WAMP5 Problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jessy
    New Member
    • Oct 2006
    • 106

    WAMP5 Problem

    Hi Guys,

    Just installed WAMP5 and placed my project in the WWW folder but whenever i access my project folder it shows me a blank page although my project folder got an index file .
    i don't know what's wrong !!

    ANy Help
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    which directory is defined as the document root in the httpd.conf file? if you just open http://localhost/ you should see the standard apache "it works"-page (unless you have removed it), did that work for you?

    Comment

    • jessy
      New Member
      • Oct 2006
      • 106

      #3
      Originally posted by Dormilich
      which directory is defined as the document root in the httpd.conf file? if you just open http://localhost/ you should see the standard apache "it works"-page (unless you have removed it), did that work for you?

      When i open that page i do not see It works But i see a Lovely page for the Wamp called WAMP5 Homepage containing a list with my projects and some other stuff

      Comment

      • Atli
        Recognized Expert Expert
        • Nov 2006
        • 5062

        #4
        Ok, so it looks like your server is working just like it should.
        What is the problem then?

        Comment

        • jessy
          New Member
          • Oct 2006
          • 106

          #5
          Originally posted by Atli
          Ok, so it looks like your server is working just like it should.
          What is the problem then?
          :) the Problem is that the project is not working when i access my project directory it shows me a blank page

          Comment

          • Atli
            Recognized Expert Expert
            • Nov 2006
            • 5062

            #6
            Ok. How are you accessing the directory?
            I am assuming you are trying to view it in a browser?

            If so, using a file path, like "C:\www\mypage. php", will not work.
            If you want to have the PHP page displayed as a PHP page, you need to go through the HTTP server, which means using a "http://localhost/..." path.

            If you are already doing that, and you are still getting a blank page, check the source. See if you are getting the PHP code sent as plain-text. That would indicate that your HTTP server is not recognizing the .php extension as PHP code.

            Comment

            • jessy
              New Member
              • Oct 2006
              • 106

              #7
              Originally posted by Atli
              Ok. How are you accessing the directory?
              I am assuming you are trying to view it in a browser?

              If so, using a file path, like "C:\www\mypage. php", will not work.
              If you want to have the PHP page displayed as a PHP page, you need to go through the HTTP server, which means using a "http://localhost/..." path.

              If you are already doing that, and you are still getting a blank page, check the source. See if you are getting the PHP code sent as plain-text. That would indicate that your HTTP server is not recognizing the .php extension as PHP code.
              Yes im doing so http://localhost/... but still a blank page
              how shall i fix that my HTTP server is not recognizing php extension

              Comment

              • Atli
                Recognized Expert Expert
                • Nov 2006
                • 5062

                #8
                Is the PHP code showing up in the source sent to the browser?

                Try going to the web-root and create a file called "phpinfo.ph p", and put this code into it:
                [code=php]
                <?php
                phpinfo();
                ?>[/code]
                Then do "http://localhost/phpinfo.php".

                If that gives you a blank page, do "View source" (or whatever version of that your browser uses). If you see the code I just posted in the source, then you have a problem.

                Then you would have to configure your Apache server so that it recognizes PHP. And how that would work depends on how you installed the server and which version of Apache you use.

                Comment

                • jessy
                  New Member
                  • Oct 2006
                  • 106

                  #9
                  Originally posted by Atli
                  Is the PHP code showing up in the source sent to the browser?

                  Try going to the web-root and create a file called "phpinfo.ph p", and put this code into it:
                  Expand|Select|W rap|Line Numbers
                  1. <?php
                  2. phpinfo();
                  3. ?>




                  Then do "http://localhost/phpinfo.php".

                  If that gives you a blank page, do "View source" (or whatever version of that your browser uses). If you see the code I just posted in the source, then you have a problem.

                  Then you would have to configure your Apache server so that it recognizes PHP. And how that would work depends on how you installed the server and which version of Apache you use.
                  This phpinfo() function Works Great and shows me all the information regarding my PHP

                  Comment

                  • Atli
                    Recognized Expert Expert
                    • Nov 2006
                    • 5062

                    #10
                    That means your server is configured correctly.

                    There must be a problem with the other page then.
                    Try enabling error reporting in that code. Just put these two lines at the top of the script:
                    [code=php]
                    error_reporting (E_ALL);
                    ini_set('displa y_errors', true);[/code]
                    That should show you if there are any errors in that code.

                    Comment

                    • jessy
                      New Member
                      • Oct 2006
                      • 106

                      #11
                      Originally posted by Atli
                      That means your server is configured correctly.

                      There must be a problem with the other page then.
                      Try enabling error reporting in that code. Just put these two lines at the top of the script:
                      Expand|Select|W rap|Line Numbers
                      1. error_reporting (E_ALL);
                      2. ini_set('displa y_errors', true);




                      That should show you if there are any errors in that code.

                      i enabled error reporting but still shows me a blank page !
                      i have an index.php script in the project ..can this be the problem ? maybe its conflicting with the index.php of the WAMP

                      Comment

                      • Dormilich
                        Recognized Expert Expert
                        • Aug 2008
                        • 8694

                        #12
                        Originally posted by jessy
                        i have an index.php script in the project ..can this be the problem ? maybe its conflicting with the index.php of the WAMP
                        I don't think so. does your project reside directly in the document root folder or has it a (sub)folder of its own?

                        Comment

                        • Atli
                          Recognized Expert Expert
                          • Nov 2006
                          • 5062

                          #13
                          Yea, Dormilich is right. If there was a conflict, you would be seeing the other index file, not a blank page.

                          What is the exact URL you are using, and where exactly is this index file you want displayed?

                          Assuming you are using the correct URL, and that the files are in the correct place, then I guess the problem would have to be with your PHP code.
                          Could we see that?

                          Comment

                          • Dormilich
                            Recognized Expert Expert
                            • Aug 2008
                            • 8694

                            #14
                            Originally posted by Atli
                            ... then I guess the problem would have to be with your PHP code.
                            I had this problem once, when my PHP installation had a broken library.... but that's rather rare.

                            Comment

                            • jessy
                              New Member
                              • Oct 2006
                              • 106

                              #15
                              Originally posted by Atli
                              Yea, Dormilich is right. If there was a conflict, you would be seeing the other index file, not a blank page.

                              What is the exact URL you are using, and where exactly is this index file you want displayed?

                              Assuming you are using the correct URL, and that the files are in the correct place, then I guess the problem would have to be with your PHP code.
                              Could we see that?
                              D:\wamp\www\Pro ject_1\company this is the path of my project and the index file is in the company folder
                              and this is the index file as well :
                              Code:
                              <?  include("companyval.php");
                                  include("../include/conf.php"); ?>
                              <?include("1header.php");?>
                              <?include("1footer.php");?>
                              its just some included files

                              Comment

                              Working...