Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Register Globals Support


Guest

Recommended Posts

see if you can override it for your domain using the htaccess

 

php_value register_globals 0

Hi

 

I finally came right.

 

This is what I did (bearing in mind I'm still a newbie)

 

I downloaded a php.ini template from: http://cvs.php.net/viewvc.cgi/php4.fubar/php.ini-recommended

 

All the options are listed there. (you can choose what you want)

 

I then proceeded to upload this php.ini file to my www directory.

 

I then try to access my site which gave the following message:

 

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

 

This is what I wanted.

 

This means I now can install the Register_Globals patch, meaning I can set it to OFF after applying the patch.

Link to comment
Share on other sites

  • Replies 280
  • Created
  • Last Reply

Top Posters In This Topic

Hi everyone,

This is a great contrib. Special thanks to Richard Bentley (CMOTD) for this one. I don't understand why register_globals doesn't seem to be an important topic for OSC community in general ?!? :'(

Well, I just wanted to ask for advise: should I replace $HTTP_*_VARS with $_* (GET, POST, etc...) in ALL of my catalog files? Would that harm my code in anyway?

It's a simple question but I haven't come up with a clear information anywhere. I have register globals contrib running ok, on a server with PHP4.4.6 and rg deactivated.

 

Thanks!

Link to comment
Share on other sites

...should I replace $HTTP_*_VARS with $_* (GET, POST, etc...) in ALL of my catalog files? Would that harm my code in anyway?

Why would you want to do this? $_* is the preferred way of referencing the global arrays but there's nothing actually wrong with with using the (old) $HTTP_* syntax.

 

I could be wrong, but I think $HTTP_* will be deprecated and eventually removed from PHP, but if you don't have a problem then I would leave it alone; there is no advantage in changing it and the scope for messing something up is quite high.

Link to comment
Share on other sites

The patch doesn't work for me.

I still have the message: FATAL ERROR: register_globals is disabled in php.ini, please enable it!

I have uploaded too a php.ini in my www directory with register globals on, and modified my htaccess with register globals 0

please help me !!

thanks

Link to comment
Share on other sites

The patch doesn't work for me.

I still have the message: FATAL ERROR: register_globals is disabled in php.ini, please enable it!

I have uploaded too a php.ini in my www directory with register globals on, and modified my htaccess with register globals 0

please help me !!

thanks

At the risk of sounding flippant, if the RG patch doesn't work, it is probably because you've not installed it correctly. The patch DOES work - honest! Did you read ALL the installation instructions? Despite the notice at the top of the instructions saying "READ ALL OF THIS...", it is AMAZING how many people don't bother and then come unstuck and wonder why.

 

Also, register globals has NOTHING to do with the Apache web server or any .htaccess files that you may have. Register Globals is a PHP issue; Apache knows nothing about such things. So, take out any ref. to register globals from the .htaccess file. Oh, hang on - this is not true! You probably CAN set the PHP RG setting from with an apache config block :-)

 

I have never used this idea of sticking a php.ini file in the www directory. It sounds very strange to me, but I have heard it before so I can only assume it works (or not, as the case may be!).

 

Rich.

Edited by CMOTD
Link to comment
Share on other sites

Does anybody know what files exactly to download?

The one from TIM se, is full pages, I can't use those as my pages are to modified, the one form Jasek is only a .htaccess and in the one from c4great, I get no files.

Thanks

Link to comment
Share on other sites

  • 1 month later...

Hi!

 

I'm researching register globals since about 2 days (my english isnt good, I hope you understand me)

 

I did try all ways for it. But I still take

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.

 

In my .htaccess file is

<IfModule mod_php4.c>
 php_value session.use_trans_sid 0
 php_value register_globals 1
 php_value register_globals on
php_flag register_globals on
php_flag register_globals 1
</IfModule>
<IfModule sapi_apache2.c>
php_value register_globals on
php_value register_globals 1
php_flag register_globals on
php_flag register_globals 1
</IfModule>
<IfModule mod_setenvif.c>
 <IfDefine SSL>
   SetEnvIf User-Agent ".*MSIE.*" \
            nokeepalive ssl-unclean-shutdown \
            downgrade-1.0 force-response-1.0
 </IfDefine>
</IfModule>
<IfModule mod_php5.c>
 php_value session.use_trans_sid 0
 php_value register_globals 1
 php_value register_globals on
php_flag register_globals on
php_flag register_globals 1
</IfModule>

 

I'm useing PHP 5 and Windows Server 2003 Enterprise. In my server, php asp sql and mysql can works same time. In php.ini, Register Globals is off. So I changed .htaccess, but Oscommerce didn't work on my server. (Not local)

 

 

Thanks.

Link to comment
Share on other sites

  • 1 month later...

Are any of you that have applied the Register Globals mod using either the US PayPal WPP or Google Checkout mods successfully?

 

My tests show that neither of these mods work with Register Globals disabled and I would prefer not to try to untangle variable usage in these mods if someone else can tell me what changes I should make.

 

This topic is raised a couple of times earlier in this thread but the only stated conclusion seems to be to enable globals again.

 

Any help or advice would be much appreciated!!

Link to comment
Share on other sites

  • 4 weeks later...

Hi I would like to use the Globals Off contrib but there are so many "Add ons" some of which don't seem to have any bearing on the subject, I can't tell which is the full working Contribution. Can somebody please point me to it. Thank you in advance for you help John

Link to comment
Share on other sites

  • 2 weeks later...
Hi I would like to use the Globals Off contrib but there are so many "Add ons" some of which don't seem to have any bearing on the subject, I can't tell which is the full working Contribution. Can somebody please point me to it. Thank you in advance for you help John

Hi all, I'd like to echo this. I'm completely new to php and am trying to reload a dormant oscommerce site so need this contribution. Can CMOTD help please? :thumbsup:

Link to comment
Share on other sites

  • 2 weeks later...

I am having problem with register_globals now.

using xampp, apache, php 5.2.3

downloaded oscommerce 2.2RC1,

installed and working fine.

then try register globals v 1.5 without other contribution installed,

then came with this problem when i goto admin

 

 

Warning: include(includes/languages/english/) [function.include]: failed to open stream:

No such file or directory in C:\xampp\htdocs\catalog\admin\includes\application_top.php

on line 135

 

Warning: include() [function.include]: Failed opening 'includes/languages/english/' for

inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\catalog\admin\

includes\application_top.php on line 135

 

I chmod all folder under \catalog to 777, didnt work.

then I did the manual mod, still same thing.

according to the v1.5 patch, there's this file in \install,

but i just delete the install folder follow osc recommendation,

why do i have to put this folder back/?

 

I tried to put all register_global file to osc folder before installing osc, still no joy.

 

the admin part of function still seems working fine, I can go to configuation, catalog, modules, etc.

without additionl problem.

 

so what go wrong?

 

thanx

Link to comment
Share on other sites

  • 3 weeks later...

Hello,

Have just added global register V1.5 - 5 Sept 2006 contribution http://www.oscommerce.com/community/contributions,2097 . I'm finding when the global registry is on extra product fields http://www.oscommerce.com/community/contributions,2202/ works great in the product page, but when off all the extra fields on the products pages are listed the same i.e. product 1 had the same information in the extra fields as products 2,3,4,....

 

CMOTD's advice looks good,

HANDY HINT FOR FINDING REGISTER GLOBALS PROBLEMS AND SOME BUG-HUNTING TIPS http://www.oscommerce.com/forums/index.php?sho...20reg&st=60

but I might be out of my depth in fixing this php problem. I was wondering if anyone has come across a quick fix or am I missing something in the install.

Thanks in advanced.

Link to comment
Share on other sites

In case anyone is interested, please use this thread to post support questions / thoughts for the 'Register Globals' contribution.

 

The contribution can be found here...

 

http://www.oscommerce.com/community/contributions,2097

 

Comments / abuse / vacuous indifference (delete as you see fit - if you can be bothered) welcomed.

 

regards,

 

Rich.

 

 

Rich, I applied your V 1.5 patch and it worked only when I deleted the .htaccess files from my catalog and admin directories. However, now I have a different error coming up:

 

Warning: require(includes/application_top.php) [function.require]: failed to open stream: No such file or directory in /home/user/public_html/catalog/admin/index.php on line 13

 

Fatal error: require() [function.require]: Failed opening required 'includes/application_top.php' (include_path='.:/usr/lib/php') in /home/user/public_html/catalog/admin/index.php on line 13

 

 

I wonder if you or any one else can help me with this. I checked my php.ini file to make sure I had my correct user directories in it, but still same error.

 

Any help would be appreciated as I have been trying to get osCommerce up and running for the last 18 hours or so.

Link to comment
Share on other sites

  • 3 months later...

It appears that this thread has been dead for a few months now, leave it to me to bring it back to life.

 

I have two concerns:

1.) I have installed all of the patches supplied in Rich's v1.5 and I receive the following error:

 

Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in D:\FTP\BikeAuth\Htdocs\store\includes\application_top.php on line 287

 

Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.;C:\php5\pear') in D:\FTP\BikeAuth\Htdocs\store\includes\application_top.php on line 287

PHP Warning: require(includes/languages/.php) [function.require]: failed to open stream: No such file or directory in D:\FTP\BikeAuth\Htdocs\store\includes\application_top.php on line 287 PHP Fatal error: require() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.;C:\php5\pear') in D:\FTP\BikeAuth\Htdocs\store\includes\application_top.php on line 287

 

2:)Is my version of osC not compatible with this patch for addressing the register globals issue, or is the fact that my host server is running php 5 not compatible with my version of osC, or am I just and idiot...... or of course all of the above.

 

I would love some actual help on this.

 

Thanx all!

 

:x

Link to comment
Share on other sites

  • 1 month later...

hi,

 

i installed the contribution very very carefully by patching (not copying full files over).

 

since then my site just comes up blank, no content, though the registered globals warning has gone away.

 

the admin area works fine.

 

any ideas?

osCommerce is GREAT. When it works...

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

After installing register_globals v1.5 still get these errors

 

Warning: session_save_path() [function.session-save-path]: SAFE MODE Restriction in effect. The script whose uid is 32188 is not allowed to access /tmp owned by uid 0 in /home/haggard/public_html/lividbliss-com/purch/includes/functions/sessions.php on line 252

 

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/haggard/public_html/lividbliss-com/purch/includes/functions/sessions.php:252) in /home/haggard/public_html/lividbliss-com/purch/includes/functions/sessions.php on line 98

 

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/haggard/public_html/lividbliss-com/purch/includes/functions/sessions.php:252) in /home/haggard/public_html/lividbliss-com/purch/includes/functions/sessions.php on line 98

Link to comment
Share on other sites

After installing register_globals v1.5 still get these errors

I am almost 100% sure this has nothing to do with globals and everything with storing the sessions as files in a directory /tmp which you cannot use. So try MySQL for storing the sessions (catalog/includes/configure.php):

  define('STORE_SESSIONS', 'mysql');

Link to comment
Share on other sites

  • 2 weeks later...

Hope someone can help with this error which appears the first time the index page loads:

 

Warning: session_write_close() [function.session-write-close]: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in /home/serescom/public_html/includes/functions/sessions.php on line 136

I've looked at line 136 but can't find anything relating to the error message.

 

Thanks all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...