简体   繁体   中英

Wordpress gives 500 error on search results on different server

Background

We have developed a WordPress website on a staging server with a custom theme and a custom search.php to display the results. This worked like a charm with no errors or warnings in the log.

When the website was put on a different environment (Windows VM), the search results would give a 500 error.

What have we've tried

Since the search works on the staging and not on the live server, we have compared the server specs and PHP installs. These are results from a site check on the live server

Server architecture: Windows NT 10.0 AMD64
Web server: Microsoft-IIS/10.0
PHP version: 7.2.18 (Supports 64bit values)
PHP SAPI: cgi-fcgi
PHP max input variables: 1000
PHP time limit: 300
PHP memory limit: 256M
Max input time: 60
Upload max filesize: 20M
PHP post max size: 8M
cURL version: 7.64.0 OpenSSL/1.1.1b
Is SUHOSIN installed?: No
Is the Imagick library available?: No

This is the staging server:

Server architecture: Linux 4.19.8-x86_64-linode120 x86_64
Web server: nginx/1.13.6
PHP version: 7.3.2 (Supports 64bit values)
PHP SAPI: fpm-fcgi
PHP max input variables: 3000
PHP time limit: 120
PHP memory limit: 256M
Max input time: 60
Upload max filesize: 64M
PHP post max size: 64M
cURL version: 7.60.0 OpenSSL/1.0.1e
Is SUHOSIN installed?: No
Is the Imagick library available?: Yes
.htaccess rules Custom rules have been added to your .htaccess file.

The PHP version is recently set to 7.3 on the staging server for testing purposes. I have also checked if all required PHP components are installed on the live server, and that's the case.

Question

What do you suggest I try next? PHP version 7.2 or 7.3 doesn't seem to be the issue, the big difference I see is that maybe it's not working because it's on a Windows server, but the rest of the website works fine.

The error is found. I've used short PHP opening '' at one point and that wasn't configured on the new server in the php.ini.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM