Enabling PHP question

Debiab 12 REQUIRED
Virtualmin current REQUIRED

“check” says PHP “available”… PHP script says " "…
documentation says “PHP options”… dashboard says “PHP configuration”…
cPanel says “PHP version” click and done…

Are you talking about multiple versions?

Nope. I’ll take anything. I can use PHP 5. I see this in the documentation but not in panels.

PHP 5 is only supported by one OS and not for long if I remember.
But, no clue what you want then.

I don’t understand what you’re asking.

PHP is enabled by default in a fresh installation.

i run a PHP script like <?php phpinfo(); ?> and get a blank screen

This was after a fresh install of debian12 and a fresh install of virtualmin… and then a migrate virtual server after a daily backup… everything came over even mysql database… i dont know if some PHP came over too… i mean like mod_php… plenty of scripts came over… i mean the script style is old… do i need like a new extention other than .php? maybe php8?

I did not “configure” any php… i assumed there were defaults

Maybe your scripts rely on a php extension such as gd it’s work looking at the scripts to see if that is a case. That does not explain why phpinfo did not work, in that script turn on error reporting before the call to phpinfo. If you still have a blank screen check that the phpfpm server is running and also look at the logs

That seems likely you installed mod_php, which shouldn’t happen on a modern system.

If you installed the php package, or it was installed before Virtualmin, you would have gotten mod_php pulled in as a dependency, and that will break all other execution modes without some extra effort (and it’s a bad idea to have it).

You should check the error log and access log for this domain for clues, though I would expect an error in the browser if it were an error, I think. I think you’re probably just seeing a non-executing page; i.e. it’s treating it like HTML and serving it, and the browser has nothing to render. That would come from having mod_php installed, but could also come from a variety of other issues.

If you don’t have mod_php installed, but you have an .htaccess file that uses mod_php directives, that would cause an error, too. Without mod_php loaded, those directives have no meaning to Apache and would be an error.

But, you always need to look at the logs!

Thanks for help. I was expecting PHP log in public_html directory… was looking at old cPanel log… I’m ready to go

1 Like

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