Primary script unknown error when trying to call a php webpage
Primary script unknown error when trying to call a php webpage
Hi again,
I'm trying to install Dolibarr and Prestashop, the first one in a subdomain created through KH panel and the second one in the domain, but everytime I enter the index.php file url for the installation script I get 'File not found' and the following error on the log.
[proxy_fcgi:error] [pid 8491:tid 139727373702912] [client XXXXXXXXX:37334] AH01071: Got error 'Primary script unknown\n'
The databases are set to local only, Apache settings are the default ones, php 7.2 is supposed to be supported by both programs, I've created cgi-bin folders in both directories, installed the required php packages, enabled fpm, reloaded apache and restarted the servers.
Am I missing some config option on the Keyhelp control panel?
I'm trying to install Dolibarr and Prestashop, the first one in a subdomain created through KH panel and the second one in the domain, but everytime I enter the index.php file url for the installation script I get 'File not found' and the following error on the log.
[proxy_fcgi:error] [pid 8491:tid 139727373702912] [client XXXXXXXXX:37334] AH01071: Got error 'Primary script unknown\n'
The databases are set to local only, Apache settings are the default ones, php 7.2 is supposed to be supported by both programs, I've created cgi-bin folders in both directories, installed the required php packages, enabled fpm, reloaded apache and restarted the servers.
Am I missing some config option on the Keyhelp control panel?
Last edited by lmarcos on Tue 28. Jan 2020, 15:02, edited 1 time in total.
Re: Primary script unknown when trying to call a php webpage
Hallo,
are the folders and file rights correct?
Put a simply php file with phpinfo(); into the webfolder to see if PHP works.
are the folders and file rights correct?
Put a simply php file with phpinfo(); into the webfolder to see if PHP works.
Mit freundlichen Grüßen / Best regards
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Primary script unknown when trying to call a php webpage
It's returning the same file not found and the same error log.
/home/users/user/www/domain
Folder permits are 755.
/home/users/user/www/domain
Folder permits are 755.
Re: Primary script unknown when trying to call a php webpage
And php version is 7.2.24-0ubuntu0.18.04.2
Re: Primary script unknown when trying to call a php webpage
Check the owner and group of the folders and files
Mit freundlichen Grüßen / Best regards
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Primary script unknown when trying to call a php webpage
What does this mean in detail? It is normally not necessary when running Keyhelp.I've created cgi-bin folders in both directories, installed the required php packages, enabled fpm, reloaded apache and restarted the servers.
Mit freundlichen Grüßen / Best regards
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Primary script unknown when trying to call a php webpage
Owner ID & Group ID 33 for the domain and one subdomain
Owner ID & Group ID 5001 for the other subdomain
Some other folders not under www have owner ID 5001 and Group ID 33
Keyhelp folder has owner ID 1001 and group ID 33, though and owner & group ID 1001 for the www folder.
Owner ID & Group ID 5001 for the other subdomain
Some other folders not under www have owner ID 5001 and Group ID 33
Keyhelp folder has owner ID 1001 and group ID 33, though and owner & group ID 1001 for the www folder.
Last edited by lmarcos on Tue 28. Jan 2020, 14:52, edited 1 time in total.
Re: Primary script unknown when trying to call a php webpage
This means that I thought that maybe some needed packages were missing and that was the reason php wasn't working for those applications because it's working on Keyhelp (you've made a great control panel here, by the way).
Re: Primary script unknown error when trying to call a php webpage
Hello,
www folder should belong to the Keyhelp User as user and www-data as group and has 750 rights
Subfolders should belong to the Keyhelp user as user and group and have 755 rights
Files should belong to the Keyhelp user as user and group and have 644 rights, files that should be executed need 755 rights
www folder should belong to the Keyhelp User as user and www-data as group and has 750 rights
Subfolders should belong to the Keyhelp user as user and group and have 755 rights
Files should belong to the Keyhelp user as user and group and have 644 rights, files that should be executed need 755 rights
Mit freundlichen Grüßen / Best regards
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Primary script unknown error when trying to call a php webpage
That solved it, thank you very much, Florian.Florian wrote: ↑Tue 28. Jan 2020, 16:01 Hello,
www folder should belong to the Keyhelp User as user and www-data as group and has 750 rights
Subfolders should belong to the Keyhelp user as user and group and have 755 rights
Files should belong to the Keyhelp user as user and group and have 644 rights, files that should be executed need 755 rights
One other question, I'm getting the following message with PrestaShop installation needs to write critical files in the folder var/cache. Please review the permissions on your server.
I don't want to mess anything.
Re: Primary script unknown error when trying to call a php webpage
Hallo,
check the permission of the folders var/cache inside your prestashop directory if it has got the correct permissions.
Do not set 777! Since PHP is running under the user ID of the Keyhelp user it can create files inside the folder if the folder belongs to the Keyhelp user.
check the permission of the folders var/cache inside your prestashop directory if it has got the correct permissions.
Do not set 777! Since PHP is running under the user ID of the Keyhelp user it can create files inside the folder if the folder belongs to the Keyhelp user.
Mit freundlichen Grüßen / Best regards
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Florian Cheno
**************************************************************
Keyweb AG - Die Hosting Marke
Neuwerkstr. 45/46, 99084 Erfurt / Germany
http://www.keyweb.de - http://www.keyhelp.de
**************************************************************
Re: Primary script unknown error when trying to call a php webpage
It must be something else, because I set permissions to 755 on five other folders and it's still telling me Permissions on files and folders
Recursive write permissions for Apache user on ~/img/
PS Edited. Those folders were not missing permission, but owners. Just in case it helps others in the future.
So, once again, thank you very much and have a very nice day, Florian.
Recursive write permissions for Apache user on ~/img/
PS Edited. Those folders were not missing permission, but owners. Just in case it helps others in the future.
So, once again, thank you very much and have a very nice day, Florian.
Re: Primary script unknown error when trying to call a php webpage
So if I am correct this is good changing myuser with the needed KeyHelp username:
Code: Select all
cd /home/users/myuser/
sudo chmod 750 www
sudo chmod myuser:www-data www
cd www
sudo chown -R myuser:myuser .
sudo chmod -R 644 .
sudo chmod -R +X .