Setup Error

mhillis

Joined: 2002-11-05
Posts: 2
Posted: Tue, 2002-11-05 17:59

I have followed the instrcutions in g2. I get all the way to where it creates a database. The database is created but when it trys to move to main.php, I get pages of this error.

Warning: Missing argument 1 for create() in /home/mhillis/public_html/gallery2/modules/core/classes/GalleryGroup.class on line 114

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-11-06 06:42

What version of PHP?

Find the "$group->create" lines in modules/core/module.inc and put debug
statements around them to try to narrow down which call is triggering this output.
It should be one of the two in that file.

 
mhillis

Joined: 2002-11-05
Posts: 2
Posted: Tue, 2002-11-12 03:32

My php version is 4.0.6. I have found the code you are talking about but I can not figure out what debug staements you are wanting me to place around them.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-11-13 22:13

If you're unfamiliar with PHP code, you should probably wait until the project is a little further along. It's not going to be time effective for me to walk you through a remote debugging process, and I may wind up fixing the bug anyway during normal development.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Mon, 2002-11-18 16:26

Same problem here i think. Setup does create a database but does not create the tables.
---
1064: You have an error in your SQL syntax near '-- This file was automatically generated from an XSL template, which is -- w' at line 1
mysql error: [1064: You have an error in your SQL syntax near '-- This file was automatically generated from an XSL template, which is -- w' at line 1] in EXECUTE("-- This file was automatically generated from an XSL template, which is -- why it looks so ugly. Editting it by hand would be a bad idea. If -- you want to do something productive, fix the style sheet so that it -- formats the SQL attractively. -- CREATE TABLE g2_Schema ( g_name varchar( 128 ) , g_major int(11) , g_minor int(11) ) TYPE=MyISAM") Error trying to load /home/software/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/Schema.sql Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1578
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1453
in modules/core/module.inc at line 176
in init.php at line 109
in main.php at line 45
in main.php at line 28

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-11-19 10:36

Greg, you've got a different problem. Can't help you till you provide a lot more info.
Let's start with your versions of:
* PHP
* Apache
* MySQL

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Tue, 2002-11-19 11:25

My sites URL is http://www.tplace.org running on a Qube 2 (mips)
Apache/1.3.3 Cobalt (Unix) (Red Hat/Linux) PHP/4.2.1 and a recent version of Mysql, but it seem that my adsl router hung on me so i cannot connect to it right now (not at home). I will reset te router in a couple of hours.

The test version of Gallery is running under /gallery2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2002-11-20 04:47

That's very odd. I'm pretty sure that I'm using well-formed SQL syntax in those queries. Any chance I can ssh to your box and tinker around with the gallery2 install there? I want to figure out what's going wrong with the SQL code.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Wed, 2002-11-20 07:39

Sure... I'll send you a login

Greg.

 
dwoods99
dwoods99's picture

