Forums / General Questions / Server issue or what? running PHP in safe mode

Server issue or what? running PHP in safe mode

Locked

Views: 3,549

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
17 Sep 2006, 8:11 AM
#1
lorhan avatar

lorhan

New Zenner

Join Date:
Aug 2004
Posts:
37
Plugin Contributions:
0

Server issue or what? running PHP in safe mode

Hi everybody.

I assume this error is caused by some settings on the server?

Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /hsphere/local/home/finekler/finekler.com/admin/includes/functions/localization.php on line 74 Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /hsphere/local/home/finekler/finekler.com/admin/includes/functions/localization.php on line 74 Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /hsphere/local/home/finekler/finekler.com/admin/includes/functions/localization.php on line 74 Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in /hsphere/local/home/finekler/finekler.com/admin/includes/functions/localization.php on line 74 Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/finekler/finekler.com/admin/includes/functions/localization.php:74) in /hsphere/local/home/finekler/finekler.com/admin/includes/functions/general.php on line 34

Any ideas on how to solve this issue?

17 Sep 2006, 8:28 AM
#2
lorhan avatar

lorhan

New Zenner

Join Date:
Aug 2004
Posts:
37
Plugin Contributions:
0

Re: Server issue or what? running PHP in safe mode

Forgot to tell that the issue is when trying to update currencies in admin.

17 Sep 2006, 8:56 AM
#3
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Server issue or what? running PHP in safe mode

This is normally a setting that the server admin sets, and is normally only used in virtual server sharing.

You can check the status in you admin > tools > server Info
scroll down to Configuration PHP Core and check the safe mode settings:

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

If you find that one or more schema of safemode is enabled this is normally only settable by the hosting company. Unless you have a php.ini file installed for you and it is configured to allow you to override these settings.

Zen-Venom Get Bitten

17 Sep 2006, 9:05 AM
#4
lorhan avatar

lorhan

New Zenner

Join Date:
Aug 2004
Posts:
37
Plugin Contributions:
0

Re: Server issue or what? running PHP in safe mode

Thanks for quick reply.

Here's the settings for this server:

safe_mode On On
safe_mode_exec_dir no value no value
safe_mode_gid On On
safe_mode_include_dir no value no value

Seems to me that I have to contact the hosting company.

Thanks!

28 Nov 2006, 6:42 PM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Server issue or what? running PHP in safe mode

I had the same problem updating currencies (Zencart ver 1.3.6 - fresh install). Interestingly, the currencies STILL updated, despite the report of this error. I contacted the hosting company, who said the problem lay in the script.

I then opened:

admin/includes/functions/localization.php

and changed:

(Line 76) curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

to:

curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);

:unsure:

... but when I did a currency update shortly thereafter, hey presto - no error, and the currencies updated correctly as well!

Have NO IDEA if what I did is "legal", or sets off a h-bomb somewhere on the planet, but it seems to work...
:smile:

20 years a Zencart User

28 Nov 2006, 6:53 PM
#6
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Server issue or what? running PHP in safe mode

You could also try adding:

php_flag safe_mode off

to your .htaccess file, although this may not work if your host has disallowed local changes.

21 Dec 2006, 10:04 PM
#7
peanut77 avatar

peanut77

Zen Follower

Join Date:
Feb 2005
Posts:
266
Plugin Contributions:
0

Re: Server issue or what? running PHP in safe mode

Hi

I too hit this same problem - followed schoolboys instructions and problem is sorted.