I've just finished a web application written in PHP. I thought it was as easy as compressing my .php files and dumping my database in order to decompress those files in the "production" server, creating the database structure and database user, but it doesn't work. Several php files have include directives that are not working, I was using "relative" paths in those directives, I've tried $_SERVER[DOCUMENT_ROOT]
and fixed the trailing slash issue in that parameter and still is not working. Any suggestions? Maybe you know some "tips" or "instalation-patterns" for PHP web applications.
views:
84answers:
3Are you using the same version of php (and host operating system) on the new server as you were on the old one?
PHP can parse your code differently in different version and installations.
PHP has some different behaviors between versions. Also, depending on the setting in your development php.ini file and the one in the production environment, you could see massive differences as they usually have very different security setups.
Check the include_path on the production server compared to your development machine-- the server may be looking for files in different locations compared to your own box.
Regarding deployment there's two projects that I've come across that might be of some help (unfortunately, I've not used either; both are on my ever-growing to-do list):