Results 1 to 14 of 14

Thread: help on php

  1. #1
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    help on php

    i am learning php nowadays.i have installed xampp in my system but the problem is that when i make any php page and put it in htdocs file of it and run it through my browser then nothing happened.only a error comes with file not found,now please help me that is there any special thing to do after writing php code please help me out.

  2. #2
    seshu is online now Privileged Users
    Join Date
    Jan 2006
    Posts
    290

    Re: help on php

    what do you get by just typing http://localhost on your browser ?

    AND post the complete error for browsing to http://localhost/yourfilename.php

  3. #3
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    by just typing http://localhost i get a page which shows something about xampp for windows.when i write any php code in txt and paste that file with php extension in my htdocs folder in my xampp file in c drive,say by a name echo.php and when i write http://localhost/echo.php in my web browser it gives an error mesage saying object not found which looks like this "Object not found!

    The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.



    If you think this is a server error, please contact the webmaster.



    Error 404

    localhost

    16-05-2011 22:38:25

    Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 "

    i want to know that writing php code in text document and just pasting it in htdocs is a legitimate way or i need to have anything special for doing this.help me out.

  4. #4
    seshu is online now Privileged Users
    Join Date
    Jan 2006
    Posts
    290

    Re: help on php

    php files are text files with the php code so they can be made just like a text file.

    for xampp, php files can be added to htdocs folder to get the required results.



    check below simple php file (hello.php) to get "hello world" message.

    Code:
    <?php 
    
     Print "Hello, World!";
    
     ?> 
    
    
    
     <?php 
    
     Echo "Hello, World!";
    
     ?>


    from your response, it appears that xampp is correctly installed and running.

    may be this link helps : testing php with xampp

  5. #5
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    what you said i did the same. i write a text file with the code you was saying and save it with the name hello.php but the same error still persists.i dont understand why is this happening.

  6. #6
    Tejas01 is offline Privileged Users
    Join Date
    Nov 2009
    Posts
    208

    Re: help on php

    Even i am facing the same problem as the OP is facing, but mine is a problem at grassroot level. After running http://localhost/ i get an error as shown below









    i installed IIS 7 on windows 7 and did everything possible to get the localhost starting(switching off apppool and turning on). Even i wanted to run php files but my localhost itself is not responding so cant execute .php files too..



    after running eventvwr, i found the error under System and not application. The error states as below.







    Now what should i do?? I even tried with xampp and easyphp but for both, my apache server does not start. I get an error port 80 is akready being used or being blocked by firewall(i checked my KIS and added port 80 to 'Allow') but still get an error.

  7. #7
    seshu is online now Privileged Users
    Join Date
    Jan 2006
    Posts
    290

    Re: help on php

    @Tejas

    for easyphp, uncheck "Check server's TCP port before starting" on its configuration

    for xampp, check this link : xampp port conflict

  8. #8
    Tejas01 is offline Privileged Users
    Join Date
    Nov 2009
    Posts
    208

    Re: help on php

    Quote Originally Posted by seshu
    @Tejas

    for easyphp, uncheck "Check server's TCP port before starting" on its configuration

    for xampp, check this link : xampp port conflict


    thanks... the xampp link got it working finally...

  9. #9
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    i have my problem solved thanks for your advice and help.

  10. #10
    seshu is online now Privileged Users
    Join Date
    Jan 2006
    Posts
    290

    Re: help on php

    @shivam, let us know what was the actual problem and how you solved so that we can learn about it

  11. #11
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    what i was doing is that i was typing the wrong adress at my browser.when i type localhost it loads a page with url localhost/xampp.what i have to do is say to load a page echo.php i have to type localhost/echo.php but i was typing localhost/xampp/echo.php.

  12. #12
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    i have installed xampp previously but due to some reason i have to format my system and when i am again installing it into my system my apache service is not starting.it is giving an error saying port80 is already in use. i am not able to understand it.help me out.

  13. #13
    seshu is online now Privileged Users
    Join Date
    Jan 2006
    Posts
    290

    Re: help on php

    ^ see this : xampp port conflict

  14. #14
    shivam99aa is offline Upgraded User
    Join Date
    Dec 2010
    Location
    ghaziabad india
    Posts
    59

    Re: help on php

    thanks man my problem get solved.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 16-06-10, 11:36 AM
  2. Help in PHP....
    By SRJ in forum Programming
    Replies: 3
    Last Post: 31-01-10, 04:57 PM
  3. Need PHP HELP TO INSTALL PHP.
    By yohanns23 in forum Programming
    Replies: 8
    Last Post: 01-11-09, 09:39 PM
  4. PHP and PHP nuke
    By techboy in forum Programming
    Replies: 4
    Last Post: 28-03-06, 07:50 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +5.5. The time now is 01:05 PM. Powered by vBulletin® Version 4.1.12
Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.
Content Relevant URLs by vBSEO 3.6.0 PL2