• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Open_basedir Hell!

J

JUMA

Guest
Hi to all,

Recently, we moved all our domains to a new server. On the old domain -using plesk 8.0.1- all worked like a charm.

Now, one of the clients is having an error due to the open_basedir.

On first instance the page won't even show, it was a blank page. I followed the instructions on http://kb.swsoft.com/article_0_432_en.html and the page finally showed...but now, some "arrays" of the page doesn't show, per example a list of countries. I have check the error log and this is what it shows:
[client 80.26.4.14] PHP Warning: main() [<a href='function.main'>function.main</a>]: open_basedir restriction in effect. File(/sha_functions.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/order_summary_functions.php on line 1
[client 80.26.4.14] PHP Warning: main(sha_functions.php) [<a href='function.main'>function.main</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/order_summary_functions.php on line 1
[client 80.26.4.14] PHP Warning: main() [<a href='function.main'>function.main</a>]: open_basedir restriction in effect. File(/sha_functions.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/order_summary_functions.php on line 1
[client 80.26.4.14] PHP Warning: main(sha_functions.php) [<a href='function.main'>function.main</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/order_summary_functions.php on line 1
[client 80.26.4.14] PHP Warning: main() [<a href='function.include'>function.include</a>]: Failed opening 'sha_functions.php' for inclusion (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/include/order_summary_functions.php on line 1
[client 80.26.4.14] PHP Notice: Undefined variable: FormIsOk in /var/www/vhosts/domain.com/httpdocs/preorder_form.php on line 148
[client 80.26.4.14] PHP Notice: Undefined variable: ExemptVat in /var/www/vhosts/domain.com/httpdocs/preorder_form.php on line 149
[client 80.26.4.14] PHP Notice: Undefined variable: AskForVatExemption in /var/www/vhosts/domain.com/httpdocs/preorder_form.php on line 150
[client 80.26.4.14] PHP Notice: Undefined variable: ValidForum in /var/www/vhosts/domain.com/httpdocs/include/preorder_form_functions.php on line 91
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.generate-country-row'>function.generate-country-row</a>]: open_basedir restriction in effect. File(/country_arrays.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row(country_arrays.php) [<a href='function.generate-country-row'>function.generate-country-row</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.generate-country-row'>function.generate-country-row</a>]: open_basedir restriction in effect. File(/country_arrays.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row(country_arrays.php) [<a href='function.generate-country-row'>function.generate-country-row</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.include'>function.include</a>]: Failed opening 'country_arrays.php' for inclusion (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Notice: Undefined variable: named_values in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 149
[client 80.26.4.14] PHP Notice: Undefined variable: desc_values in /var/www/vhosts/fryrender.com/httpdocs/include/table_generation.php on line 149
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.generate-country-row'>function.generate-country-row</a>]: open_basedir restriction in effect. File(/country_arrays.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row(country_arrays.php) [<a href='function.generate-country-row'>function.generate-country-row</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.generate-country-row'>function.generate-country-row</a>]: open_basedir restriction in effect. File(/country_arrays.php) is not within the allowed path(s): (/var/www/vhosts/domain.com/httpdocs:/tmp) in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row(country_arrays.php) [<a href='function.generate-country-row'>function.generate-country-row</a>]: failed to open stream: Operation not permitted in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Warning: generate_country_row() [<a href='function.include'>function.include</a>]: Failed opening 'country_arrays.php' for inclusion (include_path='.:') in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 148
[client 80.26.4.14] PHP Notice: Undefined variable: named_values in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 149
[client 80.26.4.14] PHP Notice: Undefined variable: desc_values in /var/www/vhosts/domain.com/httpdocs/include/table_generation.php on line 149

To make things clear...A php file called pre_order_form.php on the httpdocs directory calls to several php files located in the include/ directory.

If I configure my vhost this way:

<Directory /var/www/vhosts/domain.com/httpdocs>
<IfModule sapi_apache2.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "none"
</IfModule>
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "none"
</IfModule>
</Directory>

The page dosn't show...but If I change <Directory /var/www/vhosts/domain.com/httpdocs> to <Directory /var/www/vhosts/domain.com/httpdocs/include> the page shows and has the errors that I have said before...

Any ideas would be really great..I'm kinda desperate
 
Back
Top