943,692 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 43822
  • PHP RSS
You are currently viewing page 2 of this multi-page discussion thread; Jump to the first page
Apr 19th, 2009
0

Re: LOCALHOST-PHP in browser

localhost/aldo/index.php should suffice.
Moderator
Featured Poster
Reputation Points: 3239
Solved Threads: 838
Posting Genius
Ezzaral is offline Offline
6,757 posts
since May 2007
Apr 19th, 2009
0

Re: LOCALHOST-PHP in browser

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:

php Syntax (Toggle Plain Text)
  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.
Reputation Points: 52
Solved Threads: 23
Posting Whiz in Training
martin5211 is offline Offline
271 posts
since Aug 2007
Apr 20th, 2009
0

Re: LOCALHOST-PHP in browser

Install wamp or easy php, that will give you full package and easy to use.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Jul 24th, 2009
0

Re: LOCALHOST-PHP in browser

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.
Reputation Points: 17
Solved Threads: 6
Posting Pro in Training
ayesha789 is offline Offline
485 posts
since Jun 2009
Jul 24th, 2009
0

Re: LOCALHOST-PHP in browser

Click to Expand / Collapse  Quote originally posted by 2easy4bee ...
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
refrost is offline Offline
2 posts
since Jul 2009
Mar 3rd, 2011
0
Re: LOCALHOST-PHP in browser
what is localhost.php file & why it is used?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
shivanisaxean is offline Offline
1 posts
since Mar 2011
Mar 3rd, 2011
0
Re: LOCALHOST-PHP in browser
Hi just place your file in the root directory i.e., if u have installed "xampp" then place your file in htdocs folder or if u have installed wampp then place your file in www folder.
like
C:/xampp/htdocs/newfolder/index.php
or
C:/wampp/www/newfolder/index.php
then to access that file enter this url in browser address bar
http://localhost/htdocs/newfolder
or
http://localhost/www/newfolder

i think this will help u...!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Layerphp is offline Offline
15 posts
since Nov 2010
Mar 4th, 2011
0
Re: LOCALHOST-PHP in browser
hey it's
http://localhost/newfolder
no need to enter root folder name
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Layerphp is offline Offline
15 posts
since Nov 2010
Oct 12th, 2011
0

Found Easy way

Install Xampp will work then.
Go through this tutorial on Installing Xampp and Run PHP Codes on Windows

http://planetghost.com/run_php_code
Reputation Points: 10
Solved Threads: 0
Newbie Poster
dineshnbhatia is offline Offline
1 posts
since Oct 2011

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Ebay Tradding Api problem with india site
Next Thread in PHP Forum Timeline: picture with x mark





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC