What is Cause of this Error and How to Fix? : Got error 'Primary script unknown'

Thanks @eris - duly noted. I will document this as a known issue and look for a resolution in 1.4. Thanks for confirming and the quick response.

@eris - Do you guys have a targeted date for the 1.4 release? Is there some manual fix I can deploy for now?

I found some other forum post on this topic, not sure their solution would apply to ours, but it seems this could just be a folder permission issue. Can you please share if it’s a fairly easy fix. Thanks!

Hi @eris - Just checking in on this. I noticed from my weekly error log report that this issue is still present, even though I have upgraded to HestiaCP 1.4.

I saw this in the error log today:

[Sun Jun 06 21:34:21.962601 2021] [proxy_fcgi:error] [pid 107040:tid 140671973316352] [client 211.75.58.114:0] AH01071: Got error ‘PHP message: phpmyadmin: Failed to load /var/lib/phpmyadmin/config.inc.php Check group www-data has read access and open_basedir restrictions.’

Is there something I need to manually do or configure after HestiaCP is upgrade to 1.4 for this fix to be put in place?

Thanks!

Make sure you used the manual upgrade script found in /usr/local/hestia/instal/upgrade/manual/

Thanks @eris!

I missed that in the update log notes. I attempted to run that script, but it appears to have some issue:

Here is what I get:

root@srv01:/usr/local/hestia/install/upgrade/manual# sh /usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 10: source: not found

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 12: source: not found

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 13: source: not found

For deleting PHPmyAdmin you will need confirm the removal with root password. Password can be found in /usr/local/hestia/conf/mysql.conf

Would you like to continue? [y/n]/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 21: read: arg count

/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 23: [[: not found

root@srv01:/usr/local/hestia/install/upgrade/manual# 

Please note, I see that it’s asking a question to confirm the password, but I am not even given a chance to provide the password. I’m currently running 1.4.1 if it helps. Should I first upgrade to 1.4.2 and then attempt this again?

Okay, I upgrade to 1.4.2 successfully. And I noticed the same issue when trying to run the script with:
sh scriptname.sh, so I tried simply running with ./scriptname.sh. Which appeared to work, but then a different problem.

root@srv01:/usr/local/hestia/install/upgrade/manual# ./migrate_phpmyadmin.sh

For deleting PHPmyAdmin you will need confirm the removal with root password. Password can be found in /usr/local/hestia/conf/mysql.conf

Would you like to continue? [y/n]y

[ * ] Make backup old config files

[ * ] Remove PHPmyAdmin via ATP

phpmyadmin set on hold.

[ * ] Delete possible trail

[ * ] Create new folders

[ * ] Installing phpMyAdmin version v5.1.0...

tar (child): phpMyAdmin-5.1.0-all-languages.tar.gz: Cannot open: No such file or directory

tar (child): Error is not recoverable: exiting now

tar: Child returned status 2

tar: Error is not recoverable: exiting now

cp: cannot stat 'phpMyAdmin-5.1.0-all-languages/*': No such file or directory

sed: can't read /usr/share/phpmyadmin/libraries/vendor_config.php: No such file or directory

sed: can't read /usr/share/phpmyadmin/libraries/vendor_config.php: No such file or directory

[ * ] Createing localhost config

[ * ] Drop database could throw a error if successfull removal was preformed

[ * ] Create new user

[ * ] Create new database

root@srv01:/usr/local/hestia/install/upgrade/manual#

So it appears this is not working.

Also, attempting to access phpmydmin from the HestiaCP link results in this:

Screen Shot 2021-06-07 at 2.16.15 PM
Screen Shot 2021-06-07 at 2.16.20 PM

tar (child): phpMyAdmin-5.1.0-all-languages.tar.gz: Cannot open: No such file or directory
It didn’t download phpmyadmin properly…

Thanks, so should I wget this file into a specific directory? I would assume the script would do that action. Is there any instructions on how to do the manual update. Sorry if I missed it, but I assume I should just run the script and it will take care of all of this.

If you could point me in the direction to the instruction/knowlege doc that would be great.

There are no instructions available…

And config.inc.php

I have executed the script probally 100 of times and never had issues…

hmmm, I think I might have found the root cause. Internet connection outbound appears to be somehow dead on the server. Websites are still being served (although a big slow) and I can still remotely log in via SSH, but it seems it can’t connect to external servers. I guess that’s why the phpmyadmin file is not getting downloaded.

I was just curious and attempted to run update and upgrade and noticed the issue.

I posted a new question here as it appears to be related to after I upgraded to 1.4.2.

Any idea what’s going on? Seems to be related to the 1.4.2 update. Server was working just fine before I ran the update.

This was an issue in 1.4.1 it should be fixed for 1.4.2…

1 Like

THANK YOU!

All working now and recovered. It did seem the issue with the phpmyadmin manual upgrade script was due to that firewall issue. Once I ran the commands you provided, apt update and upgrade resumed working properly. I then was able to successfully run the phpmyadmin script and it successfully downloaded the file and upgrade phpmyadmin.

I also rebooted the server to make sure things remained intact and I was able to run update and upgrade again with no problem.

Thanks for the quick response and help. I was worried I was going to have to do a restore from a DigitalOcean backup. Thanks for saving me the time!

For anyone else that ends up on this thread. The commands eris provided me with to restore the firewall issue and connectivity, can be found here:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.