• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

php pages blank

W

websitesdivine

Guest
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!
 
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.
 
here is error

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
 
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
 
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
 
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.
 
Success

Thanks that did it! :)

Really I want to thank the advanced users who take their time to help us newbies.

Victor
 
Back
Top