Hi All,
I'm a newbie to all of this, so please have patience, and move to appropriate forum if necessary.
Here's the deal. Running IIS 5, PHP 5.0.1, MySQL 4.0.2a. Going thru the Gallery install wizard, and I get blocked at step 5, indicating that:
"You must have the MySQL PHP module installed "
I've searched unsuccessfully to find a fix to this error. I used binary installers for all of the above since I am new to using this type of software.
Any help in obtaining abovementioned module would be greatly appreciated.
TIA!!
----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful):
Gallery version:
Apache version:
PHP version (don't just say PHP 4, please):
Graphics Toolkit:
Operating system:
Web browser/version (if applicable):
Posts: 1
im getting exact same error running on Linux. MYSQL seems to work...
Posts: 2322
This belongs in the G2 forums.
Moving.
Posts: 328
signe, thanks for moving the topic here, but I think it belongs more to the general G2 forum (as this isn't an UI issue).
SG1, l33tsux0r, the problem is that your PHP installation is missing the MySQL-Module (this is the MySQL-Client part, which is independent of you having MySQL-Server installed or not) or that it is not loaded in your php.ini, in case it is an external library (which I think is the case in the binary distribution).
Find your php.ini (in C:\Windows\php.ini or something) and find the "extensions" section. Most probably the php_mysql extension is already listed there, just commented out. Comment it back in:
extension=php_mysql.dll
Restart IIS and try again. Check a page with phpinfo() to see if the mysql module is loaded.
Cheers,
Ernesto
Posts: 7
Hey Ernst,
Thanks for the advice. However, when I uncomment the line indicated, my php seems totally disabled. I simply removed the semi-colon to uncomment, saved the file to it's original location, and rebooted.
I did notice something about specifying the path for loadeable extensions, and wodering if I need to make any changes there?
"; Directory in which the loadable extensions (modules) reside.
extension_dir = "./" "
I'm guessing not, but as I am new to this process, I'm grabbing at straws here........
Posts: 7
One other thing I should add, I am behind a NAT firewall, but I don't imagine that should matter since I am installing and editing on the server itself. I do have port 80 opened on the server to allow web server connections, but I thought I'd mention it in case I may need to open ports for php or mysql. I don't have any services blocked, just all unused ports.
Thanks!!
Posts: 8601
you're right the firewall shouldn't matter since the webserver and database on both on the same server (right?). I'm not familiar with php.ini on windows.. maybe there are other mysql settings to uncomment?
l33tsux0r, on unix you need to compile php with the --with-mysql option to get mysql support compiled in.
Posts: 328
What is the "original location"? C:\Windows\php.ini? Did it gave you any errors when starting the webserver? Restart the server from the command line with
Might be the problem. Check where do you have the "php_mysql.dll" file on your system. The extensions_dir can be a path relative to your PHP's main directory, so if you have php_mysql.dll in a subdirectory called "C:\PHP-5.0.1\ext\", try the following in your php.ini:
extension_dir = "C:/PHP-5.0.1/ext/"
(note the inverted slashes!!). And then restart IIS as I described above.
To check if mysql is enabled, create a blank file, call it "phpinfo.php" in your wwwroot directory with the following content:
<?php phpinfo() ?>
Then browse to that file and see if it mentions "mysql" somewhere. If not, the module is not loaded.
Posts: 7
Hi Ernst,
specifying the path to the extensions seems to have gotten me past that error, and the phpinfo.php file does have a section for mysql, so i am assuming the module is now loaded. i've created an empty gallery2 database in mysql, but am now getting the following error:
"We received the following database related errors:
Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'user@localhost' (Using password: YES) in d:\Inetpub\wwwroot\gallery2\lib\adodb\drivers\adodb-mysql.inc.php on line 338
localhost: Access denied for user: 'user@localhost' (Using password: YES)"
I had thought I had set up users and passwords. What am I missing now?
Thanks so much for all your help O Wise One! I really appreciate it!
Posts: 328
SG1, you have set up a database in MySQL for a user called "user" and a certain password? Have you given the permissions for this user to do everything in this database (including create/alter/etc?).
The easiest way to do this is through some kind of GUI. E.g. phpMyAdmin (Web-interface) or MySQL Control Center. Remember that you must RELOAD (mysqladmin reload) mysql for changes in user-permissions to get active for the current running mysql server.
Posts: 7
okay Ernst,
i feel like i'm soon gonna give up on this, but thanks for your patience - i'm beginning to lose mine with this application. though i feel i am learning a little about php and mysql, the hard way :P
i've successfully completed that step after downloading the mysqlcc, and now i'm stopped at the next step of creating the config file:
"Unable to create config.php in your gallery directory. Make sure that Gallery has write permissions for that directory, or please create a config.php file there and make sure Gallery can write to it. "
I used notepad and created an empty config.php file, saved it in the gallery directory, the gallery\install directory, and the g2data directory. there is no protection on any of those directories or drive to prevent the installer from writing to it.
the documentation for the installation seems to be lacking for windows. mebbe i should be searching for something somebody has written? i'm sure i could write one, once/if i get through this ;P
again, thanks so much for your patience, and please advise on the above error. is there a step by step installation guide for windows on this? i'm feeling sooooo stupid because i've been using and supporting computers for many years now, and yet i don't seem to have a clue here. is it because i'm attempting to install an alpha release?
THANKS!!
Posts: 328
SG1, the IIS webserver doesn't run as your normal user, so if you created the file with your user, it probably isn't writeable by the webserver's user. Same goes for the g2data directory.
The solution: Use Explorer to change the permissions on that files. Give "Full Access" to those two locations to "All Users". And then repeat that step of the installer, it should be able to write the file now.
Galleyr2 is still in alpha-stage and we have concentrated more on our application than documentation until now. You can be sure that we will have proper documentation in a near future!
And... Don't give up! You are on the right track! ;) The knowledge you are gaining here will be useful for any other PHP-application you will install in future (phpBB, etc).
Cheers,
Ernesto
Posts: 7
Ernesto - I finally completed the Install Wizard!
Thanks do much. I thought that I may have to set write permissions, but did not see where that could be done. I had to go to folder options and uncheck "use simple file sharing" in windows XP. D'OH!
Some of the extra modules wouldn't install, but I'm not too worried about those right now. I can send the errors there if you'd like those for documentation purposes.
Now, on to uploading images ;)
Cheers!
Posts: 7
okay, maybe i was too quick regarding extra modules. i have imagemagick installed, but i cannot configure it with gallery. i am getting the following errors:
Warning: exec() [function.exec]: Unable to fork [cmd /c " "d:\Program Files\ImageMagick\identify.exe" "d:\Inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" 2> "d:\g2data\tmp\g2d8D.tmp" "] in d:\Inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec() [function.exec]: Unable to fork [cmd /c " "d:\Program Files\ImageMagick\convert.exe" "-scale" "200x200" "d:\Inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "d:\g2data\tmp\img8E.tmp" 2> "d:\g2data\tmp\g2d8F.tmp" "] in d:\Inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
Warning: exec() [function.exec]: Unable to fork [cmd /c " "d:\Program Files\ImageMagick\composite" "-geometry" "+0+0" "d:\Inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.jpg" "d:\Inetpub\wwwroot\gallery2\modules\imagemagick\classes\..\test\data\test.gif" "d:\g2data\tmp\img90.tmp" 2> "d:\g2data\tmp\g2d91.tmp" "] in d:\Inetpub\wwwroot\gallery2\modules\core\classes\GalleryPlatform\WinNtPlatform.class on line 106
any suggestions, or should i be contacting somebody at imagemagick?
tia!
Posts: 13451
SG1, have a look at the G1 installation instructions here. Especilly Step 4 regarding permissions on cmd.exe. Normally "unable to fork" messages are related to that.
Posts: 328
h0bbel, that document could also give instructions in Step 4 in case the user uses WinXP and "simple permissions mode" (or whatever it is called). It's not able to change the permissions as described there in this situation (through the Properties dialog).
The alternative is to go to a cmd-prompt, cd to c:\Windows\System32\ and type:
C:\WINDOWS\System32\>cacls cmd.exe /E /G computername\IUSR_computername:R
This adds the "read" permission to the IIS-user. Change "computername" with the name of the server, of course.
(/E means "edit" current permissions, rather than replace them all; /G is to allow the following permission)
Posts: 13451
Ernst, nice work around. The XP "Simple Filesharing" mode is truly a strange beast. I usually turn it off, thats why normally don't think about it. I've added your comment as a note to the docs.