php script displays the source code on invokation

Reply

Join Date: Mar 2006
Posts: 2
Reputation: lkpatir is an unknown quantity at this point 
Solved Threads: 0
lkpatir lkpatir is offline Offline
Newbie Poster

php script displays the source code on invokation

 
0
  #1
Mar 31st, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,409
Reputation: goldeagle2005 is an unknown quantity at this point 
Solved Threads: 43
Team Colleague
goldeagle2005's Avatar
goldeagle2005 goldeagle2005 is offline Offline
Finkus Stinkalotus

Re: php script displays the source code on invokation

 
0
  #2
Apr 1st, 2006
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.
Touch eyeballs to screen for cheap laser surgery
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 12
Reputation: Viji is an unknown quantity at this point 
Solved Threads: 0
Viji Viji is offline Offline
Newbie Poster

Re: php script displays the source code on invokation

 
0
  #3
Apr 1st, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 2
Reputation: lkpatir is an unknown quantity at this point 
Solved Threads: 0
lkpatir lkpatir is offline Offline
Newbie Poster

Still not working

 
0
  #4
Apr 1st, 2006
I entered index.php as you told in httpd.conf file. Still it's not working
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 12
Reputation: Viji is an unknown quantity at this point 
Solved Threads: 0
Viji Viji is offline Offline
Newbie Poster

Re: Still not working

 
0
  #5
Apr 2nd, 2006
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
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