help on php

Discussion in 'PHP' started by shivam99aa, May 16, 2011.

  1. #1
    i have downloaded xampp,installed it but when i write a php code in text document and save it with the name echo.php in htdocs folder of xampp,and when i try to run it by typing http://localhost/echo.php in my browser it didnt run.is there anything i am doing wrong or is there any special editor needed for it.please help me out.
     
    shivam99aa, May 16, 2011 IP
  2. ruvenf

    ruvenf Peon

    Messages:
    19
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Check the path to localhost
     
    ruvenf, May 16, 2011 IP
  3. lee07smith

    lee07smith Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Personally I have never run xampp. I have done my own version of WAMP, but you might want to check and make sure php is properly configured. I had the biggest struggle with getting my scripts to run and that was all because one file *libmysql.dll* wasn't in the right spot. So check the php and let us know what happens.
     
    lee07smith, May 16, 2011 IP
  4. shivam99aa

    shivam99aa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ya path to localhost is right and my document root is also htdocs but i dont know what the hell is going on,that error is still coming and i dont understand what is going wrong.
     
    shivam99aa, May 17, 2011 IP
  5. shivam99aa

    shivam99aa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    what to do to check that php is properly configured.well i think it is properly configured.
     
    shivam99aa, May 17, 2011 IP
  6. Mak3MyDay

    Mak3MyDay Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    What error does it show?
     
    Mak3MyDay, May 17, 2011 IP
  7. Junk NB

    Junk NB Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Additionally, if it is a syntax error, please post your code, too.
     
    Junk NB, May 17, 2011 IP
  8. Mak3MyDay

    Mak3MyDay Peon

    Messages:
    25
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I have read your thread again.. Well if you are trying to build an application using xampp, create a folder under htdocs. If the folder of your application is named MyApp and under this folder is an echo.php, try running the app using http://localhost/MyApp/echo.php
     
    Mak3MyDay, May 17, 2011 IP
  9. shivam99aa

    shivam99aa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    i have my problem fixed and no errors are coming now thanks for your advice and help.
     
    shivam99aa, May 17, 2011 IP
  10. mnmani

    mnmani Well-Known Member

    Messages:
    379
    Likes Received:
    11
    Best Answers:
    6
    Trophy Points:
    195
    #10
    ^ can we know the actual problem and its solution ..
     
    mnmani, May 17, 2011 IP
  11. shivam99aa

    shivam99aa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    the actual problem i was faciing was that when i type localhost as url, a page opens of xampp and it changes to "http://localhost/xampp".i was calling other files say echo.php by typing "http://localhost/xampp/echo.php".which is a wrong syntax.actually i have to write "http://localhost/echo.php".i was thinking i have some problem with my software but actuall problem was this and now i know what to do all of my php files are running.
     
    shivam99aa, May 18, 2011 IP
  12. mnmani

    mnmani Well-Known Member

    Messages:
    379
    Likes Received:
    11
    Best Answers:
    6
    Trophy Points:
    195
    #12
    ^ oh! okay. Thanks. I find someone has already referred to it on the other forum (TE) !!
     
    mnmani, May 18, 2011 IP
  13. lbhabib.ru

    lbhabib.ru Active Member

    Messages:
    97
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #13
    I find that WAMP is much easier then XAMPP... and much more stable!
     
    lbhabib.ru, May 19, 2011 IP
  14. shivam99aa

    shivam99aa Peon

    Messages:
    8
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    ok i will look over WAMP and check which is easier since i work a bit over XAMPP and find it nice to be used.
     
    shivam99aa, May 21, 2011 IP