URGENT: Website down, missing lang.php file

seanhedman / 2016-05-09 21:14:10   

I would prefer to speak directly to a moderator, as I don't think I can do this myself. It has been some time since I updated my website and yesterday I decided to do an overhaul. I use DreamHost as my hosting platform and server. I updated my site to run PHP 5.6 and now I can navigate my site via the SHELL command line. Everything looks great, except I can't access the site. It comes up with the error "Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296"

I have been mailing back and forth to the development team at dreamhost and they found that there is a missing lang.php file that is causing this issue. My site is exhausting the memory when searching for this file. I have even increased the memory limit and max upload limits etc, went though this whole process: wiki.dreamhost.com/…

Still, I have the error. Developer John wrote:

"Hello,

The issue is with the missing lang.php file. The specific line in the
common.php file causing the erro is the following:

show_error($file . ' class not found');

As you can see it is trying to load a file and appened some text so it
definitely looks like the issue is the missing lang.php file. Adding more
memory isn't going to resolve the issue. The file needs to be uploaded
again. We would be unable to tell you what it does as the application is
not written by us but it is required the application.

This looks like it is using the indexhibit CMS which you can find at
indexhibit.org. It appears to be a paid application. I suggest
contacting them to see if they can provide a copy of the application."

Help would be greatly appreciated, thank you.

I have done all I can to fix this, changing permissions and so forth.

Vaska A / 2016-05-10 01:10:26   

Just replace that file with a fresh one (from the files from our site).

But, the error above (268435456 bytes exhausted) sounds more like a database connection issue. Make sure the connection strings are right...make sure the database is ok...

I've even seen a number of times on DH where the database "user" becomes unattached - and creating a new one (user and password) then updating your config.php file will take care of things.

seanhedman / 2016-05-11 00:12:53   

Thanks Vaska. So you replaced it and you think its the database connection... I'm really confused. The database connection, is that when I access my site via the FTP software? I used cyberduck before, but switched to Filezilla so that I can use SSH. I know I sound extremely noob, but where can I find the database? It's what holds all my site content on the FTP software?

seanhedman / 2016-05-11 12:37:32   

I contacted my dreamhost moderators, because I found a section about updating the database, but I'm unsure of which settings to use, as it could be destructive (according to them). I also noticed that when I log in to my seanhedman.com/ndxzstudio like I did before, then it works, but the page is blank. Could this be the result of the faulty database connection?

Thanks

Vaska A / 2016-05-11 15:42:27   

I'm curious if they updated your server to PHP7 - ask them what it's running (and if it's possible to use an earlier version).

Vaska A / 2016-05-11 15:42:56   

But, being blank...it could still be a database issue.

seanhedman / 2016-05-11 15:56:33   

No, I myself changed it to 5.6, because that was the "recommended" PHP, and I think that's what started these problems, though I asked them and they didn't really respond to it. I was using PHP 5.5 before and I think I last updated it like 18 months ago. I don't know which version it was though. There's two options: 5.5 GCI and 5.5 FastGCI. What's the difference?

seanhedman / 2016-05-11 16:10:29   

I updated the database to a backup but I couldn't restore it more that 6 days ago. I also changed the PHP back to 5.5 GCI. It's just ridiculous how slow and vague this hosting site has been at addressing my problem. I just have to wait and see now, if they can sort out my database and restore it.

Vaska A / 2016-05-11 17:17:50   

They are a good host. But I understand it's frustrating trying to get some answers. It's the same for me for years now...and sometimes I'm on my own with coding problems with other peoples frameworks (but that is the job).

I thought 5.6 worked just fine. Move it back to 5.5 fastcgi and see how it goes. Backup your site before you do anything though - including outputting your entire database with the PHPMyAdmin tool...just because that's a good thing to do.

Vaska A / 2016-05-11 17:45:46   

Did you not replace the lang.php file though?

Are you able to read the errors log (created by PHP)?

It might be helpful...

seanhedman / 2016-05-12 01:59:24   

I just checked, the lang.php is still there and also the errors log.
The earliest error message is on 09 may and the latest is on 11 may.

"[09-May-2016 04:19:39 GMT] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 164"

"[11-May-2016 16:03:54 GMT] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296"

The maximum memory has increased, but it still tried to allocate the exact same amount 130968 bytes. It seems that after the maximum memory amount was changed, then the error is consistently on line 296:

"bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 164
[09-May-2016 10:23:55 GMT] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 164
[09-May-2016 10:25:06 GMT] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 164
[09-May-2016 10:26:24 GMT] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296
[09-May-2016 10:27:31 GMT] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296
[09-May-2016 13:01:12 GMT] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296
[09-May-2016 14:00:17 GMT] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /home/seanhedman/seanhedman.com/ndxzstudio/common.php on line 296"

I've just noticed something else that is strange. In FileZilla, I can change the permissions of files (some were set at 644, others at 755), but in SSH, I can't change the permission, even with the sudo command, but I am set to the admin, doesn't that give me sudo privileges? And I cannot create a sudo user without sudo access, correct?

Vaska A / 2016-05-12 02:57:54   

Database...database...database...that's what the error message is common with.

seanhedman / 2016-05-12 03:25:37   

I found the two lines:

Line 164:                 show_error($file . ' class not found');

EXPRESSION:
if (!isset($objects[$class]))
    {
        if ($internal == FALSE)
        {
            if (file_exists(DIRNAME . BASENAME . '/' . $path . '/' . $file . '.php'))
            {
                require_once(DIRNAME . BASENAME . '/' . $path . '/' . $file . '.php');
            }
            else
            {
                show_error($file . ' class not found');
            }
    
            if ($instantiate == TRUE)
            {
                $objects[$class] = new $class();
            }
            else
            {
                $objects[$class] = TRUE;
            }
        }
        else // TRUE
        {

Line 296:     $lang =& load_class('lang', TRUE, 'lib');

EXPRESSION:
function show_error($message='')
{
    // we'll use the default language for this
    $lang =& load_class('lang', TRUE, 'lib');
    $lang->setlang(); // get the default strings
    
    $message = $lang->word($message);
    
    $error =& load_class('error', TRUE, 'lib');
    header('Status: 503 Service Unavailable'); // change to right error note
    echo $error->show_error($message);
    exit;
}

Also, unrelated. FileZilla writes this about my server when I log in:
Status:     Insecure server, it does not support FTP over TLS.

I changed all the permissions in my site to 755 as well, but the issue still persists...

seanhedman / 2016-05-14 20:43:17   

Hello again. I know it must be annoying for you... The website is working again, because dreamhost finally updated it, but now I can't actually get into my ndxzstudio. I can access my site without problems through FTP and SSH, but not the actual editing panels. It just gives me the login err, and I followed the password reset v2, and I can't use the password reset plugin I don't think, as I need to be able to access the control panels in the first place...

This thread has been closed, thank you.