If you use FastCGI (called FCGI too,) as a PHP Loader on a server you won’t be able to set custom php values into .htaccessfile. instead you will have to create a wrapper for the main FCGI binary which makes the php.ini loaded from it’s current working directory instead of server-wide one! to achieve that follow this instructions.
Step1
Open “.htaccess” file for the account you want to use custom php.ini file and insert following lines to the bottom of the file:
AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php5.fcgi
Step2
Then you need to copy the source php.ini file which is located in /usr/local/lib to account cgi-bin directory. be aware that you have to fix the ownership issues that happen when you use root user to copy the file.
cd /home/user/public_html/cgi-bin/ cp -a /usr/local/lib/php.ini . chown user:user php.ini
Step3
Now you have to create the wrapper script. create a file in cgi-bin directory and name it php5.fcgi and enter following content into it.
#!/bin/sh export PHP_FCGI_CHILDREN=1 export PHP_FCGI_MAX_REQUESTS=10 exec /usr/local/cpanel/cgi-sys/php5
Finally, make sure the ownership and permissions are correct.
chown user:user php5.fcgi && hmod 0755 php5.fcgi
Incoming search terms:
- Source: www7904.aboutcollegeessay.com/
- Source: www5392.aboutcollegeessay.com/high-school-nadiad
- custom php ini cpanel fast cgi
- custom php ini for fcgi
- fast-cgi php ini
- php fastcgi php ini
- php ini fcgi
- php5 fastcgi