#1 2024-06-30 18:48:25

punctualwesley
Member
2024-06-30
4

Blank page on install.php - 'failed opening required smarty.class.php'

Actual behavior: When accessing install.php, seeing a totally blank white screen
Expected behavior: Seeing some kind of install script
Environment:

Debian 12 running as an LXC on Proxmox VE 8.4.2
Apache 2.4.59
PHP 8.2.20
MariaDB 11.4.2

Error messages:

[Sun Jun 30 10:39:27.176175 2024] [php:warn] [pid 274] [client 192.168.0.44:36580] PHP Warning:  require_once(./include/smarty/libs/Smarty.class.php): Failed to open stream: No such file or directory in /var/www/html/photos/include/template.class.php on line 13

[Sun Jun 30 10:39:27.176211 2024] [php:error] [pid 274] [client 192.168.0.44:36580] PHP Fatal error:  Uncaught Error: Failed opening required './include/smarty/libs/Smarty.class.php' (include_path='.:/usr/share/php') in /var/www/html/photos/include/template.class.php:13\nStack trace:\n#0 /var/www/html/photos/install.php(98): include()\n#1 {main}\n  thrown in /var/www/html/photos/include/template.class.php on line 13

I am apparently having issues with something called Smarty, which Google informs me is a template engine for PHP. I have attempted to install Piwigo using the netinstall script and extracting the downloadable .zip directly onto the server, with the same results. I have restored the LXC from backup to a clean LAMP configuration prior to installing piwigo multiple times, with the same results.

Can anyone shed any light on this issue? Please and thank you!

Offline

 

#2 2024-06-30 18:50:37

punctualwesley
Member
2024-06-30
4

Re: Blank page on install.php - 'failed opening required smarty.class.php'

Oh I guess I should say that I'm using a fresh download of Piwigo, which I guess is 14.4.0?

Offline

 

#3 2024-06-30 18:59:06

punctualwesley
Member
2024-06-30
4

Re: Blank page on install.php - 'failed opening required smarty.class.php'

An additional note, I attempted to use a fresh download of Piwigo 14.3.0 and experienced different behavior: Using 14.3.0 I was able to access the installation.php page (after setting chmod 777 _data) and filled out the form with the username, database info, etc. After clicking the "Start Installation" button I again encountered a completely blank screen. /var/log/apache2/error.log contained the following new errors:

[Sun Jun 30 10:52:49.788380 2024] [php:error] [pid 440] [client 192.168.0.44:54132] PHP Fatal error:  Give write access (chmod 777) to "_data/" directory at the root of your Piwigo installation in /var/www/html/photos/include/functions_html.inc.php on line 389
[Sun Jun 30 10:55:13.356120 2024] [php:error] [pid 274] [client 192.168.0.44:59566] PHP Fatal error:  Uncaught TypeError: fputs(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/photos/install.php:334\nStack trace:\n#0 /var/www/html/photos/install.php(334): fputs()\n#1 {main}\n  thrown in /var/www/html/photos/install.php on line 334, referer: http://192.168.0.23/photos/install.php?language=en_US

Offline

 

#4 2024-06-30 20:54:10

erAck
Only trying to help
2015-09-06
2183

Re: Blank page on install.php - 'failed opening required smarty.class.php'

> Failed to open stream: No such file or directory
> Failed opening required './include/smarty/libs/Smarty.class.php'

It's exactly that. Either the file is missing, or, more likely, the user the web server runs as has no access permissions to that path and file, where "./" is the Piwigo installation's directory, /var/www/html/photos/ in your case.

You'll have to investigate those possibilities. If stuck and all looks right, you may want to try the installation with PHP 8.1 instead of 8.2


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2024-06-30 21:25:01

punctualwesley
Member
2024-06-30
4

Re: Blank page on install.php - 'failed opening required smarty.class.php'

Thanks for the reply. I have taken the following troubleshooting steps:
Permissions: the entire piwigo installation directory is owned by www-data with 755 permissions, set recursively:

root@mariadb:~# ls -l /var/www/html/photos
total 368
-rwxr-xr-x  1 www-data www-data   468 Jun 30 13:09 COPYING.txt
-rwxr-xr-x  1 www-data www-data 18092 Jun 30 13:09 LICENSE.txt
-rwxr-xr-x  1 www-data www-data  1937 Jun 30 13:09 README.md
-rwxr-xr-x  1 www-data www-data  1728 Jun 30 13:09 SECURITY.md
drwxr-xr-x  2 www-data www-data  4096 Jun 30 13:09 _data
.
.
... etc.

PHP version: installing Piwigo with php8.1 (retrieved from deb.sury.org repository) yielded identical errors.

Smarty version: installing Smarty5 with Composer yielded identical errors.

Missing files: inspecting the php_include paths (both ./ a.k.a. /var/www/html/photos and /usr/share/php) does not reveal any Smarty files- /var/www/html/photos/include/smarty is empty:

root@mariadb:/var/www/html/photos/include/smarty# ls -a
.  ..

i.e. does not contain "libs/Smarty.class.php" as is apparently expected by the installer. /usr/share/php contains files but no smarty. I did take the steps of separately downloading smarty and adding it manually to the include directories, at which point I received a further error regarding a missing language.class.php. At that point I stopped troubleshooting because the error appears to be beyond my capacity to solve and I couldn't find anything in the documentation about manually installing Smarty, i.e. there is probably something else wrong. It appears that the files are not where the installer expects them, but that seems unlikely considering others have successfully installed Piwigo 14.4.0, i.e. the files were where they are supposed to be.

I do appreciate your reply, if you have any other suggestions I'll be happy to try those too, but it does seem like I'm missing something obvious here, especially w/r/t the missing language.class.php and I don't know enough about Piwigo to continue troubleshooting myself.

Thanks!

Offline

 

#6 2024-06-30 22:45:03

erAck
Only trying to help
2015-09-06
2183

Re: Blank page on install.php - 'failed opening required smarty.class.php'

Something went wrong during installation of or unzipping the Piwigo distributed .zip already, also the /var/www/html/photos directory lacks most files. You didn't mention your install method, but if it was using the netinstall procedure then try a manual installation, https://piwigo.org/guides/install/manual

As you seem to have shell access you can skip the "local unzip and upload archive content" step 2 and directly download on your server and unzip the downloaded zip archive there instead.


Running Piwigo at https://erack.net/gallery/

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact