• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Unknown: open_basedir restriction

Somewhere in your website a path to /var/cpanel/php/sessions/ea-php73 is set. Thats a path specific to cPanel and does not exist on Plesk servers. Hence the issue you are facing. You'll need to find were that path is defined and then change or remove it. It could be defined as a setting in your websites database or in files (either hard coded or as a setting).

You've already searched trough your database and found a cPanel reference. Which can worth analyzing further to see if actually contains the /var/cpanel/php/sessions/ea-php73 path. If that's the case you perhaps found the source of your issue. The question then becomes how to solve it. But let's cross that bridge when/if we get there.

Now, as for you question:
I'm not sure where to look for this one, which subscription are you refering to?

The commands @maartenv was referring in his post to can be used to search trough the content of files in as specific directory. Which can be used when you access your server via SSH. If you are not familiar with SSH and Linux commands there is a wealth of information available online to get you started. I highly recommend getting yourself familiar with SSH and basic Linux commands if you are managing your own server. For now however, if you not familiar with SSH or are not comfortable using SSH, you can also use the search option in the Plesk file manager and select to search both Filename and Content. See example image below. (Searching trough content can be slow if there are a lot files. So it might take a couple of minutes.).
Schermafbeelding 2022-12-29 133806.png

This will help you to search trough files for any cPanel reference and possibly find any settings for the /var/cpanel/php/sessions/ea-php73 path.
 
Thank you, several files came up on search, among them four php.ini files and four user.ini files all containing session.save_path = "/var/cpanel/php/sessions/ea-php73"

php.ini:1
php.ini:3
php.ini:4
php.ini:13

; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)

display_errors = Off
max_execution_time = 30
max_input_time = 60
max_input_vars = 1000
memory_limit = 512M
post_max_size = 8M
session.gc_maxlifetime = 1440
session.save_path = "/var/cpanel/php/sessions/ea-php73"
upload_max_filesize = 8M
zlib.output_compression = Off

Besides that several htaccess.bk: files containing cPanel-generated handler

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

# BEGIN WordPress
# The directives (lines) between "BEGIN WordPress" and "END WordPress" are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.

# END WordPress

# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)
<IfModule php7_module>
php_flag display_errors Off
php_value max_execution_time 30
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 32M
php_value post_max_size 8M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
php_value upload_max_filesize 8M
php_flag zlib.output_compression Off
</IfModule>
<IfModule lsapi_module>
php_flag display_errors Off
php_value max_execution_time 30
php_value max_input_time 60
php_value max_input_vars 1000
php_value memory_limit 32M
php_value post_max_size 8M
php_value session.gc_maxlifetime 1440
php_value session.save_path "/var/cpanel/php/sessions/ea-php73"
php_value upload_max_filesize 8M
php_flag zlib.output_compression Off
</IfModule>
# END cPanel-generated php ini directives, do not edit

and a lot of wp-content/plugins links

It seams impossible to delete all references to cPanel this way. I'm familiar with SSH, and can preform simple tasks here. Is there an easier way to remove all cPanel references?

One thing bothering me, why can I access the WP login page, and login to my WP dashboard as administrator, but not access my frontpage or other pages.

Does this sound like a cPanel reference issue, before I move in that direction for a solution?


Regards
Carsten
 

Attachments

  • Skærmbillede 2022-12-29 kl. 15.34.22.png
    Skærmbillede 2022-12-29 kl. 15.34.22.png
    55.4 KB · Views: 5
Those are interesting finds, but I doubt they are the cause of your issue. I'm not completely sure but if I am not mistaken any php.ini or user.ini files in your domains document root is not used by Plesk. Perhaps some else can confirm this? For testing purposes you could rename those file to php.ini.bk and user.ini.bk and see if that makes a difference. Similarly, the .htaccess.bk file should not be used either if it's named like that.

What's in the the actual .htaccess file?

If you create a new PHP file for your website called info.php and add the code bellow to it. When you visit that file, (example.com/info.php) does it list /var/cpanel/php/sessions/ea-php73 somewhere?
PHP:
<?php
phpinfo()
?>

It seams impossible to delete all references to cPanel this way. I'm familiar with SSH, and can preform simple tasks here. Is there an easier way to remove all cPanel references?
You don't need to remove all references to cPanel. Just the ones that causing issues ;)

One thing bothering me, why can I access the WP login page, and login to my WP dashboard as administrator, but not access my frontpage or other pages. Does this sound like a cPanel reference issue, before I move in that direction for a solution?
I don't know for sure. It could be. The way I would handle this is to solve any issue I would encounter.
 
Hi there, I have created a new info.php PHP file with the code, but there is no line with /var/cpanel/php/sessions/ea-php73 or anything else about cpanel in that php listing.


This is the content of the .htaccess file:

# This file was updated by Duplicator on 2022-12-25 15:36:30.
# See the original_files_ folder for the original source_site_htaccess file.
# BEGIN WordPress
# Direktiverne (linjer) mellem 'BEGIN WordPress' og 'END WordPress' er
# dynamisk genereret og bør kun ændres via WordPress-filtre.
# Eventuelle ændringer i direktiverne mellem disse markører vil blive overskrevet.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
 
user.ini and php.ini files should not be used. There is no point in these. These should be renamed or removed. I do not see any reason why they could not be renamed unless their file permissions are awkward. Maybe you can change the file permissions first to something like 0750. PHP settings - if required at all - should be made in the PHP settings of the Plesk panel. The .bk files will not be used at all. They are only backups and can be removed.

