Submitted by cruiskeen on Wed, 09/01/2010 - 09:51
I'm trying to use the install script on a virtual server to install phpmyadmin. When you try to add it, it comes back saying
his script cannot be installed, as this virtual server does not meet its requirements : Could not work out exact PHP version
This script cannot be installed, as it requires PHP version 5.
Not really sure how to convince Virtualmin that the server is running PHP 5.
Status:
Closed (fixed)
Comments
Submitted by andreychek on Wed, 09/01/2010 - 09:57 Comment #1
Howdy -- yeah, that certainly shouldn't happen, it sounds like Virtualmin is confused about something.
If you log into your server over SSH as root, what output do you see if you type this command:
rpm -qa | grep php
Also, while in the Virtualmin GUI, if you select your domain name from the drop-down on the top-left, then go into Server Configuration -> Website Options, what is the PHP Execution Mode set to? Thanks!
Submitted by cruiskeen on Wed, 09/01/2010 - 10:05 Comment #2
rpm -q -a|grep php php-pdo-5.2.11-1.el5.vmbleed php-mysql-5.2.11-1.el5.vmbleed php-gd-5.2.11-1.el5.vmbleed php-pecl-memcache-2.2.3-1.el5_2 php4-imap-4.4.8-1vm php4-ncurses-4.4.8-1vm php-common-5.2.11-1.el5.vmbleed php-cli-5.2.11-1.el5.vmbleed php-5.2.11-1.el5.vmbleed php-pgsql-5.2.11-1.el5.vmbleed php-imap-5.2.11-1.el5.vmbleed php-mbstring-5.2.11-1.el5.vmbleed php-xmlrpc-5.2.11-1.el5.vmbleed php-devel-5.2.11-1.el5.vmbleed php-pear-1.8.0-1.el5.vm php-pecl-apc-3.0.19-1.el5.vm php4-4.4.8-1vm php4-mysql-4.4.8-1vm php4-gd-4.4.8-1vm php4-domxml-4.4.8-1vm php4-devel-4.4.8-1vm php4-pear-4.4.8-1vm php-mcrypt-5.2.11-1.el5.vmbleed php-xml-5.2.11-1.el5.vmbleed wbm-php-pear-1.5-1 php-odbc-5.2.11-1.el5.vmbleed php-snmp-5.2.11-1.el5.vmbleed php4-odbc-4.4.8-1vm php4-mbstring-4.4.8-1vm php4-xmlrpc-4.4.8-1vm
As to the PHP execution mode -- this is something that I've never understood. On this server, I can set it (we're running fcgid) and the setup is correct in the httpd.conf file, and it runs under fcgid -- but if you go to LOOK at the setting for the domain, neither of the execution mode boxes is ever checked -- That is, it says to run as the domain owner, but neither CGI nor FCGID is checked in the display.
Submitted by JamieCameron on Wed, 09/01/2010 - 11:12 Comment #3
That error about being unable to work out the exact PHP version can happen if the command
php-cgi -v
doesn't output a version number.If you go to Webmin -> Others -> Command Shell and run
php-cgi -v
, what does it output?Submitted by cruiskeen on Wed, 09/01/2010 - 11:42 Comment #4
Well -- that's interesting.
If I run php-cgi -v from the command line logged into the server as root I get the expected
h-3.2# php-cgi -v PHP 5.2.11 (cgi-fcgi) (built: Oct 2 2009 04:34:17) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
But if I run it from Webmin as you requested I get
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.
For more information as to why this behaviour exists, see the manual page for CGI security.
For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
Submitted by JamieCameron on Wed, 09/01/2010 - 12:51 Comment #5
How did you install PHP 5.2? Was it from our packages, or some other source?
Submitted by cruiskeen on Wed, 09/01/2010 - 12:54 Comment #6
It's from the vmbleed repository - I need 5.2 for a lot of the Drupal hosting I'm doing. So yeah, it's one of your packages. See answer #2 above
Submitted by JamieCameron on Wed, 09/01/2010 - 13:48 Comment #7
That's odd, on a test CentOS 5 system with the exact same packages installed phpMyAdmin installs just fine.
That error from
php-cgi -v
on the Command Shell page is misleading, as it is only complaining because PHP thinks it is being run from a webserver.Try running
php -v
on the Command Shell instead.Submitted by cruiskeen on Wed, 09/01/2010 - 15:30 Comment #8
Up in #4 I did it both from Webmin and from the shell -- it worked fine from the shell, returning
php-cgi -v PHP 5.2.11 (cgi-fcgi) (built: Oct 2 2009 04:34:17) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend TechnologiesThe only things I can think of that would be different on my systems (I tried both my shared servers, and they both have the same problem).
Servers are using APC PHP accelerator
I'm using a hand built version of fcgid because the newer releases work a lot better than the one in your repositories. But I don't really see that either of these should be an issue here -
Submitted by cruiskeen on Wed, 09/01/2010 - 15:33 Comment #9
Also --
php -v returns -sh-3.2$ php -v PHP 5.2.11 (cli) (built: Oct 2 2009 04:37:52) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
Submitted by JamieCameron on Wed, 09/01/2010 - 15:55 Comment #10
If possible, you might want to try turning off the ARC PHP accelerator - it might be breaking the PHP output in some way when Virtualmin runs
php-cgi -v
Submitted by cruiskeen on Wed, 09/01/2010 - 16:32 Comment #11
Turning off APC in production is just not an option --- these sites will just fall over and kill the server without the optimization.
Also -- I tried turning off APC on a test server -- didn't help, still fails exactly the same way.
Submitted by JamieCameron on Wed, 09/01/2010 - 16:47 Comment #12
If you like, I could login to your system and take a look - I would need root SSH access though.
Submitted by cruiskeen on Wed, 09/01/2010 - 16:52 Comment #13
Sure -- I'm doing some system maintenance right now -- as soon as I get a chance to change the root passwd and enable remote root password logins, I'll let you know.
Submitted by JamieCameron on Wed, 09/01/2010 - 16:53 Comment #14
Ok .. you can email me login details at jcameron@virtualmin.com
Submitted by cruiskeen on Thu, 09/02/2010 - 09:45 Comment #15
More info - I've finally realized that this only fails on SOME domains.
Some of these sites are running Drupal with the root of the domain moved down a level from public_html -- that is, the Apache root is public_html/drupal (long story, has to do with multi-domain hosting in drupal and setting up a little forest of symlinks to accomodate this). Anyway, the install of the scripts fails on THOSE DOMAINS ONLY -- on the ones where the document root is public_html, they work fine.
And I just emailed you the RIGHT login credentials for the right server.
I wouldn't necessarily consider this a priority at this point, since I'm in the process of redoing the domains that are set up that way -- but it's a curiosity.
Submitted by JamieCameron on Thu, 09/02/2010 - 11:45 Comment #16
Changing the HTML directory shouldn't break PHP version detection .. although it may break other things.
I would be interested to know which domains you see this issue for.
Submitted by cruiskeen on Thu, 09/02/2010 - 11:55 Comment #17
Try installing phpmyadmin under, for example, capebretonguide.com -- this is one of the domains where it doesn't work, and it has a moved root directory. Also, it's one of the domains where if you break it it won't particularly be disturbing.
Submitted by JamieCameron on Thu, 09/02/2010 - 12:25 Comment #18
Ok, I see it now .. the real issue is that in the Apache config for capebretonguide.com the DocumentRoot had been set to the
drupal
sub-directory, but the <Directory> directive had not been changed to match. This breaks Virtualmin's ability to work out which PHP version applies for that directory.Once I fixed your
httpd.conf
file, all was well. To avoid this in future, change the document directory at Server Configuration -> Website Options, as this updates all the proper config files.Submitted by Issues on Fri, 09/17/2010 - 01:21 Comment #19
Automatically closed -- issue fixed for 2 weeks with no activity.