C5 website spontaneously not loading - blank screen when hitting index.php

Permalink
Hi,

A client's website that has been running fine for several years all of a sudden stopped working today. index.php simply returns a blank screen. I've stepped through the code and it seems like nothing can get past Loader::database(); in concrete/dispatcher.php. I've checked the site.php config settings and the db credentials are ok. "Nothing has changed" on the server says the client. I have reinstalled PHP and double checked the Apache config. The server is a Windows box running Server 2003.

The site is an older version of c5 with several modifications made directly on top of /concrete/... so I'd rather not try upgrading etc... Any help would be appreciated!

If not, can you guys point me to the code where the db connection is actually made? Would like to keep stepping though to find the problem. I have PHP errors on and manually put the c5 site into debug mode but nothing's being thrown...

Thanks
Patrick

patmanh
 
goutnet replied on at Permalink Reply
- Is the MySQL server still responding ? (try it with a different client to check)

- Otherwise, what is the version of c5 you are on this server ?

you can check the file concrete/core/libraries/loader.php

https://github.com/concrete5/concrete5/blob/master/web/concrete/core...

The actuall mysql_* call is performed in adodb

concrete/libraries/3rdparty/adodb/drivers/adodb-mysql.inc.php

in the ADODB_mysql::_connect function.
patmanh replied on at Permalink Reply
patmanh
Thanks for your response!

- i can connect to mysql via cmd using the same credentials in config/site.php
- the server is running version 5.3.2 of c5 (very old i know)

I've traced the code a bit deeper and I can get anything to print after
"Loader::library('database');" in /concrete/libraries/database.php

How else can I troubleshoot this? This site is down in production until I can sort out the issue.

Help is greatly appreciated! Thanks
patmanh replied on at Permalink Reply
patmanh
update: i've tried running a test script to simply test php connecting to mysql and i'm getting the classic "Call to undefined function mysql_connect()" error. Looks like it is a problem between php and mysql.

I'm really not sure where to dig as I'm unfamiliar with WAMP stacks. Here's the phpinfo() dump if anyone could help me out:http://www.nhchc.ca/tester.php

Thanks
goutnet replied on at Permalink Reply
Well, it seems the mysql extension is not activated .... (as expected).

I beleive you could just change that to mysqli since it is activated, but it really is untested (especially on that version).

I would recommend to just re-install/enable the php mysql extension on the server.
patmanh replied on at Permalink Reply
patmanh
I've reinstalled PHP and I can make SQL queries fine from PHP scripts. I am still getting a blank page when hitting index.php.

How should I go about troubleshooting this? phpinfo is still dumping tohttp://www.nhchc.ca/tester.php with new updated settings
goutnet replied on at Permalink Reply
Well, at least now, we are getting closer.

Since your PHP installation might have been corrupted, I would recommend to install on a side directory a concrete5 last version. Use a temporary database that you will drop later.

On the installation page, concrete5 runs a few tests to check if the server can run the cms correctly, it might give us some more clues.

If the installation goes without problem, then we will have to look somewhere else.
patmanh replied on at Permalink Reply
patmanh
Thanks for the suggestion. I downloaded a copy of 5.3.2 and installed it in a subdirectory on a new db. Everything installed + is functioning without any problems. It was set up using the same db credentials (except for db itself). You can see the dev site athttp://nhchc.ca/dev/concrete5.3.2/...

Anything else I should try?
goutnet replied on at Permalink Reply
Ok, then that sucks … I only see 2 options now :

- your database had been corrupted
or
- your concrete files have been corrupted

To know that, duplicate the database into a new database, and then make your newly (fresh) copy of concrete5 point to that new (duplicated) database.

If the newly installed site works (or at least does not go blank), then the problem comes from the files themself. If not, then the problem is on the db side.
patmanh replied on at Permalink Reply
patmanh
Update:

So I've done a few things and I think I'm on the right track to getting this solved:

- pointed the new site at the old db.
- had to copy over a few theme files but everything seems to be running ok on the new site minus a couple random things.

I think that this means there is a c5 file somewhere on the old site that's corrupted. What I'm thinking about doing is attempting to manually move all of the files added on top of the old c5 installation (packages, user-uploaded stuff, etc) until the new site is at parity with the old. Then, just point apache to the new site and delete the old.

I found a few weirdly compressed files on the old site and it looks like the drive the site is running on is relatively full, I'm wondering if a staff member ran a compression script or something to try to free up some space.

Is there a better way (i.e. automated or faster) to move all of the files I need to move from the old c5 site to new site?

Thanks for your help!
goutnet replied on at Permalink Reply
I am afraid you are going to do that (mostly) manually.

You can try to go for merging tools (I am personally a big fan of gvim + DirDiff plugin), but that’s all the help you can get ...

Hope you get that sorted out soon.

good luck.
goutnet replied on at Permalink Reply
btw, I would recommend you to setup a crond full backup (mysqldump + files) of your site, just in case the staff of your webserver client feel like having some more fun again...