Local installation of MLF crash PHP/Apache - solved (General)

by John, Friday, December 16, 2011, 08:14 (4535 days ago)

Hi,

Tried many days to debug (without success) MLF crash when installing on local computer under XAMPP WAMP.

MLF 2.2.3 uses Smarty 3.0.8. Just copied the /libs directory of Smarty 3.1.6 over /modules/smarty of MLF. Crash gone.

I guess there was a bug in Smarty 3.0.8!

Many thanks to the author of MLF for this nice Little Forum.

Local installation of MLF crash PHP/Apache - solved

by Jack9, Orange County, CA, USA, Friday, February 03, 2012, 08:53 (4486 days ago) @ John

This problem occurs on the default MLF 2.3 install with a localhost Apache 2.2 installation using PHP 5.3 and MySQL 5.1.39ce on my Windows XP staging machine.

Replacing the Smarty libs, as described, allowed the install to complete and the index.php to load. Site functions normally (for a few cursory tests, including Admin).

After that, reverting to the old smarty libs, the site functions.
Dropping all the tables and re-running the install, the install completes and the site functions.
Dropping all the tables, removing all compiled templates, and re-running the install, the problem occurs.


I tracked the issue down (through the terribly formatted Smarty code) to:
Smarty_Internal_Config_File_Compiler->compileSource while ($lex->yylex() goes about 3810 times then in

after Smarty_Internal_Configfileparser->doParse('6','='); it is in a while loop that calls $lex->yylex() that is on 2, so we have:
Smarty_Internal_Configfilelexer->yylex2() called, which dies right after the first if falls through to the continue and we come back to the preg_match....

preg_match($yy_global_pattern, substr($this->data, $this->counter), $yymatches)

The global pattern is unchanged, the $yymatches is a container value for future matches and the substr(...) results in:

a chunk starting @

pwf_activating_email_txt = """Hi [name],
this e-mail has been sent by the forum on [forum_address] because a new password has been requested. Please click the link below to confirm your request. By following the link a new password will be generated and sent to you. If this e-mail has been sent in error (either by you or someone else) please ignore this e-mail.

Link to confirm your request"""
...
and quite a bit after which I believe is unrelated.

I can narrow the infinite match down to
"(either by you or someone else)" wherein removing the first word "either" results in desired behavior.

RSS Feed of thread