Setting up PHP version locally

wickedDUDE

New member
Jun 25, 2006
1,054
12
0
I have a PHP script that works on one server but not another.

It seems to me that the reason the script is not working in the one environment is due to the version of PHP installed on the server.

Is there a way I can set up my local desktop to emulate a specific version of PHP?

I want to test it with the same version of php where it doesn't work to see if that is the cause.
 


Which one is the simplest to set up?

And, can I pick a specific version of PHP to use?

I notice that not all of the suggestions seem to support this.
 
You can change the PHP version, at least when you use a stack application like WAMP/MAMP/LAMP Stack. It's very easy to set up a local environment. Typically is just installing the app and copying your files to the www/public_html folder.
 
Almost guaranteed you're missing a PHP extension on the second server. Maybe mbstring, mcrypt, or some other non-default extension.
 
Almost guaranteed you're missing a PHP extension on the second server. Maybe mbstring, mcrypt, or some other non-default extension.

How would I go about figuring out what's missing? I'm mainly a front end developer so I'm a newb when it comes to this stuff...
 
For windows use WAMP
For linux use LAMP

It will setup PHP, Apache and mySQL for you.

I have had great success with both of those.