[SOLVED] Blank Main page

Ulila

Joined: 2007-03-26
Posts: 16
Posted: Sun, 2009-10-25 10:14

Gallery version (2.3):
PHP version (5.2.9):
Webserver (Apache 2.2.13 (Unix)):
Database (e.g. MySql 5.0.81):
Operating system (Linux):

Hello, I get a blank page when I try to load my gallery. If I reinstall the problem is solved until the next day.
I enabled debug mode and got the following error:
"Fatal error: Cannot redeclare h7ml() (previously declared in /home4/MySite/public_html/gallery2/config.php(1) : eval()'d code:1) in /home4/MySite/public_html/gallery2/lib/adodb/adodb.inc.php(1) : eval()'d code on line 1"

Please advice.
Thank you,
Ulila

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2009-10-25 10:25

Fixed for a day? I'm betting your host is making changes to your files at night.

Check your g2data permissions:
FAQ: How can I fix the filesystem permissions of the Gallery storage folder?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Sun, 2009-10-25 10:35

Permissions are all 0755 or 0644.
I think that's OK right?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2009-10-25 11:13

Only if your web server or PHP runs as the owner of the files.

If not, then g2data needs to be 777 and all files and folders below that will be owned by the user the web server runs as and will be 755 and 644 by default, but also check file ownership and who the web server is running as.

You can check that out by following this:
http://codex.gallery2.org/Gallery2:Security#Learn_the_Basics_about_your_Webserver

I would also check the integrity of your files:
FAQ: How can I make sure that my installation files are all intact?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Sun, 2009-10-25 11:35

My web server runs with my username.
Also checked the integrity - all OK...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Sun, 2009-10-25 11:51

Next time you have a blank page, put Gallery into debug mode and copy and paste the output into a text file, zip it and attach to this thread.

We don't need the Smarty Debug popup window, just the output on the main screen.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Sun, 2009-10-25 12:05

The error iv'e posted on my first post was the error on my main page after iv'e put Gallery into debug mode.
"Fatal error: Cannot redeclare h7ml() (previously declared in /home4/MySite/public_html/gallery2/config.php(1) : eval()'d code:1) in /home4/MySite/public_html/gallery2/lib/adodb/adodb.inc.php(1) : eval()'d code on line 1"

I'll do that again next time I get a blank page (tomorrow i guess...)

Thank you very much!
Ulila

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Mon, 2009-10-26 10:26

Well, a day has past and again I get an error on the main page:

"Fatal error: Cannot redeclare tuz() (previously declared in /home4/MySite/public_html/gallery2/config.php(1) : eval()'d code:1) in /home4/MySite/public_html/gallery2/lib/adodb/adodb.inc.php(1) : eval()'d code on line 1"

(It's only one line so I guess I don't have to zip it)
Ulila

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Mon, 2009-10-26 15:59

Your host is doing something, they have to be.

In your config.php, what is specified for the storage type? mysqlt, mysqli, etc?
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Tue, 2009-10-27 08:36

$storeConfig['type'] = 'mysqli';

I have talked to my host (BlueHost) and asked for there help. They said there is nothing they are doing to change any of my files.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16503
Posted: Tue, 2009-10-27 16:10

tuz() and h7ml()?

And it works for a day and then stops. I've seen many people running G2 just fine on BlueHost. I'm starting to think your account has been hacked and someone is changing files. Take a look at the last modified date for config.php. I'd also look at the contents of config.php

Neither tuz or h7ml are any where in G2's code and I seriously doubt they are real functions.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Wed, 2009-10-28 10:25

Now I get an error:
"Fatal error: Cannot redeclare vv5zq() (previously declared in /home4/MySite/public_html/gallery2/config.php(1) : eval()'d code:1) in /home4/MySite/public_html/gallery2/lib/adodb/adodb.inc.php(1) : eval()'d code on line 1"

I couldn't find "tuz", "h7ml" or "vv5zq" at "config.php" or at "adodb.inc.php"

Any thoughts about what I can do? I'm getting desperate...

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-10-28 10:33
Quote:
"tuz", "h7ml" or "vv5zq"

??? Sounds viral, or spam-ish to me. Especially in the context of an eval() statement that's frequently used to obfuscate malicious code.

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Wed, 2009-10-28 10:39

Do you think installing gallery from scratch will solve this problem?

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-10-28 11:09

Didn't you say in your first post that re-installation fixes it for a day?

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Wed, 2009-10-28 11:26

I guess I wasn't clear enough. By reinstall I meant extracting the gallery files again and replacing the existing files. That solves the problem till the next day.
* I have started by installing gallery from scratch, after deleting the gallery directory and database, at the first "reinstall".

 
alecmyers

Joined: 2006-08-01
Posts: 4338
Posted: Wed, 2009-10-28 11:40

Can't hurt to try!

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Wed, 2009-10-28 11:46

I guess I better.
tnx

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Thu, 2009-10-29 13:51

Hey, iv'e reinstalled (extracted the gallery files on top of the old ones) and changed my password.
Surprise surprise - a day has passed and my site is still up!
Now i'm waiting for another day or two to pass, so i'll be sure that solved it...
I'll post and tell you about it.

 
Ulila

Joined: 2007-03-26
Posts: 16
Posted: Sun, 2009-11-01 20:10

Well, my site is still up. I guess problem is solved :-)