Hello, my name is Ongun. I just joined to community.

I am building a contact form. I downloaded MAMP. to test my PHP code. i do not know the rest I follow the instructions online. I copied my all files related to my site into htdoc in MAMP. but it does not work, I also added

$link = mysql_connect('localhost', 'root', 'root');

. in the video that i found when i copy my files there is a green light on side bar showing that i am connected , but also it does not work as well. Probably I have a small error that I did not do. PLease help me Thank you.

    Welcome to PHPBuilder. 🙂

    MAMP, I assume, is a Mac OSX PHP environment?

    Where are the logfiles on Mac? BSD (from which OS X gets its roots), holds server log files under /var/log. Do you have a file that looks like an HTTPD error_log file under /var/log? If so, look and see what's in it after you try to load your page.

    Does which php in your terminal give any result? What about php -r "echo 'foo';" ?

    Also, if you're not getting anything to work at all, try something simple for your first script, like:

    <?php
    echo "First script!";
    ?>

      wow, i do not know anything what you said. I do not know how to use terminal :/
      about log I have no idea. is this really that complicated. I am frustrated

        I am sorry that you're frustrated. It's part of the learning process for many people, and few of us here haven't experienced it ... perhaps this week.

        If you want to be a programmer, though, I suggest you buck it up and get started.

        Here is an essay you might want to consider: http://www.cryptonomicon.com/command.zip

        That's Neal Stephenson's "in the beginning was the command line."

        I would suggest that a simple Google search might help you find the OSX Terminal app. For example, I found this with just a few seconds of searching:

        http://blog.teamtreehouse.com/introduction-to-the-mac-os-x-command-line

        Best of luck! You can do this! 🙂

          Hey I did something 🙂. grep --color DocumentRoot /etc/apache2/httpd.conf . when try my local host 127.0.0.1 it says it works, But i am unable to locate my Library/WebServer/Documents .

            Hi, I finally did it, my version is ;
            PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
            Copyright (c) 1997-2013 The PHP Group
            Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies.
            I uncommented LoadModule php5_module libexec/apache2/libphp5.so
            I guess i downloaded somehow. I still have cpgz file that I try to drag into terminal and getting the error access denied but version should be good.
            I copied my files into webserver. I can access them ! But whenever, I try to run php it tries to download the php file it does not open it.

              Write a Reply...