Jump to content

[SOLVED] can't start up php


Recommended Posts

I installed the wamp server and have been using php and mysql with no problems on my Windows XP machine for a month.  Today, php won't run (proved by phpinfo(); giving a blank screen.)  wamp server says all services are running (including php.)  What could be wrong, and how to fix it?

 

Link to comment
Share on other sites

Blade280891,

 

    PHP is not a windows service, it is an Apache Task.  The two services WAMP shows are Apache and MySQL.  Use the WAMP drilldown to review the Apache error log... ( Click on the WAMP speedometer, then select log files and look at the Apache Error Log and the PHP Error Log.  They may point you in the right direction.  )

 

( This is pre-supposing you are using http://www.wampserver.com/en ... If you aren't, go get it quick and leave the "roll-your-own" behind. )

Link to comment
Share on other sites

I can't see anything odd in the Apache error log.  I shut down the wamp server, started it up again, and this is the log:

-----

[Mon Dec 01 16:56:00 2008] [notice] Apache/2.2.8 (Win32) PHP/5.2.6 configured -- resuming normal operations

[Mon Dec 01 16:56:00 2008] [notice] Server built: Jan 18 2008 00:37:19

[Mon Dec 01 16:56:00 2008] [notice] Parent: Created child process 2400

[Mon Dec 01 16:56:01 2008] [notice] Child 2400: Child process is running

[Mon Dec 01 16:56:01 2008] [notice] Child 2400: Acquired the start mutex.

[Mon Dec 01 16:56:01 2008] [notice] Child 2400: Starting 64 worker threads.

[Mon Dec 01 16:56:01 2008] [notice] Child 2400: Starting thread to listen on port 80.

------------

I am new to this server log, but I don't see anything odd here. 

The php error log doesn't show anything either but I suppose that is because php is not running, yes?

 

Still puzzled.  Everything worked fine since mid-October installation of wamp server, until yesterday.

 

Link to comment
Share on other sites

Here is the code that returns a blank page, as expected if php is not running:

--------- the filename is basic.php ----------

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>php info</title>

</head>

<body>

<?php phpinfo(); ?>

</body>

</html>

 

---------------

(wrong title for the page, I see, but that's not the problem.)

Link to comment
Share on other sites

The URL used is:

file:///C:/wamp/www/php_sandbox/basic.php

The php_sandbox is a directory full of php files that used to run perfectly well, for a month and a half.

 

I have restarted the wamp server (shut down, then restart, then click on Start all services) and even rebooted the entire machine before restarting wamp.

 

The speedometer is entirely white, with the needle laying flat down on the right side.  online or offline makes no difference.

Link to comment
Share on other sites

That is not how you invoke a web server/php. That will literally cause the file to be read and output to the browser, which if you do a "view source" of the page like I have asked twice, you would know.

 

To request the page from your web server so that is will be parsed by php, you must do one of these -

 

http://localhost/your_page_name.php

http://your_wins_computer_name_here/your_page_name.php

http://xxx.xxx.xxx.xxx/your_page_name.php (where xxx.xxx.xxx.xxx is  either 127.0.0.1 or your local network IP address.)

 

The http:// is optional as your browser should add that.

Link to comment
Share on other sites

Well sure enough, and I'm afraid I have displayed my newbie status.  You have solved the problem.  The "view source" code which I put up here showed the source all right but as a result of the wrong URL.

 

Thanks very much!  I had been away and just forgot the right URL to use.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.