CrazyEngineers
  • I am learning PHP and oone of my has given me a software XAMPP which can run PHP scripts....but i dont know how to use it.So if anyone knows about it then plz tell me....
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • Kaustubh Katdare

    AdministratorApr 6, 2010

    nicepeeyush
    I am learning PHP and oone of my has given me a software XAMPP which can run PHP scripts....but i dont know how to use it.So if anyone knows about it then plz tell me....
    Using XAMPP is very easy. Follow these steps -

    1. Run the XAMPP application. Turn on Apache & MySQL (if your application needs database) services through it.
    2. Click on 'Explore' button on the XAMPP control panel - in the window that opens, check for htdocs folder.
    3. htdocs folder is the one where all your PHP scripts should lie. This is the folder that Apache points to.
    4. You might want to create a separate folder inside /htdocs/ folder to save all your PHP programs. Let's call it 'myprograms'.
    5. Save your php script in /htdocs/myprograms folder. (Ex. test.php)
    6. Now, start your webbrowser and type following address: #-Link-Snipped-#

    Your browser will now execute the script and show you the output.

    I hope this works for you. If you have further questions, feel free to ask 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Pensu

    MemberApr 7, 2010

    Thanks Biggie...it worked....😀
    Are you sure? This action cannot be undone.
    Cancel
  • Anu18

    MemberAug 15, 2011

    I tried as biggie told..but im nt getting the o/p..its cming as 403 forbidden error
    Are you sure? This action cannot be undone.
    Cancel
  • Pensu

    MemberAug 15, 2011

    403 forbidden error means that accessing to the file/folder you are trying to open has been denied. Misconfigurations and bad system or/and security and firewall settings can cause this error. Check this:

    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • Priyadharshini s

    MemberDec 31, 2011

    Pensu ..thank you .. this helped me .
    Are you sure? This action cannot be undone.
    Cancel
  • Rajeev NR

    MemberMar 27, 2012

    hai,... i am Rajeev from Kerala(INDIA). i am a fresher in php development. i would like to study about php language. i dont know anything about php...i installed XAMPP from net. now i am studying php tutorials...please help me, how can i run a php program ?
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorMar 27, 2012

    #-Link-Snipped-# : Read this post ->

    The_Big_K
    Using XAMPP is very easy. Follow these steps -

    1. Run the XAMPP application. Turn on Apache & MySQL (if your application needs database) services through it.
    2. Click on 'Explore' button on the XAMPP control panel - in the window that opens, check for htdocs folder.
    3. htdocs folder is the one where all your PHP scripts should lie. This is the folder that Apache points to.
    4. You might want to create a separate folder inside /htdocs/ folder to save all your PHP programs. Let's call it 'myprograms'.
    5. Save your php script in /htdocs/myprograms folder. (Ex. test.php)
    6. Now, start your webbrowser and type following address: #-Link-Snipped-#

    Your browser will now execute the script and show you the output.

    I hope this works for you. If you have further questions, feel free to ask 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Swain

    MemberMar 28, 2012

    Rajeev NR
    hai,... i am Rajeev from Kerala(INDIA). i am a fresher in php development. i would like to study about php language. i dont know anything about php...i installed XAMPP from net. now i am studying php tutorials...please help me, how can i run a php program ?
    I suggest you to go for WAMP SERVER. It's hassle free !
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Swain

    MemberMar 28, 2012

    Abhishek Swain
    I suggest you to go for WAMP SERVER. It's hassle free !
    As easy as 1-2-3
    1) Install Wamp Server
    2) Start Wamp Server using your Desktop icon.
    3) Copy your project files to c:/wamp/www folder
    4) Open your browser and type 127.0.0.1
    5) Select your desired folder ffrom the project folders' list.

    It's Done !
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorMar 28, 2012

    WAMP and XAMPP both work almost the same way. Even XAMPP is easy to use; and I've never had any problems with it. The best thing about XAMPP is that they keep their package up to date with the latest versions of the web and database servers.

    It's been long time since I used XAMPP though. Not aware of the latest developments. 😀
    Are you sure? This action cannot be undone.
    Cancel
  • Abhishek Swain

    MemberMar 28, 2012

    The_Big_K
    WAMP and XAMPP both work almost the same way. Even XAMPP is easy to use; and I've never had any problems with it. The best thing about XAMPP is that they keep their package up to date with the latest versions of the web and database servers.

    It's been long time since I used XAMPP though. Not aware of the latest developments. 😀
    Yes, even XAMPP is good. After all it depends on your choice. I have started my way with wamp server. So thought of suggesting others. 😁
    Are you sure? This action cannot be undone.
    Cancel
  • Rajeev NR

    MemberMar 29, 2012

    thank you very much dear,..i will expect more helps in the future ....go may bless you
    Are you sure? This action cannot be undone.
    Cancel
  • emilydecker

    MemberMar 29, 2012

    hey! myself emily decker from london(UK). i am a developer in php, i like this news....good one
    My Blog
    Are you sure? This action cannot be undone.
    Cancel
  • Programmist

    MemberMar 30, 2012

    I don't know much about XAMPP but WAMP is way too easy to use in all ways for me😀 .
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberApr 1, 2012

    Actually XAMPP has more configuration options and will baffle the newbies and render it difficult to run... WAMP doesn't have much options and it is easy! 😀
    Are you sure? This action cannot be undone.
    Cancel
  • soumikdas22

    MemberJun 6, 2012

    sir i m having a difficulty with xampp .its showing 404 error ..
    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 #-Link-Snipped-#.
    Error 404

    #-Link-Snipped-#
    06/06/12 23:01:58
    Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1



    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJun 6, 2012

    What URL did you enter? Try WAMP Server and let us know!
    Are you sure? This action cannot be undone.
    Cancel
  • soumikdas22

    MemberJun 6, 2012

    Praveen-Kumar
    What URL did you enter? Try WAMP Server and let us know!
    i am not sure what happened yesterday.. now it is working fine..
    Are you sure? This action cannot be undone.
    Cancel
  • iam12

    MemberJun 18, 2012

    What does error 404 mean?
    Are you sure? This action cannot be undone.
    Cancel
  • iam12

    MemberJun 18, 2012

    The_Big_K
    #-Link-Snipped-# : Read this post ->
    epic fail always get error 404
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJun 18, 2012

    iam12
    What does error 404 mean?
    The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.
    Are you sure? This action cannot be undone.
    Cancel
  • xheavenlyx

    MemberJun 27, 2012

    I have written an updated tutorial on XAMPP installation and getting started with development. It's very basic and for anyone who would stumble on this thread:

    #-Link-Snipped-#
    Are you sure? This action cannot be undone.
    Cancel
  • simiraj

    MemberJul 25, 2013

    hi.. your description is very usaefull for me.,..... thank u
    Are you sure? This action cannot be undone.
    Cancel
  • atulmittal0109

    MemberAug 10, 2013

    Kaustubh Katdare
    Using XAMPP is very easy. Follow these steps -

    1. Run the XAMPP application. Turn on Apache & MySQL (if your application needs database) services through it.
    2. Click on 'Explore' button on the XAMPP control panel - in the window that opens, check for htdocs folder.
    3. htdocs folder is the one where all your PHP scripts should lie. This is the folder that Apache points to.
    4. You might want to create a separate folder inside /htdocs/ folder to save all your PHP programs. Let's call it 'myprograms'.
    5. Save your php script in /htdocs/myprograms folder. (Ex. test.php)
    6. Now, start your webbrowser and type following address: #-Link-Snipped-#

    Your browser will now execute the script and show you the output.

    I hope this works for you. If you have further questions, feel free to ask 😀
    Hi Kaustabh,

    I have tried that but when I run my file at #-Link-Snipped-#
    It is showing error as "Object not found". What may be the problem? I have followed exactly the above steps
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorAug 10, 2013

    #-Link-Snipped-# : Several things to know -

    1. Does the file exist at /myprograms/ folder (physically) . That is check the htdocs folder and then go to 'myprograms' folder inside it and see if the file's there.

    2. Is php_check.php error free?

    3. Do other files in your document root work fine?
    Are you sure? This action cannot be undone.
    Cancel
  • atulmittal0109

    MemberAug 10, 2013

    Look, I installed the Xampp server and when installed, I started the control panel. After that, I turn on the Apache ans MySQL(though MySQL is not working for some reason). Now, I clicked on the explorer and in htdocs folder, I created a folder named as "myprograms" and then I created a file with name "php_check.php" in this folder. The code written in the file is as below:
    (
    <html>
    <title>PHP Check File</title>
    <body>
    <?php
    print "<h1>Congratulations, your server can process PHP!</h1>";
    print "<h3>Here you can view the PHP configuration on your server</h3>";
    phpinfo( );
    exit();
    ?>
    <h1>Sorry, PHP is not enabled on this server.</h1><br /><br />
    <h3>Check your host provider documentation or contact
    your host provider to ask them how to enable PHP.</h3>
    </body>
    </html>
    )

    Now, when I type the address in my browser as #-Link-Snipped-#
    it is still showing the same "object not found error"
    Are you sure? This action cannot be undone.
    Cancel
  • atulmittal0109

    MemberAug 10, 2013

    Hi,

    I have got the solution. There was something wrong with the file extension. Thanks for your time and help.
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorAug 10, 2013

    You don't need to put that file in the myprograms folder. If you just want to test whether XAMPP is working or not, you can put that file directly in htdocs folder and then access it from #-Link-Snipped-# . Also check if your browser can render any text file if you put it in htdocs folder and access it from #-Link-Snipped-#.

    If that doesn't work - your setup may have issues. Check whether XAMPP\apache\conf\httpd.conf is pointing to the right directory. Look for something that says "DocumentRoot".
    Are you sure? This action cannot be undone.
    Cancel
  • atulmittal0109

    MemberAug 10, 2013

    Its working fine now both with php and text files. Thanks
    Are you sure? This action cannot be undone.
    Cancel
  • Nayan Goenka

    MemberAug 10, 2013

    If you get struck at some errors and you think Xampp is working fine, try check your code for some missing tags. I had a recent experience when I screwed up some tags in the code that lead to malfunction. It was a stupid mistake and it was fixed easily but i had to waste a lot of time in to it.
    Are you sure? This action cannot be undone.
    Cancel
  • Tushar Kathuria

    MemberNov 10, 2013

    I am also getting the same error 404.I entered url #-Link-Snipped-#
    Folder myprograms is saved in htdocs and test.php in myprograms.
    please help me otherwise i will not even be able to start using php.
    Are you sure? This action cannot be undone.
    Cancel
  • Kaustubh Katdare

    AdministratorNov 10, 2013

    @#-Link-Snipped-# - welcome to CrazyEngineers. Every setup is different; so we need to know what you've on your machine so that we can provide possible solutions.

    You should perform quick checks-
    • Is your default XAMPP page loading fine?
    • If you put any text file say test.txt in /htdocs/ are you able to view it in browser by typing #-Link-Snipped-# ?
    Are you able to load other files in the same directory or in htdocs?
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberNov 11, 2013

    Tushar Kathuria
    I am also getting the same error 404.I entered url #-Link-Snipped-#
    Folder myprograms is saved in htdocs and test.php in myprograms.
    please help me otherwise i will not even be able to start using php.
    Are you working on linux? on linux paths are case sensitive, so make sure directory name is exactly same as you are accessing on browser
    Are you sure? This action cannot be undone.
    Cancel
  • NIRAJ PANDEY

    MemberApr 8, 2014

    I installed xampp on ma lappy..m newbie in php development..i tried to run php sript..bt browser dnt pops anythng inside php code...help
    Are you sure? This action cannot be undone.
    Cancel
  • Ankita Katdare

    AdministratorApr 8, 2014

    NIRAJ PANDEY
    I installed xampp on ma lappy..m newbie in php development..i tried to run php sript..bt browser dnt pops anythng inside php code...help
    Share the exact steps you performed. That will help us know what went wrong. We will guide you from there.
    Are you sure? This action cannot be undone.
    Cancel
  • NIRAJ PANDEY

    MemberApr 8, 2014

    apache is running..
    <html>
    <head>
    <title>My first php</title>
    </head>
    <body>
    <? echo "HIII!! IM NIRAJ PANDEY"; ?>
    </body>
    </html>
    Dis is the script which i saved as test.php inside xampp\htdocs\nirajphp folder..
    Then i opened chrome and typed #-Link-Snipped-#
    title is displayed bt nothing is echoed..
    Are you sure? This action cannot be undone.
    Cancel
  • Ankita Katdare

    AdministratorApr 8, 2014

    #-Link-Snipped-#

    To echo something, you can just write this code inside the test.php file.

    <?php
    echo "Hello World";
    ?>

    That should work. 👍
    Are you sure? This action cannot be undone.
    Cancel
  • NIRAJ PANDEY

    MemberApr 8, 2014

    tht worked thanxx..!! plzz cn u explain wat ws wrng in my code?
    Are you sure? This action cannot be undone.
    Cancel
  • Manish Goyal

    MemberApr 8, 2014

    you were using short code <? ?> which might have disabled in your php.ini settings

    For more info
    <a href="https://www.php.net/manual/en/language.basic-syntax.phptags.php" target="_blank" rel="nofollow noopener noreferrer">PHP: PHP tags - Manual</a>
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register