Page 1 of 1

Installation problem - Register Globals

Posted: Tue Sep 11, 2007 3:12 pm
by murphy
Hello,

I cannot install the latest 0.7.6 that I downloaded yesterday.
The install script says that Register_globals is ON ( enabled ) but according to my PHP info file it is set to OFF ( which I have double checked ).

What is wrong? Why does it say it is enabled when it is Off?

Please help!

Kind Regards,
Daniel

Re: Installation problem - Register Globals

Posted: Tue Sep 11, 2007 4:08 pm
by Daniel
Did you restart your server after you switched it off?

Re: Installation problem - Register Globals

Posted: Tue Sep 11, 2007 5:21 pm
by murphy
It is a shared server account, I cannot restart it but the PHP info file says it is off, so does the support.
What can be wrong?

Re: Installation problem - Register Globals

Posted: Thu Sep 13, 2007 10:13 am
by xaicks
hello!

i have some problems with my installation, i create the php.ini, change the .htacess. and when i go to the installation it appears Register Globals: Off Off Error , and i can´t continue the installation. Warning: OpenCart will not work with register_globals enabled!


thanks

Re: Installation problem - Register Globals

Posted: Thu Sep 13, 2007 4:20 pm
by Daniel
Your the second one with this problem.

Can you msg me FTP details for your server so I can do some testing?

Re: Installation problem - Register Globals

Posted: Thu Sep 13, 2007 11:15 pm
by xaicks
What you mean about ftp details ???

thanks

Re: Installation problem - Register Globals

Posted: Thu Sep 13, 2007 11:29 pm
by luvz2drv
Daniel wants to see the code. on your site and a url to the site to see why

ftp -- the method you used to transfer the files from your local machine to your server

ftp host name :
ftp username :
ftp password :

please send to Daniel in a pm

Re: Installation problem - Register Globals

Posted: Fri Sep 14, 2007 2:32 am
by Daniel
I found out the problem!

You are using PHP4 when you need to be using 5.

This script will not install on anything below 4. I'm not 100% sure why the ini_get is cauing an error for globals, but until you start using PHP5 you can not install the script anyway.

Re: Installation problem - Register Globals

Posted: Mon Sep 17, 2007 4:19 pm
by murphy
No, I am using PHP 5.2.3. On the installation page all is in green except the Register globals.

Re: Installation problem - Register Globals

Posted: Wed Sep 19, 2007 4:05 am
by azzzy
Daniel, consider replacing

Code: Select all

if (ini_get('register_globals')){
   ...
}
with

Code: Select all

if(ini_get('register_globals') == 1){
   ...
}
ini_get('register_globals') can return boolean, or an empty string on error. I guess if register_globals is missing in the php.ini it returns empty string, which is casted to boolean true in the first code snippet, without considering that the register_globals default value in PHP5 is false. In the second the number 1 is casted to boolean true if ini_get returns boolean, and to the string '1' if ini_get returns empty string, so it should work in both cases.

EDIT
I just remembered, that it can also return the string value 'On'/'Off', with possible variations 'on'/'off'.
So probably the best is using

Code: Select all

if((strtolower(ini_get('register_globals')) == 'on') || (ini_get('register_globals') == 1))
,a bit ugly, but at least it should work :(

Re: Installation problem - Register Globals

Posted: Wed Sep 19, 2007 12:32 pm
by henrycha
http://henrymercado.com/prueba/register_global.gif[/img]

I would like if you can help me where i can change the code that you say,  in the index of Install? (install/index.php) or in the main index.php? can you give more details?.

when i use .htaccess the code " php_value register_globals 0 " or "php_flag register_globals off" gives me "error 500" , i put the ".htaccess" in the  "/public_html/comercio/" where is opencart.

i hope an answer and solution ???

Re: Installation problem - Register Globals

Posted: Wed Sep 19, 2007 3:20 pm
by azzzy
Can you check width phpinfo() what is the values of register_globals?
The code I am speaking about is on line 23 in install/index.php. Probably you don't have alllow override set to all in your php ini, and this gives the 500 server error.

Re: Installation problem - Register Globals

Posted: Wed Sep 19, 2007 3:42 pm
by luvz2drv
some servers need it to be a php.ini file did you try that?

or you can also try to contact your server prodiver they may be able to help as well

Re: Installation problem - Register Globals

Posted: Mon Apr 21, 2008 2:13 pm
by txkhomes
How about someone giving an actual example of a php.ini file

Re: Installation problem - Register Globals

Posted: Mon Apr 21, 2008 8:12 pm
by Luvz2drv
well there is

google.com

or php.net

google is your friend

Re: Installation problem - Register Globals

Posted: Thu May 08, 2008 5:05 am
by pdbs
php.ini

Code:
php_flag register_globals Off

Re: Installation problem - Register Globals

Posted: Wed May 21, 2008 4:46 am
by allenofthetower
Luvz2drv wrote: well there is

google.com

or php.net

google is your friend
what a pr*ck

Re: Installation problem - Register Globals

Posted: Wed May 21, 2008 4:49 am
by allenofthetower
pdbs wrote: php.ini

Code:
php_flag register_globals Off
THANK YOU VERY MUCH!

Re: Installation problem - Register Globals

Posted: Wed May 21, 2008 11:17 am
by Luvz2drv
nice....  well as that is a server side issue / setup  not specific to opencart or any php script...  google is a good place to start...

allenofthetower wrote:
Luvz2drv wrote: well there is

google.com

or php.net

google is your friend
what a pr*ck