Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: odd sql error...  (Read 3818 times)

0 Members and 1 Guest are viewing this topic.

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
odd sql error...
« on: January 20, 2005, 04:50:12 am »

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???
« Last Edit: January 20, 2005, 05:46:25 am by PCGUY112887 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: odd sql error...
« Reply #1 on: January 20, 2005, 06:41:32 am »

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
Logged

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: odd sql error...
« Reply #2 on: January 20, 2005, 01:44:59 pm »

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.
« Last Edit: January 20, 2005, 02:00:36 pm by PCGUY112887 »
Logged

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: odd sql error...
« Reply #3 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?

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'
« Last Edit: January 21, 2005, 05:52:33 am by PCGUY112887 »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: odd sql error...
« Reply #4 on: January 21, 2005, 04:39:32 pm »

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
Logged

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: odd sql error...
« Reply #5 on: January 21, 2005, 11:27:11 pm »

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.
Logged

PCGUY112887

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 52
Re: odd sql error...
« Reply #6 on: January 23, 2005, 10:35:18 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.032 seconds with 19 queries.