forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: NetPublicist on December 16, 2004, 06:08:34 am

Title: CPG 1.3 NOT working with php-4.3.10!!
Post by: NetPublicist on December 16, 2004, 06:08:34 am
I installed CPG 1.3 on my server running php-4.3.9 with no problems, everything was working great untill I rebuilt Apache with php-4.3.10, I started getting database errors on every page of CPG with the following error message at the bottom of each page:

Fatal error: Unsupported operand types in /home/nearhim/public_html/photos/include/functions.inc.php on line 1334

I rebuilt Apache with php-4.3.9 and the errors went away and CPG started working just fine again!
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on December 16, 2004, 08:54:01 am
line 1334 of functions.inc.php reads for me
Code: [Select]
            $total_query_time += $qtime;If it's the same for you, you could easily make this a two-step process, like this
Code: [Select]
            $total_query_time = $total_query_time + $qtime;
Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Tarique Sani on December 16, 2004, 10:48:43 am
I had seen this bug in early versions of PHP5 guess they copied it while back porting some stuff in a hurry to fix the security flaws, but my site http://tariquesani.net which is running PHP 4.3.10 is working fine
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: NetPublicist on December 16, 2004, 03:03:01 pm
Did you have to make any changes to the script to get it to work with php-4.3.10?
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Tarique Sani on December 17, 2004, 04:44:44 am
No change was needed....
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Tranz on December 19, 2004, 10:01:29 pm
I just installed PHP Version 4.3.10 on my laptop and did not encounter errors with cpg v 1.3.2 or 1.4.1. Maybe it's because I have the latest version of Zend Optimiser too since that seems to be the solution that people are throwing around to address issues with PHP Version 4.3.10.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on December 20, 2004, 09:14:13 am
see http://bugs.php.net/bug.php?id=31108 and  unexpected database failure (http://forum.coppermine-gallery.net/index.php?topic=12711.0)

To repeat what has been said about this issue before: Coppermine will work fine with PHP4.3.10, it's outdated versions of the zend optimizer that causes issues. Either upgrade your Zend optimizer as well or downgrade your php version to 4.2.9 (or ask your webhost to do so). The error message you're getting are not related to Coppermine, but happen with various other apps as well, so it's not coppermine that is to blame.

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: NetPublicist on December 21, 2004, 06:08:30 pm
Thanks for the update!!! I have upgraded ZEND and re-installed 4.3.10 and everything is working great!!
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Satyr on December 22, 2004, 03:07:02 pm
[EDIT]:  Issue is solved, my host has updated the zend optimizer. :)

I have the same problem, since an update to PHP 4.3.10 i receive the following error messages:

Quote
There was an error while processing a database query


The page "last comment" displays following:

Quote
Warning: array_key_exists(): The first argument should be either a string or an integer in /www/htdocs/go***/gothicmodels/gallery/include/functions.inc.php on line 1686


See it on www.gothicmodels.net/gothicmodels/gallery

What i have to do exactly?

Thx for your help.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on December 22, 2004, 04:24:17 pm
you just read this thread, it clearly says what to do.

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Satyr on December 22, 2004, 05:20:08 pm
I have edited the post instead of reading (and understanding)  ;)
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 01:52:07 am
I just downloaded stable version from CVS and I'm getting:
Quote
Warning: Invalid argument supplied for foreach() in /home/html/galleries/config.php on line 368

And the config button isn't showing.
I'using v4.3.10 with Zend 2.5.7 Apache 2.0.52 on Linux
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on January 20, 2005, 06:57:27 am
I just downloaded stable version from CVS and I'm getting:
Quote
Warning: Invalid argument supplied for foreach() in /home/html/galleries/config.php on line 368

And the config button isn't showing.
I'using v4.3.10 with Zend 2.5.7 Apache 2.0.52 on Linux
Did you run the upgrade script?

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Rosely on January 20, 2005, 02:07:52 pm
see http://bugs.php.net/bug.php?id=31108 and  unexpected database failure (http://forum.coppermine-gallery.net/index.php?topic=12711.0)

To repeat what has been said about this issue before: Coppermine will work fine with PHP4.3.10, it's outdated versions of the zend optimizer that causes issues. Either upgrade your Zend optimizer as well or downgrade your php version to 4.2.9 (or ask your webhost to do so). The error message you're getting are not related to Coppermine, but happen with various other apps as well, so it's not coppermine that is to blame.

Joachim


