« Using TIME_HOUR and TIME_MIN for htaccess RewriteCondBackground Beat, Heads Up »
Debug apache log files from php
This is a secure method to debug your apache from within php
the contents of phpinfo.php
Use this for your .htaccess file.
Options +FollowSymLinks ErrorDocument 404 /phpinfo.php
Now instead of getting a 404 error you will see debug information which will help you find out what the problem is.
Cd-MaN pointed out a security problem this method has, it reveals sensitive info to anyone who requests phpinfo.php.
Also, you better use it only as a temporary measure, because it reveals many sensitive information about your server (eg. delete it after you done debugging)
This only allows the user from IP address 2.3.65.6, everyone else is redirected to http://www.domain.com
ErrorDocument 403 http://www.domain.com Order deny,allow Deny from all Allow from 2.3.65.6
Same thing only uses .htaccess. Change your phpinfo.php file to the following
« Using TIME_HOUR and TIME_MIN for htaccess RewriteCond
Background Beat, Heads Up »
The love of liberty is the love of others; the love of power is the love of ourselves.
-- William Hazlitt
Please consider donating to support active development of the free software and articles here.![]()
The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. Tim Berners-Lee
It's very simple - you read the protocol and write the code. -Bill Joy
HTML | DCMI | GRDDL | XOXO | XDMP | XFN | DOM | XML | XHTML 1.1 Strict | CSS 2.1 | W3C | TLDP | WAI | DISA | ICSI | GIAC | SANS RR | GHOST | DEFCON | NIST | DHS CYBER | NIST | Phrack
↑ TOPExcept where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License, just credit with a link.
This site is not supported or endorsed by The Apache Software Foundation (ASF). All software and documentation produced by The ASF is licensed. "Apache" is a trademark of The ASF. HTTPD based on NCSA HTTPd
The documentation for phpinfo can be found here: http://www.php.net/phpinfo
Also, you better use it only as a temporary measure, because it reveals many sensitive information about your server (eg. delete it after you done debugging)