View Full Version : PHP suddenly not working
ranger
02-05-2012, 12:09 PM
Hi,
I've been using Apache & PHP for a few months now.
To my surprise, when I restarted the computer today it's not working anymore.
Before restarting, I ran CCleaner, could that be the reason?
At a first glance, the httpd.conf and hosts files have not been modified in any way; maybe it has nothing to do with running CCleaner.
When I go to 127.0.0.1 or localhost it shows a strange page. In other cases it wants to download or open a file like "Ev1cv4N5.part" (where in the world does such a file come from?) and in other cases the page remains blank.
So localhost itself and some subdomains are not working at all, however a few of the subdomains and also phpMyAdmin, which is installed in a directory in localhost, are still working properly!! How can that be?
I was working on a project in a directory in localhost, everything was fine, now I can't run my php pages, they remain blank.
So where should I check to know what the problem is?
If any ideas, please let me know.
Thanx
djr33
02-05-2012, 06:34 PM
Honestly, I have no idea what's wrong (but that's not surprising-- I'm not an expert with server configurations). Could you just reinstall everything? It might be faster than fixing it. Just back up all of your files (even the config files if you have a lot?) then reinstall, replace everything, and hope it works. The only danger there is if one of your files (probably a config file) is the problem, then you might recreate the problem. To test for that, reinstall everything and test it without replacing your files. Then replace your files to see if they mess it up.
for clarification:
1. when you say "localhost," this is serving only your local machine (your server is not publicly accessible)? What is your operating system (some version of Windows, judging from other comments)? Are you using a prepackaged Apache bundle (like XAMPP)?
2. I've never used CCleaner (never heard of it before today), but it says it "cleans up and organizes registry files." That doesn't sound particularly comforting to me, so yes, it might have something to do with it. Have you ever used this program before (since you installed Apache), and has it ever caused any problems?
3. all of the "subdomains" you refer to are on your localhost as well? How did you create them (hosts file? local DNS? something else)?
4. search your system for the file it is prompting you to download.
--------------------------
Honestly, if phpmyadmin and "some" of your local directories are working and others are not, it's not likely that it's a problem with Apache or your configuration. It's more likely that it's a problem with the project you were working on, something else you changed (or a change you triggered earlier that didn't take effect until you restarted), or a registry problem caused by your "cleaning" software. couldn't say, at this point.
ranger
02-06-2012, 08:32 AM
Thanks for the replies. I'm on Windows 7 ultimate.
Never had problems from Ccleaner, I suspect it's not its fault.
I installed Apache, PHP and mysql separately. like I always do, I don't like to use XAMPP, WAMP or such.
Correct, I'm talking about the localhost, not publicly accessible.
And yes, all the subdomains are relative to localhost (Eg. abcd.localhost)
I created them in httpd.conf file , as usual
<VirtualHost *:80>
ServerName subdomain1.localhost
DocumentRoot "D:/subdomain1/"
DirectoryIndex index.php index.html index.htm
<Directory "D:/subdomain1/">
Options Indexes Includes FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
and added them to hosts file in system32, too.
Everything worked fine until yesterday.
Just to check, I deleted the Apache log and access files and restarted Apache.
The Apache error.log file contains the following:
___________________________
Starting the Apache2.2 service
The Apache2.2 service is running.
] Apache/2.2.17 (Win32) PHP/5.3.6 configured -- resuming normal operations
[Mon Feb 06 15:53:19 2012] [notice] Server built: Oct 18 2010 01:58:12
[Mon Feb 06 15:53:19 2012] [notice] Parent: Created child process 3096
[Mon Feb 06 15:53:20 2012] [notice] Child 3096: Child process is running
[Mon Feb 06 15:53:20 2012] [notice] Child 3096: Acquired the start mutex.
[Mon Feb 06 15:53:20 2012] [notice] Child 3096: Starting 64 worker threads.
[Mon Feb 06 15:53:20 2012] [notice] Child 3096: Starting thread to listen on port 80.
[Mon Feb 06 16:07:11 2012] [error] [client 127.0.0.1] File does not exist: D:/Web & Sites & PC/Sites/announce
[Mon Feb 06 16:08:14 2012] [error] [client 127.0.0.1] script 'D:/Web & Sites & PC/Sites/announce.php' not found or unable to stat
[Mon Feb 06 16:08:30 2012] [error] [client 127.0.0.1] File does not exist: D:/Web & Sites & PC/Sites/announce
[Mon Feb 06 16:08:32 2012] [error] [client 127.0.0.1] File does not exist: D:/Web & Sites & PC/Sites/announce
. . . . this last line repeats itself many times.
___________________________
The access.log file contains the following:
___________________________
127.0.0.1 - - [06/Feb/2012:16:07:11 +0900] "GET /announce?info_hash=%ae%0d%c40%10%87%c7%c4.%c7%5b%ebw%9a%7cQ%d2NY%03&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=14732595&downloaded=0&left=0&corrupt=0&key=3994D7FF&ev ent=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa2 8a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:22 +0900] "GET /announce?info_hash=%5b%82_7X%e2%c5%ba%c0%d5%a4%20pY%9e%c1pA%ca%17&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=1916928&downloaded=0&left=0&corrupt=0&key=3994D7FF&eve nt=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28 a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:29 +0900] "GET /announce?info_hash=%ae%0d%c40%10%87%c7%c4.%c7%5b%ebw%9a%7cQ%d2NY%03&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=14732595&downloaded=0&left=0&corrupt=0&key=3994D7FF&ev ent=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa2 8a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:30 +0900] "GET /announce?info_hash=m%3c1%cby-%de%e5%82%df7%21y%99%dfZ%e1%2f%dd-&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=0&downloaded=0&left=0&corrupt=0&key=3994D7FF&event=sta rted&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:34 +0900] "GET /announce?info_hash=%ae%0d%c40%10%87%c7%c4.%c7%5b%ebw%9a%7cQ%d2NY%03&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=14732595&downloaded=0&left=0&corrupt=0&key=3994D7FF&ev ent=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa2 8a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:35 +0900] "GET /announce?info_hash=%04%afK%29%d91%94%e6%285%a1P%c6%d5%00%7f%d0%0e%5b%13&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=6864896&downloaded=0&left=0&corrupt=0&key=3994D7FF&eve nt=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28 a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:35 +0900] "GET /announce?info_hash=%b4%17G%00%f7%13~W%fa%90%96%1b%ce%efUm%d7%86%14%16&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=518144000&downloaded=0&left=840150446&corrupt=0&key=39 94D7FF&event=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a 8778%3aa28a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:36 +0900] "GET /announce?info_hash=%04%afK%29%d91%94%e6%285%a1P%c6%d5%00%7f%d0%0e%5b%13&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=6864896&downloaded=0&left=0&corrupt=0&key=3994D7FF&eve nt=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28 a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:38 +0900] "GET /announce?info_hash=%13IO%8c%240%ce%94%11%88%83%1a%0f%9bi%3aj%e3%859&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=14814950&downloaded=0&left=0&corrupt=0&key=3994D7FF&ev ent=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa2 8a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:39 +0900] "GET /announce?info_hash=%c2%cbV%a8%84%0e%e3%ca3%9a%11%ech%12%b1%80%87%5e%ca%bc&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=98304&downloaded=0&left=0&corrupt=0&key=3994D7FF&event =started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:07:43 +0900] "GET /announce?info_hash=t%0e%28%d4%b9%c8o%01%9f%2f%3c%e6j%c2y%cc%e2j%3a%b9&peer_id=M7-2-1--2b8%fe%de%e8%90%a3n%18%24X&port=6881&uploaded=3595481&downloaded=0&left=0&corrupt=0&key=3994D7FF&eve nt=started&numwant=200&compact=1&no_peer_id=1&ipv6=2001%3ac90%3a31d%3a15a%3a5d86%3ac862%3a8778%3aa28 a HTTP/1.1" 404 206
127.0.0.1 - - [06/Feb/2012:16:13:49 +0900] "GET /index.php?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2524
127.0.0.1 - - [06/Feb/2012:16:13:49 +0900] "GET /index.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2146
127.0.0.1 - - [06/Feb/2012:16:13:49 +0900] "GET / HTTP/1.1" 200 75580
etc- many such lines
___________________________
So is it possible to spot the problem from this instead of reinstalling...?
The problem showing in your logs is that the file D:/Web & Sites & PC/Sites/announce.php is missing. I don't know what (if anything) that has to do with your other problems. Is that one of the files you were working on?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.