Please bear with me as I'm new to PHP.

Yesterday, I was working on an HTML form and everything was working fine (PHP would process the information and send an email as expected), but when I started this morning nothing happens.

A couple weeks ago I installed WAMP using mostly default settings. The only thing I modified was the information about email (server info, etc.), and that was done during the installation. After the installation, I used a basic, test form and was pleased to find the PHP working as expected. I then started working on my own form and it also worked as expected. The next day it stopped...I didn't change ANYthing, but it stopped working. No errors...just nothing. The following day it worked; again, no changes...it just started working again.

I've now been working on the form for a few days...everything's been working fine until this morning. I tried the form and nothing happened. As before there were no errors.

As I mentioned above, I'm new to PHP so I have absolutely no idea what to look for in determining the problem. Can someone give me any ideas on where to look?

Assuming that this is a localhost sandbox, I suggust that you set the PHP ini to display all errors. Normally, they are logged in a production server. The on screen error display is a great diagnostic tool.

I suspect that the error has to do with conditional logic which has an error in a particular conditional path, thus sometimes it works, sometimes it doesn't.

Thanks for the quick response.

When I first installed everything, I just basically used default settings and thought that by putting it 'online' that would be all I needed to do. But from what I'm now reading, I'll need to make some modifications to one or more files. That being said...

I looked at the php.ini file and it appears to be set to display all errors. The error options I see are:

error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
track_errors = On
html_errors = On

The above was copied directly from the php.ini file.

Ok, that should put the errors on screen for you. You might as well turn off the logging, lest you fill up the hard drive for no reason.

When you said "stopped" working, I assume you mean the "white screen of death"?
Just as a test of PHP and server functionality, rename your current index.php to save.php or something, then make another index.php with only:

<?PHP phpinfo();?>

This should bring up the PHP parameters. If you still get nothing, then delete that file and try an index.html to see if the server is working. (don't use php in this one, just html)

It's working now...and nothing was done.

I went to lunch and when I got back I did as you suggested. When I ran it, I got a large amount of PHP info (version number, System, Build Date, Compiler, etc.). I then tried the file I was working on earlier and it worked.

Before I left for lunch...it didn't work. After I got back...it worked. I don't get it.

Going back to your comment about the "white screen of death"...I'm not sure. Let me explain a bit about how I've got things set up and maybe you'll realize what part of the equation I'm missing.

The company I work for has multiple locations and uses a Domain environment. I use two computers...one with XP and the other with Windows 7. (The XP is used primarily for testing purposes.) I felt it would be beneficial to utilize HTML & PHP to replace some of the forms being use and, after a bit, decided to utilize WAMP.

I downloaded and installed the most current version on the XP machine. As mentioned previously, I used mostly default settings except where the mail server settings are concerned. (One of my goals was to get away from having HTML forms be dependent upon the email client on the individual computers.)

After a quick set up, I placed the WampServer online. From the Windows 7 computer I can now open an IE browser, open the HTML form and, after clicking the submit button, run the PHP to display the data in the browser & email the data to me. I've been able to do the same thing from a remote computer.

Then we get to the situation today. Everything was working fine yesterday afternoon before I left. This morning the PHP wasn't working all the way up to when I went to lunch. I get back from lunch and find that everything is working again.

VERY confusing. Any thoughts?

BTW...when you say turn off logging, do you mean just comment out the line?

After happily working on the form for the last hour or so, PHP decided to stop working.

Again, no error codes...it just looks like the PHP is processing the code, shows 'Done' in the IE Status Bar and that's it. No display of data...no email.

BTW...when you say turn off logging, do you mean just comment out the line?

edit the line to "off".

As far as the intermittent operation, maybe it's a network issue?
I have never used one of those WAMP servers on a network.
I have no experience with them other than as local machine localhost for writing/testing new sites.

Whatever the reason, it doesn't last long...it's working again. Go figure.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.