mirror of
https://github.com/nextcloud/documentation.git
synced 2025-10-26 11:18:02 +00:00
Added two new man pages: debugging, and configfile; Added pages to TOC; Improved intro paragraph
This commit is contained in:
parent
1a54108d8f
commit
53bfb7e71c
27
developer_manual/configfile.rst
Normal file
27
developer_manual/configfile.rst
Normal file
@ -0,0 +1,27 @@
|
||||
Config file
|
||||
===========
|
||||
|
||||
Using alternative app directories
|
||||
---------------------------------
|
||||
|
||||
ownCloud can be set to use a custom app directory in /config/config.php. Customise the following code and add it to your config file:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
'apps_paths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'path' => OC::$SERVERROOT.'/apps',
|
||||
'url' => '/apps',
|
||||
'writable' => true,
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'path' => OC::$SERVERROOT.'/apps2',
|
||||
'url' => '/apps2',
|
||||
'writable' => false,
|
||||
),
|
||||
),
|
||||
|
||||
ownCloud will use the first app directory which it finds in the array with 'writable' set to true.
|
||||
53
developer_manual/debugging.rst
Normal file
53
developer_manual/debugging.rst
Normal file
@ -0,0 +1,53 @@
|
||||
Debugging
|
||||
=========
|
||||
|
||||
Debug mode
|
||||
----------
|
||||
|
||||
When debug mode is enabled ownCloud, a variety of debugging features are enabled - see debugging documentation. Add the following to the very end of /config/config.php to enable it::
|
||||
|
||||
define( "DEBUG", 1);
|
||||
|
||||
|
||||
Identifying errors
|
||||
------------------
|
||||
|
||||
ownCloud uses custom error PHP handling that prevents errors being printed to webserver log files or command line output. Instead, errors are generally stored in ownCloud's own log file, located at: **/data/owncloud.log**
|
||||
|
||||
|
||||
Debugging variables
|
||||
-------------------
|
||||
|
||||
You should use exceptions if you need to debug variable values manually, and not alternatives like trigger_error() (which may not be logged).
|
||||
|
||||
e.g.:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php throw new \Exception( "\$user = $user" ); // should be logged in ownCloud ?>
|
||||
|
||||
not:
|
||||
|
||||
.. code-block:: php
|
||||
|
||||
<?php trigger_error( "\$user = $user" ); // may not be logged anywhere ?>
|
||||
|
||||
To disable custom error handling in ownCloud (and have PHP and your webserver handle errors instead), see Debug mode.
|
||||
|
||||
|
||||
Debugging Javascript
|
||||
--------------------
|
||||
|
||||
By default all Javascript files in ownCloud are minified (compressed) into a single file without whitespace. To prevent this, see Debug mode.
|
||||
|
||||
|
||||
Debugging HTML and templates
|
||||
----------------------------
|
||||
|
||||
By default ownCloud caches HTML generated by templates. This may prevent changes to app templates, for example, from being applied on page refresh. To disable caching, see Debug mode.
|
||||
|
||||
|
||||
Using alternative app directories
|
||||
---------------------------------
|
||||
|
||||
It may be useful to have multiple app directories for testing purposes, so you can conveniently switch between different versions of applications. See the configuration file documentation for details.
|
||||
@ -1,7 +1,7 @@
|
||||
ownCloud Developers Manual
|
||||
**************************
|
||||
|
||||
Short synopsis of the manual goes here.
|
||||
This is the ownCloud documentation. More information and source code is at the `Git repository <https://github.com/owncloud/documentation>`_.
|
||||
|
||||
Contents
|
||||
========
|
||||
@ -10,6 +10,8 @@ Contents
|
||||
:maxdepth: 2
|
||||
|
||||
introduction
|
||||
debugging
|
||||
configfile
|
||||
unittests
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user