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

4.0.3 - error after installation #344

Closed
lionel-m opened this issue Sep 11, 2015 · 14 comments
Closed

4.0.3 - error after installation #344

lionel-m opened this issue Sep 11, 2015 · 14 comments
Assignees
Labels
Milestone

Comments

@lionel-m
Copy link

I have installed Contao 4.0.3 with Composer. No problem until the creation of a new user in the install tool.

Error:

 FatalErrorException in localconfig.php line 3: Parse Error: syntax error, unexpected '<'

In the localconfig.php file, there are two <?php:

<?php

<?php

### INSTALL SCRIPT START ###
$GLOBALS['TL_CONFIG']['licenseAccepted'] = true;
$GLOBALS['TL_CONFIG']['installPassword'] = '***';
$GLOBALS['TL_CONFIG']['adminEmail'] = '***';
### INSTALL SCRIPT STOP ###
@leofeyer leofeyer added this to the 4.0.4 milestone Sep 11, 2015
@leofeyer
Copy link
Member

I assume you have already tried removing the local configuration file and repeating the installation process?

@lionel-m
Copy link
Author

I have removed the second <?php manually...

But after that I removed the maintenance mode and it does not add the php opening tag. Only during the installation. I will reinstall to see if I can reproduce a second time.

@lionel-m
Copy link
Author

PS: The back end displays 4.0.2

capture d ecran 2015-09-11 a 12 47 45

@lionel-m
Copy link
Author

I have reproduced this issue.

And there is a problem with the debugger (?)

capture d ecran 2015-09-11 a 12 55 44
capture d ecran 2015-09-11 a 12 56 03

@aschempp
Copy link
Member

I have stumbled upon the same issue just now. Wasen't able to understand why though…

@fritzmg
Copy link
Contributor

fritzmg commented Sep 20, 2015

@ESchuderer
Copy link
Contributor

Same problem here, tried with composer installation and install tool using PHP 5.6.13 and nginx 1.8

@Toflar
Copy link
Member

Toflar commented Sep 25, 2015

Confirmed. Same here.

leofeyer added a commit to contao/installation-bundle that referenced this issue Oct 2, 2015
@leofeyer
Copy link
Member

leofeyer commented Oct 2, 2015

I have added a workaround in contao/installation-bundle@696acfd.

The underlying problem obviously is the Config class writing twice into the same file. The two persistConfig() calls were so close behind each other that it led to a race condition.

However, I thought we had fixed this potential issue a long time ago? @contao/developers /cc

@Toflar
Copy link
Member

Toflar commented Oct 2, 2015

I cannot recall but I would've used the LockHandler to work around this :)

@leofeyer
Copy link
Member

leofeyer commented Oct 5, 2015

Turned out it was not a race condition. Fixed in e6bc7ad.

@leofeyer leofeyer closed this as completed Oct 5, 2015
@leofeyer leofeyer self-assigned this Oct 5, 2015
@aschempp
Copy link
Member

aschempp commented Oct 5, 2015

So this would also be a bug in Contao 3 right? If one saved the localconfig twice it would happen?

@leofeyer
Copy link
Member

leofeyer commented Oct 6, 2015

No, Contao 3 is not affected, because of this line, which has only been added in Contao 4 to solve the issue that you can only call Config::save() once in Contao 3.

@aschempp
Copy link
Member

aschempp commented Oct 6, 2015 via email

leofeyer pushed a commit that referenced this issue Feb 18, 2019
Description
-----------

This PR fixes #219.

Commits
-------

75351e55 Return user from token if exists
@leofeyer leofeyer modified the milestones: 4.0.4, 4.0 May 14, 2019
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

6 participants