Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th December 2005, 16:59
sc0ut sc0ut is offline
Junior Member
 
Join Date: Oct 2005
Location: Bosnia and Herzegovina
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default php safe mode warning

Hi,
I upgraded few days ago PHP on my SuSE 9.2 server with ISPConfig on 4.4 version (from 4.3.11) and apache 2.0.51 on 2.2, and on sites that have PHP Safe mode enabled, I get error message like this:

Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /home/www/web20/phptmp owned by uid 10016 in Unknown on line 0

Owners of php scripts and phptmp are the same, and file/dir permissions are 777 for phptmp and 755 for php scripts

Since PHP Safe mode is disabled in php.ini, and enabled for each site through ISPConfig, I guess this issue has nothing to do with settings in it...


What could be wrong?
Reply With Quote
Sponsored Links
  #2  
Old 17th December 2005, 18:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Please compare the owner and group of the PHP script and of the /home/www/web20/phptmp directory. They have to be the same.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th December 2005, 19:05
sc0ut sc0ut is offline
Junior Member
 
Join Date: Oct 2005
Location: Bosnia and Herzegovina
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

The thing that is strange is that user/group for phptmp and php scritps are the same:

Code:
ns3:/home/www/web20 # ls -la phptmp/
total 2
drwxrwxrwx  2 web20_admin web20 1024 Nov 28 23:59 .
drwxr-xr-x  8 web20_admin web20 1024 Dec 15 08:58 ..
-r--------  1 root        root     0 Nov 28 06:19 .no_delete
ns3:/home/www/web20 #  

ns3:/home/www/web20/web # ls -la *.php
-rwxr-xr-x  1 web20_admin web20 50589 Jul  4 00:15 SSI.php
-rwxr-xr-x  1 web20_admin web20  3534 Nov 28 07:03 Settings.php
-rwxr-xr-x  1 web20_admin web20  3220 Jun 23 00:15 Settings_bak.php
-rwxr-xr-x  1 web20_admin web20 13687 Jul 13 20:59 index.php
-rwxr-xr-x  1 web20_admin web20  5181 Jun 23 00:15 ssi_examples.php
Reply With Quote
  #4  
Old 18th December 2005, 16:18
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Do you have any include files in your PHP script that have wrong permissions?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
bowlAltetle (27th July 2014)
  #5  
Old 19th December 2005, 13:50
sc0ut sc0ut is offline
Junior Member
 
Join Date: Oct 2005
Location: Bosnia and Herzegovina
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

There should be no includes outside of web directory of the script, actually it's a forum script (SMF), and I did: chown -R web20_admin:web20 web/ to be sure there's no files or dirs with wrong owners there...
I got the same error on some other sites, but since they have quiet simple php scripts, I turned off safe mode so they can work OK...
I'm compiling PHP 5.1.1 right now on the server, to try it out, maybe SuSE made something strange in updated rpm's on their ftp server
Reply With Quote
  #6  
Old 19th December 2005, 16:14
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,757
Thanks: 840
Thanked 5,603 Times in 4,414 Posts
Default

What is the setting of the include path in your php.ini?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 19th December 2005, 21:07
sc0ut sc0ut is offline
Junior Member
 
Join Date: Oct 2005
Location: Bosnia and Herzegovina
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

Include path is commented, so it shouldn't make trouble, but I have this enabled:

Code:
extension_dir = "./"
extension_dir = /usr/lib/php/extensions
Could this make trouble?
Reply With Quote
The Following User Says Thank You to sc0ut For This Useful Post:
bowlAltetle (21st July 2014)
  #8  
Old 19th December 2005, 21:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by sc0ut
Include path is commented, so it shouldn't make trouble, but I have this enabled:

Code:
extension_dir = "./"
extension_dir = /usr/lib/php/extensions
Could this make trouble?
I don't have any extension_dir directive in my php.ini... I suggest that you comment them out and restart Apache to see if that changes anything.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 19th December 2005, 23:30
sc0ut sc0ut is offline
Junior Member
 
Join Date: Oct 2005
Location: Bosnia and Herzegovina
Posts: 14
Thanks: 0
Thanked 1 Time in 1 Post
Default

Code:
ns3:/usr/lib/php/extensions # ls
.            dbase.so    gettext.so   mcrypt.so      shmop.so     wddx.so
..           dbx.so      gmp.so       mhash.so       snmp.so      xslt.so
bcmath.so    domxml.so   iconv.so     mime_magic.so  sockets.so   yp.so
bz2.so       exif.so     imap.so      mysql.so       swf.so       zlib.so
calendar.so  filepro.so  ldap.so      pgsql.so       sysvsem.so
ctype.so     ftp.so      mbstring.so  qtdom.so       sysvshm.so
curl.so      gd.so       mcal.so      session.so     unixODBC.so
ns3:/usr/lib/php/extensions #
php.ini comment says that this directory is: Directory in which loadable extensions (modules) reside.
I tried to comment it, restart apache, but got the same error on pages...
Reply With Quote
  #10  
Old 20th December 2005, 00:47
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
 
Default

Quote:
Originally Posted by sc0ut
Warning: Unknown(): SAFE MODE Restriction in effect. The script whose uid is 0 is not allowed to access /home/www/web20/phptmp owned by uid 10016 in Unknown on line 0
Can you have a look at /etc/passwd to find out which user has the id 10016?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 09:27
PHP Safe Mode & Directory Permissions domino General 10 19th December 2005 19:38
Sharedip Ivan Installation/Configuration 3 7th December 2005 16:36
Crontab Joe-Montana HOWTO-Related Questions 2 24th October 2005 00:54
php safe mode not working.. hagel Installation/Configuration 2 18th August 2005 11:44


All times are GMT +2. The time now is 03:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.