Post by ristretto6 » Sat May 24, 2008 6:19 am

Hi, there.  I'm pretty new to PHP and MySQL, but the first thing I'm met with when trying to install Open Cart is it's telling me that my Register Globals are on when they should be off.  I've tried researching this but don't understand how or where to change this in my PHP settings.  Can someone please let me know where I can turn this off?

Thanks!!

New member

Posts

Joined
Sat May 24, 2008 6:18 am

Post by Luvz2drv » Sat May 24, 2008 8:49 am

You should try searching the forums before posting. I looked for register_globals and quickly found the following.
http://forum.opencart.com/index.php/top ... tml#msg519 It might not work, but some of the discussion could help you too.

Global Moderator

Posts

Joined
Fri Mar 21, 2008 10:58 am

Post by ristretto6 » Tue May 27, 2008 10:28 am

I asked my web host and got a really great answer:

***

In order to turn off register_globals, you should create and use files named php.ini. A php.ini file should contain the following lines:

register_globals = off
post_max_size = 20M
memory_limit = 80M
upload_max_filesize = 20M
max_execution_time = 120
expose_php = off
session.save_path = /tmp
mysqli.default_socket = /tmp/mysql5.sock


The first line turns off the "register_globals" setting, and the rest of the lines are needed for compatibility reasons.

Note that php.ini files do not work recursively, and you need to add the file in each directory where you want the PHP behavior changed.

***

I tried this and now my register globals are turned off and it lets me proceed to the next step.
Hope this helps anyone else having this problem!

New member

Posts

Joined
Sat May 24, 2008 6:18 am

Post by david.gilbert » Sun Jun 01, 2008 11:55 am

a better way without having to have a php.ini in every directory is to add the following into the very first line of your .htaccess

Code: Select all

php_flag register_globals Off
-Dave

Professional Website Services - http://www.davidmgilbert.com/


Active Member

Posts

Joined
Sun Jan 06, 2008 5:02 pm
Location - Mount Compass, South Australia
Who is online

Users browsing this forum: No registered users and 2 guests