question

PeteTucker-2846 avatar image
0 Votes"
PeteTucker-2846 asked ryanchill commented

PHP scripts started failing

At some point during maintenance YMP2-TS8 all of my php scripts started failing with "The page cannot be displayed because an internal server error has occurred.". I created an HTML file that worked then changed the extension to .php and now I get that internal server error (https://www.textmuse.com/zivoz/demo/test2.html, https://textmuse.com/zivoz/demo/test2.php). There are no errors in php_errors.log.

azure-webapps
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ryanchill avatar image
0 Votes"
ryanchill answered ryanchill commented

I would try Enable diagnostics logging for apps in Azure App Service to better determine what the issue is. If you a simple HTML file works but your PHP file doesn't, it may be an issue with the script. Just curious if a plain Jane PHP file worked e.g.

<?php

echo "This is a test";


If you're running your PHP app on Linux, try accessing the docker logs via https://<appname>.scm.azurewebsites.net/api/logs/docker to determine if there were any PHP errors during image retrieval and app startup. PHP on Linux plan uses PHP 8 so there may be an incompatibly there; highly unlikely but without additional logging information not outside the realm of possibility.



· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @ryanchill. The PHP file was actually identical to the HTML file, I just changed the extension. I ended up moving the site to a Linux server running PHP 8. There were some incompatibilities, but I'm back up and running.

0 Votes 0 ·
ryanchill avatar image ryanchill PeteTucker-2846 ·

It's best to run PHP workflows on Linux for better support so I'm glad that is working for you.

0 Votes 0 ·