LOCALHOST-PHP in browser

Reply

Join Date: May 2007
Posts: 4,483
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 515
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: LOCALHOST-PHP in browser

 
0
  #11
Apr 19th, 2009
localhost/aldo/index.php should suffice.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 189
Reputation: martin5211 is an unknown quantity at this point 
Solved Threads: 14
martin5211 martin5211 is offline Offline
Junior Poster

Re: LOCALHOST-PHP in browser

 
0
  #12
Apr 19th, 2009
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:

  1. <?php
  2. echo phpinfo();
  3. ?>

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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 257
Reputation: BzzBee is an unknown quantity at this point 
Solved Threads: 37
BzzBee BzzBee is offline Offline
Posting Whiz in Training

Re: LOCALHOST-PHP in browser

 
0
  #13
Apr 20th, 2009
Install wamp or easy php, that will give you full package and easy to use.
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 202
Reputation: ayesha789 is an unknown quantity at this point 
Solved Threads: 3
ayesha789's Avatar
ayesha789 ayesha789 is offline Offline
Posting Whiz in Training

Re: LOCALHOST-PHP in browser

 
0
  #14
Jul 24th, 2009
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.
Ayesha
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 2
Reputation: refrost is an unknown quantity at this point 
Solved Threads: 0
refrost refrost is offline Offline
Newbie Poster

Re: LOCALHOST-PHP in browser

 
0
  #15
Jul 24th, 2009
Originally Posted by 2easy4bee View Post
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>
Some background... (I use Apache on a Windows box) In the conf subdirectory of your Apache directory is a file named httd.conf and in that is your setting for Apache's "DocumentRoot". Mine is set to:

# -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
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC