logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Other Software View previous topic :: View next topic
Reply to topic   Topic: PHP suddenly not working
Author
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Sun 05 Feb '12 14:12    Post subject: PHP suddenly not working Reply with quote

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
Back to top
maba



Joined: 05 Feb 2012
Posts: 64
Location: Germany, Heilbronn

PostPosted: Sun 05 Feb '12 16:30    Post subject: Reply with quote

Hello,

first of all, check the startup logs.
Stop Apache, delete all log files (or move them to a safe place), Start Apache.

Check the error.log file. It should tell you that apache has been started and should show no error messages. If this is the case, likelihood is high that nothing is wrong with the installation.

Put a PHP file in your web server root that does phpinfo.
----
Code:
<?php phpinfo();?>

----
Filename can be anything (for example call the file test.php). Then load this file in the browser:
Code:

http://localhost/test.php

Check the access.log. It should contain this one call to test.php. Check the Apache error.log. There should be no additional entries. If this is the case, then both Apache and PHP seem to be working and the problem is most likely corrupted content of your web sites.

Best regards
Maba
Back to top
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Mon 06 Feb '12 9:24    Post subject: Checked Reply with quote

Thanks for the advice, I did exactly that.

The <?php phpinfo();?> script returns the php version and details correctly.

The Apache error.log file contains the following:
___________________________
http://pastebin.com/raw.php?i=SZDyRK71
___________________________



The access.log file contains the following:

___________________________
http://pastebin.com/raw.php?i=XWB8RmjB
___________________________


So is it possible to spot the problem from this...?

Mod note: long logs are not allowed in this forum. Moved them to pastebin
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7377
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Feb '12 15:25    Post subject: Reply with quote

It think it is <? vs <?php

Please check http://www.apachelounge.com/viewtopic.php?t=2395
Back to top
ranger



Joined: 01 Nov 2011
Posts: 11

PostPosted: Tue 07 Feb '12 4:46    Post subject: Reply with quote

Good point, Thank you !!
Back to top


Reply to topic   Topic: PHP suddenly not working View previous topic :: View next topic
Post new topic   Forum Index -> Other Software