PHP Beginer help ---PHP code is not excuting return source code

[size=5][b]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 localhostphpinfo.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
[color=Orange]<?php
echo("this is first php file ");

?>[/color]
and saved it with name "first.php" to make sure it will get php extention as well then

i saved it at
[size=2]C:Program FilesApache GroupApachehtdocs[/size][color=Blue][/color]
then execute it
[size=3]http://localhost/first.php[/size][color=Red][/color]
out put suppose to come
[size=5]this is first php file[/size]

but instead of this
[size=5]i got my source file back as a result. i dont know why php is not processing my file ?
[/size][color=Purple][/color]can anyone help me please
i would be really thankful[/b][/size]

Comments

  • 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.
  • 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
  • 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
  • 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
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories