DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   php script displays the source code on invokation (http://www.daniweb.com/forums/thread42388.html)

lkpatir Mar 31st, 2006 8:22 pm
php script displays the source code on invokation
 
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.

goldeagle2005 Apr 1st, 2006 1:53 am
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.

Viji Apr 1st, 2006 3:30 pm
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

lkpatir Apr 1st, 2006 7:43 pm
Still not working
 
I entered index.php as you told in httpd.conf file. Still it's not working

Viji Apr 2nd, 2006 12:38 pm
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


All times are GMT -4. The time now is 4:34 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC