magento/osCommerce install/500 problem

While trying to install magento, I am getting this error:

Found http://scripts.virtualmin.com:80/magento-1.9.2.1.tar.gz in cache ..

PHP module mysql is required .. Enabling module in PHP configuration .. .. done Installing package php54-php-mysql .. Installing package(s) with command /usr/bin/yum -y install php54-php-mysql ..

Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.den.host-engine.com * extras: centos.den.host-engine.com * updates: centos.den.host-engine.com Package php54-php-mysqlnd-5.4.16-22.el6.centos.alt.x86_64 already installed and latest version Nothing to do .. install complete. Installing package php54-mysql .. Installing package(s) with command /usr/bin/yum -y install php54-mysql ..

Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.den.host-engine.com * extras: centos.den.host-engine.com * updates: centos.den.host-engine.com No package php54-mysql available. Error: Nothing to do .. install failed! Module is not available even after installation!

====

Though I was able to install osCommerce, I am getting 500 error when I access the site/folder.

Example: https://hostlawn.com/oscommerce/admin/

Please help!

Status: 
Active

Comments

Howdy -- what error do you see in the Apache logs for that domain when receiving that 500 error?

You can see those in $HOME/logs/error_log.

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 10:22 Pro Licensee

Was unable to open /home/h_n/error_log as user 'h_n' - Permission denied!

But as root: Logs and Reports -> Apache Error Log, here is the latest error logs:

[Thu Oct 22 09:38:30 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:38:30 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 09:43:26 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:43:26 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 09:45:40 2015] [warn] [client 71.173.203.109] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:45:40 2015] [error] [client 71.173.203.109] Premature end of script headers: index.php [Thu Oct 22 09:48:28 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:48:28 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 09:52:23 2015] [warn] [client 180.76.15.137] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:52:23 2015] [error] [client 180.76.15.137] Premature end of script headers: index.php [Thu Oct 22 09:53:23 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:53:23 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 09:58:41 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 09:58:41 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 10:03:29 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:03:29 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 10:04:20 2015] [error] [client 66.249.65.81] File does not exist: /home/hostlawn/public_html/robots.txt [Thu Oct 22 10:04:20 2015] [error] [client 66.249.65.78] File does not exist: /home/hostlawn/public_html/bislinks.com [Thu Oct 22 10:04:28 2015] [warn] [client 108.90.217.137] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:04:28 2015] [error] [client 108.90.217.137] Premature end of script headers: index.php

Hmm, we may want to try switching the PHP Execution Mode to "CGI" temporarily (which can generate better errors). That can be changed in Server Configuration -> Website Options.

After doing that, what error shows up in the log when accessing your Magento site?

Also, just to check, do other PHP apps work under this domain?

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 10:38 Pro Licensee

No other PHP scripts/appas are working under this server although /analytics was working fine until I noticed the error with Magento installation...

Was unable to install Magento at all.....

Error after changing exec mode to CGI:

