Post by murphy » Tue Sep 11, 2007 3:12 pm

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

Newbie

Posts

Joined
Wed Jul 04, 2007 10:09 pm

Post by Daniel » Tue Sep 11, 2007 4:08 pm

Did you restart your server after you switched it off?

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by murphy » Tue Sep 11, 2007 5:21 pm

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?

Newbie

Posts

Joined
Wed Jul 04, 2007 10:09 pm

Post by xaicks » Thu Sep 13, 2007 10:13 am

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

Newbie

Posts

Joined
Thu Sep 13, 2007 9:32 am

Post by Daniel » Thu Sep 13, 2007 4:20 pm

Your the second one with this problem.

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

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by xaicks » Thu Sep 13, 2007 11:15 pm

What you mean about ftp details ???

thanks

Newbie

Posts

Joined
Thu Sep 13, 2007 9:32 am

Post by luvz2drv » Thu Sep 13, 2007 11:29 pm

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

luvz2drv


Post by Daniel » Fri Sep 14, 2007 2:32 am

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.

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by murphy » Mon Sep 17, 2007 4:19 pm

No, I am using PHP 5.2.3. On the installation page all is in green except the Register globals.

Newbie

Posts

Joined
Wed Jul 04, 2007 10:09 pm

Post by azzzy » Wed Sep 19, 2007 4:05 am

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 :(
Last edited by azzzy on Wed Sep 19, 2007 4:19 am, edited 1 time in total.

Newbie

Posts

Joined
Wed Sep 12, 2007 6:55 pm

Post by henrycha » Wed Sep 19, 2007 12:32 pm

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 ???

Newbie

Posts

Joined
Wed Sep 19, 2007 12:03 pm

Post by azzzy » Wed Sep 19, 2007 3:20 pm

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.

Newbie

Posts

Joined
Wed Sep 12, 2007 6:55 pm

Post by luvz2drv » Wed Sep 19, 2007 3:42 pm

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

luvz2drv


Post by txkhomes » Mon Apr 21, 2008 2:13 pm

How about someone giving an actual example of a php.ini file

Newbie

Posts

Joined
Wed Apr 02, 2008 4:12 pm

Post by Luvz2drv » Mon Apr 21, 2008 8:12 pm

well there is

google.com

or php.net

google is your friend

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by pdbs » Thu May 08, 2008 5:05 am

php.ini

Code:
php_flag register_globals Off

New member

Posts

Joined
Thu May 08, 2008 2:56 am

Post by allenofthetower » Wed May 21, 2008 4:46 am

Luvz2drv wrote: well there is

google.com

or php.net

google is your friend
what a pr*ck
Last edited by hm2k on Wed May 21, 2008 4:47 pm, edited 1 time in total.

New member

Posts

Joined
Thu Apr 10, 2008 8:48 am

Post by allenofthetower » Wed May 21, 2008 4:49 am

pdbs wrote: php.ini

Code:
php_flag register_globals Off
THANK YOU VERY MUCH!

New member

Posts

Joined
Thu Apr 10, 2008 8:48 am

Post by Luvz2drv » Wed May 21, 2008 11:17 am

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
Last edited by hm2k on Wed May 21, 2008 4:47 pm, edited 1 time in total.

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am
Who is online

Users browsing this forum: No registered users and 1 guest