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 27th November 2009, 13:08
Blinkiz Blinkiz is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default [Solved] Can not open files in include_path() (/usr/share/php)

I have a problem that started yesterday. I both fiddled around with my suphp settings and at the same time I did an update to latest ispconfig.
Problem is now that I can not access any files in my include_path that is ".:/usr/share/php".
Code:
Fatal error: require() [function.require]: Failed opening required 'Auth/Auth.php' (include_path='.:/usr/share/php') in /var/www/web11/web/includes/functions.php on line 8
Why can I not run php files in /usr/share/php?
  • In all php.ini files under /etc/php5, I have set include_path to ".:/usr/share/php". I have suphp active and if I write in a php file echo exec('whoami') I get the correct username suphp have for me. phpinfo() is providing all the correct data.
  • Running my php script from cli from within the correct webuser, I have no problem accessing the files in the include_path.
  • Nothing in the logs. /var/log/suphp.log on info and it seems to work alright. Setting apache to debug or info does not provide any help.
  • And yes, the file do really exist in /usr/share/php..

Specification:
Debian 5.0 Lenny with latest updates
ISPConfig 2.2.35
PHP 5.2.6-1+lenny4 with Suhosin-Patch 0.9.6.2
Apache/2.2.9 (Debian)
suphp 0.6.2 (compiled myself with paranoid setting)

Last edited by Blinkiz; 28th November 2009 at 18:24. Reason: Change Topic
Reply With Quote
Sponsored Links
  #2  
Old 28th November 2009, 14:07
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

What's in /etc/suphp.conf?
__________________
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 28th November 2009, 15:39
Blinkiz Blinkiz is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
What's in /etc/suphp.conf?
Code:
[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=www-data

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0022

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
I have tested a bunch of umasks. Like 0007 and 0077.
Reply With Quote
  #4  
Old 28th November 2009, 16:52
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,609 Times in 4,420 Posts
Default

Check if a open basedir restriction or similar restriction is set in /home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 28th November 2009, 18:15
Blinkiz Blinkiz is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Check if a open basedir restriction or similar restriction is set in /home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper
/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper:
Code:
#!/bin/sh
PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/libexec"

BASEDIR=`dirname ${DOCUMENT_ROOT}`
TMPDIR=${BASEDIR}/phptmp
SESSDIR=${TMPDIR}

if [ X"${php_safe_mode}" != X"On" ]; then
SAFE_MODE="Off"
else
SAFE_MODE="On"
fi

exec php-cgi -d open_basedir=${BASEDIR} -d upload_tmp_dir=${TMPDIR} -d session.save_path=${SESSDIR} -d safe_mode=${SAFE_MODE}
Do I need to change something in this file?
Reply With Quote
  #6  
Old 28th November 2009, 18:20
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,769
Thanks: 840
Thanked 5,609 Times in 4,420 Posts
Default

Change:

exec php-cgi -d open_basedir=${BASEDIR} -d upload_tmp_dir=${TMPDIR} -d session.save_path=${SESSDIR} -d safe_mode=${SAFE_MODE}

to:

exec php-cgi -d open_basedir=${BASEDIR}:/usr/share/php -d upload_tmp_dir=${TMPDIR} -d session.save_path=${SESSDIR} -d safe_mode=${SAFE_MODE}
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 28th November 2009, 18:23
Blinkiz Blinkiz is offline
Junior Member
 
Join Date: Sep 2009
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
 
Thumbs up

Thank you till, you solved the problem!
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
High on Lenny - Lvm Mount Problem Serverman Technical 1 23rd June 2009 17:26
The system is currently updating the configuration files. warlock General 8 21st February 2009 19:15
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! qvindesland Installation/Configuration 22 21st May 2007 17:05
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29
open ports rayit General 6 18th January 2006 15:23


All times are GMT +2. The time now is 09:01.


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