If this is your first visit, check our documentation. To post, register or login.
Forums / Installing on a Linux/Unix Server / Email & register_globals

Email & register_globals

Locked

Started by ces on 6 Jun 2006, 9:50 AM · Views: 6,373

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
6 Jun 2006, 9:50 AM
#1
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Email & register_globals

I have a shop - https://www.NicheLocks.com running zencart Zen Cart 1.2.6 and everything has been great for a while.

Sometime yesterday the shop stopped sending out all emails - admin, orders, contact us.

I contacted the host - easily.co.uk today and they say they have applied a security patch on the server and register_globals has been disabled.

Question is what do I do? Can anyone point me in the right direction. I want to act as fast as I can so I do not lose any custom on a live shop.

Just had a look at my server information and it looks as if register_globals is turned on???

register_argc_argv	On	On
register_globals	On	On
report_memleaks	On	On
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
safe_mode_gid	Off	Off
safe_mode_include_dir	no value	no value
sendmail_from	[email][email protected][/email]	[email][email protected][/email]
sendmail_path	/usr/sbin/sendmail -t -i 	/usr/sbin/sendmail -t -i 
serialize_precision	100	100

Thanks

Craig

6 Jun 2006, 10:09 AM
#2
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

Thanks for the quick reply.

It is the server info from the cart.

I added a line into my .htaccess fie and turned register_globals off and that does not make a difference.

Have you tried configuring the alternative way of sending emails in admin? ie: using sendmail instead of smtp, or vice-versa?

have not messed too much as I thought there might be a 'simple' fix first.

I saved the chat that I had with them and they suggest:

Tim Williams: Ok I believe thi might then be due to register_globals

Craig Squire: right, has it changed since the weekend?

Tim Williams: The function register_globals has been disabled specifically due to
security and performance reasons (this has stemmed from the latest
update of security patches which was recently installed on the server).

Craig Squire: OK what do I do?

Tim Williams: The use of global variables can lead to it being misused, hence global variables are no longer registered for
input data (POST, GET, cookies, environment and other server
variables). Instead of using $foo, you can use $_REQUEST["foo"]
(includes any variable that arrives through the
request, namely, POST, GET and cookie variables), or use one of the
specific
$_GET["foo"], $_POST["foo"], $_COOKIE["foo"] or $_FILES["foo"],
depending
on where the input originates. Also, you can look at the
import_request_variables() function.

Tim Williams: Note that register_globals is going to be depracated (i.e., turned off
by
default) in the next version of PHP, because it often leads to security
bugs.
For further information about this please go to
http://php.net/manual/en/security.registerglobals.php.

Craig Squire: OK I shall try and work around this. Would have been nice to be forewarned though!!

Tim Williams: I apologise for any inconvenience caused by thus but unfortunatley due to security reasons the patches needed to be applied immediately.

Craig

6 Jun 2006, 10:14 AM
#3
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

For information, here are my email settings in admin:

