By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,911 Members | 1,137 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,911 IT Pros & Developers. It's quick & easy.

WAMP5 Problem

100+
P: 106
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
Jan 18 '09 #1
Share this Question
Share on Google+
18 Replies


Dormilich
Expert Mod 5K+
P: 8,639
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?
Jan 18 '09 #2

100+
P: 106
@Dormilich

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
Jan 18 '09 #3

Atli
Expert 5K+
P: 5,058
Ok, so it looks like your server is working just like it should.
What is the problem then?
Jan 18 '09 #4

100+
P: 106
@Atli
:) the Problem is that the project is not working when i access my project directory it shows me a blank page
Jan 18 '09 #5

Atli
Expert 5K+
P: 5,058
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.
Jan 18 '09 #6

100+
P: 106
@Atli
Yes im doing so http://localhost/... but still a blank page
how shall i fix that my HTTP server is not recognizing php extension
Jan 18 '09 #7

Atli
Expert 5K+
P: 5,058
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
  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.
Jan 18 '09 #8

100+
P: 106
@Atli
This phpinfo() function Works Great and shows me all the information regarding my PHP
Jan 18 '09 #9

Atli
Expert 5K+
P: 5,058
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
  1. error_reporting(E_ALL);
  2. ini_set('display_errors', true);
That should show you if there are any errors in that code.
Jan 18 '09 #10

100+
P: 106
@Atli

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
Jan 19 '09 #11

Dormilich
Expert Mod 5K+
P: 8,639
@jessy
I don't think so. does your project reside directly in the document root folder or has it a (sub)folder of its own?
Jan 19 '09 #12

Atli
Expert 5K+
P: 5,058
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?
Jan 19 '09 #13

Dormilich
Expert Mod 5K+
P: 8,639
@Atli
I had this problem once, when my PHP installation had a broken library.... but that's rather rare.
Jan 19 '09 #14

100+
P: 106
@Atli
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 :
Expand|Select|Wrap|Line Numbers
  1. <?  include("companyval.php");
  2.     include("../include/conf.php"); ?>
  3. <?include("1header.php");?>
  4. <?include("1footer.php");?>
its just some included files
Jan 19 '09 #15

Dormilich
Expert Mod 5K+
P: 8,639
do you have short tags enabled (see phpinfo())? generally, it is best to use the full tag (<?php).

further,
Expand|Select|Wrap|Line Numbers
  1. <?include('file.php');?>
is invalid ("<?include" is not a valid processing instruction), better use
Expand|Select|Wrap|Line Numbers
  1. <?php include 'file.php'; ?>
Jan 19 '09 #16

100+
P: 106
@Dormilich
GOD BLESS YOU !

Thanks alot
R u married :)
Jan 19 '09 #17

Dormilich
Expert Mod 5K+
P: 8,639
yea..... small cause, big trouble (if it were always that simple)
Jan 19 '09 #18

Atli
Expert 5K+
P: 5,058
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.
Jan 19 '09 #19

Post your reply

Sign in to post your reply or Sign up for a free account.