Symptoms
- The Apache error log entries for the affected websites are similar the following:
CONFIG_TEXT: [Mon Jan 22 13:27:01.735290 2024] [proxy_fcgi:error] [pid 9494:tid 139778703505152] [client 203.0.113.2:33400] AH01071: Got error 'PHP message: PHP Warning: Undefined array key "example" in /var/www/vhosts/example.com/httpdocs/example.php on line 83', referer: https://www.google.com
[Mon Jan 22 13:31:37.083939 2024] [proxy_fcgi:error] [pid 9494:tid 139778703505152] [client 203.0.113.2:35648] AH01071: Got error 'Primary script unknown'
[Mon Jan 22 13:32:44.573579 2024] [proxy_fcgi:error] [pid 9937:tid 139778586007296] [client 23.26.220.23:36104] AH01071: Got error 'Primary script unknown'
[Mon Jan 22 13:45:05.394552 2024] [security2:error] [pid 9494:tid 139778686719744] [client 78.153.140.218:39198] [client 203.0.113.3] ModSecurity: Access denied with code 403 (phase 1). Matched phrase "/.env" at REQUEST_URI. [file "/etc/httpd/conf/modsecurity.d/rules/comodo_free/02_Global_Generic.conf"] [line "117"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "example.com"] [uri "/.env"] [unique_id "Za5VQR8pThynFWOzfw6jvgAAAIU"]
[Mon Jan 22 14:17:19.763567 2024] [proxy_fcgi:error] [pid 9494:tid 139778560829184] [client 203.0.113.4:45854] AH01071: Got error 'Primary script unknown'
[Mon Jan 22 14:19:21.361552 2024] [proxy_fcgi:error] [pid 9937:tid 139778594400000] [client 203.0.113.4:46832] AH01071: Got error 'PHP message: PHP Warning: Undefined variable $newPass in /var/www/vhosts/example.com/httpdocs/mailfiles/orderConfirm.php on line 17', referer: https://example.com/
[Mon Jan 22 14:23:49.363204 2024] [proxy_fcgi:error] [pid 9937:tid 139778577614592] [client 203.0.113.6:48482] AH01071: Got error 'Primary script unknown', referer: https://example.net/contact-us
[Mon Jan 22 14:23:50.963476 2024] [proxy_fcgi:error] [pid 9563:tid 139778728683264] [client 203.0.113.6:48486] AH01071: Got error 'Primary script unknown', referer: https://example.net/contact
[Mon Jan 22 15:11:20.941118 2024] [proxy_fcgi:error] [pid 27558:tid 139778632750848] [client 203.0.113.3:57112] AH01071: Got error 'Primary script unknown'
[Mon Jan 22 15:24:08.490614 2024] [proxy_fcgi:error] [pid 31177:tid 139778606368512] [client 203.0.113.3:58942] AH01071: Got error 'Primary script unknown', referer: https://example.com/example.php - Without any changes being done, websites are inaccessible for a period of time
- The Plesk server does not appear to be experiencing high load
Cause
The "Primary script unknown" errors states that PHP is attempting to connect to a file it cannot locate or does not have permission to access.
If this happens temporarily, it may mean that bots are trying to access scripts that would break the security of the website and are not succeeding.
In all other cases, permissions for files and directories and web server configuration files need to be fixed.
Resolution
Fix permissions for files and directories and web server configuration files
1. Log into your server via SSH
2. Execute the following command in order to repair file permissions:
# plesk repair fs
3. Execute the following command in order to repair web server configuration files:
# plesk repair web
Additional information
Php: Primary script unknown error message displayed in FastCGI stderr
Comments
0 comments
Please sign in to leave a comment.