Hi all :smile:
Just trying G2 for the first time today. I ran into a number of setup problems and after some reading here, begin to wonder if my php version is too old. The setup problems began when it wouldn't create the directories (I'm positive permissions were OK). I created the directories manually and setup proceeded to db creation. Although it reported success, when I went to main.php I received a long list of errors that sum up to say that no tables were created in the new db. I stopped at that point.
My environment:
MacOSX 10.1.5 (Darwin Kernel Version 5.2)
php 4.1.2
mySQL 3.23.39
apache 1.3.22
any thoughts?
Posts: 3474
Is MySQL running? Does your specified MySQL user have the correct permissions to create the database? Your PHP version is fine (I think).
Posts: 25
Yes and Yes... thanks though :smile:
Posts: 7994
Hard to say what might be at fault here. It'd be fastest if I could just look at it directly. Can I ssh to your box and poke around? If so, private message me with the details. Thanks.
Posts: 25
Hi bharat :smile:
Thanks for the kind offer. I'll get back to you a bit later on the ssh thing.
This install of g2 I am playing with is on my personal box and I am on dial-up from home most of the time and occasionally behind a DSL connected LAN at work (which wouldn't be much good.) I go out to play hockey tonight and I will try to leave my Mac online for the night and will fwd an address, etc to you before I go out, if possible. The address should be good for at least 12 hours. If we get lucky, the timing will work out.
BTW... I may try installing this on a Linux box this afternoon to see what success I get.
To sum up the installation problems:
1) setup wouldn't create the directories. I created the directories manually so it could proceed
2) the db was created by setup, but no tables were created in the new db
3) following are the errors I get on main.php:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
Error (ERROR_STORAGE_FAILURE)
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1561
* in modules/core/classes/GalleryStorage/DatabaseStorage.class at line 1436
* in modules/core/module.inc at line 208
* in init.php at line 108
* in main.php at line 41
* in main.php at line 26
mysql error: [1146: Table 'gallery2.g2_GalleryModuleParameterMap' doesn't
exist] in EXECUTE("SELECT
g2_GalleryModuleParameterMap.g_parameterName,g2_GalleryModuleParameterMap.g_parameterValue
FROM g2_GalleryModuleParameterMap WHERE
g2_GalleryModuleParameterMap.g_moduleName='core'")
------------------------------------------------------------------------
(mysql): SELECT
g2_GalleryModuleParameterMap.g_parameterName,g2_GalleryModuleParameterMap.g_parameterValue
FROM g2_GalleryModuleParameterMap WHERE
g2_GalleryModuleParameterMap.g_moduleName='core'
------------------------------------------------------------------------
1146: Table 'gallery2.g2_GalleryModuleParameterMap' doesn't exist
Can't load core version -- assuming that the core needs installation
opendir(/Library/WebServer/Documents/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql)
------------------------------------------------------------------------
(mysql): SHOW TABLES
------------------------------------------------------------------------
fopen(/Library/WebServer/Documents/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/Schema.sql,
r, 0)
------------------------------------------------------------------------
(mysql): -- 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
------------------------------------------------------------------------
mysql error: [1146: Table 'gallery2.g2_Schema' doesn't exist] in
EXECUTE("INSERT INTO g2_Schema (
g_name,
g_major,
g_minor
) VALUES (
'Schema',
1,
0
)")
------------------------------------------------------------------------
(mysql): INSERT INTO g2_Schema (
g_name,
g_major,
g_minor
) VALUES (
'Schema',
1,
0
)
------------------------------------------------------------------------
1146: Table 'gallery2.g2_Schema' doesn't exist
Error trying to load
/Library/WebServer/Documents/gallery2/modules/core/classes/GalleryStorage/../../../../modules/core/classes/GalleryStorage/DatabaseStorage/schema/platform/mysql/Schema.sql
</TD></TR></TABLE><!-- BBCode End -->
Posts: 7994
Ok, I received your password and took a quick look at the files. I notice that they all have carriage returns at the end of each line (Windows/DOS style). Where did you get this copy of the code from? CVS?
It looks like you might have retrieved these these files from CVS on a Windows box, then copied them over to the Mac OS X box. This causes the files to get corrupted (with the carriage returns) and can lead to the problems that you're experiencing.
I was about to try to fix them, but lost the connection to your box :-/ Try to get the files from CVS directly on the Mac OS X box, or failing that, on another Unix box. You'll know when
you have them transferred correctly when you can "vi" the files on your Mac OS X
box and don't see ^M at the end of each line.
Posts: 25
Hi bharat,
I noticed you were on. I'm not sure what happened to the connection. My modem didn't appear to disconnect but I certainly lost all ability to resolve hosts. Anywise...
I used 'MacCVSClient X' to get the files from CVS. (please excuse my ignorance in these regards, but I had trouble getting CVS to install and run through my terminal). I imagine 'MacCVSClient X' must saved the files with CR's for line endings. As I use BBEdit for working on all my files, and BBEdit keeps the line ending format transparent to me, I never noticed that they were DOS files. This'll only take me a few seconds to fix. I'll do it right after I get back from hockey!
Thanks for the pointer and I'll let you know how I made out tomorrow.
best regards, v