I have successfully installed 32 bit Bitnami RubyStack on an Ubuntu 12.04 VM under VirtualBox. Then I installed ResourceSpace by unzipping it and moving the entire resourcespace directory contents into the apache2/htdocs directory. This works correctly when a browser is pointed to it. When I tried to use a cli tool to import images, I run into an issue where the mysql.so extension module is either not installed, or installed twice, depending on whether I uncomment or comment the relevant line in php.ini.
I cant tell if this is a ResourceSpace issue, or a bitnami/php issue, or an interaction between the two.
ResourceSpace has a cli tool (called staticsync.php) to enable bulk loading of .jpg and other files.
Running staticsync.php, as follows: ....apache2/resourcespace$ php pages/tools/staticsync.php originally gave the error that the extension mysql.so had not been enabled.
I uncommented the "extension=mysql.so line" in the php.ini file. I was not able to locate the "mysql.so" file already in the bitnami rubystack. I installed php5-mysql using apt-get, then copied the /usr/lib/php5/20090626+lfs/mysql.so file into the extension directory pointed to by the php.ini file.
ResourceSpace's internal web status page now showed the mysql extension was installed. Good, it also agreed that the module was not installed when the relevant line in php.ini was commented. So far so good.
However when I then ran the staticsync.php from the commandline, php reported that the mysql module was already loaded.
That is where it got interesting. Either the module is not installed at all, or it is installed twice. Commenting out the line "extension = mysql.so" and the module is not installed. Uncomment it and the module is installed already. (When I run a php script from the command line.)
A bit of googling suggested that the problem was that the mysql.so extension module had been loaded twice perhaps by being referenced multiple times in different files. In one example I found, mysql.so had been referenced both in the php.ini file, and in an mysql.ini file. Commenting one of those solved the issue.
So I searched through all files on my system to see if mysql.so had been referenced more than once. The only file I can find referencing "mysql.so" is /home/vagrant/rubystack-3.2.5-0/php/etc/php.ini There were other references to "mysql.sock" but not "mysql.so"
This is contrary to the data I get when I run phpinfo():
vagrant@lucid32:~/rubystack-3.2.5-0/apache2/htdocs/resourcespace$ php -r "phpinfo();" | grep php.ini PHP Warning: Module 'mysql' already loaded in Unknown on line 0 Configuration File (php.ini) Path => /bitnami/rubystackDev-linux/output/php/lib Loaded Configuration File => /home/vagrant/rubystack-3.2.5-0/php/etc/php.ini
A careful search to find what phpinfo() refers to as "The Configuration File (php.ini) Path" failed to find it. Searching for variations of "rubystackDev-linux/output" didn't find anything similar either. (Could this be something to do with the bitnami rubystack install procedure which is still left over in the running environment?)
I am sshing into the virtual machine with Putty. In case there was a problem with the PATH, I added a line to my .profile which rubyconsole -- and that sets the PATH to what would be expected in the Bitnami environment.
- Is it correct and expected that the mysql.so module is not part of the rubystack?
- It appears that the bitnami php.ini file is being called twice somehow, but I haven't spotted where. Can anyone shed any light on this?