Re: Portability of PHP from windows to Linux



Probably not too bad. The main thing would be adjusting any hard-coded
paths to files -- both in the code and in php.ini (since the filepaths
in Linux use / to separate directories). You will probably need to
check permissions on directories and files that the application
requires.

The other place you might run into trouble is connecting to any
databases -- only because modules and extensions are loaded differently
under Linux than they would be on Windows. That's more of a PHP setup
issue than a code problem.

There are probably also differences in how you might interact with the
operating system -- especially the file system. Opening and writing to
files, etc. might have slight different requirements or limitations
under a different OS.

I'd say that it shouldn't be too difficult, but be prepared to spend a
little time adjusting your PHP configuration and make some minor code
changes. Above all, test it first!

.