Hi,
Running
Apache 2.2.8
PHP 5.2.5
I have received a system to be doing maintenance on. It is a web application that is running on RedHat Linux. The software is a mixture of C++, PHP, Java, javascript, HTML. The application is bundled together with MySQL server/client, Apache webserver and PHP. There is no information about the pre-requisites to install this system from scratch.
My experience is limited regarding all above except C++ and in this case my C++ knowledge doesn’t help much.
The Linux version is to be changed to a later one in a new environment and the MySql –server is to be running on a separate machine. PHP and Apache is not to be upgraded.
Since the application is installed in /myapp/ all functionality, MySql, PHP, Apache is located under /myapp today. The new environment requires that the top directory is /opt/. This means that my system will now be located like /opt/myapp/. I expected that it would be possible to just copy the /myapp –directory and move it to the new environment. Changes in the defined paths in the system would be necessary of course. All paths starting with /myapp/ are now changed to /opt/myapp/ in the files.
The webserver starts in the new environment and it is possible to get some reaction when contacting the system . Unfortunately I only get error messages in the web browser saying that include files and dynamic libraries can not be found and showing a faulty path like this:
Unable to load dynamic library '/myapp/httpd/lib/php/extensions/no-debug-non-zts-20070715/myapp.so’
Failed opening 'DB.php' for inclusion (include_path='.:/myapp/httpd/lib/php')
I have found out that if I remove /myapp/conf/php.ini in the working old test environment I can get the same error messages as in the new environment. The error messages above seem to include some default paths. I guess that those paths have been compiled in some way. The interesting part is that it seems like the php.ini file affect the execution in the old environment but not in the new one. The problem is probably that the php.ini-file definitions are ignored or the php.ini-file is never read in the new environment. The phpinfo()-function says that the Loaded Configuration File is none so that would explain why the paths are wrong and why they become wrong in the old environment when removing the php.ini-file.
What to do about this? Do I have to compile or run some configuration?
If the content in the /myapp/ directory would have been moved to a new environment without the new top directory /opt ,these problems would never have been seen or am I wrong?
Regards,
Kalle