If you do not find a reference to /var/cpanel/php/sessions/ea-php73 in any files in your document root directory, please make sure that no .htaccess file exists in your subscription root directory. Some users had misplaced such files there in the past, and their content affects all directories that descend from their subscription root.

My guess is that the grep was not executed correctly, because the results shown in Issue - Unknown: open_basedir restriction don't show any "cpanel" string, so these cannot be the grep results of the given command. If you are absolutely sure that there is no mention of "cpanel" in any file in your document root directory than the only two explanations possible are the .htaccess file a level higher or a plugin configuration of the Wordpress site.
 
Hi Peter, thank you for your thorough clarification.
I'm stuck here and it shouldn't be so complicated to migrate a site, so I think I will try another migration option instead of a WP migrator plugin.

In Plesk Migrator extension you can define the panel type of the source server, so I will try to see if this helps.
 
If you have to migrate a single WP site, try this extension:

 
I get this warning, in Source document root I left the field empty for automatic detection.

Done
Connecting to the source domain

Failed
Scanning for content
Unable to locate the document root directory of the website.
Possible reasons:
1. The FTP user only has access to a directory inside the document root.
For example, this can happen when migrating the website Example Domain if the FTP user only has access to a subdirectory of the website, e.g. http://example.com/blog.
To resolve the issue, specify correct source document root and source website URL in advanced options below.
2. The document root of the website is located more than three levels deep relative to the FTP root directory.
For example, this can happen when migrating the website Example Domain if its document root directory is /var/www/vhosts/my/sites/example.com/httpdocs and the FTP user root is in /var/www/.
To resolve the issue, specify correct source document root in advanced options below.
3. There are rewrite rules for the document root (for example, specified by mod_rewrite and the .htaccess file).
To resolve the issue, temporarily disable the rewrite rules.
 
Thank you, I managed to login, but the Progress spinning reel is stuck, and the progress never ends.
 

Attachments

  • Skærmbillede 2022-12-30 kl. 23.57.03.png
    Skærmbillede 2022-12-30 kl. 23.57.03.png
    34.5 KB · Views: 5
After logging in to Plesk again, this report came up:

status-error.png
Failed to create database dump of database 'xxxxx'.
'mysqldump' utility returned non-zero exit code.
- Exit code: 3
- Stderr: mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `LFTglLWJpK_postmeta` at row: 963

status-success.png
File '/var/www/vhosts/xxxxx/httpdocs/wp-content/maintenance.php': fixed paths, that were updated during migration.
Line #8 of the file was changed.
Before fix: // /home/xxxxx/public_html/wp-content/maintenance/template.phtml
After fix: // /var/www/vhosts/xxxxx/httpdocs/wp-content/maintenance/template.phtml

status-success.png
File '/var/www/vhosts/xxxxx/httpdocs/wp-content/autoptimize_404_handler.php': fixed paths, that were updated during migration.
Line #30 of the file was changed.
Before fix: $ao_cache_dir = '/home/xxxxx/public_html/wp-content/cache/autoptimize/';
After fix: $ao_cache_dir = '/var/www/vhosts/xxxxx/httpdocs/wp-content/cache/autoptimize/';

status-success.png
WordPress at '/var/www/vhosts/xxxx/httpdocs/': adjusted database name.
Line #24 of the file '/var/www/vhosts/xxxxx/httpdocs/wp-config.php' was changed.
Before fix: define('DB_NAME', 'xxxxx');
After fix: define('DB_NAME', 'xxxxx2');

status-success.png
WordPress at '/var/www/vhosts/xxxxx/httpdocs/': adjusted database user name.
Line #26 of the file '/var/www/vhosts/xxxx/httpdocs/wp-config.php' was changed.
Before fix: define('DB_USER', 'xxxxxx);
After fix: define('DB_USER', 'xxxxx2');

status-warning.png
Failed to register WordPress instance at '/var/www/vhosts/xxxxx/httpdocs/' in WordPress Toolkit on the target server.
You will not be able to manage application with the help of WordPress Toolkit. [Hide details]
Command execution failed on the local server with non-zero exit code.
command: plesk ext wp-toolkit register -path /httpdocs/ -domain-id 7
exit code: 3
stdout:
stderr: [2022-12-30 21:46:24.114] 88806:63af4e201b749 ERR [extension/wp-toolkit] An error occurred while executing WP-CLI command for instance: WordPress installation #5 ('https://xxxxx'). Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

[2022-12-30 21:46:24.291] 88806:63af4e201b749 ERR [extension/wp-toolkit] An error occurred while executing WP-CLI command for instance: WordPress installation #5 ('WordPress › Installation'). Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

[2022-12-30 21:46:24.774] 88806:63af4e201b749 ERR [extension/wp-toolkit] Failed to reset cache for the instance #5, reason: Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

Failed to reset cache for the instance #5: Error: The site you have requested is not installed.
Run `wp core install` to create database tables.

exit status 3
 
Sorry to read that once again you ran into a new issue. Beyond the message, what is the situation on your server now? Can you see the files of the imported site? Can you see a database for that? Does the database name match what's given in wp-config.php?
 
Hi Peter, thanks for your persistent help.

The files are in place, and the database is created and match the name in wp-config.php.
But there are no tables in the database.

I'm trying to copy the database from the source site using the database import. The Progress wheel is spinning, but I'm not sure
the import will be successful.
 
@calu you could try to export (dump) the database manually from cPanel and import it manually in Plesk.

I came across this video which covers a manual site migration, including database, from cPanel to Plesk. Which might be helpful to watch.
 
Seen the video, this looks promising, I wonder why it is necessary to use Filezilla for the file transfer, instead of just importing with Plesk.
 
Back
Top