t_bergman Posted February 20, 2013 Report Share Posted February 20, 2013 Guide to phpVMS on Windows (IIS) Servers First let me thank Nabeel for all of his hard work on phpVMS, it truly is a wonderful system. This guide is for those of us who need to be hosting in a Windows environment; just like Linux, Windows environments vary and this is simply a guide to getting phpVMS up and running and not a tutorial. This guide is divided into a few different sections: first why I decided to write this guide, myhosting environment, installation and modification on the phpVMS files and databases, modifications made to the hosting environment, other known solutions to hosting phpVMS in a Windows based environment, and food for thought. I decided to write this guide as there must be someone besides me who wishes to host phpVMS in a Windows environment. phpVMS is such wonderful system that I don’t think people should be turned off to the system when it doesn’t work when installed under IIS without modification. Before we get into the technical stuff let me say that phpVMS was designed and should be run under Linux, if you’re hosting it under windows please do so for a good reason. This guide is also simply here as information and does not guarantee a successful installation under Windows. I am hosting phpVMS under Windows Server 2008 R2 Datacenter edition, using PHP v5.3.19 and MySQL v5.6. Both PHP and MySQL are installed using the Microsoft Web Platform Installer. Both are without modification when starting the phpVMS installation, automatic updates are turned on. Start off with running the phpVMS install script in a folder of your choice, my preference is to put all applications under the wwwroot folder to avoid any permissions complications. Create a MySQL database with the appropriate user permissions and install phpVMS per install/install.php. Once phpVMS is installed there are two quirks to the system, you cannot file manual or automatic PIREPS and data isn’t being transmitted to acarsdata database. After some thinking and a lot of coffee this seems to be an issue with how PHP under IIS’s fastcgi module is processing the phpVMS code, somewhere there must be an error. To get started tracking down the error, set up an aircraft along with a flight for you to test your installation with. After trying different php.ini settings, after setting mysql.trace_mode to on I was able to see the errors which were occurring. Make sure you restart your website after changings php.ini values. Before trying to auto file a PIREP I was only trying to manually file one. After going through all of the errors, I was able to get the manual filing system working by providing NULL as a default value to the price, gross, pilot pay, expenses, and revenue fields in the PIREPS table. The next challenge was how to get ACARS information onto the moving map and file PIREPS automatically. To find the errors for auto PIREP filing open the local.config.php file, this can be done in notepad but I prefer using Notepad++, change the ACARS_DEBUG and DEBUG_MODE to true. In theory by doing this all errors should be logged in the logs section. ./core/logs. These are where your logs are located and will provide you (assuming the phpVMS has the correct permissions to write the logs) the error which arise. While invoking errors you will need to start kACARS or another program several times as only one error comes up at a time. After correcting the errors within the database, these deal with a value not having a default value for me and all I had to do was add NULL to the record, phpVMS should be operating as if it were on Linux. The final step for me was to get the SMTP mail function working. To do this I added the appropriate fields to my php.ini file, the local.config.php, and the class.phpmailer.php, appropriate fields being my SMTP settings of my email host for the no-reply account. Another known solution is to install MySQL in strict mode, this was tested and confirmed by another forum member, I have also had luck while using the WAMP web server along with a local install of MySQL. Some food for thought: I have not tested phpVMS which is hosted on a different server as the MySQL server is located, this may hurt or help the issue of running phpVMS under windows. Hopefully you have found this guide helpful in getting your phpVMS install squared away on Windows. If I ever do another install from scratch I plan on updating this post with pictures to make it more of a tutorial. 1 Quote Link to comment Share on other sites More sharing options...
kenjacobson Posted February 25, 2013 Report Share Posted February 25, 2013 Thanks for the insight, it has been helpful so far. After turning the phpvms debugging on I too have been able to isolate a problem I have been having with submitting pireps, which seems to be completely centered around the SQL syntax. I'm hoping you might be able to help with a little more detail on how you solved your problems with regard to (WRT) manual PIREPS. You mentioned that you added a NULL as the price, gross, pilot pay, expenses, and revenue fields in the PIREPS table. Are you referring to a MySQL db table? Also any additional detail you could provilde WRT how you fixed the problem you were having with filing PIREPS with kACARS would be greatly appreciated, I'm sure not only by myself, but by others who attempt to use this software on an IIS server. Cheers, Ken Quote Link to comment Share on other sites More sharing options...
t_bergman Posted February 26, 2013 Author Report Share Posted February 26, 2013 Ken, After error reporting (php) was turned on, you may have to dig through the local config file for phpvms, I was able to see the errors which were associated with manually filing a PIREP. After I attempted to file a pirep you will be redirected to your pireps page and should see an error. The kacars errors were found by turning on ACARS debugging and in the acars log files, make sure IIS has the correct permissions to write to the files. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.