Taking up the installer thread again for a while... Discussion started with:
garvinhicking wrote:IMHO the installer should not depend on smarty for proper installation operation.
If smarty cannot write to templates_c/ for example, the installer would not load up at all without a working smarty environment.
I must come back to this. In fact we have this situation:
- We do have an error DIRECTORY_WRITE_ERROR, if the Smarty compile_dir fails. Normally this did not stop anything else than smarty init() returning false into the workflow, below 1.7.
- With Smarty 3 we will now receive an Exception and Stop, everywhere init() does stop at this point. If not done by Serendipity's Error function, this will happen in Smarty, though.
- This is a change. Yes. But without solving this directory to be writable, Serendipity may be installed, but not usable either, as it is bundled with Smarty at all. So this issue must be solved to run Serendipity properly in all cases!
- This eval ressource thing wont help us here, in the backends installer file, as it is smarty_init() which fails.
- Rethinking this, we would now have three possible options:
- Accept this stop if one of the importent s9y-bigfoots is failing. Even in installing situations.
- Return to a PHP-Template for the installer, to avoid Smarty stop while installing.
- Run a non-writable check and error-stop, before even run the installer in serendipity_admin.php.
Id did test this on a vanilla install and set chmod delivered 'templates_c' to be non-writable before install.
Finally I got:
Keine Schreibrechte für Verzeichnis /var/www/test/s9y-20/templates_c/. Bitte korrigieren
== TESTING ERROR MODE ==
Fatal error: Uncaught exception 'ErrorException' with message 'Serendipity error: Keine Schreibrechte für Verzeichnis /var/www/test/s9y-20/templates_c/. Bitte korrigieren' in /var/www/test/s9y-20/include/compat.inc.php:106
And the nice Stack trace: ...
This happend before any installing procedure was done, which is OK for me as thown (quite) nicely, and as you have to solve the non-writable directory in any case.
This leaves me to the remaining question:
What is the difference of the Installer run through, notice its failing for the compile dir to the user and finish, leaving a plain Frontend erroring to the public, until it got fixed by the user ... and on the other hand have a halt and error notice to the adminuser before any public gets involved?
My vote on this is clear.