0

I just upgraded my cPanel easyApache 3 (php 5.5) to easyApache 4 (php 7.3). All in all, the upgrade went smoothly. I have tested many pages through two full http websites and one https website - all seems good except for one page in the root https directory - it returns a 500 internal server error and for the life of me I can't figure out why.

The file has a .php extension, has the same permissions as all other directory files that are working just fine. I can't find any entries in any error_log files pertaining to this particular script and lastly executing the php file from command line runs cleanly - no errors. This script was working cleanly in EA3 before the upgrade to EA4

At first I was thinking maybe mod rewrite in .htaccess was the issue but the same config works for all other pages served via https. Where else can I look?

.htaccess

RewriteEngine On

RewriteCond %{HTTP_HOST} !^api\. [NC,OR]
RewriteCond %{HTTPS} off
RewriteRule ^ -  [F]

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
  AddType application/x-httpd-ea-php73 .php .php7 .phtml .html .htm
</IfModule>
# php -- END cPanel-generated handler, do not edit

DirectoryIndex index.html index.htm index.php
rolinger
  • 2,787
  • 1
  • 31
  • 53
  • 1
    add these on top of your php file `error_reporting(-1); ini_set('display_errors', 'On');` and share the results – Red Bottle Jun 11 '19 at 07:58
  • Thank you. That did the trick. Its telling me a function does not exist in a specific `include "includes.php" ;` file. But it does exist and its the same includes.php file that is used by every script in the directory and subfolders - and they are all working. I am scratching my head on this one. – rolinger Jun 11 '19 at 13:21
  • Well, found it. Turns out the file i had on my server was incorrectly referencing `../includes.php` while my local file I edit and then upload to the server (because I never directly edit files on the server) was correctly `includes.php`. – rolinger Jun 11 '19 at 13:37

0 Answers0