We used to turn on the Detailed Error Messages to help troubleshooting problems of web application hosted on Windows Azure Web Sites. This feature is not only available for ASP.Net application, but available for PHP application as well.

Here is the steps about how to enable and get the log.

Turn on "DETAILED ERROR MESSAGES"

·         Logon to the management portal

·         Navigate to your web site has a problem

·         Click the "CONFIGURE" tab

·         Turn on the "DETAILED ERROR MESSAGES"

Download the detailed error logs

·         1. Logon to the site using FTP client with your deployment credentials.

·         2. Go to the LogFiles folder

·         3. Download the php_errors.log

 

Sample Content of the log

The PHP error log contains follow fields:

·         Datetime in UTC

·         Reason of the error

·         File name

·         Line number

 

Here is a sample for PHP with follow content.

<?

phpinfo(;

?>

 

[11-Dec-2012 01:34:12 UTC] PHP Parse error:  syntax error, unexpected ';', expecting ')' in C:\DWASFiles\Sites\HelloWorldWithMySQL\VirtualDirectory0\site\wwwroot\error.php on line 2 

 

Here is a sample for Joomla site with SQLAzure. You can find the problem here.

http://social.msdn.microsoft.com/Forums/en-US/windowsazurewebsitespreview/thread/a97283a9-c796-4a2b-8c61-b0d43dc26140

 

 [10-Dec-2012 09:32:15 UTC] PHP Catchable fatal error:  Argument 1 passed to JSchemaChangeset::getUpdateQueries() must be an array, boolean given, called in C:\DWASFiles\Sites\WZHAOJOOMLA\VirtualDirectory0\site\wwwroot\libraries\cms\schema\changeset.php on line 63 and defined in C:\DWASFiles\Sites\WZHAOJOOMLA\VirtualDirectory0\site\wwwroot\libraries\cms\schema\changeset.php on line 213

[10-Dec-2012 09:32:15 UTC] PHP Fatal error:  sqlsrv_errors contains an invalid type in C:\DWASFiles\Sites\WZHAOJOOMLA\VirtualDirectory0\site\wwwroot\libraries\joomla\database\database\sqlsrv.php on line 677

 

See you next time,

Wei