943,981 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 3639
  • PHP RSS
Mar 31st, 2006
0

php script displays the source code on invokation

Expand Post »
I have installed MySql 5.0.19, Apache 1.3.34 and PHP 5.1.2(SAPI Module) and configured both php.ini and httpd.conf files such as extension_dir,doc_root,LoadModule,AddModule,AddType etc. on myWindows Xp (FAT32) system. When I invoke test.php containing the code <?php phpinfo(); ?> on the browser, the sorce code itself gets displayed without error. Where is the problem, please help me.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
lkpatir is offline Offline
2 posts
since Mar 2006
Apr 1st, 2006
0

Re: php script displays the source code on invokation

You sure you're calling the file from the server, and not from the local file? That is to say, are you opening your file by double clicking it in explorer, or are you calling it by typing an address like this in your browser address bar -- http://localhost:8080/test.php ? If you call the file directly from explorer, you'll see the code. Calling it from the server tells the PHP engine to process the PHP file and send the reesults to the browser.
Team Colleague
Reputation Points: 67
Solved Threads: 45
Finkus Stinkalotus
goldeagle2005 is offline Offline
1,423 posts
since Jun 2005
Apr 1st, 2006
0

Re: php script displays the source code on invokation

go to httpd.conf that is present in conf folder.

Search for DirectoryIndex and add the index.php as the First parameter .

DirectoryIndex index.php index.html index.shtml.

Then invoke the test.php in the browser . I think it should work..

Cheers,
viji
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Viji is offline Offline
12 posts
since Mar 2006
Apr 1st, 2006
0

Still not working

I entered index.php as you told in httpd.conf file. Still it's not working
Reputation Points: 10
Solved Threads: 0
Newbie Poster
lkpatir is offline Offline
2 posts
since Mar 2006
Apr 2nd, 2006
0

Re: Still not working

Refer to this site <a
href="http://www.thesitewizard.com/archive/apache.shtml" target="_top">

They have given the step by step instruction. Just Recheck from the scrach.

i think this site will be very helpful for U.

I Refered this site for downloading Apache server.


cheers,
Viji
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Viji is offline Offline
12 posts
since Mar 2006

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: Help
Next Thread in PHP Forum Timeline: Pagination - not displaying results properly, please help!





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


Follow us on Twitter


© 2011 DaniWeb® LLC