Actually....
I had this problem too and my host solved it for me... twice!
We are running PHP 5.0.3
The problem is that somehow Coppermine currupts a MySQLtable.
What you have to do when you see this problem is to go to PHP MyAdmin and go to the link: Query Window

There you have to fill in this:
repair table databasename_pictures
(with for *databasename* ofcourse your databasename)

anyways, that one works for me.
It now happened twice but the second time I was able to fix it in a minute!

Please fix this problem in Coppermine, other applications work just fine.
PHP is not the problem but the way Coppermine works with it.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: kegobeer on January 20, 2005, 02:57:08 pm
Ha ha ha.  That's a good one.  Coppermine corrupts the MySQL tables.  Never heard that one before.

Some versions of MySQL have trouble dealing with FULLTEXT which can lead to corruption.  There are also many other situations that can cause corruption.  Here's a good article (http://nukecops.com/PHP-Nuke_repair-corrupt-table.html) that talks about it.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 03:02:53 pm
Yes I Did.

I just downloaded stable version from CVS and I'm getting:
Quote
Warning: Invalid argument supplied for foreach() in /home/html/galleries/config.php on line 368

And the config button isn't showing.
I'using v4.3.10 with Zend 2.5.7 Apache 2.0.52 on Linux
Did you run the upgrade script?

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: kegobeer on January 20, 2005, 03:14:19 pm
Just a guess, but sounds like you missed a file when downloading from the CVS.

Did you use a CVS tool like TortoiseCVS, or did you download each file manually?
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 03:17:52 pm
BTW 1.4.1 (beta) works fine. Except when you use the SMF bridge and access it as a guest there is some template parsing errors of some sort.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 04:11:59 pm
I just used the standard linux cvs tool on my linux box and did the ol' souceforge routine.

Just a guess, but sounds like you missed a file when downloading from the CVS.

Did you use a CVS tool like TortoiseCVS, or did you download each file manually?
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 04:16:49 pm
Just did a checkout again and nothing looked missed:
Quote

cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/coppermine co -P stable
cvs checkout: Updating stable
cvs checkout: Updating stable/albums
cvs checkout: Updating stable/albums/edit
cvs checkout: Updating stable/albums/userpics
cvs checkout: Updating stable/bridge
cvs checkout: Updating stable/docs
cvs checkout: Updating stable/docs/pics
cvs checkout: Updating stable/images
cvs checkout: Updating stable/images/flags
cvs checkout: Updating stable/images/smiles
cvs checkout: Updating stable/include
cvs checkout: Updating stable/lang
cvs checkout: Updating stable/sql
cvs checkout: Updating stable/themes
cvs checkout: Updating stable/themes/classic
cvs checkout: Updating stable/themes/classic/images
cvs checkout: Updating stable/themes/default
cvs checkout: Updating stable/themes/default/images
cvs checkout: Updating stable/themes/eyeball
cvs checkout: Updating stable/themes/eyeball/images
cvs checkout: Updating stable/themes/fruity
cvs checkout: Updating stable/themes/fruity/images
cvs checkout: Updating stable/themes/hardwired
cvs checkout: Updating stable/themes/hardwired/images
cvs checkout: Updating stable/themes/igames
cvs checkout: Updating stable/themes/igames/images
cvs checkout: Updating stable/themes/mac_ox_x
cvs checkout: Updating stable/themes/mac_ox_x/images
cvs checkout: Updating stable/themes/project_vii
cvs checkout: Updating stable/themes/project_vii/images
cvs checkout: Updating stable/themes/rainy_day
cvs checkout: Updating stable/themes/rainy_day/images
cvs checkout: Updating stable/themes/styleguide
cvs checkout: Updating stable/themes/styleguide/images
cvs checkout: Updating stable/themes/water_drop
cvs checkout: Updating stable/themes/water_drop/images


I just used the standard linux cvs tool on my linux box and did the ol' souceforge routine.

Just a guess, but sounds like you missed a file when downloading from the CVS.

Did you use a CVS tool like TortoiseCVS, or did you download each file manually?
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: kegobeer on January 20, 2005, 04:22:50 pm
Download the 1.3.2 zip and install it.  See if you get the same errors.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: tradenet on January 20, 2005, 04:31:36 pm
OK something is VERY wrong with the CVS version.
I just downloaded the tar ball off of sourceforge and over wrote the files and all works fine...as it appears now.
 ???
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Rosely on January 22, 2005, 01:53:59 pm
Ha ha ha.  That's a good one.  Coppermine corrupts the MySQL tables.  Never heard that one before.

