-
Notifications
You must be signed in to change notification settings - Fork 198
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
Parse error: syntax error, unexpected '}' in /container/service/phpldapadmin/assets/config.php on line 68 #23
Comments
I have the same problem. To go further, when I ran "docker exec ...", the environment variable "PHPLDAPADMIN_SERVERS" is well set. It's maybe a problem with the startup.sh call? Problem detected on 0.6.9, 0.6.8 versions. The 0.6.7 version is working. |
@lcotonea thanks for the version hint! Seems to be a regression. downgrading to 0.6.7 locally, until fix arrives. |
hi guys,
everything seems ok. Could you provide your docker-compose.yml files ? |
Here my extract (docker-compose V1): openldap:
image: dinkel/openldap
environment:
- SLAPD_ORGANIZATION=XXX
- SLAPD_DOMAIN=dc=xxx,dc=yyy,dc=com
- SLAPD_RECONFIGURE=true
volumes:
- $PWD/openldap/data/var/lib/ldap:/var/lib/ldap
- $PWD/openldap/data/etc/ldap:/etc/ldap
phpLDAPadmin:
image: osixia/phpldapadmin
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap
- PHPLDAPADMIN_HTTPS=false
links:
- openldap:ldap
ports:
- "0.0.0.0:8081:80" |
this works for me:
i added The following phpLDAPadmin configuration is created :
in |
The version of osixia/phpldapadmin is 0.6.7 in your test (my fault, because of a wrong copy&paste). |
Just tried with 0.6.8 and 0.6.9 with the same result eveything seems ok.
( |
if there is nothing special with -l debug run with -l trace please :) |
Ok, I think I've identified the problem.... When I sent you the sample docker compose file, I've replaced my SLAPD_ORGANIZATION variable by XXX. But in my file, there is some spaces into the variable value. Try with that and the problem will occur: openldap:
image: dinkel/openldap
environment:
- SLAPD_ORGANIZATION=My Organisation Com
- SLAPD_DOMAIN=dc=my,dc=organisation,dc=com
- SLAPD_RECONFIGURE=true
- SLAPD_PASSWORD=test
volumes:
- $PWD/openldap/data/var/lib/ldap:/var/lib/ldap
- $PWD/openldap/data/etc/ldap:/etc/ldap
phpLDAPadmin:
image: osixia/phpldapadmin:0.6.9
environment:
- PHPLDAPADMIN_LDAP_HOSTS=ldap
- PHPLDAPADMIN_HTTPS=false
command: -l debug
links:
- openldap:ldap
ports:
- "0.0.0.0:8081:80" |
@osixia Any updates here? Don't want to rush, rather just curious.
|
I'm fairly certain that the problem is the blowfish value that's autogenerated. Sometimes, a character is in the string that isn't properly escaped and PHP has a parsing error. This is why the problem is intermittent. Unfortunately, since it's intermittent, I'm having an issue reproducing it to be absolutely certain. 😆 |
@cfairweather yes me too 😄 |
For me it looked to be caused by the It seemed to happen when the ldap-admin container would start before the ldap container - causing it to appear intermittent. Using docker-compose depends_on fixed it for me
|
Agreed, I actual saw this issue happen today where the "templating" wasn't applied to the configuration file. Cristoffer
|
Still getting the same error here, with compose.yml:
last bit of log:
inside container the last bit of config.php still has templating intact:
Any ideas? Any way I can add a startup delay to the admin container to make sure the ldap container has time to start up properly? |
I'm also having this issue. Tried it with 0.6.9, -10 and 11. PHPLDAPADMIN_SERVERS is not replaced in the config. @thearrow did you find a solution? |
@sirrapa I ended up just using this docker image instead: https://hub.docker.com/r/dinkel/phpldapadmin/ |
running in docker-compose, relevant section is:
docker-compose up
output (filtered for specific container):however, once started and navigating to http://localhost:8092/, I see:
I checked the contents of the specific file:
The problematic line referred to is the last one.
How can I fix it?
The text was updated successfully, but these errors were encountered: