Re: A PHP-driven script to determine if the environment is configured correctly (checklist)

From: Date: Thu, 17 Dec 2009 07:55:44 +0000
Subject: Re: A PHP-driven script to determine if the environment is configured correctly (checklist)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-300558@lists.php.net to get a copy of this message
Здравствуйте, AmirBehzad. Вы писали 17 декабря 2009 г., 17:46:59: > Dear list, > e-Greetings, > I've developed some PHP-driven web applications. These applications will be > installed on different > linux-based servers (typically Debian and Redhat). Usually, after I copy the > files to the > server, they DO NOT WORK, so I spend hours to debug the problem. Problems > are very funny, > for example, the program is giving strange errors, and it is not working > because "short_open_tags" are off ! > I decided to write a PHP script to check if server's configuration meets my > requirements. > - checking whether some php extensions are loaded, eg. MCrypt. > - checking wheather short_open_tags is ON > - checking whether mod_rewrite is enabled > - etc. > Here's my question: > - How do you check if .htaccess is working, *** via php code *** ? > It's easy to check if .htaccess exists (@php: file_exists), but how to make > sure if .htaccess is working?! > - How do you check if AllowOverride is set to All in apache's configuration? > Please let me know what do you think. Thank you in advance. > -behzad Make sure that you did your scripts executable(chmod +x) You can check .htaccess that way: create .htaccess if folder with script, override some directive thru it, like php's max execution time. then create php script, get php value that you've changed(max_execution_time), compare to the value you gave in .htaccess, if values are the same, .htaccess is working! -- Sam

« previous php.general (#300558) next »