View Full Version : php pages blank
websitesdivine
4th September 2006, 10:01 PM
Newbie here!
I have blank php pages after a successful install of a website and MySQL database. From what I can tell, it may be a setting in php.ini that will allow php to display in higher directories.
I can vi the php.ini file, but do not know what to edit or add.
It may also be a .htaccess fix. There is no .htaccess in the directories currently, so I would need to know what to enter. I am 2 days on this now and that is about all I could find as the possible reasons.
The site has php enabled in setup.
Thanks in advance for your help!
jwdick
4th September 2006, 10:45 PM
The default is NOT to display errors.
create an " .htaccess " file with the following line:
php_flag display_errors on
Put the .htaccess file in the directory where the php script is being run to display errors.
Alternately, look in the "error_log" for the errors.
websitesdivine
4th September 2006, 10:54 PM
Here is the error - any ideas?
Warning: main() [function.main]: open_basedir restriction in effect. File(/DbConnection.php) is not within the allowed path(s): (/var/www/vhosts/bytheowner.net/httpdocs:/tmp) in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 3
Warning: main(DbConnection.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 3
Warning: main() [function.main]: open_basedir restriction in effect. File(/DbConnection.php) is not within the allowed path(s): (/var/www/vhosts/bytheowner.net/httpdocs:/tmp) in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 3
Warning: main(DbConnection.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 3
Warning: main() [function.include]: Failed opening 'DbConnection.php' for inclusion (include_path='.:') in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 3
Warning: main() [function.main]: open_basedir restriction in effect. File(/Smarty.class.php) is not within the allowed path(s): (/var/www/vhosts/bytheowner.net/httpdocs:/tmp) in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 4
Warning: main(Smarty.class.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 4
Warning: main() [function.main]: open_basedir restriction in effect. File(/Smarty.class.php) is not within the allowed path(s): (/var/www/vhosts/bytheowner.net/httpdocs:/tmp) in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 4
Warning: main(Smarty.class.php) [function.main]: failed to open stream: Operation not permitted in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 4
Fatal error: main() [function.require]: Failed opening required 'Smarty.class.php' (include_path='.:') in /var/www/vhosts/bytheowner.net/httpdocs/libs/Global.php on line 4
jwdick
5th September 2006, 06:47 AM
yes, you have a open_basedir restriction that will not let your php script run as it is written.
The easiest fix is to create a "vhost.conf" file in the same folder as the "httpd.include" file for this domain.
In the vhost.conf file, enter the following:
<Directory /var/www/vhosts/bytheowner.net/httpdocs/>
php_admin_value open_basedir none
</Directory>
If you also want to turn off "safe mode" add this line:
php_admin_flag safe_mode off
Once you have created this file, run this command:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=bytheowner.net
websitesdivine
5th September 2006, 11:27 AM
Below is new error : And I have attached the Smarty.class.php script in question. I am going to forward this error to the Website Template developer as well and see what I find there as well.
Warning: Smarty error: problem creating directory '/var' in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1083
Warning: Smarty error: problem writing temporary file '/tmp/write_FFL3IT' in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1083
Warning: Smarty::fetch() [function.fetch]: Unable to access /var/www/vhosts/bytheowner.net/httpdocs/work/%%45/45E/45E480CD%%index.tpl.php in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1247
Warning: Smarty::fetch(/var/www/vhosts/bytheowner.net/httpdocs/work/%%45/45E/45E480CD%%index.tpl.php) [function.fetch]: failed to open stream: No such file or directory in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1247
Warning: Smarty::fetch() [function.fetch]: Unable to access /var/www/vhosts/bytheowner.net/httpdocs/work/%%45/45E/45E480CD%%index.tpl.php in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1247
Warning: Smarty::fetch(/var/www/vhosts/bytheowner.net/httpdocs/work/%%45/45E/45E480CD%%index.tpl.php) [function.fetch]: failed to open stream: No such file or directory in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1247
Warning: Smarty::fetch() [function.include]: Failed opening '/var/www/vhosts/bytheowner.net/httpdocs/work/%%45/45E/45E480CD%%index.tpl.php' for inclusion (include_path='.:') in /var/www/vhosts/bytheowner.net/httpdocs/libs/Smarty.class.php on line 1247
websitesdivine
5th September 2006, 11:30 AM
I had to zip file - here it is
jwdick
5th September 2006, 02:25 PM
You cannot upload attachments to this forum.
Your best bet now is to go to the source code anyway. You seem to have the open_basedir problem fixed. Now it's a matter of their code.
websitesdivine
6th September 2006, 09:30 AM
Thanks that did it! :)
Really I want to thank the advanced users who take their time to help us newbies.
Victor
vBulletin® v3.6.12, Copyright ©2000-2008, Jelsoft Enterprises Ltd.