Joined: 2002-09-18
Posts: 13
Posted: Wed, 2002-11-20 18:17
Quote:
Same problem here i think. Setup does create a database
but does not create the tables.
---
1064: You have an error in your SQL syntax near '-- This file was automatically generated from an XSL template, which is -- w' at line 1
mysql error: [1064: You have an error in your SQL syntax near
'-- This file was automatically generated from an XSL template, which is -- w' at line 1] in
EXECUTE("-- This file was automatically generated from an XSL template, ...
Error trying to load /home/software/gallery2/modules/core/classes/GalleryStorage/
../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/
platform/mysql/Schema.sql Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1578
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1453
in modules/core/module.inc at line 176
in init.php at line 109
in main.php at line 45
in main.php at line 28

Bharat, I downloaded the g2 CVS code *this* morning, did the setup successfully,
but going to the main.php page gives me the same errors as greg72.

Error (ERROR_STORAGE_FAILURE)
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1578
in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1477
in modules/core/module.inc at line 176
in init.php at line 109
in main.php at line 45
in main.php at line 28

mysql error: [1146: Table 'gallery2.GalleryModuleParameterMap' doesn't
exist] in EXECUTE("SELECT
GalleryModuleParameterMap.parameterName,GalleryModuleParameterMap.parameterValue
FROM GalleryModuleParameterMap WHERE
GalleryModuleParameterMap.moduleName='core'")

(mysql): SELECT
GalleryModuleParameterMap.parameterName,GalleryModuleParameterMap.parameterValue
FROM GalleryModuleParameterMap WHERE
GalleryModuleParameterMap.moduleName='core'
...
/home/mysites/public_html/gallery2/modules/core/classes/GalleryStorage/
../../../../modules/core/classes/GalleryStorage/DatabaseStorage/
schema/platform/mysql/GalleryDerivativePreferencesMap.sql
-------------------
Server specs...
MySQL 3.23.47
php-mysql-4.1.2
Apache 1.3.23
Linux Mandrake 8.2

Using phpMyAdmin, I see that database gallery2 has the following tables:
GalleryAlbumItem
GalleryChildEntity
GalleryDataItem
GalleryDerivative
GalleryDerivativeImage
Schema

Hope that helps :sad:

Thanks...Dan.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-11-21 01:56
Quote:
Bharat, I downloaded the g2 CVS code *this* morning, did the setup successfully,
but going to the main.php page gives me the same errors as greg72.

Hmm. Your results are different than greg72's. He was unable to create the Schema table, but you actually managed to.

Quote:
mysql error: [1146: Table 'gallery2.GalleryModuleParameterMap' doesn't
exist] in EXECUTE("SELECT
GalleryModuleParameterMap.parameterName,GalleryModuleParameterMap.parameterValue
FROM GalleryModuleParameterMap WHERE
GalleryModuleParameterMap.moduleName='core'")

This is a recoverable error and is handled properly. It's a red herring -- your real error happened later on. Can you re-do it and find the actual error?

Quote:
Server specs...
MySQL 3.23.47
php-mysql-4.1.2
Apache 1.3.23
Linux Mandrake 8.2

This looks like a pretty standard configuration. Any chance I can ssh to your box and play around with it in a sandbox of my own there? I can't reproduce this problem on any of my boxen :-/

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Thu, 2002-11-21 07:16

Very strange indeed.. Did you find anything that could help? It's a MIPS platform maybe that has something do do with it?

Greg.

 
dwoods99
dwoods99's picture

Joined: 2002-09-18
Posts: 13
Posted: Thu, 2002-11-21 20:31
Quote:
This is a recoverable error and is handled properly. It's a red herring -- your real error happened later on. Can you re-do it and find the actual error?

mysql): SELECT
GalleryModuleParameterMap.parameterName, GalleryModuleParameterMap.parameterValue
FROM GalleryModuleParameterMap WHERE
GalleryModuleParameterMap.moduleName='core'
1146: Table 'gallery2.GalleryModuleParameterMap' doesn't exist

Can't load core version -- assuming that the core needs installation opendir(/home/mysites/public_html/gallery2/modules/core/classes/GalleryStorage/
../../../../modules/core/classes/GalleryStorage/DatabaseStorage/
schema/platform/mysql)

(mysql): SELECT name, major, minor FROM Schema
fopen (/home/mysites/programmer/public_html/gallery2/modules/core/classes/
GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/
schema/platform/mysql/GalleryDerivativePreferencesMap.sql, r, 0)
mysql error: [1064: You have an error in your SQL syntax near
'order int(11), derivativeType int(11), '
at line 12] in EXECUTE("-- This file was automatically generated from an
XSL template, which is
-- why it looks so ugly. Editting it by hand would be a bad idea. If
-- you want to do something productive, fix the style sheet so that it
-- formats the SQL attractively.

CREATE TABLE GalleryDerivativePreferencesMap (
itemId int(11),
order int(11),
derivativeType int(11),
derivativeCommands varchar(255),

INDEX (itemId),
INDEX (order),
INDEX (derivativeType),
INDEX (derivativeCommands)
) TYPE=MyISAM")

I notice that: TYPE=MYISAM" has a missing "

Thanks...Dan

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2002-11-22 04:04
Quote:
mysql error: [1064: You have an error in your SQL syntax near
'order int(11), derivativeType int(11), '

That's mighty odd. Your column names are showing up without a prefix, and are conflicting with reserved words. I specifically avoid that by prefixing all column names with a value. In your config.php, what do you have for your $storeConfig['columnPrefix'] setting? By default it is 'g_' which would make your columns "g_order" and "g_derivativeType".

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2002-11-22 04:05
Quote:
Very strange indeed.. Did you find anything that could help? It's a MIPS platform maybe that has something do do with it?

Greg.

Greg --

I was able to log in, but I can't seem to make my G2 install visible from the outside world, nor do I have a password for your database. I private-messaged you with an exact list of what I still need.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Fri, 2002-11-22 10:43

I FOUND IT!!!
It brakes on the commands in de .sql files

-- This file was automatically generated from an XSL template, which is
-- why it looks so ugly. Editting it by hand would be a bad idea. If
-- you want to do something productive, fix the style sheet so that it
-- formats the SQL attractively.
--

when i delete those setup goes fine.

Greg.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Fri, 2002-11-22 10:52

never never shout to fast!

Well seem the quotes where only part of the problem, now i get
mysql error: [1121: Column 'g_parentId' is used with UNIQUE or INDEX but is
not defined as NOT NULL] in EXECUTE("CREATE TABLE g2_GalleryChildEntity

 
dwoods99
dwoods99's picture

Joined: 2002-09-18
Posts: 13
Posted: Fri, 2002-11-22 18:08
Quote:
>> mysql error: [1064: You have an error in your SQL syntax near
'order int(11), derivativeType int(11), ' <<

That's mighty odd. Your column names are showing up without a prefix, and are conflicting with reserved words. I specifically avoid that by prefixing all column names with a value. In your config.php, what do you have for your $storeConfig['columnPrefix'] setting? By default it is 'g_' which would make your columns "g_order" and "g_derivativeType".

During the setup process, I removed the table and field prefixes since I was letting G2 create a new database.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2002-11-22 19:47
Quote:
never never shout to fast!

Well seem the quotes where only part of the problem, now i get
mysql error: [1121: Column 'g_parentId' is used with UNIQUE or INDEX but is
not defined as NOT NULL] in EXECUTE("CREATE TABLE g2_GalleryChildEntity

I got the info you sent me, so I'll check it out on your system today.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2002-11-22 19:50
Quote:
During the setup process, I removed the table and field prefixes since I was letting G2 create a new database.

Heh. Those prefixes aren't optional. You can probably remove the table prefix safely,
but the problem you're seeing is exactly what happens when you remove the column
prefix.

 
dwoods99
dwoods99's picture

Joined: 2002-09-18
Posts: 13
Posted: Fri, 2002-11-22 23:32
Quote:
>>That's mighty odd. Your column names are showing up without a prefix, and are conflicting with reserved words. I specifically avoid that by prefixing all column names with a value. In your config.php, what do you have for your $storeConfig['columnPrefix'] setting? By default it is 'g_' which would make your columns "g_order" and "g_derivativeType".

I deleted the gallery2 database, put back in the default prefixes in the config
file, and re-ran the setup process. This time it worked all the way up to step 7 in the
README file. Step 8, go to main.php simply gives me a blank page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

The process of creating the random tree and random users went ok without errors, but now I can no longer get the main.php page. :sad:

The tables that were created are...
| g2_GalleryAlbumItem
| g2_GalleryChildEntity
| g2_GalleryComment
| g2_GalleryDataItem
| g2_GalleryDerivative
| g2_GalleryDerivativeImage
| g2_GalleryDerivativePreferencesMap
| g2_GalleryEntity
| g2_GalleryFileSystemEntity
| g2_GalleryGroup
| g2_GalleryItem
| g2_GalleryItemPropertiesMap
| g2_GalleryModuleMap
| g2_GalleryModuleParameterMap
| g2_GalleryMovieItem
| g2_GalleryPermissionMap
| g2_GalleryPhotoItem
| g2_GallerySession
| g2_GalleryUnknownItem
| g2_GalleryUser
| g2_GalleryUserGroupMap
| g2_GalleryViewCountMap
| g2_Lock
| g2_Schema
| sequence_id
| sequence_lock

Thanks...Dan.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-11-23 00:50
Quote:
never never shout to fast!

Well seem the quotes where only part of the problem, now i get
mysql error: [1121: Column 'g_parentId' is used with UNIQUE or INDEX but is
not defined as NOT NULL] in EXECUTE("CREATE TABLE g2_GalleryChildEntity

Greg --

I checked out your setup. It turns out that you're running mysql-3.22.30 which
is a couple of years old. That version is not fully compliant with some of the
standards, and has some restrictions that are causing the Gallery table definitions
not to work. I doubt that I'll support that version, so you'll have to upgrade in
order to use G2. :-/ Sorry.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Sat, 2002-11-23 08:33

ooh ok, thanks... I will give it a try, not a easy thing with a mips :sad:

Greg.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Mon, 2002-11-25 16:46

Wauw this is getting really hard. To upgrade my Mysql i need at least gcc 2.85 or I cannot compile it and now i get an error compiling gcc :sad:

Is't there an other way around this? Cuzz, I would love to work with G2 in the future and I just love my little Qube 2 (mips proc).

Greg.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2002-11-26 04:19
Quote:
Wauw this is getting really hard. To upgrade my Mysql i need at least gcc 2.85 or I cannot compile it and now i get an error compiling gcc :sad:

I'm surprised that there aren't binary MySQL packages for MIPS. Somebody's
gotta be making them...

Quote:
Is't there an other way around this? Cuzz, I would love to work with G2 in the future and I just love my little Qube 2 (mips proc).

I may focus some time on this later, but unfortunately it's not a priority for me now. Sorry.

 
greg72
greg72's picture

Joined: 2002-11-18
Posts: 23
Posted: Fri, 2002-11-29 19:25

update: I did it.. upgraded to mysql 3.23.53 and G2 installs ok now!!

I'm a happy camper :smile:

Greg.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2002-11-30 00:18

Outstanding. Thanks for following up!