I am wondering why my http://localhost/ server is not displaying any error? I am throwing errors like “require(test.php);” which doesn’t exists,
Tried throwing every error, but either screen goes blank or the actual output comes, but no error is reported.
If the page only shows the code that’s because the PHP interpreter isn’t running. Look at your httpd.conf (Apache configuration file) and look if the line that says ‘LoadModule php5_module’ isn’t commented with # sign.
Also, look for ‘Listen’ should say ‘Listen 80’ so you can put simply http://localhost/ on the browser. If the server is running on another port instance e.g. the line shows ‘Listen 8080’, put on the browser http://localhost:8080/. This is a more uncommon issue.
If that doesn’t make any change, maybe the PHP module isn’t installed. I suggest to use a pre-configured package software with Apache/PHP/MySQL like xampp or mamp.
Make a new file on the root folder of your web server, ‘test.php’. Add on the content:
Then on the browser access to http://localhost/test.php
Well this is to manage sort of troubles with PHP, I haven’t seen the previous page and the year.
You should look to your php.ini if the “display_errors” is set to “1” or you can set the variable over php with:
I also wrote error_reporting(E_ALL); on top of the file, but still, can’t figure out.
Concerning the files, you need to put your files in a folder called “htdocs” where you installed the apache webserver
but first check if the server is running.
You might have hard-coded references to include files. You should use
$_SERVER['DOCUMENT_ROOT'] instead of hard-coding filepaths because on a local windows PC your path will be something like
C:/path/to/my/webroot whereas, for example, on a Linux shared-hosting production server your path will be something like
<a href=”itechonology.com”>php development company in india</a>,<a href=”itechonology.com”> wordpress development company in india</a>,<a href=”itechonology.com”> seo company in india</a>