Skip to content

docs: improve troubleshooting.rst #6911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions user_guide_src/source/general/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Logging Information
:local:
:depth: 2

You can log information to the local log files by using the ``log_message()`` method. You must supply
Log Levels
==========

You can log information to the local log files by using the :php:func:`log_message()` method. You must supply
the "level" of the error in the first parameter, indicating what type of message it is (debug, error, etc).
The second parameter is the message itself:

Expand All @@ -32,6 +35,8 @@ The logging system does not provide ways to alert sysadmins or webmasters about
the information. For many of the more critical event levels, the logging happens automatically by the
Error Handler, described above.

.. _logging-configuration:

Configuration
=============

Expand Down Expand Up @@ -125,4 +130,4 @@ the **app/Config/Autoload.php** configuration file, or through another autoloade
like Composer. Next, you should modify **app/Config/Services.php** to point the ``logger``
alias to your new class name.

Now, any call that is done through the ``log_message()`` function will use your library instead.
Now, any call that is done through the :php:func:`log_message()` function will use your library instead.
12 changes: 6 additions & 6 deletions user_guide_src/source/installation/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ I have to include index.php in my URL
-------------------------------------

If a URL like ``/mypage/find/apple`` doesn't work, but the similar
URL ``/index.php/mypage/find/apple`` does, that sounds like your ``.htaccess`` rules
URL ``/index.php/mypage/find/apple`` does, that sounds like your **.htaccess** rules
(for Apache) are not set up properly, or the ``mod_rewrite`` extension
in Apache's ``httpd.conf`` is commented out.
in Apache's **httpd.conf** is commented out.

Only the default page loads
---------------------------
Expand All @@ -37,7 +37,7 @@ REQUEST_URI variable needed to serve search-engine friendly URLs. As a
first step, open your **app/Config/App.php** file and look for
the URI Protocol information. It will recommend that you try a couple of
alternate settings. If it still doesn't work after you've tried this
you'll need to force CodeIgniter to add a question mark to your URLs. To
you'll need to force CodeIgniter to add a question mark (``?``) to your URLs. To
do this open your **app/Config/App.php** file and change this:

.. literalinclude:: troubleshooting/001.php
Expand All @@ -59,7 +59,7 @@ The tutorial gives 404 errors everywhere :(
-------------------------------------------

You can't follow the tutorial using PHP's built-in web server.
It doesn't process the `.htaccess` file needed to route
It doesn't process the **.htaccess** file needed to route
requests properly.

The solution: use Apache to serve your site, or else the built-in
Expand Down Expand Up @@ -88,7 +88,7 @@ CodeIgniter Error Logs

CodeIgniter logs error messages, according to the settings in **app/Config/Logger.php**.

You can adjust the error threshold to see more or fewer messages.
You can adjust the error threshold to see more or fewer messages. See :ref:`Logging <logging-configuration>` for details.

The default configuration has daily log files stored in `writable/logs`.
The default configuration has daily log files stored in **writable/logs**.
It would be a good idea to check them if things aren't working the way you expect!
1 change: 1 addition & 0 deletions user_guide_src/source/installation/troubleshooting/002.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ class App extends BaseConfig
// ...

public $indexPage = 'index.php?';

// ...
}