943,911 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 912
  • PHP RSS
You are currently viewing page 1 of this multi-page discussion thread
Apr 10th, 2009
0

Hi.......Help me get started with PHP

Expand Post »
Guys, i have installed PHP 5 on my windows system, i am able to browse to info.php which shows a listing, but if i create another simple page with a echo statement then i and not able to browse that page. i get the HTTP 500 internal server error. i have both the pages in the same folder.


hepl please
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ramanand is offline Offline
5 posts
since Apr 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

make a folder in www directory and put your page in it and try to browse.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

tell me what happened so i can better guide you.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

you can make a simple echo file with the name of "index.php" in you folder. so when you will click on your folder listed on first page you will be redirected to index.php page. but if you have file with different name then you have to go that page manually. or type your file name in address bar e.g
http://localhost/mytestfolder/testfile.php

if if your file name is index.php then its enough to right

http://localhost/mytestfolder/
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

Tizag has some realy great beginer tutorials on PHP (They helped me learn in about 1 month)
Tizag PHP Tutorials
Enjoy
Reputation Points: 26
Solved Threads: 31
Posting Whiz
samarudge is offline Offline
354 posts
since May 2008
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

hi,

I have create a new folder for every page? wont it be possible to browse the pages from the single folder.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ramanand is offline Offline
5 posts
since Apr 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

No, you don't have to create a new folder for every page. However, in order for php code to be executed, you not only need to make sure to use the <?php opening and ?> closing tags, but also make sure that the directory is in fact configured as a DocumentRoot in apache (assuming you use apache).
Also you cannot "browse" to it using the filesystem, but need to type in the valid URL for the page, which most likely will be something like this: http://localhost/<directory>/filename.php

It might help if you tell us the directory structure as well as how you configured the DocumentRoot.

Hope this helps...
Reputation Points: 10
Solved Threads: 9
Light Poster
kokoro90 is offline Offline
25 posts
since Feb 2009
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

Actually in a purely PHP file, the closing tag ?> should be excluded.

It is necessary when you are jumping in an out of php control structures that are mixed with html or some other kind of output.
Sponsor
Reputation Points: 265
Solved Threads: 126
Practically a Master Poster
mschroeder is offline Offline
624 posts
since Jul 2008
Apr 10th, 2009
0

Re: Hi.......Help me get started with PHP

If you are working on one website, just one folder will be enough for that website, put all the php, html files and folders regarding that website in that folder.
Create new folder for new website and its related material.
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
emarshah is offline Offline
61 posts
since Jan 2008
Apr 11th, 2009
0

Re: Hi.......Help me get started with PHP

hi,

i have put the php.ini in windows folder.
and have set the doc_root to C:Inetpub/wwwroot. this is where i have the two scripts. I have also configured the IIS virtual directory to C:Inetpub/wwwroot. i am able to open a page which has just phpinfo(). the other page has one echo statement and the phpinfo(), but i am not able to browse it. i try to browse it by using the ip address.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ramanand is offline Offline
5 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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: Admin Panel script
Next Thread in PHP Forum Timeline: mail help





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


Follow us on Twitter


© 2011 DaniWeb® LLC