E-Mail Transport Method 	sendmail 	 
E-Mail Linefeeds 	LF 	 
Use MIME HTML When Sending Emails 	true 	 
Verify E-Mail Addresses Through DNS 	false 	 
Send E-Mails 	true 	 
Email Archiving Active? 	true 	 
E-Mail Friendly-Errors 	true 	 
Email Address (Displayed to Contact you) 	[email protected] 	 
Email Address (sent FROM) 	[email protected] 	 
Email Admin Format? 	TEXT 	 
Send Copy of Order Confirmation Emails To 	[email protected] 	 
Send Copy of Create Account Emails To - Status 	1 	 
Send Copy of Create Account Emails To 	[email protected] 	 
Send Copy of Tell a Friend Emails To - Status 	1 	 
Send Copy of Tell a Friend Emails To 	[email protected] 	 
Send Copy of Customer GV Send Emails To - Status 	1 	 
Send Copy of Customer GV Send Emails To 	[email protected] 	 
Send Copy of Admin GV Mail Emails To - Status 	1 	 
Send Copy of Customer Admin GV Mail Emails To 	[email protected] 	 
Send Copy of Admin Discount Coupon Mail Emails To - Status 	1 	 
Send Copy of Customer Admin Discount Coupon Mail Emails To 	[email protected] 	 
Send Copy of Admin Orders Status Emails To - Status 	0 	 
Send Copy of Admin Orders Status Emails To 	[email protected] 	 
Allow Guest To Ask A Product Question 	true 	 
Send Copy of Pending Reviews Emails To - Status 	1 	 
Ask A Question Email To: 	[email protected] 	 
Send Copy of Pending Reviews Emails To 	[email protected] 	 
Ask A Question Name To 	Craig Squire 	 
Set "Contact Us" Email Dropdown List 		 
Allow Guest To Tell A Friend 	true 	 
Contact Us - Show Store Name and Address 	1 	 
Send Extra Low Stock Emails 	1 	 
Send Extra Low Stock Emails To 	[email protected] 	 
Display "Newsletter Unsubscribe" Link? 	true 	 
Audience-Select Count Display 	true 	 
SMTP Email Mail Host 		 
SMTP Email Account Password 		 
SMTP Email Account Mailbox 		 
SMTP Email Account Mailbox 	YourDomain.com 	 
SMTP Email Account Password 	YourDomain.com 	 
SMTP Email Mail Host 	YourDomain.com 	 
SMTP Email Mail Server Port 	25 	
6 Jun 2006, 10:46 AM
#4
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Email & register_globals

Tim Williams: Note that register_globals is going to be depracated (i.e., turned off
by
default) in the next version of PHP, because it often leads to security
bugs.

Total bull****. The guy is reading from an idiot screen. Register Globals has been turned 'off' by default in php.ini for years now. If the php installation is secure then there is no need to turn off Register Globals.

If this is an Apache server and you can use .htaccess files on it then put this code in a .htaccess file in the root of your web.

php_flag register_globals on

This will turn back on Register Globals just for your website.

Vger

6 Jun 2006, 11:07 AM
#5
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

Thanks for the reply Vger

Vger:

If this is an Apache server and you can use .htaccess files on it then put this code in a .htaccess file in the root of your web.

php_flag register_globals on

> 
> This will turn back on Register Globals just for your website.
> 
> Vger

Have done this with no luck.

Have changed the E-Mail Transport Method but still no joy.

Craig
6 Jun 2006, 11:27 AM
#6
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

kelvyn:

Did you also try that change in php.ini?

I have looked for it but cannot seem to find it in any of the directories when I log in via ftp.

Any ideas where?

Craig

6 Jun 2006, 2:32 PM
#7
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

Ok guys thanks for all your help, but:

I have tried smtpauth too and this does not work.

I have spoken to my host and thay say that register_globals is off for the whole server.

They say there is nothing I can do to change this by htaccess and they will not let me near the php.ini

As far as they are concerned register_globals is off and staying off on this server.

They did say I should be able to alter the code to not use globals but how do I do this???

Any suggestions, apart from kicking them into touch!!

Thanks again.

Craig

6 Jun 2006, 3:02 PM
#8
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Email & register_globals

I'd agree that you are better off changing hosts - but if you don't want to do that (if you've paid for a whole year up-front and can't get a refund) then the fix of dropping a php.ini file of your own into all folders should do the trick.

Vger

6 Jun 2006, 3:07 PM
#9
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Email & register_globals

register globals on or off is a moot point with zen cart.

Zen doesn't require either or.

You might want to ask them if they also turned off mail as nobody

Zen cart PCI compliant Hosting

6 Jun 2006, 3:23 PM
#10
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

Merlinpa1969:

register globals on or off is a moot point with zen cart.

Zen doesn't require either or.

You might want to ask them if they also turned off mail as nobody

And if they have..... what do I do?

I will check with them.

Thanks

Craig

6 Jun 2006, 6:07 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Email & register_globals

I'm not convinced that this is a register_globals thing.

As merlin mentioned, Zen Cart itself doesn't require RG to be on.... and for security, prefers it to be off. Add-on contributions may or may not require RG to be on though.

If the email support in your Zen Cart site is the default system that came with Zen Cart and not altered by any addon's, then I'd say the Register Global issues is a red herring.

In fact, the support dialog you quoted suggests that he was only GUESSING that Register Globals might be the cause. Instead, I suspect it's related to OTHER settings that they've changed in their "update":> Tim Williams: The function register_globals has been disabled specifically due to

security and performance reasons (this has stemmed from the latest
update of security patches which was recently installed on the server
).

They've likely changed the php mail settings and now require a different method for connecting to their mailserver. Merlin's question about the "nobody" account is quite valid. If they "have" turned off the "nobody@" support, then ask them what the new method for sending mail needs to be. If they don't seem to understand your question, go to 2nd-level support....escalating until you get some answers.

Meanwhile, you can try using the sendmail-f transport method...which often works around the nobody@ support issue.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

6 Jun 2006, 7:20 PM
#12
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

DrByte:

Meanwhile, you can try using the sendmail-f transport method...which often works around the nobody@ support issue.

I did try this but still no go.

Thanks for the advice, I shall raise the nobody thing with support tomorrow anyhow.

On a side note, if I did change host, are there any delays between my domain pointing at the old host to the new one. Does the DNS need to propogate arond the net? if so will this cause me grief having two databases slightly out of sync? How long would it take to change host if I started straight away?

Questions. Questions. Questions. :)

Thanks

Craig

6 Jun 2006, 10:07 PM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Email & register_globals

A good host will help you keep things running without more than a few minutes downtime... depends how much interest they take in assisting in the process.

If they can have a few days to let DNS changes sync into their control, then they can set the TTL down to an hour thus causing the replication of the "real" switch to happen very quickly. Meanwhile databases could be repointed to run from the other server and thus keep things totally in sync, and make cutover almost seamless.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2006, 6:53 AM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Email & register_globals

many cPanel hosts will let you nominate the IP of your prior server

keep in mind that it's temporary, for maybe a day or two

also note that hosting the database remotely will usually make it MUCH slower

There are other methods of making the process seamless without running a remote database...

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

7 Jun 2006, 10:48 AM
#15
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

kelvyn:

For example, an htacces rewrite on the old host, that just forwards any request to the new host. That's what I did. and it seemed to work OK!

Hi can you tell me what the htaccess rewrite code was.

Thanks

7 Jun 2006, 11:55 AM
#16
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Email & register_globals

You'd need to have a dedicated ip address on the site you wish to connect from, and, ideally, a dedicated ip address on the site you wish to connect to. Then the host has to set you up as a Remote User. Naturally, on a shared server with lots of other sites that the host is responsible for they couldn't give access to a site on a shared ip address - because it would (potentially) give access to anyone else on that shared ip address.

Vger

8 Jun 2006, 9:37 AM
#17
ces avatar

ces

Zen Follower

Join Date:
Nov 2004
Location:
West Mids, England
Posts:
199
Plugin Contributions:
0

Re: Email & register_globals

I'd just like to say a big thank you to all you guys for the help and advice.

Moved the shop to a new host and everything has gone well, email working a treat.

One slight bug/problem.

The site map link in the information shows

BOX_INFORMATION_SITE_MAP

instead of

Site Map.

It worked on the old host!

Any ideas?

Craig

8 Jun 2006, 10:21 AM
#18
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Email & register_globals

This is where you'll find those settings:

includes\languages\english.php(141): define('BOX_INFORMATION_SITE_MAP', 'Site Map');
includes\modules\sideboxes\information.php(35): $information[] = '<a href="' . zen_href_link(FILENAME_SITE_MAP) . '">' . BOX_INFORMATION_SITE_MAP . '</a>';

Vger