1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

to execute php ...

Discussion in 'PHP' started by tk667, Jul 12, 2009.

  1. #1
    hi,
    I have a problem executing php program after I installed php and apache.
    I made a simple file called info.php in which has codes like "<?php phpinfo(); ?>".
    But when I executed it, it displayed its codes for IE7, and it tried to downloade its file for FireFox, instead of displaying the result......

    os : vista
    php : php 5.2.10
    apache : 2.2.11

    I changed php.ini and httpd.conf files, but I think I m missing something.
    Apache is running without any problems.
    could anyone know what could be the problem and solution for this??

    thank you.
     
    tk667, Jul 12, 2009 IP
  2. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    go back into info.php comment block out what you have and try

    echo "everything is fine";


    try restarting the services
    edit. make sure that your files are in www directory?
     
    Dirty-Rockstar, Jul 12, 2009 IP
  3. tk667

    tk667 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    hi, Dirty-Rockstar

    thanks for replying me.
    I changed back php.ini file except these two below.

    doc_root = "C:\Program Files\Apache Group\Apache2.2\htdocs"
    extension_dir = "c:\php\ext"

    location of info.php is under
    C:\Program Files\Apache Group\Apache2.2\htdocs

    from the browsers, I type http://localhost/info.php
    then it displayed it for fireFox again.....

    <?php
    //info();
    echo "everything is fine";
    ?>

    any other idea what is wrong with it???

    tomo
     
    tk667, Jul 12, 2009 IP
  4. Dirty-Rockstar

    Dirty-Rockstar Guest

    Messages:
    252
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    well im lost now. outside of my scope. my work around is to uninstall what you put on your pc and install a program called WAMP. just install it, put your .php files in the www directory and poof it works. but if you wait long enough someone will answer you correctly
     
    Dirty-Rockstar, Jul 12, 2009 IP