Some versions of MySQL have trouble dealing with FULLTEXT which can lead to corruption.  There are also many other situations that can cause corruption.  Here's a good article (http://nukecops.com/PHP-Nuke_repair-corrupt-table.html) that talks about it.

http://www.google.nl/search?q=Coppermine+There+was+an+error+while+processing+a+database+query&hl=nl&lr=&start=10&sa=N


hmm... is that mysql or coppermine???
we're using the newest stable version of MySQL and PHP.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: kegobeer on January 22, 2005, 01:58:30 pm
What's the purpose of the link you provided?  If you want help, you need to provide a lot more information than just a quote and a link to a Google search.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Rosely on January 23, 2005, 12:41:13 am
I'm sorry I wasn't clear.

I was pointing you to the enormous amount of people that have the same error and most of them don't know how to fix it.
They all have the error: "There was an error while processing a database query"

The same error I had and what means that a mysql table is corrupted. and which you can solve by repairing the table like I've written before.

I was trying to make you aware of how many people have the problem in the hope that you would see that this is a problem that Coppermine gives and that it isn't a problem in MySQL or PHP... And that hopefully you guys, the builders, the perfectionists (at least I would be if it were my product), would find a way to build your software around this problem.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: kegobeer on January 23, 2005, 03:51:39 am
That generic error is displayed in lieu of the actual MySQL error statement.  You have to enable debug output in order to see the actual error message.  I would wager less than one percent are the result of a corrupted table.

If you do some research on other database intesive apps, like SMF, phpBB, etc, you will see posts on those sites dealing with corrupted tables.

There is no "way around" this problem.  Coppermine, like the other apps, isn't responsible for a corrupted table.  Shared hosting, servers that can't handle the strain, old (beta, old, buggy, etc) versions of MySQL, and unforseen environmental problems can all contribue to a corrupted MySQL table.

We know that people sometimes encounter a corrupted table, you don't have to "make us aware" of that.  But we also know that Coppermine isn't the problem.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on January 23, 2005, 09:17:31 am
The same error I had and what means that a mysql table is corrupted. and which you can solve by repairing the table like I've written before.
Kegobeer is absolutely right, just to make this absolutely clear, let me repeat: the error message you quote does not necessarily mean your mySQL table is broken, it just means "there's something fishy related to the mySQL connection", but the reasons are manifold.
You just drew the wrong conclusions, your posting is irrelevant (and doesn't belong into this thread in the first place).

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Rosely on January 23, 2005, 09:48:22 pm
Well never mind then. Luckily I know how to fix the problem if it shows up again.

Other than that error Coppermine is great and I wanna say THANK YOU for sharing this gallery with us all.

Sorry for wrongposting, I thought it would be the right place as it talks about mysql errors and all.

Plus I just wanted to give people the solution to this problem as it shows up very often and this way (repair table) is the way to fix it (it worked for other people aswell.)

Quote
Shared hosting, servers that can't handle the strain, old (beta, old, buggy, etc) versions of MySQL, and unforseen environmental problems can all contribue to a corrupted MySQL table.
PS I just wanted to say: yeah, I have shared hosting but this server is far from full and really really up to date! (it's just been installed and all in september) besides we run the newest stable versions of all, it really can't be the server.
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: Joachim Müller on January 24, 2005, 06:33:47 am
After all the mySQL data is stored on a hard drive, and a hard drive (even a brand new one) can fail. Just a few broken sectors on the hard drive can for example cause the MYI file to be broken. As an additional advice, I suggest you make backups both of your uploaded files and your database on a regular basis (this doesn't only apply to you, but anybody who has data on a webserver that is important).

Joachim
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: nol33t on January 25, 2005, 04:08:43 pm
Hi,
about the CVS problem mentionned above in this topic, i just did a fresh install ( cpg1.3.2 with TortoiseCVS, yesterday ), and apparently there's still a file missing:

"Warning: Invalid argument supplied for foreach() in config.php on line 368"

no biggie, i'm not asking for support here, just wanted to let you know

-matt-
Title: Re: CPG 1.3 NOT working with php-4.3.10!!
Post by: nol33t on January 26, 2005, 10:16:33 pm
silly me that was due to the english.php file issue.. (http://forum.coppermine-gallery.net/index.php?topic=13547.msg62414#msg62414)