I am trying to learn MySQL, PHP and Apache server. I downloaded the Apache(2.0 and PHP(5.2). Also, I added these two codes in my conf file.

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

It says its running but does anybody know how to check it to see if I downloaded Php correct. My Apache server is working correct, I dont see anything wrong but just want to make sure that the php is working as well. I try to ran the phpinfo(); but it doesnt work (i guess not enough detail instructions for beginner like me). So pls guide me check my PHP connection w/ apache.

Also, Can u guide me to download MySQL, and connect it with Apache, Php

Thank you in advance,

Kabbi

    What was the extension of the file you tried phpinfo() in - .php ?

    Did the file look like this:

    <?php
    phpinfo();
    ?>

    ?

    Have you restarted Apache since making these changes?

    Do you have a php.ini file somwhere (e.g. in c:/php/) ? If so, you should add the "PHPIniDir" directive to the httpd.conf file as well.

      I just added the dir code in conf file.

      Also, I saved the info.php file in my documents, and then i type in http://localhost/info.php. The file is exactly the same as you have.

      But for some reason it's not working. In the book, it says to save it my HTML directory, what's that suppose to mean?

      Thx in advance

      Kabbi

        Ya, the script of php looks just like that. Also, I added the line of dir in my conf file.

        I saved that php script in my documents, the book that I am following says save in my HTML directory(what's that suppose to mean). Then, I type in http://localhost/info.php.

        But it's not working. Pls guide me thru this.

        Thx in advance.

        Kabbi

          If you installed Apache 2 with the default paths, your website's root is located at: C:\Program Files\Apache Group\Apache2\htdocs\

          Or... something similar. I don't remember the exact folder name inside Apache Group (I changed mine to simply "Apache", so it could actually be "Apache 2" or something, I don't remember).

            I saved my little PHP testing script(actual file name 'info.php') in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs folder.

            Then, I ran it on my internet browser, as http://localhost/info.php

            It's taking me to AOL search result page, which means it's not working. PLs guide me from there.

            Thx

              Is Windows set to view file extensions? To make sure it is, open My Computer, goto Tools -> Folder Options, click the View tab, and make sure the box labeled "Hide extensions for known file types" is unchecked.

                After saving the file in the apache Ht directory, it is now showing a blank white page. So, it did picked up the localhost/info.php. But, didnt show the results that were expected.

                What's that suppose to mean, I thought I sould see a page with my php configuration settings scripts in it. Pls let me know what am I missing.

                Thx in advance

                Kabbi

                  If you go to the http://localhost/info.php page and view the source, do you see nothing at all or do you see the "<?php phpinfo(); ?>" code?

                  EDIT: Hmm.... since you're obviously a beginner in the world of webservers and PHP, perhaps you should consider an all-in-one installer solution such as XAMP or WAMP to install Apache, MySQL, and PHP for you?

                  EDIT2: Er... you marked this thread resolved, so... does that mean you've found the problem?

                    Thanks for all your help

                    I had an space between <? and php . That's what creating the problem. Now, I am moving forward to download MySQL in this php-apache.

                    Thx

                    kabbi

                      Write a Reply...