PHP

Moderators: None (Apply to moderate this forum)
Number of threads: 1848
Number of posts: 5016

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
PHP Beginer help ---PHP code is not excuting return source code Posted by libra900 on 18 Mar 2009 at 8:29 PM
hi friends , i have just started php self learning ..i m using apache server , mysql, and php4 and even tried 5..problem is when i type local host in my browser it shows apache is working fine but when i excute localhost\phpinfo.php file or any other php file it return me my own source code which i have written on notepaid.i dont know why php is not excuting on my system ?
see i have just made simple file
<?php
echo("this is first php file ");

?>

and saved it with name "first.php" to make sure it will get php extention as well then

i saved it at
C:\Program Files\Apache Group\Apache\htdocs
then execute it
http://localhost/first.php
out put suppose to come
this is first php file

but instead of this
i got my source file back as a result. i dont know why php is not processing my file ?
can anyone help me please
i would be really thankful
Report
Re: PHP Beginer help ---PHP code is not excuting return source code Posted by OldJames on 18 Mar 2009 at 9:46 PM
This is a problem with you Apache/PHP installation. Essentially Apache is not recognizining php as a script to parse, and there for not running it through the parser.

Two reasons really:
1. You haven't properly installed the PHP module into apache. are you using an so?
2. You haven't added the .php extension to your apache config.
Report
Re: PHP Beginer help ---PHP code is not excuting return source code Posted by libra900 on 19 Mar 2009 at 1:13 AM
Thanks for response james, but i have already used .php extention when i saved file and if i upload this file through ftp on my web server then it works fine and give me correcte output so one thing is clear that there isn't any problem with php file
and second thing as you said i havent updated php extention in php installation could you please help me where and how i can check whether i have added .php ext. or not i have several time read apache and php installation notes they said add three line in php.ini file and i did that too but still things are not working please help me to start things i m beginner and i really need your help.
thanks.
Libra900
Report
Re: PHP Beginer help ---PHP code is not excuting return source code Posted by libra900 on 19 Mar 2009 at 1:14 AM
Thanks for response james, but i have already used .php extention when i saved file and if i upload this file through ftp on my web server then it works fine and give me correcte output so one thing is clear that there isn't any problem with php file
and second thing as you said i havent updated php extention in php installation could you please help me where and how i can check whether i have added .php ext. or not i have several time read apache and php installation notes they said add three line in php.ini file and i did that too but still things are not working please help me to start things i m beginner and i really need your help.
thanks.
Libra900
Report
Re: PHP Beginer help ---PHP code is not excuting return source code Posted by libra900 on 19 Mar 2009 at 1:15 AM
Thanks for response james, but i have already used .php extention when i saved file and if i upload this file through ftp on my web server then it works fine and give me correcte output so one thing is clear that there isn't any problem with php file
and second thing as you said i havent updated php extention in php installation could you please help me where and how i can check whether i have added .php ext. or not i have several time read apache and php installation notes they said add three line in php.ini file and i did that too but still things are not working please help me to start things i m beginner and i really need your help.
thanks.
Libra900



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.