Koozali.org: home of the SME Server

Apache error: Primary script unknown

Offline holck

  • ****
  • 317
  • +1/-0
Apache error: Primary script unknown
« on: September 25, 2022, 08:05:34 PM »
After upgrading to 10.1 (thanks again to everyone who contributed!), I get lots of these messages in /var/log/httpd/error_log:
Code: [Select]
[Sun Sep 25 07:55:23.595498 2022] [proxy_fcgi:error] [pid 12089] [client 202.226.37.79:58248] AH01071: Got error 'Primary script unknown'
[Sun Sep 25 07:55:36.017873 2022] [proxy_fcgi:error] [pid 10274] [client 161.97.152.7:56272] AH01071: Got error 'Primary script unknown'
I have yet to spot if and where these messages actually point to something not working as expected.
......

Offline Jean-Philippe Pialasse

  • *
  • 2,746
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Apache error: Primary script unknown
« Reply #1 on: September 25, 2022, 08:43:37 PM »
assuming you use php74 as default for your ibay, to see if anything is abnormal
(otherwise adapt the path)

Code: [Select]
/opt/remi/php74/root/usr/sbin/php-fpm -t
httpd -t

but it could be related to simply php file not existing
can you relate those entries to access_log entries ?


Offline holck

  • ****
  • 317
  • +1/-0
Re: Apache error: Primary script unknown
« Reply #2 on: September 25, 2022, 09:45:04 PM »
assuming you use php74 as default for your ibay, to see if anything is abnormal
(otherwise adapt the path)

Code: [Select]
/opt/remi/php74/root/usr/sbin/php-fpm -t
httpd -t
Code: [Select]
# /opt/remi/php74/root/usr/sbin/php-fpm -t
[NOTICE] configuration file /etc/opt/remi/php74/php-fpm.conf test is successful
Quote
but it could be related to simply php file not existing
can you relate those entries to access_log entries ?
Yes, I haven't checked all occurrences, but most of the errors seem related to entries like these in /var/log/httpd/access_log
Code: [Select]
ibsgaarden.dk 123.31.12.18 - - [25/Sep/2022:13:00:47 +0200] "POST /wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36"
ibsgaarden.dk 123.31.12.18 - - [25/Sep/2022:16:26:26 +0200] "POST /wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36"
ibsgaarden.dk 123.31.12.18 - - [25/Sep/2022:17:31:47 +0200] "POST /wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"
ibsgaarden.dk 123.31.12.18 - - [25/Sep/2022:18:36:37 +0200] "POST /wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0"
ibsgaarden.dk 123.31.12.18 - - [25/Sep/2022:20:36:15 +0200] "POST /wordpress/xmlrpc.php HTTP/1.1" 404 16 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36"
......

Offline Jean-Philippe Pialasse

  • *
  • 2,746
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Apache error: Primary script unknown
« Reply #3 on: September 26, 2022, 06:43:33 AM »
we might need to add a if file exist on our template then to limit this noise

like this

Code: [Select]
<FilesMatch ".+\.ph(ar|p|tml)$">
    <If "-f %{REQUEST_FILENAME}">
        SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost"
    </If>
</FilesMatch>

could you open a NFR bug against  smeserver-php ?

source  https://serverfault.com/questions/984990/ah01071-got-error-primary-script-unknown-n-apache2-4-php-fpm7-2

Offline holck

  • ****
  • 317
  • +1/-0
Re: Apache error: Primary script unknown
« Reply #4 on: September 26, 2022, 04:26:07 PM »
Thanks for quick response, I've opened a bug: https://bugs.koozali.org/show_bug.cgi?id=12201
......