Hello/Hi/Greetings,
I decided to update to last version and then now I get:
Warning: popen() has been disabled for security reasons in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 395
Warning: fgets() expects parameter 1 to be resource, null given in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 396
Warning: pclose() expects parameter 1 to be resource, null given in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 398
Warning: A non-numeric value encountered in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 406
So now my Piwigo site is visible, but the admin section is corrupted!
Thanks.
Piwigo 11.0.0 Controllo aggiornamenti
Sistema operativo: Linux
PHP: 7.4.10 (Mostra le informazioni) [2021-01-20 10:24:45]
MySQL: 5.7.32-35-log [2021-01-20 10:24:45]
Libreria grafica: ImageMagick 6.9.10-68
Piwigo URL: https://lnx.sinapsi.org/piwigo
Offline
I have the same problem. The top of Control Panel shows these error messages:
Warning: popen() has been disabled for security reasons in /web/htdocs5/tecsiszantohu/home/www/photos/admin/intro.php on line 395
Warning: fgets() expects parameter 1 to be resource, null given in /web/htdocs5/tecsiszantohu/home/www/photos/admin/intro.php on line 396
Warning: pclose() expects parameter 1 to be resource, null given in /web/htdocs5/tecsiszantohu/home/www/photos/admin/intro.php on line 398
Warning: A non-numeric value encountered in /web/htdocs5/tecsiszantohu/home/www/photos/admin/intro.php on line 406
Offline
Your hoster(s) seem to have disabled some function calls, in this case popen(), "for security reasons". You can check on the command line with
php -r "var_dump(function_exists('popen'));"
which then should return "bool(false)". Ask to have that enabled.
@plg:
it might be worth for a set of functions that enable calls to executables (exec, passthru, shell_exec, system, proc_open, popen) to check whether these are indeed callable.
Offline
Thank you very much. I will contact the webspace provider.
Offline
erAck wrote:
@plg:
it might be worth for a set of functions that enable calls to executables (exec, passthru, shell_exec, system, proc_open, popen) to check whether these are indeed callable.
I'm searching a pure PHP alternative to calculate the size of a directory, instead of relying on call to external commands (sometimes it's appropriate like ImageMagick, but here, only to calculate the filsize of _data directory, we can do another way). For now, I have:
function GetDirectorySize($path){ $bytestotal = 0; $path = realpath($path); if($path!==false && $path!='' && file_exists($path)){ foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, FilesystemIterator::SKIP_DOTS)) as $object){ $bytestotal += $object->getSize(); } } return $bytestotal; }
Needs to be checked on PHP 5.3 (or I can simply call it only if PHP > 5.6, since I know it works in 5.6)
Offline
Yeah, people still running PHP 5.3 deserve to get less functionality.. :-P
Hell, they're lucky enough if they still own their system (do they? they probably wouldn't even know).
Offline
erAck wrote:
Your hoster(s) seem to have disabled some function calls, in this case popen(), "for security reasons".
I opened a support ticket with my host provider about enabling popen().
Meanwhile I'd like to understand about the other 3 Wanings:
Warning: fgets() expects parameter 1 to be resource, null given in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 396
Warning: pclose() expects parameter 1 to be resource, null given in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 398
Warning: A non-numeric value encountered in /web/htdocs/www.sinapsi.org/home/piwigo/admin/intro.php on line 406
Thanks
Last edited by passegua (2021-01-20 15:17:36)
Offline
My webspace provider said it was not possible to enable those functions unfortunately.
My environment is PHP v7.4.6
Piwigo 11.0.0 Check for upgrade
Operating system: Linux
PHP: 7.4.6 (Show info) [2021-01-20 16:25:36]
MySQL: 5.7.32-35-log [2021-01-20 16:25:35]
Graphics Library: ImageMagick 6.7.2-7
Offline
Also my host provider told me the same:
"I inform you that for security reasons some PHP functions have been disabled. The functions in question are the following:
system
popen
dl
passthru
proc_open
shell_exec
These functions cannot be enabled in Shared Hosting; if your application requires these instructions, I invite you to review your code so that you do not use it"
So? Should I downgrade? Or what?
Thanks.
Offline
passegua wrote:
Meanwhile I'd like to understand about the other 3 Wanings:
They are follow-up warnings because popen() failed.
Offline
plg wrote:
https://github.com/Piwigo/Piwigo/issues/1290
So? What does it mean?
What should we do?
The site seems working properly, is it possible at least hide those disturbing warnings from admin page?
Thankssss
Offline
Oh, it means an issue has been created in the issue tracker. I fixed it, see [Github] Piwigo commit ab81e770
This fix will be included in Piwigo 11.1.0, coming tomorrow.
Offline
plg wrote:
Oh, it means an issue has been created in the issue tracker. I fixed it, see [Github] Piwigo commit ab81e770
This fix will be included in Piwigo 11.1.0, coming tomorrow.
Great! Many many thanks.
Offline