in non-setup state, Rilke should give more friendly errormsg
Status: Beta
Brought to you by:
jayeshsh
When Rilke CMS is not setup and you browse to the root
directory (instead of the setup directory) first, it
gives a very unfriendly error message (directly from PHP).
It might look a bit like this:
Warning: main(prefs.php) [function.main]: failed to
create stream: No such file or directory in
apache\htdocs\moztips_095_local\index.php on line 2
Fatal error: main() [function.main]: Failed opening
required 'prefs.php'
(include_path='.;php\includes;php\pear') in
apache\htdocs\moztips_095_local\index.php on line 2
There should be a small snippet of code that checks for
[rootdir]/prefs.php and [rootdir]/setup/setup.php and
if one or both are missing, direct the user to perform
the appropriate setup actions.
Logged In: YES
user_id=809642
Here is the code snippet that could be put at the top of the
[rootdir]/index.php file:
-------------------------------------------------------------
if (!(file_exists('prefs.php')))
{
echo "<h2>Error:</h2> <p><strong>Your preferences file
(prefs.php) for Rilke CMS has not been created
yet.</strong></p> Please create this file, otherwise you
will not be able to set up Rilke CMS successfully. Please
use the file setup/makeprefs.html to generate your
preferences file (prefs.php), and then upload it to your
webhost via FTP.";
exit();
}
else if (!(file_exists('setup/setup.php')))
{
echo "<h2>Error:</h2> <p><strong>Your setup file for Rilke
CMS (setup/setup.php) has not been created yet.</strong></p>
<p>Please create this file, otherwise you will not be able
to set up Rilke CMS successfully. Please use the file
setup/makesetup.html to generate your setup file (setup.php)
, and then upload it to your webhost via FTP.</p>";
exit();
}
-------------------------------------------------------------
Maybe in the future it could use the localized /
internationalized string system ...