WAMP5 Problem | Member | | Join Date: Oct 2006
Posts: 102
| | |
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
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,656
| | | re: WAMP5 Problem
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?
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
Ok, so it looks like your server is working just like it should.
What is the problem then?
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
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.
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
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.php", and put this code into it:
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.
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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.php", and put this code into it:
Expand|Select|Wrap|Line Numbers - <?php
- phpinfo();
- ?>
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
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
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: -
error_reporting(E_ALL);
-
ini_set('display_errors', true);
That should show you if there are any errors in that code.
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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|Wrap|Line Numbers - error_reporting(E_ALL);
- ini_set('display_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
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,656
| | | re: WAMP5 Problem Quote:
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?
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
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?
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,656
| | | re: WAMP5 Problem Quote:
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.
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
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\Project_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 : - <? include("companyval.php");
-
include("../include/conf.php"); ?>
-
<?include("1header.php");?>
-
<?include("1footer.php");?>
its just some included files
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,656
| | | re: WAMP5 Problem
do you have short tags enabled (see phpinfo())? generally, it is best to use the full tag (<?php).
further,
is invalid ("<?include" is not a valid processing instruction), better use - <?php include 'file.php'; ?>
| | Member | | Join Date: Oct 2006
Posts: 102
| | | re: WAMP5 Problem Quote:
Originally Posted by Dormilich do you have short tags enabled (see phpinfo())? generally, it is best to use the full tag (<?php).
further,
is invalid ("<?include" is not a valid processing instruction), better use - <?php include 'file.php'; ?>
GOD BLESS YOU !
Thanks alot
R u married :)
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,656
| | | re: WAMP5 Problem
yea..... small cause, big trouble (if it were always that simple)
|  | Moderator | | Join Date: Nov 2006 Location: Iceland
Posts: 3,751
| | | re: WAMP5 Problem
So it all boils down to a syntax error. Those things will be the death of us all :]
Still, you should have seen the code in the source of your page. Didn't you check that a few posts back?
In any case, glad it all worked out.
|  | Similar Apache Web Server bytes | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,467 network members.
|