X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=install.php;h=901e502f1a2e45ca347db2292dd41006634e848d;hb=5caa90c6e73655574aa6846fb4b2552d06f67118;hp=0240349bb15d1220f2cdd7babdef83c720febabd;hpb=13c183e2f4e0738233658ca79103bbe4a6d57992;p=quix0rs-gnu-social.git diff --git a/install.php b/install.php index 0240349bb1..901e502f1a 100644 --- a/install.php +++ b/install.php @@ -1,4 +1,22 @@ - +. + */ + define('INSTALLDIR', dirname(__FILE__)); function main() @@ -17,45 +35,54 @@ function main() function checkPrereqs() { + $pass = true; + if (file_exists(INSTALLDIR.'/config.php')) { ?>
Config file "config.php" already exists.
- - return false; +Require PHP version 5 or greater.
- return false; + if (version_compare(PHP_VERSION, '5.2.3', '<')) { + ?>Require PHP version 5.2.3 or greater.
Cannot load required extension "= $req ?>".
- return false; + ?>Cannot load required extension:
Cannot find mysql or pgsql extension. You need one or the other:
Cannot write config file to "= INSTALLDIR ?>".
-On your server, try this command:
-chmod a+w = INSTALLDIR ?>- - return false; + ?>
Cannot write config file to:
On your server, try this command: chmod a+w
+
Cannot write avatar directory "= INSTALLDIR ?>/avatar/".
-On your server, try this command:
-chmod a+w = INSTALLDIR ?>/avatar/- - return false; + // Check the subdirs used for file uploads + $fileSubdirs = array('avatar', 'background', 'file'); + foreach ($fileSubdirs as $fileSubdir) { + $fileFullPath = INSTALLDIR."/$fileSubdir/"; + if (!is_writable($fileFullPath)) { + ?>
Cannot write directory:
On your server, try this command: chmod a+w
Enter your database connection information below to initialize the database.
-