• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Move magento install folder

dalydesign

Basic Pleskian
I installed Magento via plesk control panel into a folder called /beta whilst we were building a new magento site from scratch

Once completed, we moved the magento files from /beta to the root folder of the domain (/home/vhosts/mydomain.com/httpdocs) .

Now when we use plesk to change the preferred domain from mydomain.com to www.mydomain.com we receive a load of errors:

Code:
Warning: Unable to configure "". The following problems were found: Non-zero exit status returned by script. Output stream: 'PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /usr/local/psa/var/apspackages/1c3a3014-04b2-4cfe-94fa-b3847d615901/cache/scripts/env-parser.php on line 230 PHP Warning: fopen(/var/www/vhosts/earplugged.co.uk/httpdocs/beta//app/etc/local.xml): failed to open stream: No such file or directory in /usr/local/psa/var/apspackages/1c3a3014-04b2-4cfe-94fa-b3847d615901/cache/scripts/file-util.php on line 15 '. Error stream: 'PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/London' for 'BST/1.0/DST' instead in /usr/local/psa/var/apspackages/1c3a3014-04b2-4cfe-94fa-b3847d615901/cache/scripts/env-parser.php on line 230 PHP Warning: fopen(/var/www/vhosts/earplugged.co.uk/httpdocs/beta//app/etc/local.xml): failed to open stream: No such file or directory in /usr/local/psa/var/apspackages/1c3a3014-04b2-4cfe-94fa-b3847d615901/cache/scripts/file-util.php on line 15 '.

I assume it's looking for the files in /beta.

I can move them back, but how do we move them into the root without it messing up the hosting control panel.
 
Unable to load dynamic library '/usr/lib64/php/modules/apc.so' - /usr/lib64/php/modules/apc.so: cannot open shared object file: No such file or directory
PHP module got corrupt after the PHP re-installation\upgrade (in our case - APC).
Try to re-install APC PHP module:

# pecl uninstall apc
# pecl install apc
 
Thanks, I ended up finding a solution that involved editing the Plesk database.

As an admin user, at a terminal (note this is for Plesk 12 Linux only):


Check the table to see the application paths (take a look in urlPrefix fields)

Code:
# plesk db show apsResourcesParameters


Then create a SQL dump of your plesk database

Code:
# plesk db dump > PSA.sql


This creates a SQL dump, essentially a backup of your psa database into the root user folder.


OPTIONAL ...I then created a second dump file as a backup because I needed to edit PSA.sql via
Code:
# plesk db dump > PSA_Orig.sql

Edit the 'PSA.sql' file looking for instances of "/beta" and "beta" in the 'apsResourcesParameters' table.


Remove the relevant parts, for instance:

(145,71,'urlPrefix','beta') becomes (145,71,'urlPrefix','')

(14,16,'/httpdocs/beta',0,14) becomes (14,16,'/httpdocs',0,14)

Once your SQL file is edited, save it and import it back into the psa database with the following command:

Code:
# plesk db < PSA.sql


That should now have the folder changed. To check that plesk has recognised the changes, visit the application settings and you will see that the beta has gone.




Finally, check the tables again to see the 'beta' has been removed...

Code:
# plesk db show apsResourcesParameters
 
Back
Top