Can't run installation #1436

Closed
opened 2026-10-05 00:43:42 +02:00 by adam · 6 comments
Owner

Hello, I'm currently trying to get Piwigo working on my local computer.
Apache2 server on Ubuntu 21.10, PHP 8.0.8 (if this issue is caused due to PHP 8, I'm very sorry, but I couldn't find a not that Piwigo doesn't run on PHP 8), Piwigo 12.2.0, downloaded from your website.

Apache's error log says:

[php:error] [pid 38291] [client 127.0.0.1:50680] PHP Fatal error:  Uncaught TypeError: fputs(): Argument #1 ($stream) must be of type resource, bool given in install.php:328\nStack trace:\n#0 install.php(328): fputs()\n#1 {main}\n  thrown in install.php on line 328, referer: http://localhost/install.php

This app looks very nice, thanks for the effort!

Hello, I'm currently trying to get Piwigo working on my local computer. Apache2 server on Ubuntu 21.10, PHP 8.0.8 (if this issue is caused due to PHP 8, I'm very sorry, but I couldn't find a not that Piwigo doesn't run on PHP 8), Piwigo 12.2.0, downloaded from your website. Apache's error log says: ``` [php:error] [pid 38291] [client 127.0.0.1:50680] PHP Fatal error: Uncaught TypeError: fputs(): Argument #1 ($stream) must be of type resource, bool given in install.php:328\nStack trace:\n#0 install.php(328): fputs()\n#1 {main}\n thrown in install.php on line 328, referer: http://localhost/install.php ``` This app looks very nice, thanks for the effort! <!-- github-sync-id:1191848268 -->
adam closed this issue 2026-10-05 00:43:42 +02:00
Author
Owner

Hi, I'm using piwigo without any problem with php 8.0.17-1.fc35.

I got a similar error if install.php can't create the local/config/database.inc.php file. Please check the right of local/config directory.

Hi, I'm using piwigo without any problem with php 8.0.17-1.fc35. I got a similar error if install.php can't create the local/config/database.inc.php file. Please check the right of local/config directory. <!-- github-comment-id:1094085268 -->
Author
Owner

Thanks. I fixed that by temporarily using the php dev server, which worked. After that, apache2 server, worked.

Thanks. I fixed that by temporarily using the php dev server, which worked. After that, apache2 server, worked. <!-- github-comment-id:1094216923 -->
Author
Owner

Hello, my workaround:
Comment line 328 and 329

#@fputs($fp, $file_content, strlen($file_content));
#@fclose($fp);

Hello, my workaround: Comment line 328 and 329 ``` #@fputs($fp, $file_content, strlen($file_content)); #@fclose($fp); ``` <!-- github-comment-id:1287672144 -->
Author
Owner
sudo chmod 777 /var/www/html/piwigo/local/config/

that fixed it for me.

``` sudo chmod 777 /var/www/html/piwigo/local/config/ ``` that fixed it for me. <!-- github-comment-id:1500520102 -->
Author
Owner

Hello, my workaround: Comment line 328 and 329

#@fputs($fp, $file_content, strlen($file_content));
#@fclose($fp);

Thanks, this did the trick!. Also downgrading from PHP 8.2 to 8.0 was necessary (DirectAdmin) to pypass the errors in PHP 8.2.

> Hello, my workaround: Comment line 328 and 329 > > ``` > #@fputs($fp, $file_content, strlen($file_content)); > #@fclose($fp); > ``` Thanks, this did the trick!. Also downgrading from PHP 8.2 to 8.0 was necessary (DirectAdmin) to pypass the errors in PHP 8.2. <!-- github-comment-id:1573806570 -->
Author
Owner

Ok so I encountered the same error in the same location, but i did NOT chmod the folder (though that probably would have fixed it).

Instead, I changed ownership of the whole web root to the user nginx is running as (same would work for apache). So, in my case, "chown - R www-data:www-data *" changed all files to be owned by the nginx process, which lifted the arbitrary permission issues.

Hope this helps!

Ok so I encountered the same error in the same location, but i did NOT chmod the folder (though that probably would have fixed it). Instead, I changed ownership of the whole web root to the user nginx is running as (same would work for apache). So, in my case, "chown - R www-data:www-data *" changed all files to be owned by the nginx process, which lifted the arbitrary permission issues. Hope this helps! <!-- github-comment-id:2136426265 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1436