Steve D Posted January 31, 2005 Share Posted January 31, 2005 Hi, I'm trying to install OSC for a friend, but I get this message: FATAL ERROR: register_globals is disabled in php.ini, please enable it! Having spoken to the web host (demon.net), I have been informed that they have disabled this in their .ini file due to security concerns. My question, therefore, is whether I can somehow bypass this file to install and run OSC, or whether it is essential to the entire program? Any help appreciated. Cheers Link to comment Share on other sites More sharing options...
peterr Posted January 31, 2005 Share Posted January 31, 2005 Hi, You can either have your own PHP.INI file, or you can set register_globals to 'on' via the .htaccess file, something like: php value register_globals 1 Peter Link to comment Share on other sites More sharing options...
Steve D Posted January 31, 2005 Author Share Posted January 31, 2005 Thanks, Peter. Can you advise where the .htaccess file is stored? Have looked in the install and OSC root, but can't find it. Cheers Link to comment Share on other sites More sharing options...
peterr Posted January 31, 2005 Share Posted January 31, 2005 Hi Steve, There should be one in the 'web root' path, that is usually called 'public_html' or a symbolic link called 'www'. If it isn't there, create a new one, with the PHP value as above , save it as .htaccess and upload to the web root path. Peter Link to comment Share on other sites More sharing options...
Steve D Posted January 31, 2005 Author Share Posted January 31, 2005 Hi Steve, There should be one in the 'web root' path, that is usually called 'public_html' or a symbolic link called 'www'. If it isn't there, create a new one, with the PHP value as above , save it as .htaccess and upload to the web root path. Peter <{POST_SNAPBACK}> Thanks. Do i just need to include that one line that you mentioned? Also, do I save it as a .php file? (.htaccess.php)? :-" Link to comment Share on other sites More sharing options...
♥Vger Posted January 31, 2005 Share Posted January 31, 2005 .htaccess files are hidden files, so just because you don't immediately see it doesn't mean it's not there. Uploading a new one may overwrite an existing .htaccess file - so you need to 'unhide' any hidden files in your root directory to see if you do have an existing .htaccess file. When you FTP to your site (this is based on using WS FTP Pro) you will see, on the right of your screen, a box named MkDir, and below that there is a blank box. Into that blank box type -la then navigate out of that folder to another and then back to it again - you should now see any hidden files, including .htaccess You only need to insert the one line Peter provided into the .htaccess file. Be aware of this however - as your hosting company has disabled register globals for security reasons - if you enable them for your site and someone uses it to gain malicious access to the shared server you are on, then your hosting company may shut down your site, or even delete it. They may shut down your site if they just find out you are over-riding their security settings by enabling register globals via .htaccess. Setting up your own local php.ini file is not an option, as any local php.ini files will get overwritten every time upgrades/patches are applied to the server. My advice is to install the Register Globals patch which will allow your osCommerce website to run with Register Globals set to Off. Vger Link to comment Share on other sites More sharing options...
Steve D Posted January 31, 2005 Author Share Posted January 31, 2005 Many thanks Vger. I don't want to get on the wrong side of the hosting company, so I'll try the patch. Cheers Link to comment Share on other sites More sharing options...
mutho Posted January 31, 2005 Share Posted January 31, 2005 Hi Steve, There should be one in the 'web root' path, that is usually called 'public_html' or a symbolic link called 'www'. If it isn't there, create a new one, with the PHP value as above , save it as .htaccess and upload to the web root path. Peter <{POST_SNAPBACK}> I've tried that and it's not working. Same error. Any other suggestion? Link to comment Share on other sites More sharing options...
mutho Posted January 31, 2005 Share Posted January 31, 2005 Where can I download Register Globals patch? Thanks. Link to comment Share on other sites More sharing options...
♥Vger Posted January 31, 2005 Share Posted January 31, 2005 Contributions - link at top of this page. Be very careful when you do the install - backup all files to be edited (so you can start over if things go wrong). There are some sections of the install where you have (this is just an example) five lines of code to be replaced, and it's easy not to notice that the original has seven lines of code. You are meant to replace only the five and leave the other two alone - but it's easy to overlook and just copy and paste the five lines in place of the original seven lines of code (thus messing things up). Vger Link to comment Share on other sites More sharing options...
mutho Posted January 31, 2005 Share Posted January 31, 2005 Thank you very much Vger. After reading the help file of Global Patch, I thought of creating a php.ini file and entered the value: register_globals = On and it's working without the patch. Thank you all. Link to comment Share on other sites More sharing options...
♥Vger Posted January 31, 2005 Share Posted January 31, 2005 That's fine, but remember what I said: 1. Hosting company may not like you doing it. 2. Any local php.ini file will get overwritten any time an update/patch is applied to the server or the web hosting control panel software. Your site will go down, and it will stay that way until you notice that it's down and reinstall your php.ini file locally again. Vger Thank you very much Vger. After reading the help file of Global Patch, I thought of creating a php.ini file and entered the value: register_globals = On and it's working without the patch. Thank you all. <{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
peterr Posted January 31, 2005 Share Posted January 31, 2005 Hi, With a hosting company some years back, we could have 'our own' php.ini file, but had to be careful, as "Vger" stated, of updates. In fact, the first time I used my own, I only needed to change a few values, and so only had a very small php.ini file. I quickly found out that was the wrong way to do it. I needed to copy the php.ini that was used by the server, to my website, and then modify the lines I needed to change, so it may be the same there, you 'may' need a _complete_ PHP.INI file, in fact, I'd be 99% certain you would. Peter Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.