Hosting PHP/ZEND Framework applications in Windows Azure Web Role (Full IIS)
Symptom: Unable to host application using ZEND framwork and PHP. The role gets started but runtime issues occur. Here's one of the errors logged in the application event log & browser indicating PHP prcess in crashing.
Log Name: Application
Source: Application
Error
Date:
4/21/2011 9:12:11 PM
Event ID: 1000
Task Category: (100)
Level: Error
Keywords: Classic
User:
N/A
Computer: RD00155D38277C
Description:
Faulting
application php-cgi.exe, version 5.3.1.0, time stamp 0x4b06c42f, faulting module php-cgi.exe, version 5.3.1.0, time stamp 0x4b06c42f, exception code 0xc0000005, fault offset 0x0000191a, process id 0x618, application start time 0x01cc0068c7d3bcdd.
Upon running processmon, found out that ZEND framework files were not being located. Process monitor basically complained about not finding the path for zend specific files. I could see that, F:\approot\php\php.ini (configuration file) is where it has configured all the paths listed below. I would expect them to be directed somewhere under F:\approot\php directory instead.
29:20.3 php-cgi.exe 2324 CreateFile C:\xampp\php\extras\ PATH NOT FOUND
29:20.3 php-cgi.exe 2324 CreateFile C:\xampp\php\ PATH NOT FOUND
29:20.3 php-cgi.exe 2324 CreateFile C:\xampp\php\extras\browscap.ini PATH NOT FOUND}
Here's a good video and corresponding blog that lets you put PHP on IIS.
https://channel9.msdn.com/posts/php-azure
https://rhizohm.net/irhetoric/post/2011/04/18/How-To-Do-PHP-Deployment-To-Windows-Azure.aspx
Just go through the above video and blog, find the section where it talks about copying the files using the Start-up task. Since the issue is with not being able to find the zend framework specific files and folders as indicated above, you can also create a startup task to copy all the files and folders under “c:\xampp\php” to “F:\approot\php”
Here’s how you can do it:
My research led me to conclude that the ZEND framework is generally installed at C:\xmapp\php (at least in case of using apache server, it could be a different location if installing for IIS), copy all the files and sub-folders under “C:\xmapp\php” or any relevant location to a folder call “putmoduleshere” within your application folder on the development machine like explained in the blog/video above. You can then use a similar startup task of copy files and do an xcopy as below.
xcopy "..\putmoduleshere\*.*" "%approot%\PHP\"