odd sql error... odd sql error...
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

odd sql error...

Started by PCGUY112887, January 20, 2005, 04:50:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PCGUY112887

I've been running my gallery just fine for months now... I have my gallery and phpBB forum intergrated... so their in the same database.  I've been doing some mods to my phpBB forum, and I just realised that sudnelly my coppermine is broke.  I have no idea why... the mods shoulden't have touched any of the coppermine tables... I can find the 2 or so mods that did database changes if you would like... anyways here is the error i'm getting...

While executing query "SELECT count(*) FROM cpg132_pictures WHERE 1" on 0

mySQL error: Access denied for user: 'pcguy@localhost' (Using password: NO)

On this page...
http://www.spudfiles.com/gallery/

Why in the heck does it say using no password?
I'm not sure what to check... but I did a DB backup just a day or 2 ago when it all worked... I was looking at the cpg132_pictures table structure (since it mentions it in the error) and I found there are 2 differences from when I backed it up the other day from today when it's not working... both of these have been added

`lasthit_ip` tinytext,
and
KEY `owner_id_2` (`owner_id`),

*beep* is going on?  Is there a way I could sort of have it rebuild that table so it works again?

Edit - I looked through the mods i've done so far and there were 2 php files that I had to run to edit the DB.  Here they both are in this ZIP...
http://www.spudfiles.com/changes.zip
After testing I don't believe that it was log_actions_db_update.php that did it, because that mod came with a DB Uninstaller, I ran it and I still had the error, so it must be title_install.php

Also this is from the debug...
Quote
==========================
VERSION INFO :
------------------
PHP version: 4.3.9 - OK
------------------
<br />
<b>Warning</b>:  mysql_query(): Access denied for user: 'pcguy@localhost' (Using password: NO) in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1524</b><br />
<br />
<b>Warning</b>:  mysql_query(): A link to the server could not be established in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1524</b><br />
<br />
<b>Warning</b>:  mysql_fetch_row(): supplied argument is not a valid MySQL result resource in <b>/home/pcguy/public_html/gallery/include/functions.inc.php</b> on line <b>1525</b><br />
mySQL version:
------------------
Coppermine version: 1.3.2


Hehe... everything still uploads fine and such... it's just that large error right there :p
I've checked the config file and everything in there is correct, and I checked the CHMODing on the 2 folders and they are both correct.
I'm stumped.... hopefully one of you guys can tell me *beep* happened... I don't see how premission is being denied but everything is still working fine???

Joachim Müller

The error means that authentification for running a query on the database failed - as you said you didn't modify any coppermine files, this is probably being caused by a file on the webserver's hard drive getting corrupt. When trying to access the authentification file http://www.spudfiles.com/gallery/include/config.inc.php, I get error 500 and then I get redirected to another page, so I suggest there's something fishy with that particular file. Verify it exists on the server, make sure it contains the correct mysql data (you entered during coppermine install) and that you didn't change database settings in the past. To give you an idea how the file should look like, check the sample file that comes with coppermine (include/config.inc.php.sample). If you think everything is set up correctly, ask your webhost why you get error 500 on the file posted above.

Joachim

PCGUY112887

#2
Humm... I checked the file once again and compared it to the sample.  Everything is ok... but I went ahead and deleted the file off of the server and uploaded a fresh one from my HDD.  Now when you view http://www.spudfiles.com/gallery/include/config.inc.php you just get a blank page... but for some reason the error in the gallery remains the same.

Maybe I should try putting up fresh copies of other files?

Edit - Humm... When I CHmod the whole Includes folder to 777 I get the error 500... and I get this in my error log
[2005-01-20 06:59:21]: error: directory is writable by others: (/home/pcguy/public_html/gallery/include)
When it's at 755, I don't get the error 500 when I try to view the config file.

PCGUY112887

#3
Maybe I should just try reinstalling the forums then using a database backup?  How exactelly would that go... if I uploaded all new and went through the installer with the current DB... would it clear it all or what?

Maybe if I just restore a few day old DB backup and see if it works?

Edit - Humm I think something is going on with the server because it won't accept my Email pw anymore :p

Edit2 - Yeap has to be something with the server... even phpMyAdmin is giving me a very similar error when I try to make/drop databases...

SQL-query: Edit

CREATE DATABASE `pcguy_test` ;

MySQL said: Documentation
#1044 - Access denied for user: 'pcguy@localhost' to database 'pcguy_test'

Joachim Müller

Quote from: PCGUY112887 on January 21, 2005, 03:56:46 AM
Maybe I should just try reinstalling the forums then using a database backup?  How exactelly would that go... if I uploaded all new and went through the installer with the current DB... would it clear it all or what?
I guess this won't help. If you insist to do so (not recommended), search the board - this has been asked (and answered) before.
It's not a forum btw, Coppermine is a gallery...

Joachim

PCGUY112887

Woops i'm used to typing forums for phpBB's forums  :-X
I know it's a gallery.  ;D

Apparentelly my host found the problem... their still trying to fix it.

PCGUY112887

Well my host had to pass it on to a lev 3 tech... becuase they can't figure out *beep* the problem is.
In the mean time is there a way to suppress the critical error and such?  The gallery still works fine... it's just the fact that there is a large error msg.