Php not being excecuted

Virtualmin (latest build)
os: latest ubuntu 20.04 LTS
php version 7.4 (default installation with virtualmin)

Hi jents
Yesterday I moved all my sites to the new server with
Most of the pages were Wordpress and they all work. Few of my other sites are hand coded and suddenly it was dumping all my code.

Further investigation the code was “commented out” and all code (incl. passwords) can be seen under source code of the website. see attached screenshot.

I have been looking until 4am and tried both on LAMP and LEMP. The php settings has been applied (so it does not download files but runs them, but the code itself is does not get executed)

Source code is NOT commented out in source but the server is doing that, and Wordpress sites runs just fine… can it be a php version?
I think I have covered it all.

… with Virtualmin’s import tools or by copying? Have you compared ownership and permissions between old and new servers?

Deprecated functions are a consideration if you were using an older PHP version before. In your code or php.ini file try enabling debugging errors and notices for more precise clues. But verify file permissions first.

1 Like

ramin: thx for your suggestions. The premissions are correct since i use a plugin called duplicator, and if the premissions were wrong it will not be able to exstract the zip file that is uploaded with the installer script, wordpress is running on it like a champ. (files are chmod 644 and folders are chmod 755)

my code ran on php 7.2 no problems… i will enable debugging and see what is going on.

ehrm… turned on logging in php ini and now it works… :joy: :nerd_face: why? dno… but thx for pointing me in that direction…

dubble checked it, and yes turning on error logging made it run… that is weird

It’s weird but somewhere there’s an explanation. I’m drawing a blank though. I’m not sure you’re out of the woods yet but you’re definitely onto something. Normally you want logging off otherwise logs get heavy and slow things down.

totally agree…

; error_reporting
;   Default Value: E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED
;   Development Value: E_ALL
   Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

thats how im having it… and ive also cranked up the memory usage in the file aswell

but i do agree it makes no sense what so ever…

Make sure error reporting is enabled with display_errors = On and then reveal all errors with error_reporting = E_ALL. Then gradually suppress errors that aren’t helping.

Bear in mind that if visitors are hitting your site you might want to install a landing page that prevents them from seeing a lot of PHP noise.

cheers, noted

Btw, I should have said PHP error logging is what gets to be a nuisance, not all logging. It depends on how error reporting is set, and those logs should be set to a max size anyway.

1 Like

Cheers! once again thx for your

I’m drawing a blank though

1 Like

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