PHP.ini

From KOP KB
Revision as of 17:22, 10 September 2014 by ReMaster (talk | contribs) (Created page with "== Summary == php.ini or user.ini(since php 5.3) 1) In a SSH Program (ie. Putty): Enter the following commands to copy the system’s default php.ini into your home directory...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Summary

php.ini or user.ini(since php 5.3)

1) In a SSH Program (ie. Putty): Enter the following commands to copy the system’s default php.ini into your home directory:

cp /etc/php.ini ~/

2) In notepad: Create a cgi wrapper named php.cgi

#!/bin/sh 
exec /var/www/cgi-bin/php -c ~/php.ini

3) Using FTP upload the php.cgi to your cgi-bin directory. 4) In a SSH Program (ie. Putty): enter the following to change directory to cgi-bin: cd cgi-bin 5) In a SSH Program (ie. Putty): Enter the following command to set the executable bit on your wrapper:

chmod +x php.cgi

6) In Notepad: Create an .htaccess file containing the following lines:

AddHandler application/my-php 
.php Action application/my-php /cgi-bin/php.cgi

7) Using FTP upload the .htaccess file to the directory in which you want to use the settings 8) Change any settings you need in the php.ini file in your home directory and use phpinfo to ensure that they’re set