| | |
LOCALHOST-PHP in browser
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2007
Posts: 189
Reputation:
Solved Threads: 14
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
It should display the PHP version and installed modules.
Well this is to manage sort of troubles with PHP, I haven't seen the previous page and the year
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:
php Syntax (Toggle Plain Text)
<?php echo phpinfo(); ?>
Then on the browser access to http://localhost/test.php
It should display the PHP version and installed modules.
Well this is to manage sort of troubles with PHP, I haven't seen the previous page and the year
Last edited by martin5211; Apr 19th, 2009 at 12:30 pm.
•
•
Join Date: Apr 2009
Posts: 257
Reputation:
Solved Threads: 37
Install wamp or easy php, that will give you full package and easy to use.
You can also use XAMPP or PHPEASY
Both are easy
In Xampp Save your pages to Htdocs
for example your page is my.php and save in htdocs
then you have to write in browser
http://localhost/my.php
great
Maark this thread as solved.
Both are easy
In Xampp Save your pages to Htdocs
for example your page is my.php and save in htdocs
then you have to write in browser
http://localhost/my.php
great
Maark this thread as solved.
Ayesha
•
•
Join Date: Jul 2009
Posts: 2
Reputation:
Solved Threads: 0
•
•
•
•
I have my index.php file in folder aldo on drive D. here is the detail
D:\PHP\www\aldo\index.php. what should i write on address browser to run this index, or should I need to create new folder ?? should I set the server (appserv) ??
Your assistance really much appreciated
Regards
Leonardo
<EMAIL SNIPPED>
# -refa- Current doc root is on D: on win200pro 10/12/2006
DocumentRoot "d:/Apache/htdocs/refrost/www"
I create directories under this location, resulting in, say,
"d:/Apache/htdocs/refrost/www/webapp1"
"d:/Apache/htdocs/refrost/www/webapp2"
Then I put/create the index.php and other app files in the webapp1 or webapp2 directories and call them from the browser via:
http://127.0.0.1/webapp1/index.php
In your case, Leonardo, if you set your DocumentRoot to "D:/PHP/www" then you would call it via:
http://127.0.0.1/aldo/index.php
Clear as mud?
Ralph Frost
![]() |
Similar Threads
Other Threads in the PHP Forum
- Previous Thread: sidebars gone, really need help!
- Next Thread: Use of undefined constant post_text - assumed
| Thread Tools | Search this Thread |
ajax apache api array beginner beneath binary broadband broken button cakephp checkbox class cms code countingeverycharactersfromastring crack cron curl database date decode display dynamic echo email error file files folder form forms function functions google href htaccess html image include insert integration ip java javascript joomla limit link login loop mail match md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf php problem protocol query radio random recursion regex remote script search server session sessions sms smtp soap source space sql strip_tags survey syntax system table tutorial undefined update upload url validator variable video virus votedown web window.onbeforeunload=closeme; xml youtube






