#1 2025-01-02 18:45:15

dougienisbet
Member
2025-01-02
16

PHP Fatal error when attempting netinstall on Debian Bookworm

Hi, I'm trying to install Piwingo on a Debian Bookwork virtual machine. The machine is up to date and I'm reasonably confident that it meets the minimum specification.

I've not yet tried a manual install as I was curious about giving the netinstall a try. I have a couple of virtual hosts configured in apache that are shiny and new so there shouldn't be any conflicts. I have a .htaccess file in one but that doesn't seem to be related.

I initially hit a permissions problem (script cannot write to current directory) that I found mentioned elsewere in the forums but that was resolved by setting the ownership on the script to www-data (sudo chown www-data: piwigo-netinstall.php).

Things look pretty promising and the 'Retrieve and Unzip' was looking good until a blank screen. I had a look at the syslog and the fatal error I'm seeing is:

Code:

[Thu Jan 02 17:07:29.571403 2025] [php:error] [pid 1526772:tid 1526772] [client my-home-ip:46172]
PHP Fatal error:  Uncaught Error: Call to undefined function __() in /var/www/html/<redacted-for-the-moment>.uk/pwg_unzip.php:209\nStack trace:\n#0 /var/www/html/<redacted-for-the-moment>.uk/pwg_unzip.php(104): fileUnzip->putContent()\n#1 /var/www/html/<redacted-for-the-moment>.uk/piwigo-netinstall.php(540): fileUnzip->unzip()\n#2 {main}\n  thrown in /var/www/html/<redacted-for-the-moment>.uk/pwg_unzip.php on line 209, referer: https://<redacted-for-the-moment>.uk/piwigo-netinstall.php

The code wrap might make that a bit unreadable; this may be a little easier:

[Thu Jan 02 17:07:29.571403 2025] [php:error] [pid 1526772:tid 1526772] [client myIP:46172] PHP Fatal error:  Uncaught Error: Call to undefined function __() in /var/www/html/mytestsite.uk/pwg_unzip.php:209\nStack trace:\n#0 /var/www/html/mytestsite.uk/pwg_unzip.php(104): fileUnzip->putContent()\n#1 /var/www/html/mytestsite.uk/piwigo-netinstall.php(540): fileUnzip->unzip()\n#2 {main}\n  thrown in /var/www/html/mytestsite.uk/pwg_unzip.php on line 209, referer: https://mytestsite.uk/piwigo-netinstall.php


I'll probably try a manual installation too but another day perhaps.

Thanks for any pointers...

Dougie

Last edited by dougienisbet (2025-01-02 18:45:52)

Offline

 

#2 2025-01-03 12:48:59

dougienisbet
Member
2025-01-02
16

Re: PHP Fatal error when attempting netinstall on Debian Bookworm

I've now managed to successfully install piwigo using the Manual Installation notes. But a little more on the error in case anyone is interested.

I had a look at the script mentioned in the error message as it gives the line number of the error, and it looks like a permissions error on writing file(s).

Line 209 in /var/www/html/hoolit.uk/pwg_unzip.php:

Code:

        protected function testTargetDir($dir)
        {
                if (is_dir($dir) && !is_writable($dir)) {
                        throw new Exception(__('Unable to write in target directory, permission denied.'));
                }
                
                if (!is_dir($dir)) {
                        files::makeDir($dir,true);
                }
        }

is the throw new exception line.

I tried chmod'ing 777 and also chown'ing but no change.
I'm not going to investigate further as the manual install worked ok, although at one point I got the error (in red)

Code:

"Give write access (chmod 777) to "_data/" directory at the root of your Piwigo installation"

but that was fixed by chown'ing the folder to www-data:

Offline

 

Board footer

Powered by FluxBB