[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)
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.
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?
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}