Page 1 of 1
Developing on Windows, publishing on Linux
Posted: Sat Jun 11, 2011 4:57 am
by bobthebuilder
hello, I have done all my php development on my Windows PC but am considering using a linux VPS on which to host my website. Will this cause any problems? I am using standard php with the GD and pkzip libraries, and I also use standard file IO commands like mkdir & unlink etc. I am nervous that code developed on my PC won't work on the server and this will make debugging a nightmare. Thanks
Re: Developing on Windows, publishing on Linux
Posted: Sat Jun 11, 2011 11:33 am
by oscardog
As long as you're using a standard PHP release, and the same PHP version is on the server you're going to host it on, you should be fine. What were you using to host it on your Windows PC? XAMPP?
Re: Developing on Windows, publishing on Linux
Posted: Sat Jun 11, 2011 3:34 pm
by bobthebuilder
Thanks for the reassurance. On my development PC I have WAMP.
Re: Developing on Windows, publishing on Linux
Posted: Sat Jun 11, 2011 3:53 pm
by oscardog
bobthebuilder wrote:Thanks for the reassurance. On my development PC I have WAMP.
Ah the other option. I see no reason, assuming PHP/MySQL versions are the same on both systems, why there would be a problem.
I never quite got why people used such tools when there are millions of free hosting websites out there that will give you a free subdomain and an area to test, all for free! Plus shared hosting can be found for $1-2 now

Re: Developing on Windows, publishing on Linux
Posted: Sat Jun 11, 2011 6:31 pm
by jarofgreen
Actually, there is one major gotcha. Windows has a case insensitive file system, Linux doesn't. So:
Code: Select all
require "Code.php" // file is actually code.php
Will work on Windows and not on Linux.
I haven't found a way to catch these errors on Windows, but the good news is they are really easy to debug.
Re: Developing on Windows, publishing on Linux
Posted: Sun Jun 12, 2011 12:52 am
by califdon
Although I'm not doing especially sophisticated development, I too have been using a Windows development environment and Linux production servers for years with no problems (other than the case-sensitivity of filenames, as jarofgreen mentioned).
Re: Developing on Windows, publishing on Linux
Posted: Mon Jun 13, 2011 1:37 pm
by bobthebuilder
Thanks. And as predicted by you chaps, I have indeed had case-sensitive type issues! Quite easy to fix though.
The other issue I have met is dealing with directory persmissions. The scripts dynamically make directories outside of root in which to store customer data and I have had some chmod issues. Still need to get a good handle on that, as setting
is probably really stupid, but that's what I have done for the moment.