Array probelms with MySQL??? Array probelms with MySQL???
 

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

Array probelms with MySQL???

Started by grisu59, July 09, 2005, 02:22:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

grisu59

I have this error when I try to installa cpg3

What happen?
Someone can help me?
Thank's

mySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array' at line 1on query 'Array'

donnoman

Post more information, thats not enough information to go on.

grisu59

I haven't more information

the website is
http://www.cosmaro.it/cmg/install.php

I use correct DBname DBuser and DBpassword but I have this error

• • ERROR • • •
The following errors were encountered and need to be corrected first:

mySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array' at line 1on query 'Array'


My server have
Apache 1.3.33
PHP 4.3.11
MySQL 4.1.11

Thanks

donnoman

#3
There isn't anything at that url.   I did find your gallery at http://www.cosmaro.it/foto.

It appears that init.inc.php, functions.inc.php may be damaged, or the config.inc.php is incorrect.

re-upload init.inc.php and functions.inc.php from the installation package and retest. Doublecheck your config.inc.php.

I think Nibbler or Casper has posted on the board a little routine that does a quick database test to see if your config.inc.php is correct. Search the board for "check database" or something like that.

grisu59

#4
I'm sorry  :( ... I have changed the directory....

coppermin now is in
http://www.cosmaro.it/foto
DBase is cosmaroc_cpg


on my server is installed MySQL 4.1.11 ...
and PHP 4.3.11

is possible that there is some problem of compatibily with CPG 1.3.3?


Thanks for the help!

XPCSniperXX

#5
I too have this problem and want to get it fixed. I even get this prob w/ the beta so I dunno what to do.

Oh and my link http://www.sniperxx.net/coppermine/

My error is slightly diff but still an array prob.

mySQL Error: You have an error in your SQL syntax near 'Array' at line 1on query 'Array'

donnoman


@XPCSniperXX  are you running mysql 4.1 as well?

Are these new installs of coppermine, or had they been running?

Did you both run install.php?

XPCSniperXX

Mine is a new install in a new database used only for coppermine. Umm I am not sure what version of MySQL exactly since its a server my friend and i rent from 1&1 but in the phpMyAdmin for the database it says MySQL 3.23.58. So I assume thats the version.


Yes I ran install.php and put in all the correct info. When I click "Lets Go!" thats when I get my error. Oh and BTW I am running Apache 2.0x (something like that) and Fedora Core 2 for the OS.

donnoman

in functions.inc.php find:

function cpg_db_connect()
{
       global $CONFIG;
       $result = @mysql_connect($CONFIG['dbserver'], $CONFIG['dbuser'], $CONFIG['dbpass']);
       if (!$result)
               return false;
       if (!mysql_select_db($CONFIG['dbname']))
               return false;
       return $result;
}

remove the @ from in front of mysql_connect


find

function db_query($query, $link_id = 0)
{
       global $CONFIG, $query_stats, $queries;


and replace it with:


function db_query($query, $link_id = 0)
{
       global $CONFIG, $query_stats, $queries;
       echo $query."<br>";


Then post the output.

XPCSniperXX

Ok I made those changes and the file is @ http://www.sniperxx.net/coppermine/include/functions.inc.php now what do I do? I went there and it didnt say anything.. am I supposed to do something else? Sorry if I sound like a n00b but I am w/ mysql. :D

grisu59

#10
I make this changes on function.ini.php but after I have the same error

mySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Array' at line 1on query 'Array'

I forget to say that it's a NEW installation

donnoman

neither of your galleries have an install.lock file which indicates to me that you haven't succesfully run install.php.

Please recheck your permissions, make sure you have chmodded the 'albums' and 'include' directory to 755 or 777 and rerun install.php

AFTER installation you can chmod 'include' to 744

If you are on windows then you iuser.. needs full control of those directories. (include can be set back to just read AFTER a succesful install)