Developing on Windows, publishing on Linux
Moderator: General Moderators
-
bobthebuilder
- Forum Commoner
- Posts: 32
- Joined: Tue Mar 22, 2011 5:06 pm
Developing on Windows, publishing on Linux
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
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?
-
bobthebuilder
- Forum Commoner
- Posts: 32
- Joined: Tue Mar 22, 2011 5:06 pm
Re: Developing on Windows, publishing on Linux
Thanks for the reassurance. On my development PC I have WAMP.
Re: Developing on Windows, publishing on Linux
Ah the other option. I see no reason, assuming PHP/MySQL versions are the same on both systems, why there would be a problem.bobthebuilder wrote:Thanks for the reassurance. On my development PC I have WAMP.
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
-
jarofgreen
- Forum Commoner
- Posts: 71
- Joined: Sun Jul 11, 2010 12:40 pm
Re: Developing on Windows, publishing on Linux
Actually, there is one major gotcha. Windows has a case insensitive file system, Linux doesn't. So:
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.
Code: Select all
require "Code.php" // file is actually code.phpI 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
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).
-
bobthebuilder
- Forum Commoner
- Posts: 32
- Joined: Tue Mar 22, 2011 5:06 pm
Re: Developing on Windows, publishing on Linux
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.
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
Code: Select all
chmod($dirname, 0777);