Latest News: (loading..)

Archived

This topic is now archived and is closed to further replies.

canesoverhere.com

"Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file..."

19 posts in this topic

OK, I'm not a total rookie at this (I've run a phpbb forum for over 2 years), but I'm a noob at oscommerce. Anyone else get this "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory" error after installing oscommerce? Any insight would be appreciated. TIA.

Share this post


Link to post
Share on other sites

If You are using a fresh osc go for RC1 online merchant oscommerce release.It has the fix.

 

else

I just downloaded oscommerce, copied catalog over to my Apache server and ran into the same problem.

 

 

1. Modify php.ini to turn global_registers = on

2. Add .htaccess files to htddocs, catalog, admin and install folders with the line php_value register_globals 1

3. Add php.ini with global_registers=on to htddocs, catalog, admin and install folders.

 

else apply register globals patch by VGER.

 

Satish

Share this post


Link to post
Share on other sites
If You are using a fresh osc go for RC1 online merchant oscommerce release.It has the fix.

 

else

I just downloaded oscommerce, copied catalog over to my Apache server and ran into the same problem.

1. Modify php.ini to turn global_registers = on

2. Add .htaccess files to htddocs, catalog, admin and install folders with the line php_value register_globals 1

3. Add php.ini with global_registers=on to htddocs, catalog, admin and install folders.

 

else apply register globals patch by VGER.

 

Satish

 

 

Hi there.

I also have the same problem. I have performed an automatic installation using the "Fantastico" automated installer which is part of my hosting package. The system fails to start with the same error as above. I then went to edit the files as suggested but came to a stop when I could not find the "catalog" directory? The other directories mentioned above do exist, but they hang off the subdirectory I created during the installation process called "osc", and it does not contain the file php.ini.

 

Anyone got any suggestions please?

Share this post


Link to post
Share on other sites
Anyone got any suggestions please?

 

Yep! Do as Satish suggests, ignore the Fantastico install, as it is out of date and download RC1 from the solutions tab top of this page.

 

The "catalog" directory is the one you have named "osc". It is just a containing folder.

Share this post


Link to post
Share on other sites
Yep! Do as Satish suggests, ignore the Fantastico install, as it is out of date and download RC1 from the solutions tab top of this page.

 

The "catalog" directory is the one you have named "osc". It is just a containing folder.

 

 

Thanks SPAX for the quick response.

 

Downloaded and did as suggested, but I came to a stop at the following installation question:

"The address of the database server in the form of a hostname or IP address.".

 

I can't find the actual location of the database?

 

How do I find this out please? Do I use phpMyAdmin and where in it does it tell me the address of the DB?

 

Thanks again.

Share this post


Link to post
Share on other sites

Generally that is local Host.

Else chek in Your data base connection parameter.

If unable then ask Your hosting company to assist in getting those parameters.

 

Satish

Share this post


Link to post
Share on other sites
Generally that is local Host.

Else chek in Your data base connection parameter.

If unable then ask Your hosting company to assist in getting those parameters.

 

Satish

 

I agree, but what is "localhost" in my case?

 

In phpMyadmin it displays:

Server: localhost Database: xxxxx_oscommerce

 

SO:

The "Database Server" is: localhost

The "Database Name" is: xxxxx_oscommerce

but I get an error saying: Access denied for user or Unknown MySQL server host.

 

I assume localhost should be an address but what is it? Is localhost my domain name or what? Unfortunately it's the weekend and my hosting company support office is closed.

 

Once again, any clues. Regards.

Share this post


Link to post
Share on other sites

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '****');

define('DB_SERVER_PASSWORD', '*******');

define('DB_DATABASE', 'XXXXXX');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql');

 

 

here DB_SERVER' == 'localhost which the server where the data base exist.

 

Username and password as You are using PhpMyAdmin You should be knowing.

Same for DB_DATABASE.

 

 

user is where You need to look in.

 

 

 

Satish

Share this post


Link to post
Share on other sites

It has been a few months since this topic has been active, but since I just came across the same issue - and none of the MANY, MANY suggestions that I've come across solved the problem - I figured I would register here and post how I solved the issue in my case, which turned out to be a very quick and simple fix.

 

First let me explain something. I had originally uploaded the current version (as of the date of this post - v2.2 RC 2a) and only had to deal with issue "A" listed below. Issue "B" was non-existent. But since the end user wanted a jewelry store template downloaded from a third-party provider, it apparently was an older version.

 

