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

Newbie problem: PHP script not running in browser

P: n/a
(bringing the discussion here for php.general)

I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b. http://localhost/ is E:\wamp\www\

I have put the first php script to hello.php file:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.php shows a blank screen

I have forgotten some previous situation where it had appeared as

Hello World

'; ?>

on the browser.

E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

My Computer
manage
Services and Applications
Services
shows that Apache is running

wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and

wampmysqld, started, manual, local system, and

I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log

[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.

so, that means apache is running.

I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:

[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.

The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"

What is stopping it?

Thanks.
--
V
Aug 6 '08 #1
Share this Question
Share on Google+
22 Replies


P: n/a
I haven't seen wamp not work out of the box before, but I think the
first time you have to left click on the icon and select put online,
don't quote me on this though(may have been prior to 2). The icon
should not be yellow as it means something's not running. Do a regular
html page and see if you're seeing anything. Also make sure you're not
opening the file locally i.e. double clicking on it (really big hint,
if the url says file:// you are wrong). Beyond that I would say
reinstall but that's extreme
Aug 7 '08 #2

P: n/a
On Aug 7, 11:06 am, V S Rawat <vsra...@gmail.comwrote:
(bringing the discussion here for php.general)

I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/is E:\wamp\www\

I have put the first php script to hello.php file:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

Putting the above file to E:\wamp\www\php_ex but givinghttp://localhost/php_ex/hello.phpshows a blank screen

I have forgotten some previous situation where it had appeared as

Hello World

'; ?>

on the browser.

E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

My Computer
manage
Services and Applications
Services
shows that Apache is running

wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and

wampmysqld, started, manual, local system, and

I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log

[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.

so, that means apache is running.

I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:

[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.

The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"

What is stopping it?

Thanks.
--
V
can you see normal html files?
Aug 7 '08 #3

P: n/a
On 8/7/2008 5:39 AM India Time, _The Hajj_ wrote:
I haven't seen wamp not work out of the box before, but I think the
first time you have to left click on the icon and select put online,
which icon to "left click on the icon and select put online"?

it is showing Joomla, drupal sites that I have downloaded under the same
www folder. it is showing entire php documentation, it is showing php
admin, allows me to create database, change priviledges, change
password, so I guess non-php part is working.
don't quote me on this though(may have been prior to 2). The icon
should not be yellow
which icon? the systray icon of wamp is not yellow. is white. goes to
red/ yellow when I stop all or some services.
as it means something's not running. Do a regular
html page and see if you're seeing anything. Also make sure you're not
opening the file locally i.e. double clicking on it (really big hint,
if the url says file:// you are wrong). Beyond that I would say
reinstall but that's extreme
yeah, I will reinstall but I wanted to understand the problem. if this
thread doesn't lead anywhere, I would.

thanks.
--
V
Aug 7 '08 #4

P: n/a
On 8/7/2008 10:24 AM India Time, _BlackRose_ wrote:
can you see normal html files?
Yes. All joomla, drupal, zencart sites on localhost, entire phpadmin and
php documentation is showing up.

Aug 7 '08 #5

P: n/a
ok.. I see that above you posted the error log for when your apache
just starts. What shows up on the access and error logs when you try
to visit that page?
Aug 7 '08 #6

P: n/a

"V S Rawat" <vs*****@gmail.comwrote in message
news:76**********************************@i20g2000 prf.googlegroups.com...
(bringing the discussion here for php.general)

I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b. http://localhost/ is E:\wamp\www\

I have put the first php script to hello.php file:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.php shows a blank screen

I have forgotten some previous situation where it had appeared as

Hello World

'; ?>

on the browser.

E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

My Computer
manage
Services and Applications
Services
shows that Apache is running

wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and

wampmysqld, started, manual, local system, and

I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log

[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008
00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process
1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.

so, that means apache is running.

I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:

[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.

The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other
locations.
#
DocumentRoot "e:/wamp/www/"

What is stopping it?

Thanks.
--
V
hi,
do you have error reporting turned on for PHP?
If not then please do.

Richard
Aug 7 '08 #7

P: n/a
On Aug 7, 3:07 am, V S Rawat <vsra...@gmail.comwrote:
>
which icon to "left click on the icon and select put online"?
It would be the same one where you stop/restart the services but if
you're seeing Joomla then something else is going on and I feel it's
something simple.
Aug 7 '08 #8

P: n/a
V S Rawat wrote:
(bringing the discussion here for php.general)

I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b. http://localhost/ is E:\wamp\www\

I have put the first php script to hello.php file:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.php shows a blank screen

I have forgotten some previous situation where it had appeared as

Hello World

'; ?>

on the browser.

E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

My Computer
manage
Services and Applications
Services
shows that Apache is running

wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and

wampmysqld, started, manual, local system, and

I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log

[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.

so, that means apache is running.

I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:

[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.

The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"

What is stopping it?

Thanks.
--
V
This looks good, but I suspect you have a syntax error somewhere.

In your php.ini file, ensure you have the following:

display_errors = on
error_reporting = E_ALL

I suspect once you turn these on, you'll find a syntax error.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 7 '08 #9

P: n/a
(bringing the discussion here for php.general)
>
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b. http://localhost/ is E:\wamp\www\

I have put the first php script to hello.php file:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>

Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.php shows a blank screen

I have forgotten some previous situation where it had appeared as

Hello World

'; ?>

on the browser.

E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3

My Computer
manage
Services and Applications
Services
shows that Apache is running

wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and

wampmysqld, started, manual, local system, and

I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log

[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.

so, that means apache is running.

I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:

[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.

The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has

# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"

What is stopping it?

Thanks.
If you're certain it's located in the right directory to be served:

I had a similar problem once when I copy/pasted a php line: The quotes
were unicode or something; deleted/replaced the quotes and it worked.

Just a beginner here, so; that's all I have<g>

Regards,
Aug 7 '08 #10

P: n/a
On Aug 7, 5:58*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/is E:\wamp\www\
I have put the first php script to hello.php file:
<html>
* * <head>
* * *<title>PHP Test</title>
* * </head>
* * <body>
* * <?php echo '<p>Hello World</p>'; ?>
* * </body>
</html>
Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.phpshows a blank screen
I have forgotten some previous situation where it had appeared as
Hello World
'; ?>
on the browser.
E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
My Computer
manage
Services and Applications
Services
shows that Apache is running
wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and
wampmysqld, started, manual, local system, and
I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log
[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.
so, that means apache is running.
I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.
The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"
What is stopping it?
Thanks.
--
V

This looks good, but I suspect you have a syntax error somewhere.

In your php.ini file, ensure you have the following:

display_errors = on
error_reporting = E_ALL

I suspect once you turn these on, you'll find a syntax error.
That is leading somewhere.

display_errors was off so I switched that on

error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL

and switched on a few more error reportings that I could make out in
the nearby lines.

no luck, the screen is still blank.

but, php error log has following lines now that were not there
previously.

--start
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
--end

the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
if ($params_for_wampini[$paramname] == 1)
$phpConfText .= 'Type: item; Caption: "'.$paramname.'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
else
$phpConfText .= 'Type: item; Caption: "'.$paramname.'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end

that fwrite() one is the line 257

and 390 is
--start
$mypattern = ';WAMPADDALIAS';
$newalias_dir = str_replace('.conf','',$one_alias);
$alias_contents = @file_get_contents ($aliasDir.$one_alias);
preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
$newalias_dest = $match[1];

$myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end

that match[1] is line 390.

So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V
Aug 7 '08 #11

P: n/a
V S Rawat wrote:
On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>V S Rawat wrote:
>>(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/is E:\wamp\www\
I have put the first php script to hello.php file:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.phpshows a blank screen
I have forgotten some previous situation where it had appeared as
Hello World
'; ?>
on the browser.
E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
My Computer
manage
Services and Applications
Services
shows that Apache is running
wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and
wampmysqld, started, manual, local system, and
I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log
[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.
so, that means apache is running.
I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.
The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"
What is stopping it?
Thanks.
--
V
This looks good, but I suspect you have a syntax error somewhere.

In your php.ini file, ensure you have the following:

display_errors = on
error_reporting = E_ALL

I suspect once you turn these on, you'll find a syntax error.

That is leading somewhere.

display_errors was off so I switched that on

error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL

and switched on a few more error reportings that I could make out in
the nearby lines.

no luck, the screen is still blank.

but, php error log has following lines now that were not there
previously.

--start
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
--end

the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
if ($params_for_wampini[$paramname] == 1)
$phpConfText .= 'Type: item; Caption: "'.$paramname.'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
else
$phpConfText .= 'Type: item; Caption: "'.$paramname.'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end

that fwrite() one is the line 257

and 390 is
--start
$mypattern = ';WAMPADDALIAS';
$newalias_dir = str_replace('.conf','',$one_alias);
$alias_contents = @file_get_contents ($aliasDir.$one_alias);
preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
$newalias_dest = $match[1];

$myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end

that match[1] is line 390.

So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V
The only ones pertinent to displaying your errors are display_errors and
error_reporting.

And I'm not familiar with this file, but it looks like it's completely
unrelated to your problem.

Can you copy/paste your EXACT code into a message - the entire page?
that might help us figger out the problem.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 8 '08 #12

P: n/a
On Aug 8, 5:11*am, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/isE:\wamp\www\
I have put the first php script to hello.php file:
<html>
* * <head>
* * *<title>PHP Test</title>
* * </head>
* * <body>
* * <?php echo '<p>Hello World</p>'; ?>
* * </body>
</html>
Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.phpshowsa blank screen
I have forgotten some previous situation where it had appeared as
Hello World
'; ?>
on the browser.
E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
My Computer
manage
Services and Applications
Services
shows that Apache is running
wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and
wampmysqld, started, manual, local system, and
I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log
[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.
so, that means apache is running.
I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.
The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"
What is stopping it?
Thanks.
--
V
This looks good, but I suspect you have a syntax error somewhere.
In your php.ini file, ensure you have the following:
display_errors = on
error_reporting = E_ALL
I suspect once you turn these on, you'll find a syntax error.
That is leading somewhere.
display_errors was off so I switched that on
error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL
and switched on a few more error reportings that I could make out in
the nearby lines.
no luck, the screen is still blank.
but, php error log has following lines now that were not there
previously.
--start
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: mywampfp in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined offset: *1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: *Undefined offset: *1 in E:\wamp
\scripts\refresh.php on line 390
--end
the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
* * if ($params_for_wampini[$paramname] == 1)
* * * * $phpConfText .= 'Type: item; Caption: "'.$paramname.'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
* * else
* * * * $phpConfText .= 'Type: item; Caption: "'.$paramname.'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end
that fwrite() one is the line 257
and 390 is
--start
* * $mypattern = ';WAMPADDALIAS';
* * $newalias_dir = str_replace('.conf','',$one_alias);
* * $alias_contents = @file_get_contents ($aliasDir.$one_alias);
* * preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
* * $newalias_dest = $match[1];
* * $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end
that match[1] is line 390.
So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V

The only ones pertinent to displaying your errors are display_errors and
error_reporting.

And I'm not familiar with this file, but it looks like it's completely
unrelated to your problem.
hmm. in that case, i have yet to face the consequences of the above
errors.
>
Can you copy/paste your EXACT code into a message - the entire page?
that might help us figger out the problem.
here it is:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>

>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attglobal.net
==================
--
V
Aug 8 '08 #13

P: n/a
V S Rawat wrote:
On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>V S Rawat wrote:
>>On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/isE:\wamp\www\
I have put the first php script to hello.php file:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo '<p>Hello World</p>'; ?>
</body>
</html>
Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.phpshowsa blank screen
I have forgotten some previous situation where it had appeared as
Hello World
'; ?>
on the browser.
E:\wamp\bin\apache\apache2.2.8\conf\httpd.co nf file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
My Computer
manage
Services and Applications
Services
shows that Apache is running
wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and
wampmysqld, started, manual, local system, and
I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log
[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.
so, that means apache is running.
I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.
The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"
What is stopping it?
Thanks.
--
V
This looks good, but I suspect you have a syntax error somewhere.
In your php.ini file, ensure you have the following:
display_errors = on
error_reporting = E_ALL
I suspect once you turn these on, you'll find a syntax error.
That is leading somewhere.
display_errors was off so I switched that on
error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL
and switched on a few more error reportings that I could make out in
the nearby lines.
no luck, the screen is still blank.
but, php error log has following lines now that were not there
previously.
--start
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
--end
the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
if ($params_for_wampini[$paramname] == 1)
$phpConfText .= 'Type: item; Caption: "'.$paramname.'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
else
$phpConfText .= 'Type: item; Caption: "'.$paramname.'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end
that fwrite() one is the line 257
and 390 is
--start
$mypattern = ';WAMPADDALIAS';
$newalias_dir = str_replace('.conf','',$one_alias);
$alias_contents = @file_get_contents ($aliasDir.$one_alias);
preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
$newalias_dest = $match[1];
$myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end
that match[1] is line 390.
So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V
The only ones pertinent to displaying your errors are display_errors and
error_reporting.

And I'm not familiar with this file, but it looks like it's completely
unrelated to your problem.

hmm. in that case, i have yet to face the consequences of the above
errors.
>Can you copy/paste your EXACT code into a message - the entire page?
that might help us figger out the problem.

here it is:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
OK, what do you see if you view the document source?

Do you get PHP Test in your title bar? And this is in a file with a
..php extension, correct?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 9 '08 #14

P: n/a
On Aug 9, 5:19*am, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
(bringing the discussion here for php.general)
I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
5.0.51b.http://localhost/isE:\wamp\www\
I have put the first php script to hello.php file:
<html>
* * <head>
* * *<title>PHP Test</title>
* * </head>
* * <body>
* * <?php echo '<p>Hello World</p>'; ?>
* * </body>
</html>
Putting the above file to E:\wamp\www\php_ex but giving
http://localhost/php_ex/hello.phpshowsablank screen
I have forgotten some previous situation where it had appeared as
Hello World
'; ?>
on the browser.
E:\wamp\bin\apache\apache2.2.8\conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
My Computer
manage
Services and Applications
Services
shows that Apache is running
wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
system, and
wampmysqld, started, manual, local system, and
I restarted all services from the wamp systray icon. That gave the
following entries in apache_error.log
[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
--
Shutting down the server.
[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled..
Child process is ending.
[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
mutex
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
have
exited.
[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
exiting
[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
successfully.
[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
configured -- resuming normal operations
[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
running
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
mutex.
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
threads.
so, that means apache is running.
I gave, check port 80. The dos window that opened said "your port 80
is
not used" and the following entry got added in error_log:
[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
listen on port 80.
The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory,
but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "e:/wamp/www/"
What is stopping it?
Thanks.
--
V
This looks good, but I suspect you have a syntax error somewhere.
In your php.ini file, ensure you have the following:
display_errors = on
error_reporting = E_ALL
I suspect once you turn these on, you'll find a syntax error.
That is leading somewhere.
display_errors was off so I switched that on
error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL
and switched on a few more error reportings that I could make out in
the nearby lines.
no luck, the screen is still blank.
but, php error log has following lines now that were not there
previously.
--start
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: mywampfp inE:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: *Undefined offset: *1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: *Undefined offset: *1 in E:\wamp
\scripts\refresh.php on line 390
--end
the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
* * if ($params_for_wampini[$paramname] == 1)
* * * * $phpConfText .= 'Type: item; Caption: "'.$paramname..'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
* * else
* * * * $phpConfText .= 'Type: item; Caption: "'.$paramname..'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end
that fwrite() one is the line 257
and 390 is
--start
* * $mypattern = ';WAMPADDALIAS';
* * $newalias_dir = str_replace('.conf','',$one_alias);
* * $alias_contents = @file_get_contents ($aliasDir.$one_alias);
* * preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
* * $newalias_dest = $match[1];
* * $myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end
that match[1] is line 390.
So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V
The only ones pertinent to displaying your errors are display_errors and
error_reporting.
And I'm not familiar with this file, but it looks like it's completely
unrelated to your problem.
hmm. in that case, i have yet to face the consequences of the above
errors.
Can you copy/paste your EXACT code into a message - the entire page?
that might help us figger out the problem.
here it is:
<html>
*<head>
* <title>PHP Test</title>
*</head>
*<body>
*<?php echo 'Hello World'; ?>
*</body>
</html>
OK, what do you see if you view the document source?
In the Page Source in ff3, I get:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
Do you get PHP Test in your title bar?
Yes.
And this is in a file with a .php extension, correct?
Yeah, it is hello.php.

--
V
Jerry Stuckle
Aug 9 '08 #15

P: n/a
Message-ID:
<7d**********************************@s1g2000pra.g ooglegroups.comfrom
V S Rawat contained the following:
>
>OK, what do you see if you view the document source?

In the Page Source in ff3, I get:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
>Do you get PHP Test in your title bar?

Yes.
For other files, do you see their extensions e.g .htm .html .txt ?

--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
http://slipperyhill.co.uk
Aug 9 '08 #16

P: n/a
V S Rawat wrote:
On Aug 9, 5:19 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
>V S Rawat wrote:
>>On Aug 8, 5:11 am, Jerry Stuckle <jstuck...@attglobal.netwrote:
V S Rawat wrote:
On Aug 7, 5:58 pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
>V S Rawat wrote:
>>(bringing the discussion here for php.general)
>>I am on xpsp3, wampserver 2.0, having apache 2.2.8, php 5.2.6, MySQL
>>5.0.51b.http://localhost/isE:\wamp\www\
>>I have put the first php script to hello.php file:
>><html>
>> <head>
>> <title>PHP Test</title>
>> </head>
>> <body>
>> <?php echo '<p>Hello World</p>'; ?>
>> </body>
>></html>
>>Putting the above file to E:\wamp\www\php_ex but giving
>>http://localhost/php_ex/hello.phpshowsablank screen
>>I have forgotten some previous situation where it had appeared as
>>Hello World
>>'; ?>
>>on the browser.
>>E:\wamp\bin\apache\apache2.2.8\conf\httpd.co nf file has the lines:
>>LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.dll"
>>AddType application/x-httpd-php .php
>>AddType application/x-httpd-php .php3
>>My Computer
>>manage
>>Services and Applications
>>Services
>>shows that Apache is running
>>wampapache, Apache/2.2.8 (Win32) PHP/5.2.6, started, manual, local
>>system, and
>>wampmysqld, started, manual, local system, and
>>I restarted all services from the wamp systray icon. That gave the
>>following entries in apache_error.log
>>[Wed Aug 06 19:06:57 2008] [notice] Parent: Received shutdown signal
>>--
>>Shutting down the server.
>>[Wed Aug 06 19:06:57 2008] [notice] Child 3072: Exit event signaled.
>>Child process is ending.
>>[Wed Aug 06 19:06:58 2008] [notice] Child 3072: Released the start
>>mutex
>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: All worker threads
>>have
>>exited.
>>[Wed Aug 06 19:06:59 2008] [notice] Child 3072: Child process is
>>exiting
>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Child process exited
>>successfully.
>>[Wed Aug 06 19:06:59 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6
>>configured -- resuming normal operations
>>[Wed Aug 06 19:06:59 2008] [notice] Server built: Jan 18 2008 00:37:19
>>[Wed Aug 06 19:06:59 2008] [notice] Parent: Created child process 1872
>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Child process is
>>running
>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Acquired the start
>>mutex.
>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting 64 worker
>>threads.
>>so, that means apache is running.
>>I gave, check port 80. The dos window that opened said "your port 80
>>is
>>not used" and the following entry got added in error_log:
>>[Wed Aug 06 19:07:00 2008] [notice] Child 1872: Starting thread to
>>listen on port 80.
>>The file E:\wamp\bin\apache\apache2.2.8\conf\httpd.conf has
>># DocumentRoot: The directory out of which you will serve your
>># documents. By default, all requests are taken from this directory,
>>but
>># symbolic links and aliases may be used to point to other locations.
>>#
>>DocumentRoot "e:/wamp/www/"
>>What is stopping it?
>>Thanks.
>>--
>>V
>This looks good, but I suspect you have a syntax error somewhere.
>In your php.ini file, ensure you have the following:
>display_errors = on
>error_reporting = E_ALL
>I suspect once you turn these on, you'll find a syntax error.
That is leading somewhere.
display_errors was off so I switched that on
error_reporting was E_ALL & ~E_NOTICE & ~E_STRICT, so I made that
E_ALL
and switched on a few more error reportings that I could make out in
the nearby lines.
no luck, the screen is still blank.
but, php error log has following lines now that were not there
previously.
--start
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampfp in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: i in E:\wamp
\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined variable: mywampini in E:
\wamp\scripts\refresh.php on line 257
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
[08-Aug-2008 04:10:11] PHP Notice: Undefined offset: 1 in E:\wamp
\scripts\refresh.php on line 390
--end
the area around line 257 in that file is:
--start
$phpConfText = ";WAMPPHP_PARAMSSTART
";
fwrite($mywampfp,$mywampini[$i]);
foreach ($params_for_wampini as $paramname=>$paramstatus)
{
if ($params_for_wampini[$paramname] == 1)
$phpConfText .= 'Type: item; Caption: "'.$paramname.'"; Glyph:
13; Action: multi; Actions: '.$phpParams[$paramname].'
';
else
$phpConfText .= 'Type: item; Caption: "'.$paramname.'";
Action: multi; Actions: '.$phpParams[$paramname].'
';
--end
that fwrite() one is the line 257
and 390 is
--start
$mypattern = ';WAMPADDALIAS';
$newalias_dir = str_replace('.conf','',$one_alias);
$alias_contents = @file_get_contents ($aliasDir.$one_alias);
preg_match('|^Alias /'.$newalias_dir.'/ "(.+)"|',$alias_contents,
$match);
$newalias_dest = $match[1];
$myreplace .= 'Type: submenu; Caption: "http://localhost/'.
$newalias_dir.'/"; SubMenu: alias_'.str_replace(' ','_',
$newalias_dir).'; Glyph: 3
';
--end
that match[1] is line 390.
So, I hope that this all that is greek and latin to me is telling
something sensibly to you folks.
I swear that I haven't touched this file. I hadn't opened it, not even
knew about it. it is "as supplied" by install.
--
V
The only ones pertinent to displaying your errors are display_errors and
error_reporting.
And I'm not familiar with this file, but it looks like it's completely
unrelated to your problem.
hmm. in that case, i have yet to face the consequences of the above
errors.
Can you copy/paste your EXACT code into a message - the entire page?
that might help us figger out the problem.
here it is:
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
>OK, what do you see if you view the document source?

In the Page Source in ff3, I get:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?php echo 'Hello World'; ?>
</body>
</html>
>Do you get PHP Test in your title bar?

Yes.
>And this is in a file with a .php extension, correct?

Yeah, it is hello.php.

--
V
>Jerry Stuckle
Which means your server is not parsing the php files correctly, so you
have a configuration problem.

I have no idea what the refresh.php file does - I don't use WAMP. But
it looks like a configuration file which could be writing things.

I would suggest you start by going over the WAMP installation again very
carefully to see if you missed something. It does work if installed
correctly.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 9 '08 #17

P: n/a
First thought, if everything else works...

Are you just opening the file in the browser or are you actually
visting the page.

Opening the file would be:
file->open->filename in the browser file menu.

Visting the page would be:

http://localhost/path/to/file/in/web/space.php

The first only opens the file in the browser (no PHP parsing done).
the second lets the webserver parse the PHP and display it properly.
Aug 10 '08 #18

P: n/a
On 8/11/2008 3:52 AM India Time, _l****@portcommodore.com_ wrote:
First thought, if everything else works...

Are you just opening the file in the browser or are you actually
visting the page.

Opening the file would be:
file->open->filename in the browser file menu.

Visting the page would be:

http://localhost/path/to/file/in/web/space.php

The first only opens the file in the browser (no PHP parsing done).
the second lets the webserver parse the PHP and display it properly.
I am giving http://localhost/......

In other cases, I get to see the source code of file displayed in the
browser window - when I drap drop it, when I give file open... etc.

--
V
Aug 11 '08 #19

P: n/a
Today, I deleted and reinstalled wampserver2.0

Thankfully, the first "Hello World" script taken from the tutorial is
working. So, I am heaving a sigh of relief that php is working this
time.

The settings in c:\wamp/bin/apache/apachex.xx/conf\httpd.conf are
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">

But, i want to have www somewhere else, say e:\wamp\www

I have changed the above two to e:\wamp\www and restarted services,
even restarted wampserver, still, the "www folder" option in the left
click menu on systray icon is opening c:\wamp\www

How do I change www to e:\wamp\www

or should I install the entire wamp server in e:\wamp itself, so that
in case of usual formatting of c and reinstall of xpsp3, my other
settings of wamp don't disappear?

Thanks.
--
V

cc: php.general
Sep 20 '08 #20

P: n/a

"V S Rawat" <vs*****@gmail.comwrote in message
news:20**********************************@i24g2000 prf.googlegroups.com...
Today, I deleted and reinstalled wampserver2.0

Thankfully, the first "Hello World" script taken from the tutorial
is
working. So, I am heaving a sigh of relief that php is working this
time.

The settings in c:\wamp/bin/apache/apachex.xx/conf\httpd.conf are
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">

But, i want to have www somewhere else, say e:\wamp\www

I have changed the above two to e:\wamp\www and restarted services,
even restarted wampserver, still, the "www folder" option in the
left
click menu on systray icon is opening c:\wamp\www

How do I change www to e:\wamp\www

or should I install the entire wamp server in e:\wamp itself, so
that
in case of usual formatting of c and reinstall of xpsp3, my other
settings of wamp don't disappear?

Thanks.
--
V
Hi V,
this is best asked on the WAMP forums.
WAMP has its own way of dealing with configurations, it differs from
the "standard" server setup.
What you want is possible though.

Richard
Sep 20 '08 #21

P: n/a
On 20 Sep, 17:34, V S Rawat <vsra...@gmail.comwrote:
Today, I deleted and reinstalled wampserver2.0

Thankfully, the first "Hello World" script taken from the tutorial is
working. So, I am heaving a sigh of relief that php is working this
time.

The settings in c:\wamp/bin/apache/apachex.xx/conf\httpd.conf are
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">

But, i want to have www somewhere else, say e:\wamp\www

I have changed the above two to e:\wamp\www and restarted services,
even restarted wampserver, still, the "www folder" option in the left
click menu on systray icon is opening c:\wamp\www

How do I change www to e:\wamp\www

or should I install the entire wamp server in e:\wamp itself, so that
in case of usual formatting of c and reinstall of xpsp3, my other
settings of wamp don't disappear?

Thanks.
--
V

cc: php.general
The two settings (the apache one and the open www folder are totally
unrelated
Sep 20 '08 #22

P: n/a
r0g
V S Rawat wrote:
Today, I deleted and reinstalled wampserver2.0

Thankfully, the first "Hello World" script taken from the tutorial is
working. So, I am heaving a sigh of relief that php is working this
time.

The settings in c:\wamp/bin/apache/apachex.xx/conf\httpd.conf are
DocumentRoot "c:/wamp/www/"
<Directory "c:/wamp/www/">

But, i want to have www somewhere else, say e:\wamp\www

I have changed the above two to e:\wamp\www and restarted services,
even restarted wampserver, still, the "www folder" option in the left
click menu on systray icon is opening c:\wamp\www

How do I change www to e:\wamp\www

or should I install the entire wamp server in e:\wamp itself, so that
in case of usual formatting of c and reinstall of xpsp3, my other
settings of wamp don't disappear?

Thanks.
--
V

cc: php.general

From what I remember you can specify this at install time so maybe just
reinstall again and keep an eye out for it. Once you're installed you
can specify webroot folders for each domain you want in your httpd.conf
file. Google for "configure virtual hosts".

Roger.
Sep 21 '08 #23

This discussion thread is closed

Replies have been disabled for this discussion.