Page 1 of 1
How do I check portability when switching hosts
Posted: Thu Jan 15, 2004 12:01 pm
by Swede78
Does anyone have any advice on checking portability of php pages when switching hosts? I know that my current host may have different .ini settings than my new one. I try to make my code as portable as possible. But, I'm sure I missed some things.
Is there a program or something out there that can scan your code looking for possible portability problems? I would just hate to go through so much manually.
Any suggestions would be greatly appreciated.
Posted: Thu Jan 15, 2004 2:09 pm
by kettle_drum
Well the core of php will work fine on all hosts, its just a few of the functions that may not work on different hosts. Other than checking the manual to make sure that a function doesnt only work on linux/unix or that it requires a library, theres not much you can do other than test it.
Posted: Thu Jan 15, 2004 2:52 pm
by timhortons
Since I run my own server, I've got it configured pretty well close to how I want it, but I'd imagine with other hosting plans that are provided, things get a bit more tough. Although I've got some nice "addon" modules installed in PHP, like some of the PEAR classes, I've tried to stick to most of the basic PHP functions so that in the future I'll have a good idea of what I need setup on the host, or what i need to take out of my code.
In your case, testing would alright if you havent already done so. I personally dont know of any programs to test for compatibility, but if you print out the phpinfo() function on your new host, and print out another phpinfo() on your current host, you can compare results and get an idea of what you've got in your code that may conflict. After that, I wouldnt know what to do

Posted: Tue Jan 20, 2004 11:16 am
by Swede78
Ok, thanks for the suggestions. I guess I was hoping that a program was available that helped do this.
My biggest concern is magic_quotes. I also had the m_crypt function installed at my current host, which hopefully the new host has or can install.