coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: grisu59 on July 09, 2005, 02:22:55 PM

Title: Array probelms with MySQL???
Post by: grisu59 on July 09, 2005, 02:22:55 PM
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'
Title: Re: Array probelms with MySQL???
Post by: donnoman on July 09, 2005, 02:50:38 PM
Post more information, thats not enough information to go on.
Title: Re: Array probelms with MySQL???
Post by: grisu59 on July 09, 2005, 10:32:05 PM
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
Title: Re: Array probelms with MySQL???
Post by: donnoman on July 10, 2005, 04:38:29 PM
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.
Title: Re: Array probelms with MySQL 4.1.11???
Post by: grisu59 on July 10, 2005, 10:47:44 PM
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!
Title: Re: Array probelms with MySQL???
Post by: XPCSniperXX on July 10, 2005, 11:14:34 PM
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'
Title: Re: Array probelms with MySQL???
Post by: donnoman on July 11, 2005, 06:21:41 AM

@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?
Title: Re: Array probelms with MySQL???
Post by: XPCSniperXX on July 11, 2005, 06:41:52 AM
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.
Title: Re: Array probelms with MySQL???
Post by: donnoman on July 11, 2005, 07:08:47 AM
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.
Title: Re: Array probelms with MySQL???
Post by: XPCSniperXX on July 11, 2005, 07:19:17 AM
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
Title: Re: Array probelms with MySQL???
Post by: grisu59 on July 11, 2005, 11:50:02 AM
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
Title: Re: Array probelms with MySQL???
Post by: donnoman on July 12, 2005, 05:09:59 AM
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)