Thanks Daniel ,I tried contacting my host to see if they could help.They tell me that because I am on a shared server they couldnt modify the php ini just for me.Tried commands in htaccess but to no success.Any other way around it.(I wonder how many others are on shared servers)its a lot more expensive to go to a dedicated server or install my own.I suppose I just need to be put out of my misery.Its such a good product.
Most companies will aloow you you some way of shutting off globals.
Globals is a major security risk and has been completly removed as over PHP6.
You can try switching off globals using ini_set() or using .htaccess.
Globals is a major security risk and has been completly removed as over PHP6.
You can try switching off globals using ini_set() or using .htaccess.
OpenCart®
Project Owner & Developer.
try putting ini_set("register_globals","Off"); at the start of the index.php in the main directory and admin directory.
Last edited by Daniel on Thu Jun 28, 2007 7:37 pm, edited 1 time in total.
OpenCart®
Project Owner & Developer.
Thanks once again Daniel for your time with this.I tried the putting ini_set("register_globals","On"); in both index files and still no go.It seems its time to give up,i will try another provider,maybe they will be more flexible.Good Luck to you sir and thanks again.
I got the same problem and contacted to my host too. I was told that it was already turned off. But it was giving the error. After that I recognised that the problem was solved automatically. I guess the hosting company restarted the IIS or the server itself. You may want your host to do it if the register_globals flag seem turned off in the php.ini file. Because most of them keep it turned off. As I read from your messages they did not mentioned about its current state.
y.
Hey guys,
I'm new here and ran into the same problems of being on a shared server with Register Globals set to ON in a php.ini file I had no control of and wanted to share a fix that worked for me.
I tried making the changes in the .htaccess file but that threw a server configuration error.
Adding the ini_set("register_globals","Off"); to the index.php files in the main directory and admin directory did absolutely nothing.
I finally found a fix that worked for me and was to create a php.ini file that had one line of code and save it to the root of the store and admin directory.
everything works beautifully now
I'm new here and ran into the same problems of being on a shared server with Register Globals set to ON in a php.ini file I had no control of and wanted to share a fix that worked for me.
I tried making the changes in the .htaccess file but that threw a server configuration error.
Adding the ini_set("register_globals","Off"); to the index.php files in the main directory and admin directory did absolutely nothing.
I finally found a fix that worked for me and was to create a php.ini file that had one line of code and save it to the root of the store and admin directory.
Code: Select all
register_globals = Off
This can be indeed a problem with many shared hosting accounts. register_globals should be set to off for security reasons and is the recommended default value for PHP 5.x. We set up six OpenCart based websites with different customer accounts on MDWebHosting, and on one of their servers the register_globals kept going back to the wrong value (On) instead of Off. After several weeks we finally asked them to move account to another server box where we knew for sure that register_globals was Off all the time.
As Daniel pointed out, having register_globals=On is an open invitation to hackers, and if the webhosting company doesn't change it to Off, then it is time to find another one. IXWebHosting is a good one which we use for our own web hosting needs.
As Daniel pointed out, having register_globals=On is an open invitation to hackers, and if the webhosting company doesn't change it to Off, then it is time to find another one. IXWebHosting is a good one which we use for our own web hosting needs.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
try adding the following code to the very first line of .htaccess
Code: Select all
php_flag register_globals Off
Professional Website Services - http://www.davidmgilbert.com/
Active Member
For those who did not see this, juste create a php.ini
rwallin wrote: Hey guys,
I'm new here and ran into the same problems of being on a shared server with Register Globals set to ON in a php.ini file I had no control of and wanted to share a fix that worked for me.
I tried making the changes in the .htaccess file but that threw a server configuration error.
Adding the ini_set("register_globals","Off"); to the index.php files in the main directory and admin directory did absolutely nothing.
I finally found a fix that worked for me and was to create a php.ini file that had one line of code and save it to the root of the store and admin directory.
everything works beautifully nowCode: Select all
register_globals = Off
I am on a shared server and today something changed so a few sites I have using opencart all get the register_globals error.
Changing the .htaccess file won't work on my server but the php.ini file did work. But I couldn't just put it in the root & admin folders. I had to put it in ALL folders for it to work.
Changing the .htaccess file won't work on my server but the php.ini file did work. But I couldn't just put it in the root & admin folders. I had to put it in ALL folders for it to work.
Yes, indeed, on most shared servers, such as IXWebHosting or HostGator or MDWebHosting, PHP runs as CGI, in which case the approach with some entries in the '.htaccess' file won't work, but rather it then has to be done in a separate 'php.ini' file which is either located in your 'public_html', 'public_html/cgi-bin', or 'cgi-bin' directory depending on how the web hosting has been configured.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
For my hostgator sites it needs the php file in every folder to work.
So I put the php.ini in the root and then so I don't need to copy to each folder, I put this in the .htaccess
suPHP_ConfigPath /home/USERNAME
order allow,deny
deny from all
I just realized that when I installed the latest version of OC, I didn't have to do this, it worked without it.
So I put the php.ini in the root and then so I don't need to copy to each folder, I put this in the .htaccess
suPHP_ConfigPath /home/USERNAME
order allow,deny
deny from all
I just realized that when I installed the latest version of OC, I didn't have to do this, it worked without it.
Who is online
Users browsing this forum: No registered users and 2 guests