unable to install oscommerce

Hi, i am using the script installers to try an install oscommerce, however - the installation fails as it says it requires php-mysql to work and then cannot install it. My server already has php-mysql installed and working. I have checked the php.ini for that website and the mysql extension is there? what could be wrong please?

Status: 
Active

Comments

PHP module mysql is required ..

Installing package php5-mysql ..
Installing package(s) with command yum -y install php5-mysql ..

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * atomic: atomic.mirror.uber.com.au
 * base: centos.mirror.serversaustralia.com.au
 * epel: fedora.mirror.serversaustralia.com.au
 * extras: centos.mirror.serversaustralia.com.au
 * updates: centos.mirror.crucial.com.au
Setting up Install Process
No package php5-mysql available.
Error: Nothing to do

.. install failed!

Module is not available even after installation!

[root@hosting sar-nscale]# yum install php-mysql Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * atomic: atomic.mirror.uber.com.au * base: centos.mirror.serversaustralia.com.au * epel: fedora.mirror.serversaustralia.com.au * extras: centos.mirror.serversaustralia.com.au * updates: centos.mirror.crucial.com.au Setting up Install Process Package php-mysql-5.4.31-37.el6.art.x86_64 already installed and latest version Nothing to do

Is the domain you are installing osCommerce into using mod_php as the PHP execution mode, or fcgid ?

I can't change this:

Your system only has PHP version 5 installed, so selecting a different version for each directory is not possible.

No, I was referring to the PHP execution type, set at Server Configuration -> Website Options -> PHP script execution mode.

FCGId (run as virtual server owner)

Ok .. and also on that page under PHP information, does it show the mysql module as installed?

not that I can see:

Pear modules for PHP 5
Archive_Tar Console_Getopt DB PEAR Structures_Graph XML_RPC

What about next to "Modules for PHP 5" ?

I don't have that there Jamie. All I have in the website options - PHP Information is what i copy/pasted above?

Ok, I think that is a symptom of the same issue.

Try this - SSH into your system as the domain owner and run the following :

export PHPRC=$HOME/etc/php5
php -m

And let me know what it outputs.

thanks Jamie, Ok, I ssh into my system as root, then su to the user. I then ran those commands - this is what I got:

sh-4.1$ export PHPRC=$HOME/etc/php5 sh-4.1$ php -m Failed loading /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: cannot open shared object file: Permission denied PHP Warning: Module 'mysql' already loaded in Unknown on line 0 PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0 sh-4.1$

If I run php-m as root - i get:

[root@hosting public_html]# php -m Failed loading /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: undefined symbol: php_body_write PHP Warning: Module 'mysql' already loaded in Unknown on line 0 PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0

Ah, it may be failing for a different reason.

It looks like the php.ini file has "register_globals" enabled, which isn't supported on newer PHP versions.

What you may want to do is edit $HOME/etc/php.ini, and disable that particular option.

Once you do that, try the above command again and see if it completes properly.

ok - done. Now I get:

[root@hosting etc]# php -m Failed loading /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: /home/billing/public_html/ioncube/ioncube_loader_lin_5.2.so: undefined symbol: php_body_write PHP Warning: Module 'mysql' already loaded in Unknown on line 0 [PHP Modules] bz2 calendar Core ctype curl date dom ereg exif fileinfo filter ftp gd gettext gmp hash iconv imap ionCube Loader json libxml mbstring mcrypt memcache mhash mysql mysqli odbc openssl pcntl pcre PDO pdo_mysql PDO_ODBC pdo_pgsql pdo_sqlite pgsql Phar readline Reflection session shmop SimpleXML snmp sockets SPL sqlite3 standard tokenizer wddx xml xmlreader xmlrpc xmlwriter xsl zip zlib

[Zend Modules] the ionCube PHP Loader

Okay, that output looks good.

What happens if you attempt the osCommerce installation again?

thanks Jamie - got further than time. It actually installed ! However, when I click the link to go to the start - admin page.. i get:

$languages[$i]['code'], 'text' => $languages[$i]['name']); if ($languages[$i]['directory'] == $language) { $languages_selected = $languages[$i]['code']; } } require(DIR_WS_INCLUDES . 'template_top.php'); ?> 1) { ?> '; ?> isEnabled() ) { if ($col < 1) { echo ' ' . "\n"; } $col++; if ($col <= 2) { echo ' ' . "\n"; } if ( !isset($adm_array[$i+1]) || ($col == 2) ) { if ( !isset($adm_array[$i+1]) && ($col == 1) ) { echo ' ' . "\n"; } $col = 0; echo ' ' . "\n"; } } } } ?> ' . "\n"; } echo $ad->getOutput(); if ($col <= 2) { echo '

but nothing else?

Just to clarify, you're saying that you see the above PHP code in your browser when going to the admin page?

Are you seeing any errors in the Apache error logs when that occurs, in $HOME/logs/error_log?

yes, correct. and no, I can't see any errors?

any idea please?

After doing some testing, I haven't been able to reproduce a problem installing and using osCommerce.

You may be seeing an issue specific to the third party PHP version/configuration installed onto your server, as we see a lot of problems when using non-standard repos.

I'd be curious if you have better luck using a different PHP Execution Mode though; you can change that by going into Server Configuration -> Website Options, and there you can choose between FCGID, CGI, and mod_php.

thanks. when I change to apache_mod_php.. I get:

Warning: include(/home/sar-nscale/public_html/store/admin/includes/configure.php): failed to open stream: Permission denied in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 28

Warning: include(/home/sar-nscale/public_html/store/admin/includes/configure.php): failed to open stream: Permission denied in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 28

Warning: include(): Failed opening 'includes/configure.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 28

Warning: require(DIR_WS_FUNCTIONScompatibility.php): failed to open stream: No such file or directory in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 35

Warning: require(DIR_WS_FUNCTIONScompatibility.php): failed to open stream: No such file or directory in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 35

Fatal error: require(): Failed opening required 'DIR_WS_FUNCTIONScompatibility.php' (include_path='.:/usr/share/pear:/usr/share/php') in /home/sar-nscale/public_html/store/admin/includes/application_top.php on line 35

when I change to cgi-wrapper, and browse to the admin page, the browser tries to download the file rather than open it.

when I change to FCGld, I get :

$languages[$i]['code'], 'text' => $languages[$i]['name']); if ($languages[$i]['directory'] == $language) { $languages_selected = $languages[$i]['code']; } } require(DIR_WS_INCLUDES . 'template_top.php'); ?> 1) { ?> '; ?> isEnabled() ) { if ($col < 1) { echo ' ' . "\n"; } $col++; if ($col <= 2) { echo ' ' . "\n"; } if ( !isset($adm_array[$i+1]) || ($col == 2) ) { if ( !isset($adm_array[$i+1]) && ($col == 1) ) { echo ' ' . "\n"; } $col = 0; echo ' ' . "\n"; } } } } ?> ' . "\n"; } echo $ad->getOutput(); if ($col <= 2) { echo '