ok, removed everything again. Starting over with new database and empty folders.
This is the script i use to unzip my .zip file.
<?php
/* Simple script to upload a zip file to the webserver and have it unzipped
Saves tons of time, think only of uploading Wordpress to the server
Thanks to c.bavota (www.bavotasan.com)
I have modified the script a little to make it more convenient
Modified by: Johan van de Merwe (12.02.2013)
*/
function rmdir_recursive($dir) {
foreach(scandir($dir) as $file) {
if ('.' === $file || '..' === $file) continue;
if (is_dir("$dir/$file")) rmdir_recursive("$dir/$file");
else unlink("$dir/$file");
}
rmdir($dir);
}
if($_FILES["zip_file"]["name"]) {
$filename = $_FILES["zip_file"]["name"];
$source = $_FILES["zip_file"]["tmp_name"];
$type = $_FILES["zip_file"]["type"];
$name = explode(".", $filename);
$accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/x-compressed');
foreach($accepted_types as $mime_type) {
if($mime_type == $type) {
$okay = true;
break;
}
}
$continue = strtolower($name[1]) == 'zip' ? true : false;
if(!$continue) {
$message = "The file you are trying to upload is not a .zip file. Please try again.";
}
/* PHP current path */
$path = dirname(__FILE__).'/'; // absolute path to the directory where zipper.php is in
$filenoext = basename ($filename, '.zip'); // absolute path to the directory where zipper.php is in (lowercase)
$filenoext = basename ($filenoext, '.ZIP'); // absolute path to the directory where zipper.php is in (when uppercase)
$targetdir = $path . $filenoext; // target directory
$targetzip = $path . $filename; // target zip file
/* create directory if not exists', otherwise overwrite */
/* target directory is same as filename without extension */
if (is_dir($targetdir)) rmdir_recursive ( $targetdir);
mkdir($targetdir, 0777);
/* here it is really happening */
if(move_uploaded_file($source, $targetzip)) {
$zip = new ZipArchive();
$x = $zip->open($targetzip); // open the zip file to extract
if ($x === true) {
$zip->extractTo($targetdir); // place in the directory with same name
$zip->close();
unlink($targetzip);
}
$message = "Your .zip file was uploaded and unpacked.";
} else {
$message = "There was a problem with the upload. Please try again.";
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Unzip a zip file to the webserver</title>
</head>
<body>
<?php if($message) echo "<p>$message</p>"; ?>
<form enctype="multipart/form-data" method="post" action="">
<label>Choose a zip file to upload: <input type="file" name="zip_file" /></label>
<br />
<input type="submit" name="submit" value="Upload" />
</form>
</body>
</html>
Then i run mysite.com/modx/setup/
I pick language
I enter database info.
http://prntscr.com/2tk883
http://prntscr.com/2tk8eq
All seems to be OK when running the setup.
I enter my admin stuff.
the last page also shows all OK
I finish the installation.
When that is done, all still shows ok.
I press next and then login.
And now i try to use my login details i just setup.
It do not work.
1. at the end of the installation, i tried to toggle the warnings. No warnings was shown.
2. it seems the log file show lots of errors.
here are them.
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/bde2000c798fd870bfc6f0c0fb0e0e19/0/ to /storage/content/15/115715/okuus.se/public_html/modx/index.php
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/bde2000c798fd870bfc6f0c0fb0e0e19/1/ to /storage/content/15/115715/okuus.se/public_html/modx/ht.access
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/0/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/assets
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/1/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/controllers
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/2/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/templates
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/3/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/min
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/4/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/ht.access
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/5/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/cache.manifest.php
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not copy /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/modContext/41634a97fbb377215b0b065f5edab24f/6/ to /storage/content/15/115715/okuus.se/public_html/modx/manager/index.php
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/1d7b8700a980f1c4e80a7172a6a00539/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/b72a6d5c6bb206ef1e2a6df2dc710553/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/61b4f5aae0285ec00087dfe179aee82e/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/9b9232f8765b7bcb3892ae71dd5cb722/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/385b17be4f63550b2d2f6276cc3096e8/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/b96a9c35a20a556526476e0d6b52eb0d/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/b42ad4fc3bf0bff1dbb74c7acda48f2a/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/35d6629486751636da3e4a59844bd4aa/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/9696f8bbb8216fc2d3da2dbb01e33d2e/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/1fd64d48c10a054699fbefab0fd3dc65/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) Could not install files from /storage/content/15/115715/okuus.se/public_html/modx/core/packages/core/xPDOFileVehicle/ed35d6b927780352640d42668f39eb1e/ to /storage/content/15/115715/okuus.se/public_html/modx/connectors/
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) modUser: Attempt to set NOT NULL field username to NULL
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) modUserProfile: Attempt to set NOT NULL field email to NULL
[2014-02-18 09:37:19] (ERROR @ /modx/setup/index.php) modSystemSetting: Attempt to set NOT NULL field value to NULL
What should i do?