I'm getting the error "No input file specified." with Wordpress when switching hosting to Virtualmin

OS type and version CentOS Linux 7.9.2009
Virtualmin version 7.7

I installed Virtualmin on my VPS very well. I installed the phpmyadmin script OK. But when I upload the code of my website (Wordpress) to the /public_html folder, I get the error “No input file specified.” Website phpmyadmin also encountered the same error.
I couldn’t find a fix. Please help me.
Best regards.

We’d need to see relevant error log entries for that domain. You may also want to try Validate Virtual Servers, which can spot some common problems.

I think this error would happen with fCGI or CGI execution modes, but FPM is the recommended execution mode. You may want to try switching to FPM and see if the problem persists or if the error changes in useful ways.

Thank you for responding. I don’t understand your answer yet. What I have to do?

This is PHP Error Log:

[20-Jul-2023 16:20:04 UTC] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0
[20-Jul-2023 16:22:12 UTC] PHP Warning: Unknown: open_basedir restriction in effect. File(/home/protechvn/public_html/index.php) is not within the allowed path(s): (/www/wwwroot/protechvn.net/:/tmp/) in Unknown on line 0
[20-Jul-2023 16:22:12 UTC] PHP Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0

This is PHP Options:

Where is that restriction coming from? (It is not from Virtualmin or any packages or configuration it creates. Nothing goes on /www on a Virtualmin system.)

I assume it is in your application code somewhere. So, use grep to find where and fix it.

Your application lives in /home/protechvn/public_html, but you should usually put temp files outside of the document root (your error indicates you historically were putting tmp files within the document root). It’s a good security practice to put anything that doesn’t need to be visible to the end user outside of the document root (so, in /home/protechvn/tmp, perhaps). But that depends on your application. It may expect/need those files to be in the document root.

It has nothing to do with PHP configuration. Your application has configured or hard-coded paths that are wrong for your Virtualmin system, and you need to fix that.

Thanks Joe.

I created /tmp folder inside /public_html folder & restarted server.

But now get the following error:

[Fri Jul 21 06:31:52.008211 2023] [proxy:error] [pid 1612] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /var/php-fpm/168985884210590.sock (*) failed
[Fri Jul 21 06:31:52.008276 2023] [proxy_fcgi:error] [pid 1612] [client] AH01079: failed to make connection to backend: httpd-UDS, referer: https://protechvn.net:10000/

How should I fix it? I use PHP 7.2.34.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.