473,729 Members | 2,376 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Newbie problem: PHP script not running in browser

(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\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
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.lo g

[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\apa che\apache2.2.8 \conf\httpd.con f 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
22 3822
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
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\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
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.lo g

[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\apa che\apache2.2.8 \conf\httpd.con f 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
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
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
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

"V S Rawat" <vs*****@gmail. comwrote in message
news:76******** *************** ***********@i20 g2000prf.google groups.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\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
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.lo g

[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\apa che\apache2.2.8 \conf\httpd.con f 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
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
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\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
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.lo g

[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\apa che\apache2.2.8 \conf\httpd.con f 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*******@attgl obal.net
=============== ===

Aug 7 '08 #9
(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\apa che\apache2.2.8 \conf\httpd.con f file has the lines:
LoadModule php5_module "e:/wamp/bin/php/php5.2.6/php5apache2_2.d ll"
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.lo g

[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\apa che\apache2.2.8 \conf\httpd.con f 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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8818
by: Aardwolf | last post by:
I've had PHP on my Win2K server running IIs 5 for about 2 weeks now. I have an annoying problem in that I can not run the php scripts/pages locally, instead they open up in the browser as a download. By that I mean that If I access them via my lan or the net from another computer on my lan, the webpages that have php on them and end in a .php extension all run fine and work just great. BUT if I open up the browser on the IIs server...
0
1568
by: Michael Reetz | last post by:
My Web server is running on Suse with apache2 and PHP 5.0.2. The msession server (Version 1.21) works perfectly locally using the provided tools (/usr/local/phoenix/bin/). For the browser test I use a test script that came with Msession. As long as I make all Msession calls local it works fine. But the moment I use a browser get a strange behavior. Running the test script for the first time does exactly what it should do and as long as I...
5
2085
by: Ralph Sluiters | last post by:
Hi, i've got a small problem with my python-script. It is a cgi-script, which is called regulary (e.g. every 5 minutes) and returns a xml-data-structure. This script calls a very slow function, with a duration of 10-40 seconds. To avoid delays, i inserted a cache for the data. So, if the script is called, it returns the last caculated data-structure and then the function is called again and the new data is stored in the cache. (There is no...
3
3049
by: bradwiseathome | last post by:
I focus on controls in a web form like this: <script language="javascript"> var focusControl = null; if (document.getElementById) focusControl = document.getElementById('txtArea1'); else if (document.all) focusControl = document.all; if (focusControl && focusControl.focus) focusControl.focus();
14
4674
by: Rene Grothmann | last post by:
I have managed to communicate between forms and Java applets. A button press sends the content of the text area to an applet, a second button gets some text from the applet and puts it into the textarea. However, at the start, there is a delay of several seconds, before any of the buttons react to a click. After the first reaction has happened, all further clicks work immediately. Is this meant to be so, or can I speed up the first...
3
2054
by: duzhidian | last post by:
Hello All, I am using Linux, php and mysql. When I run my script, it will take a very long time. So when users close their browsers, my scripts stop either. What I want to do is let the script continue running and send an email at the end. How can I successfully do that?
11
3722
by: Flexor | last post by:
I have a php script that runs from command line and makes an https request to paypal, using curl. It works fine if I run it from a web page. It fails if I run it from CLI. The error I get from the CLI: * About to connect() to api-3t.sandbox.paypal.com port 443 * Trying 216.113.191.88... * connected * Connected to api-3t.sandbox.paypal.com (216.113.191.88) port 443 * successfully set certificate verify locations: * CAfile:...
3
2572
by: V S Rawat | last post by:
Browser has its own settings, java, javascripts, addons, extensions, keyboard shortcuts, along with the problem in html coding in the php file, which all I think might interfere with seeing only the php part. Is there any interface where I can test/ debug my php code snippets without browser? Any xpsp3/ dos command line or other utility that would at process my php file and least allow me to see the output (final html that would go to...
6
11493
Markus
by: Markus | last post by:
Things to discuss: Headers What are they? What does PHP have to do with headers? Why can they only be sent before any output? Common causes
0
8917
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.