ispCP - Board - Support
Change register_globals? - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: General discussion (/forum-11.html)
+--- Thread: Change register_globals? (/thread-665.html)

Pages: 1 2


Change register_globals? - Eminos - 05-24-2007 09:34 PM

Hi there,

I need to set register_globals to ON for some scripts. On Debian Sarge (my old server) I could just put an .htaccess file with php_flag register_globals On in that directory where I had that script. But this doesn't work anymore (is it any difference now because I run php5 with fcgi?)

I tried adding the line register_globals On in both the domain specific php.ini and the "global" in etc/php5/cgi/php.ini. No change. Stil shows up as "Off".

Of course I restarted apache2 between changes Smile

/E


RE: Change register_globals? - SunDanCe - 05-24-2007 09:38 PM

Eminos Wrote:Hi there,

I need to set register_globals to ON for some scripts. On Debian Sarge (my old server) I could just put an .htaccess file with php_flag register_globals On in that directory where I had that script. But this doesn't work anymore (is it any difference now because I run php5 with fcgi?)

I tried adding the line register_globals On in both the domain specific php.ini and the "global" in etc/php5/cgi/php.ini. No change. Stil shows up as "Off".

Of course I restarted apache2 between changes Smile

/E

take a look in /var/www/fcgi/domain.tld/php5/php.ini
in that file you can change php values only for that domain, if you want to do it for everyone (i do not recommed it) just edit /var/www/fcgi/master/...


Best Regards


RE: Change register_globals? - Eminos - 05-24-2007 09:42 PM

As I said, I've already tried that.
But in that domain specific php.ini there IS NO register_globals string, so I added it, but still no luck.

/E


RE: Change register_globals? - BeNe - 05-24-2007 09:57 PM

Yeah, i also started to test override the php setting with a .htaccess and i always get an Internal Error 500 !

I tested this one:

Code:
#
# Set
#
<Directory "/var/www/virtual/mydomain.com/htdocs">
AllowOverride FileInfo
#
# to enable parsing off this file
#
php_value memory_limit 32M
php_value max_execution_time 60
php_flag register_globals Off
php_flag magic_quotes_gpc Off
php_flag magic_quotes_runtime Off
# settings for the file upload, you might increase them further
php_value upload_max_filesize 16M
# session handling: now the check for expired sessions is done on every 10th session creation
php_flag session.use_trans_sid Off
php_value session.gc_probability 1
php_value session.gc_divisor 10
# multibyte extension: needed for utf-8
php_value mbstring.func_overload 7
</Directory>



RE: Change register_globals? - Eminos - 05-24-2007 10:04 PM

I get error 500 with that in the htaccess file.

Error log:
/var/www/virtual/domain.net/htdocs/whmcs/.htaccess: <Directory not allowed here

Actually I don't get the 500 error when just having the php_flag register_globals On in the htaccess, It's just that it doesn't "adapt", my script still shows as register_globals Off.

/E


RE: Change register_globals? - Eminos - 05-24-2007 10:11 PM

Ok, I found part of the problem.

It was the php4 php.ini I had to edit !! .. Even tho I use php5 (hack from FAQ section).

But still. I want to use htacess file in just that directory, instead of the domain specific php.ini.

/E


RE: Change register_globals? - joximu - 05-25-2007 04:18 AM

php settings in .htaccess file or direct in the apache conf (see post from BeNe) don't work with phpfcgi.
Since php is fully separated from the rest of apache.

The only thing you can do is creating different fastcgi prozesses (starters) and put the thin in the respective php.ini...


RE: Change register_globals? - Eminos - 05-25-2007 04:24 AM

Oh, ok, then I know, thanks Smile

So .. what is the advantage of running php via fcgi ? Is it JUST that we can choose betwen php4 and php5, or is it something else ?

/E


RE: Change register_globals? - joximu - 05-25-2007 04:42 AM

It's the fact that the php scripts will run with the ownership and permissions of the vuXXXX user (with mod_php all php were running as apache user and when uploading files with ftp and then changing theese files with php you always have problems (or you chmod to 777 which is not good either).
So, it's security. You even could disable openbase_dir - the user vu2001 cannot see the php files from vu2002 and therefore it should be possible to protect the config files better...

This is a big thing for ISP with moe than a cuple of foreign customers...

It's maybe easier with mod_php - and if it's only you on the machine and maybe you friends then there is no reason why not to go back to mod-php.

And, there is another thing: Since mod-php cannot be used in the mpm-worker of apache you loose some performing advantages of threads which were available since apache2 but not usable because of mod-php...

hope that's it...


RE: Change register_globals? - Eminos - 05-25-2007 04:46 AM

You're the man joximu !

Maybe you wanna develop the mpm-worker thing? I know there is mpm-worker and threaded, but what is it actually ?

/E - *like to learn* ^^