Installing piwigo and am receiving the following error message when submitting the netinstall.php form:
[Fri Jul 05 15:09:50.433252 2024] [fcgid:warn] [pid 269936:tid 129046465349376] [remote 96.74.78.141:49566] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function __() in /[...]/pwg_unzip.php:209, referer: [...]/piwigo-netinstall.php
$ grep "__(" img.stevarino.com/*.php
pwg_files.php: throw new Exception(__('Unable to open directory.'));
pwg_files.php: throw new Exception(__('Unable to create directory.'));
pwg_files.php: throw new Exception(__('File is not writable.'));
pwg_files.php: throw new Exception(__('Unable to open file.'));
pwg_files.php: throw new Exception(__('Not an uploaded file.'));
pwg_files.php: throw new Exception(__('The uploaded file exceeds the maximum file size allowed.'));
pwg_files.php: throw new Exception(__('The uploaded file was only partially uploaded.'));
pwg_files.php: throw new Exception(__('No file was uploaded.'));
pwg_files.php: throw new Exception(__('Missing a temporary folder.'));
pwg_files.php: throw new Exception(__('Failed to write file to disk.'));
pwg_files.php: throw new Exception(sprintf(__('%s is not a directory.'),$dirName));
pwg_files.php: throw new Exception(__('Unable to open directory.'));
pwg_unzip.php: throw new Exception(sprintf(__('File %s is not compressed in the zip.'),$file_name));
pwg_unzip.php: throw new Exception(sprintf(__('Trying to unzip a folder name %s'),$file_name));
pwg_unzip.php: throw new Exception(__('Unable to write destination file.'));
pwg_unzip.php: throw new Exception(__('Unable to write in target directory, permission denied.'));
pwg_unzip.php: throw new Exception(__('Not enough memory to open file.'));
$ php -r "__('foo');"
PHP Fatal error: Uncaught Error: Call to undefined function __() in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
Thanks in advance!
This does not appear to be the same issue as https://github.com/Piwigo/Piwigo/issues/1305
Installing piwigo and am receiving the following error message when submitting the netinstall.php form:
`[Fri Jul 05 15:09:50.433252 2024] [fcgid:warn] [pid 269936:tid 129046465349376] [remote 96.74.78.141:49566] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function __() in /[...]/pwg_unzip.php:209, referer: [...]/piwigo-netinstall.php`
```
$ grep "__(" img.stevarino.com/*.php
pwg_files.php: throw new Exception(__('Unable to open directory.'));
pwg_files.php: throw new Exception(__('Unable to create directory.'));
pwg_files.php: throw new Exception(__('File is not writable.'));
pwg_files.php: throw new Exception(__('Unable to open file.'));
pwg_files.php: throw new Exception(__('Not an uploaded file.'));
pwg_files.php: throw new Exception(__('The uploaded file exceeds the maximum file size allowed.'));
pwg_files.php: throw new Exception(__('The uploaded file was only partially uploaded.'));
pwg_files.php: throw new Exception(__('No file was uploaded.'));
pwg_files.php: throw new Exception(__('Missing a temporary folder.'));
pwg_files.php: throw new Exception(__('Failed to write file to disk.'));
pwg_files.php: throw new Exception(sprintf(__('%s is not a directory.'),$dirName));
pwg_files.php: throw new Exception(__('Unable to open directory.'));
pwg_unzip.php: throw new Exception(sprintf(__('File %s is not compressed in the zip.'),$file_name));
pwg_unzip.php: throw new Exception(sprintf(__('Trying to unzip a folder name %s'),$file_name));
pwg_unzip.php: throw new Exception(__('Unable to write destination file.'));
pwg_unzip.php: throw new Exception(__('Unable to write in target directory, permission denied.'));
pwg_unzip.php: throw new Exception(__('Not enough memory to open file.'));
```
I can confirm that these function calls are in the source, but I don't know where those would exist in source control (does not appear to be in this repo): https://piwigo.org/download/netinstall/class.unzip.txt
Installed modules:
```
$ php -m | tr '\n' ' '
[PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv imagick imap intl json libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix pspell random Reflection session SimpleXML soap sockets sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache
```
Sanity check:
```
$ php -r "__('foo');"
PHP Fatal error: Uncaught Error: Call to undefined function __() in Command line code:1
Stack trace:
#0 {main}
thrown in Command line code on line 1
```
Thanks in advance!
<!-- github-sync-id:2393208485 -->
Edited the puContent function to create the directory just in case:
protected function putContent($content,$target=false)
{
if ($target) {
if (!is_dir(dirname($target))) {
mkdir(dirname($target), 0777, true);
}
$r = @file_put_contents($target,$content);
if ($r === false) {
throw new Exception(l10n('Unable to write destination file: ' . $targetg));
}
files::inheritChmod($target);
return true;
}
return $content;
}
And heyyyyy it says it works! I'm unsure how much further I can get since it seems like something is fundamentally wrong, but I'm at the configuration page at least.
Following through on the subsequent error, it looks like its trying to write file `./piwigo/admin/themes/clear/css/components/general.css`.
However:
```
$ ls -l ./piwigo/admin/themes/clear/
total 40
drwxr-xr-x 2 dh_pb9nma pg235275 4096 Jul 5 15:58 icon
drwxr-xr-x 2 dh_pb9nma pg235275 204 Jul 5 15:58 images
-rwxr-xr-x 1 dh_pb9nma pg235275 618 Jul 5 17:10 index.php
-rwxr-xr-x 1 dh_pb9nma pg235275 1292 Jul 5 17:10 mail-css.tpl
-rwxr-xr-x 1 dh_pb9nma pg235275 21984 Jul 5 17:10 theme.css
-rwxr-xr-x 1 dh_pb9nma pg235275 168 Jul 5 17:10 themeconf.inc.php
```
.. the directory does not exist...
Edited the puContent function to create the directory just in case:
```
protected function putContent($content,$target=false)
{
if ($target) {
if (!is_dir(dirname($target))) {
mkdir(dirname($target), 0777, true);
}
$r = @file_put_contents($target,$content);
if ($r === false) {
throw new Exception(l10n('Unable to write destination file: ' . $targetg));
}
files::inheritChmod($target);
return true;
}
return $content;
}
```
And heyyyyy it says it works! I'm unsure how much further I can get since it seems like something is fundamentally wrong, but I'm at the configuration page at least.
<!-- github-comment-id:2211537075 -->
With the above fixes, I was able to install and run piwigo fine. It looks like its just the net installer script, specifically pwg_files.php and pwg_unzip.php, that had issues.
With the above fixes, I was able to install and run piwigo fine. It looks like its just the net installer script, specifically pwg_files.php and pwg_unzip.php, that had issues.
<!-- github-comment-id:2211582834 -->
I'm just installed Piwigo for the first time, but faced the same issue. I tried replacing the protected function, had no success.
Ended up easily and manually creating such subfolders ('css' and 'components'), and refreshing the blank screen resending the command/data.
Remains an open issue, though.
Best regards
Hey there!
I'm just installed Piwigo for the first time, but faced the same issue. I tried replacing the protected function, had no success.
Ended up easily and manually creating such subfolders ('css' and 'components'), and refreshing the blank screen resending the command/data.
Remains an open issue, though.
Best regards
<!-- github-comment-id:2453105872 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This does not appear to be the same issue as https://github.com/Piwigo/Piwigo/issues/1305
Installing piwigo and am receiving the following error message when submitting the netinstall.php form:
[Fri Jul 05 15:09:50.433252 2024] [fcgid:warn] [pid 269936:tid 129046465349376] [remote 96.74.78.141:49566] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function __() in /[...]/pwg_unzip.php:209, referer: [...]/piwigo-netinstall.phpI can confirm that these function calls are in the source, but I don't know where those would exist in source control (does not appear to be in this repo): https://piwigo.org/download/netinstall/class.unzip.txt
Installed modules:
Sanity check:
Thanks in advance!
Attempted to force a bypass:
Error log:
Following through on the subsequent error, it looks like its trying to write file
./piwigo/admin/themes/clear/css/components/general.css.However:
.. the directory does not exist...
Edited the puContent function to create the directory just in case:
And heyyyyy it says it works! I'm unsure how much further I can get since it seems like something is fundamentally wrong, but I'm at the configuration page at least.
With the above fixes, I was able to install and run piwigo fine. It looks like its just the net installer script, specifically pwg_files.php and pwg_unzip.php, that had issues.
Hey there!
I'm just installed Piwigo for the first time, but faced the same issue. I tried replacing the protected function, had no success.
Ended up easily and manually creating such subfolders ('css' and 'components'), and refreshing the blank screen resending the command/data.
Remains an open issue, though.
Best regards