Current time: 05-20-2024, 03:27 PM Hello There, Guest! (LoginRegister)


Post Reply 
Users: How to edit/access php.ini via FTP
Author Message
edeis Offline
Junior Member
*

Posts: 34
Joined: May 2010
Reputation: 0
Post: #3
RE: Users: How to edit/access php.ini via FTP
How would a user change a php_flag or php_value in ispCP?

Normally, it would be done in .htaccess as:
php_flag register_globals Off

Since we are using fcgi for php, the changes have to be made in the php.ini, which is here:
/var/www/fcgi/domainname/php5/php.ini

It is not possible for the user to edit this file.

I have read that the way to do this is for the user to create their own php.ini file, and set the following in their .htaccess:
SetEnv PHPRC /location/todir/containing/phpinifile

I haven't been able to get this to work. I suspect that the httpd.conf is not allowing the proper override.

I have tried doing so here, with no success:
Code:
<Directory /var/www/virtual/domainname/htdocs>
            AllowOverride All
            FCGIWrapper /var/www/fcgi/domainname/php5-fcgi-starter .php
            Options +ExecCGI
        </Directory>

How can I enable the override?
Here's an idea. Can we set the shell script to check for a custom php.ini file?

/var/www/fcgi/artipedia.org/php5-fcgi-starter
Code:
customphp="/var/www/virtual/domain/php.ini"
if [ -f  $customphp ]
then
   PHPRC="/var/www/virtual/domain/"
else
PHPRC="/var/www/fcgi/domain/php5/"
fi

This works, except apache has to be restarted after the user uploads the php.ini file. Is there a way to make this happen dynamically, without having to restart apache?
(This post was last modified: 06-16-2010 11:47 AM by edeis.)
06-16-2010 11:23 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Users: How to edit/access php.ini via FTP - edeis - 06-16-2010 11:23 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)