Configuration à la PHP: Difference between revisions

From wiki
Jump to navigation Jump to search
imported>Johayek
(Created page with "== php.ini for web applications == * $HOME/public_html/cgi-bin/php.ini mysql.default_port=____ mysql.default_socket=$HOME/mysql/mysql.sock mysqli.default_port=____ mysql...")
 
imported>Johayek
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== php.ini for web applications ==
== php.ini for web applications ==


* $HOME/public_html/cgi-bin/php.ini
* $HOME/public_html/cgi-bin/php.ini – my web-space provider created this file for me (of course with reasonable port numbers, and $HOME was also properly expanded):


  mysql.default_port=____
  mysql.default_port=____
Line 8: Line 8:
  mysqli.default_socket=$HOME/mysql/mysql.sock
  mysqli.default_socket=$HOME/mysql/mysql.sock


I have no idea, how that …/php.ini gets found.
The path is probably hard-wired into the PHP interpreter.


== php.ini for command line applications ==
== php.ini for command line applications ==
Line 19: Line 19:


  $ php -c $HOME/public_html/cgi-bin/php.ini dumpBackup.php --full \
  $ php -c $HOME/public_html/cgi-bin/php.ini dumpBackup.php --full \
     --output=gzip:$HOME/www/tmp/dump.$(date +'%Y%m%d%H%M%S').xml.gz
     --output=gzip:$HOME/www/tmp/MediaWikiDump.$(date +'%Y%m%d%H%M%S').xml.gz
 
 
[[Category:ToBeExported]]

Latest revision as of 03:56, 29 January 2015

php.ini for web applications[edit]

  • $HOME/public_html/cgi-bin/php.ini – my web-space provider created this file for me (of course with reasonable port numbers, and $HOME was also properly expanded):
mysql.default_port=____
mysql.default_socket=$HOME/mysql/mysql.sock
mysqli.default_port=____
mysqli.default_socket=$HOME/mysql/mysql.sock

The path is probably hard-wired into the PHP interpreter.

php.ini for command line applications[edit]

If you call php on a command line, you can tell it, which php.ini to use throught option -c:

$ php -c $HOME/public_html/cgi-bin/php.ini …

This way you can tell the usual MediaWiki PHP utilitiies their system settings:

$ php -c $HOME/public_html/cgi-bin/php.ini dumpBackup.php --full \
    --output=gzip:$HOME/www/tmp/MediaWikiDump.$(date +'%Y%m%d%H%M%S').xml.gz