VMware Images:
|
How To Set Up Apache2 With mod_fcgid And PHP5 On Fedora 14 - Page 2
4 TestingNow we create a small PHP test file, for example in the www.example1.com web site... vi /var/www/web1/web/info.php
... and call that file in a browser (http://www.example1.com/info.php). If all goes well, the output should look similar to this, and you should see CGI/FastCGI in the Server API line:
5 Custom php.ini for Each Web SiteBecause each web site has its own php-fcgi-starter wrapper script, it is possible to define different php.ini files for different web sites. To demonstrate this, I will copy the default php.ini (/etc/php.ini) to the /var/www/web2/ directory and make www.example2.com use the php.ini from the /var/www/web2/ directory: cp /etc/php.ini /var/www/web2/ (You can now modify /var/www/web2/php.ini to your likings.) Then we open /var/www/php-fcgi-scripts/web2/php-fcgi-starter... vi /var/www/php-fcgi-scripts/web2/php-fcgi-starter ... and put /var/www/web2/ in the PHPRC line:
Reload Apache afterwards: /etc/init.d/httpd reload Create a new phpinfo(); file for www.example2.com... vi /var/www/web2/web/info.php
... and call it in a browser (http://www.example2.com/info.php). The Loaded Configuration File line should now show /var/www/web2/php.ini:
6 Changing Single PHP Configuration SettingsInstead of passing a whole new php.ini file to your web site, you can as well change single PHP configuration settings in the php-fcgi-starter wrapper script (or use a combination of both) by adding the -d switch to the PHP executable. For example, if I want to disable magic_quotes_gpc for the web site www.example2.com, I'd do it as follows: vi /var/www/php-fcgi-scripts/web2/php-fcgi-starter
Reload Apache afterwards: /etc/init.d/httpd reload Then call the info.php script again in a browser (http://www.example2.com/info.php) and search for the magic_quotes_gpc line - it should show Off now:
7 Links
|






Recent comments
9 hours 25 min ago
14 hours 24 min ago
15 hours 50 min ago
16 hours 43 min ago
18 hours 26 min ago
22 hours 50 min ago
23 hours 42 min ago
1 day 1 hour ago
1 day 15 hours ago
1 day 16 hours ago