[Thu Oct 22 10:14:52 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:14:52 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:14:54 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:14:54 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:14:56 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:14:56 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:14:58 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:14:58 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:15:00 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:15:00 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:15:02 2015] [warn] [client 37.187.137.225] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:15:02 2015] [error] [client 37.187.137.225] Premature end of script headers: index.php [Thu Oct 22 10:18:28 2015] [warn] [client 192.0.84.33] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:18:28 2015] [error] [client 192.0.84.33] Premature end of script headers: index.php [Thu Oct 22 10:19:45 2015] [warn] [client 108.90.217.137] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server [Thu Oct 22 10:19:45 2015] [error] [client 108.90.217.137] Premature end of script headers: index.php [Thu Oct 22 10:21:32 2015] [warn] RSA server certificate CommonName (CN) `www.hostlawn.com' does NOT match server name!? [Thu Oct 22 10:21:36 2015] [error] [client 108.90.217.137] PHP: syntax error, unexpected '(' in /home/hostlawn/etc/php5.4/php.ini on line 881 [Thu Oct 22 10:21:36 2015] [error] [client 108.90.217.137] PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0

[Thu Oct 22 10:21:36 2015] [error] [client 108.90.217.137] Premature end of script headers: php5.4.cgi

Ah, did you perhaps just install a newer PHP version on your server? Which repository did that PHP version come from?

It looks like you're receiving errors related to the PHP config not working with that PHP version, such as this one here:

PHP Fatal
error:  Directive 'register_globals' is no longer available in PHP in
Unknown on line 0

Also, there seems to be a syntax error in the php.ini as well:

PHP:  syntax
error, unexpected '(' in /home/hostlawn/etc/php5.4/php.ini on line 881
bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:02 Pro Licensee

I think I did install PHP 5.4.16 recently... from SCL

i commented out the error line in .ini which was done for piwik

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:18 Pro Licensee

I have enabled support login, in case

There's two PHP errors shown above... the one is a syntax error, and the other is a case of it using a directive that no longer works in PHP 5.4, so that would need to be removed or commented out.

After tweaking both of those, what happens when accessing your site?

If it's still a 500 error, take another peek at the logs and see what error shows up there now.

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:33 Pro Licensee

After commenting out two instances of register_globals, other PHP apps are working: oscommers/piwik.

But I am still unable to install Magnto:

--- getting this error --- Found http://scripts.virtualmin.com:80/magento-1.9.2.1.tar.gz in cache ..

PHP module mcrypt is required .. Installing package php54-php-mcrypt .. Installing package(s) with command /usr/bin/yum -y install php54-php-mcrypt .. Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.den.host-engine.com * extras: centos.den.host-engine.com * updates: centos.den.host-engine.com No package php54-php-mcrypt available. Error: Nothing to do .. install failed! Installing package php54-mcrypt .. Installing package(s) with command /usr/bin/yum -y install php54-mcrypt ..

Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.den.host-engine.com * extras: centos.den.host-engine.com * updates: centos.den.host-engine.com No package php54-mcrypt available. Error: Nothing to do .. install failed!

Module is not available even after installation!

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:37 Pro Licensee

service httpd restart gives no error too....

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:39 Pro Licensee

I see the following 'new' errors

[Thu Oct 22 11:23:27 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/geoip.so' - /opt/rh/php54/root/usr/lib64/php/modules/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0 [Thu Oct 22 11:23:27 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/mcrypt.so' - /opt/rh/php54/root/usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0 [Thu Oct 22 11:23:27 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/mysql.so' - /opt/rh/php54/root/usr/lib64/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 [Thu Oct 22 11:23:27 2015] [error] [client 108.90.217.137] PHP Warning: Module 'imap' already loaded in Unknown on line 0 [Thu Oct 22 11:23:27 2015] [error] [client 108.90.217.137] PHP Warning: date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/hostlawn/public_html/oscommerce/includes/functions/compatibility.php on line 54 [Thu Oct 22 11:23:29 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/geoip.so' - /opt/rh/php54/root/usr/lib64/php/modules/geoip.so: cannot open shared object file: No such file or directory in Unknown on line 0, referer: https://hostlawn.com/oscommerce/ [Thu Oct 22 11:23:29 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/mcrypt.so' - /opt/rh/php54/root/usr/lib64/php/modules/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0, referer: https://hostlawn.com/oscommerce/ [Thu Oct 22 11:23:29 2015] [error] [client 108.90.217.137] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/rh/php54/root/usr/lib64/php/modules/mysql.so' - /opt/rh/php54/root/usr/lib64/php/modules/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0, referer: https://hostlawn.com/oscommerce/ [Thu Oct 22 11:23:29 2015] [error] [client 108.90.217.137] PHP Warning: Module 'imap' already loaded in Unknown on line 0, referer: https://hostlawn.com/oscommerce/ [Thu Oct 22 11:24:19 2015] [warn] RSA server certificate CommonName (CN) www.hostlawn.com' does NOT match server name!? [Thu Oct 22 11:24:19 2015] [warn] RSA server certificate CommonName (CN)www.hostlawn.com' does NOT match server name!?

The errors about it not being able to load the geoip module should be harmless, though it wouldn't hurt to comment that extension out since it doesn't appear to be installed on your system.

The issue installing Magento is that it's unable to find the PHP mcrypt module for PHP 5.4 in that repository.

Do you need PHP 5.4 for this Magento version?

If not, the simplest solution would be to use PHP 5.3, which does come with the mcrypt module.

bislinks's picture
Submitted by bislinks on Thu, 10/22/2015 - 11:59 Pro Licensee

Yes, changing Magento folder to PHP 5.3 worked perfectly well. Was able to install and login successfully to Magento.

Thanks again for all your help.

Great, I'm glad that's working now!