Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker, Error "require_once(/usr/share/php/smarty3/Smarty.class.php) No such file or directory" #832

Closed
andre2087 opened this issue Feb 2, 2024 · 3 comments
Labels

Comments

@andre2087
Copy link

I tried to run it in docker. I did not edit the image, just plain usage/pull from docker hub.
But every request fails with this error message:

[Fri Feb 02 23:39:13.825019 2024] [php:error] [pid 17] [client 172.20.0.2:52260] PHP Fatal error:  Uncaught Error: Failed opening required '/usr/share/php/smarty3/Smarty.class.php' (include_path='.:/usr/local/lib/php') in /var/www/html/index.php:188\nStack trace:\n#0 {main}\n  thrown in /var/www/html/index.php on line 188

I tried version/tag 1.5.4 and 1.5.0.
Probably this is related to
#681

@andre2087
Copy link
Author

Additionally, i've tried the debian install with nginx too. But here I get a blank page and error message in log

2024/02/02 23:14:23 [error] 101784#101784: *5 FastCGI sent in stderr: "Access to the script '/usr/share/self-service-password/htdocs' has been denied (see security.limit_extensions)" while reading response header from upstream, client: ###, server: ###, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php8.2-fpm.sock:", host: "###"

@coudot coudot added the question label Feb 3, 2024
@coudot
Copy link
Member

coudot commented Feb 3, 2024

I don't reproduce the problem:

$ docker run -p 8080:80     -v $PWD/ssp.conf.php:/var/www/conf/config.inc.local.php     -it docker.io/ltbproject/self-service-password:latestAH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Sat Feb 03 10:17:22.613003 2024] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.56 (Debian) PHP/8.1.19 configured -- resuming normal operations
[Sat Feb 03 10:17:22.613047 2024] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
ldap_url_parse_ext(ldap://localhost/)
ldap_init: trying /etc/ldap/ldap.conf
ldap_init: using /etc/ldap/ldap.conf
ldap_init: HOME env is NULL
ldap_init: trying ldaprc
ldap_init: LDAPCONF env is NULL
ldap_init: LDAPRC env is NULL
[Sat Feb 03 10:17:31.140860 2024] [php:warn] [pid 17] [client 172.17.0.1:36764] PHP Warning:  Undefined array key "msg_changehelpextramessage" in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43
[Sat Feb 03 10:17:31.140880 2024] [php:warn] [pid 17] [client 172.17.0.1:36764] PHP Warning:  Attempt to read property "value" on null in /var/www/templates_c/3ba7131c51edfe0cef48341f1409d3c1a60d3c16_2.file.change.tpl.php on line 43
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET / HTTP/1.1" 200 1766 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/bootstrap/css/bootstrap-theme.min.css HTTP/1.1" 200 3113 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /css/self-service-password.css HTTP/1.1" 200 869 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/font-awesome/css/font-awesome.min.css HTTP/1.1" 200 7391 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/bootstrap/css/bootstrap.min.css HTTP/1.1" 200 20080 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /images/ltb-logo.png HTTP/1.1" 200 12943 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /js/self-service-password.js HTTP/1.1" 200 538 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/bootstrap/js/bootstrap.min.js HTTP/1.1" 200 11292 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/jquery/js/jquery-3.5.1.min.js HTTP/1.1" 200 31263 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /images/unsplash-space.jpeg HTTP/1.1" 200 388486 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /vendor/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1" 200 77449 "http://localhost:8080/vendor/font-awesome/css/font-awesome.min.css" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
172.17.0.1 - - [03/Feb/2024:10:17:31 +0000] "GET /images/favicon.ico HTTP/1.1" 200 1450 "http://localhost:8080/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"
127.0.0.1 - - [03/Feb/2024:10:17:36 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.56 (Debian) PHP/8.1.19 (internal dummy connection)"
127.0.0.1 - - [03/Feb/2024:10:17:37 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.56 (Debian) PHP/8.1.19 (internal dummy connection)"

WIth ssp.conf.php:

<?php

$ldap_url = "ldap://172.17.0.1";
$ldap_binddn = "cn=admin,dc=example,dc=com";
$ldap_bindpw = 'secret';
$keyphrase = "test";
$debug = true;
$debug_smarty = true;

?>

@andre2087
Copy link
Author

I don't know why, but it is working now. I've used your config (with some adjustments for my env) and it started immediately.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants