The production server is shared, I don't have access to php.ini and httpd.conf and most PHP settings cannot be set or overrided using ini_set PHP function.
So I would like to create a local development environment having configurations as close as it can be to those of the production environment (LAMP). I don't have shell access to the server but using exec PHP function to run some simple commands is possible.
I am using Windows XP Pro and I am going to install on VMWare a linux distribution that is more or less the same as the production server. However, installing apache, mysql and php, and then configuring them like those on the production server is not a easy task.
It would be great if there exists any tools that are useful in this situation, tools that can analyze/ inspect the production server and then produce something that can help replicating the environment would be useful.
If not, what should I be aware of when I try to manually replicate the production environment?
So as Svrist said, you can pull the vast majority of the PHP configuration information out of php_info(). Just put up a .php page and simply enter
<? php_info(); ?>
. It ought to print out your configuration.It might help you to also pull a list of the installed software, too. If it's a Red Hat derivative, stick a 'rpm -qa' as a PHP shell pass-through and you'll get a good idea of what's installed. If it's a Ubuntu/Debian machine, then dpkg --list.
Finally, you can use a combination of command line options to the httpd daemon to pull information out. Are you certain the configuration isn't readable? That's possible, but usually not by default.
There is no such function "php_info()", it should be "phpinfo()".
You've several options:
The second option is recommended for advanced users only, or if you have spare time to learn (and break) things (like me :p)
Your package manager is better customizable than XAMPP. If you need a component (say PHP GD), you'ld just apt-get/yum/whatever it.
Here's a guide on How to forge for installing a LAMPP server on CentOS using packages: http://www.howtoforge.com/perfect-server-centos-5.2