So anyway...

 

Note: GoDaddy as the host. PHP 5, MySQL 5, Apache2 HTTP, Linux (Red Hat I think, don't remember what they use)

 

----------

 

Issue "A": Changes in "php.ini" appear not to affect anything, regardless of the changes made.

 

Issue "B": osCommerce giving error: "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file..."

 

----------

 

MY SOLUTION WHICH FIXED BOTH ISSUES:

 

(Note 1: Be sure to change/add the line mentioned above, "global_registers = on", in the file, in my case it is on line 1, but I don't think it matters what line it is on).

 

(Note 2: Use a standard ASCII/Text editor to edit the .INI file, -NOT- a Rich Text editor like MS Word, WordPad, et cetera).

 

* First, since I have PHP 5 as the version, changes in the "php.ini" didn't matter, it needs to be renamed, or for safety sake, copied, to "php5.ini" (GoDaddy should have known this and done it automatically, I think I'll write them next)...

 

* Second, I had to upload the file via FTP in ASCII mode (not Auto or BINARY)...

 

----------

 

That solved it for me... I hope it helps someone else and saves all the time of (in my case, pointless) researching...

 

-WW

Share this post


Link to post
Share on other sites

 

You're right, I didn't see that post... Thanks for pointing it out... I searched this forum to death too - I never used any keywords that brought up that article though... I never thought of searching for GoDaddy or register_globals specifically...

 

I was searching for the error string...

 

But that still leaves the other issue, the FTP software I was using (FileZilla via Ubuntu Gutsy Desktop [Linux]) does not have ".ini" in the Settings list to upload as ASCII by default using the Auto detect mode, therefore it was uploading the ".ini" filetype as BINARY...

 

I guess you can call that a software flaw, but in any case, I made the post as informative and simple as possible with 2 solutions in one which, perhaps, may help someone else who is only searching the error string...

 

I apologize for sounding rude about "finding nothing", it wasn't written with anger towards anyone. It was just a verbal expression of my frustration meant to show others in the same situation that they were not alone in their own frustration over the lack of easy to find solutions for that specific error string...

 

Thanks again for replying, BryceJr...

 

-WW

Share this post


Link to post
Share on other sites
It has been a few months since this topic has been active, but since I just came across the same issue - and none of the MANY, MANY suggestions that I've come across solved the problem - I figured I would register here and post how I solved the issue in my case, which turned out to be a very quick and simple fix.

 

First let me explain something. I had originally uploaded the current version (as of the date of this post - v2.2 RC 2a) and only had to deal with issue "A" listed below. Issue "B" was non-existent. But since the end user wanted a jewelry store template downloaded from a third-party provider, it apparently was an older version.

 

So anyway...

 

Note: GoDaddy as the host. PHP 5, MySQL 5, Apache2 HTTP, Linux (Red Hat I think, don't remember what they use)

 

----------

 

Issue "A": Changes in "php.ini" appear not to affect anything, regardless of the changes made.

 

Issue "B": osCommerce giving error: "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file..."

 

----------

 

MY SOLUTION WHICH FIXED BOTH ISSUES:

 

(Note 1: Be sure to change/add the line mentioned above, "global_registers = on", in the file, in my case it is on line 1, but I don't think it matters what line it is on).

 

(Note 2: Use a standard ASCII/Text editor to edit the .INI file, -NOT- a Rich Text editor like MS Word, WordPad, et cetera).

 

* First, since I have PHP 5 as the version, changes in the "php.ini" didn't matter, it needs to be renamed, or for safety sake, copied, to "php5.ini" (GoDaddy should have known this and done it automatically, I think I'll write them next)...

 

* Second, I had to upload the file via FTP in ASCII mode (not Auto or BINARY)...

 

----------

 

That solved it for me... I hope it helps someone else and saves all the time of (in my case, pointless) researching...

 

-WW

At least you came back and posted a solution that worked for you and obviously for others. Some people post "I found it", "Mine works now", "I got it working", etc but never post any details for others to follow.

 

Good Post NJBilly, well thought out. This will help a lot of people. :thumbsup:

Share this post


Link to post
Share on other sites

It doesnt work for me, i get the "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory." - error too.

 

Im running 3 oscommerce based sites at an external host (Abusiness.dk) and two of the three (hardstrike.dk and akstyling.dk) works perfectly whereas computerbits.dk is the one producing the error.

 

The problem just came on by itself, i havent been accessing the site to edit or replace files in a long time and yet the error came along over night. :-(

 

 

I dont have access to the php.ini file, but i ran a php page that shows me the info of the server, in all three cases it shows "register_globals Off".

 

Above in the solution guides it states that this shd be set to "ON", hoever ive got 2 fully working oscommerce sites running with this setting at "Off", so obviously that aint the problem and shdnt have to be part of the solution either. :-S

 

I checked my htaccess files, that means as many as i could find and apart from those with paths theyre identical to the ones at akstyling which is a wirking site.

 

It sure beats me, now what? Anyone have suggestion for me (apart from doing a reinstall of oscommerce ofcourse LOL). :-)

Share this post


Link to post
Share on other sites

It doesnt work for me, i get the "Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory." - error too.

 

Im running 3 oscommerce based sites at an external host (Abusiness.dk) and two of the three (hardstrike.dk and akstyling.dk) works perfectly whereas computerbits.dk is the one producing the error.

 

The problem just came on by itself, i havent been accessing the site to edit or replace files in a long time and yet the error came along over night. :-(

 

 

I dont have access to the php.ini file, but i ran a php page that shows me the info of the server, in all three cases it shows "register_globals Off".

 

Above in the solution guides it states that this shd be set to "ON", hoever ive got 2 fully working oscommerce sites running with this setting at "Off", so obviously that aint the problem and shdnt have to be part of the solution either. :-S

 

I checked my htaccess files, that means as many as i could find and apart from those with paths theyre identical to the ones at akstyling which is a wirking site.

 

It sure beats me, now what? Anyone have suggestion for me (apart from doing a reinstall of oscommerce ofcourse LOL). :-)

 

Hey, I send a PM message but if anyone else want to reply this topic I;m interested too. My e-mail adress is bboydflo at gmail dot com

Share this post


Link to post
Share on other sites

I had to put my already existing Onlineshop to another server. I could install everything, import the old data but in the end it is written all the time: Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

 

I tried everything, especially I made a .htaccess file and also a php.ini file to turn globals_registers on but nothing worked. What can I do?

Share this post


Link to post
Share on other sites

I know this thread is really old but I am hoping someone is monitoring it and will see my thread.

 

I am having the same proble as above Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.

 

I get that I need to find php.ini or htaccess file but I do not have either one of these files, and I have been looking for an hour, so I dont know what to do now.

 

If anyone could help it would be appreciated.

Share this post


Link to post
Share on other sites

Not all sites have them. You can create either, add the text mentioned and upload to the root of your shop. You may want to ask your host first since not all will allow changing the setting that way. They should be able to advise you in that case.

Share this post


Link to post
Share on other sites

Sandra, are you just starting out with your store? If you are, why are you using such an ancient version of osC? You should be using version 2.3.3. If you purchased a new store package or a template, you got taken. If you're choosing to use osC 2.2 because there are add-ons for 2.2 that aren't yet available for 2.3, at least use 2.2 RC2a (the last release in that line).

 

On the other hand, if your store is old and your host just upgraded to a recent vintage PHP, you can either consider upgrading to 2.3.3, try to fix the code so it doesn't require register global variables, or try to configure PHP to turn them on. Note that upcoming PHP versions (perhaps as early as 5.4) won't even allow you to use register global variables any more, and some hosts have already banned them. Therefore, the third option would be only a stopgap measure, at best. If your code still uses register global variables, there are probably a whole lot of other problems that will show up when your host goes to PHP 5.3 (which is now the mainstream release).

 

.htaccess files are found only on servers with the Apache server (almost all Linux server hosts and some Windows server hosts). The root (/) directory will always have one, and any other directory may have one. Your hosting file manager may hide files starting with a period (.) and you need to throw a switch to see them. Most sites don't have a php.ini file by default, so you would have to create one if it doesn't exist (if your host uses one and allows you to create one). If your PHP uses a php.ini file, that would be the proper place to put the register global variables switch. Many servers will throw an error if you put it in the .htaccess file. You should ask your host tech support what the proper methodology is to change PHP settings.

Share this post


Link to post
Share on other sites