Failed to install script : Could not find PHP version for /usr/home/domain-name/public_html/

OS Freebsed 11.1

I get this error message when trying to install wordpress from the "Install script" from within my domain.

How can I tell virtualmin my version of PHP? The output of php -v is below:

php -v

PHP 7.2.5 (cli) (built: May 9 2018 03:44:54) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

Thanks

Sandra

Status: 
Active

Comments

Howdy -- can you show us the output you receive if you go into System Settings -> Re-Check Config? Thanks!

gutiersa's picture
Submitted by gutiersa on Tue, 05/29/2018 - 13:26 Pro Licensee

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active .. Your system has 7.97 GB of memory, which is at or above the Virtualmin recommended minimum of 512 MB. BIND DNS server is installed, and the system is configured to use it.

TLSA DNS records will be added to new domains.

Mail server Postfix is installed and configured.

Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module.

The following PHP versions are available : 7.2.5 (/usr/local/bin/php-cgi)

PHP-FPM support is available on this system.

Webalizer is installed.

MySQL is installed and running.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

Plugin Nginx SSL website is installed OK.

Plugin Administrator's Notes is installed OK.

Plugin Virtualmin Support Links is installed OK.

Plugin Nginx website is installed OK.

Using network interface vtnet0 for virtual IPs.

IPv6 addresses are available, using interface vtnet0.

Default IPv4 address for virtual servers is 138.197.102.121.

Default IPv6 address for virtual servers is fe80::acad:7dff:fed3:74d1.

The module could not find the mount point for your home directories filesystem /usr/home. Quotas editing has been disabled.

Shell /bin/false for FTP users is not included in /etc/shells, which may prevent FTP access.

All commands needed to create and restore backups are installed.

Resource limits are not supported on your system : Resource limits are only supported on Linux

The selected package management and update systems are installed OK.

Chroot jails are not available : The Jailkit command jk_init was not found on your system - maybe the jailkit package is not installed?

.. your system is ready for use by Virtualmin.

thanks

gutiersa's picture
Submitted by gutiersa on Thu, 06/07/2018 - 23:40 Pro Licensee

I am still not able to install scripts. thanks Sandra

If you go to Limits and Validation -> Validate Virtual Servers and run validation on all your domains, does it report any errors?

gutiersa's picture
Submitted by gutiersa on Sat, 06/09/2018 - 16:00 Pro Licensee

domain1.us

Webalizer reporting : No webserver log found for virtual host domain1.us

Nginx SSL website : No Nginx virtual host for domain1.us was found

Nginx website : No Nginx virtual host for domain1.us was found

domain2.net

Webalizer reporting : No webserver log found for virtual host domain2.net

MySQL database : MySQL login myopenemr does not exist

Nginx SSL website : No Nginx virtual host for domain2.net was found

Nginx website : No Nginx virtual host for domain2.net was found

domain1.net

Webalizer reporting : No webserver log found for virtual host domain1.net

Nginx SSL website : No Nginx virtual host for domain1.net was found

Nginx website : No Nginx virtual host for domain1.net was found

domain2.com

Webalizer reporting : No webserver log found for virtual host domain2.com

MySQL database : MySQL login myopenemr does not exist

Nginx SSL website : No Nginx virtual host for domain2.com was found

Nginx website : No Nginx virtual host for domain2.com was found

Ok, there's your problem - if Virtualmin can't find the Nginx config for the domain, it also can't work out the PHP version. Did you make any manual changes to the config files?

gutiersa's picture
Submitted by gutiersa on Sun, 06/10/2018 - 14:10 Pro Licensee

Not really, maybe I added the location ~ .php$ { } segment

Can you attach your Nginx config file to this bug report?

gutiersa's picture
Submitted by gutiersa on Tue, 06/12/2018 - 11:41 Pro Licensee

this is one:

server {
server_name domain.us www.domain.us;
listen ##.##.##.##;
listen [xx##::xxxx:##XX:xx3#:74d1];
root /usr/home/domain/domains/domain.us/public_html;
index index.html index.htm index.php;
access_log /var/log/virtualmin/domain.us_access_log;
error_log /var/log/virtualmin/domain.us_error_log notice;
rewrite_log on;

fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME /usr/home/domain/domains/domain.us/public_html$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /usr/home/domain/domains/domain.us/public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https;

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/php-nginx/152804196743923.sock/socket;
}

listen ##.##.##.##:443 default ssl;
listen [xx##::xxxx:##XX:xx3#:74d1]:443 default ssl;
ssl_certificate /usr/home/domain/domains/domain.us/ssl.cert;
ssl_certificate_key /usr/home/domain/domains/domain.us/ssl.key;
}

this is another:

server {
server_name domain.net www.domain.net;
listen ##.##.##.##;
listen [xx##::xxxx:##XX:xx3#:74d1];
        if ($host = 'www.domain.net' ) { rewrite  ^/(.*)$  https://domain.net/$1  permanent; }     ## redirect www to nowww
root /usr/home/domain/public_html;
index index.html index.htm index.php;
access_log /var/log/virtualmin/domain.net_access_log;
error_log /var/log/virtualmin/domain.net_error_log;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_FILENAME /usr/home/domain/public_html$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT /usr/home/domain/public_html;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param HTTPS $https;
location ~ \.php$ { try_files $uri =404; fastcgi_pass unix:/var/php-nginx/152798886089931.sock/socket; }
listen ##.##.##.##:443 ssl;
listen [xx##::xxxx:##XX:xx3#:74d1]:443 ssl;
ssl_certificate /usr/home/domain/ssl.cert;
ssl_certificate_key /usr/home/domain/ssl.key;
}

That looks reasonable at first glance. If you go to Webmin -> Servers -> Nginx Webserver, do servers for your domains appear?

gutiersa's picture
Submitted by gutiersa on Tue, 06/12/2018 - 23:00 Pro Licensee

yes, and they do work. I can go to the landing page.

I do not know whether the following method is possible for an issue like this one, If it is possible, delete the virtual server and create it again. I solved my issue in that way! First I created another server and then I checked whether the PHP problem was or was not present in that virtual server. Fortunately, there was no PHP issue found in that virtual server. Then I tried to create the original one. Then an error was present and I could not do it. Then I changed the domain name of the virtual server I created secondly and gave the domain name of the original one. This method may be crazy or stupid in some cases! However anyone can try this method if the other methods were not usable!