center-key / paradise

📷 Paradise PHP Photo Gallery
https://centerkey.com/paradise
GNU General Public License v3.0
7 stars 6 forks source link

Initialize error on first use of console #14

Closed hegi108 closed 5 years ago

hegi108 commented 7 years ago

The gallery is up on my server and so I wanted to call it for the very first time: http://www.raccourci.ch/Testseiten/gallery/console/ what returns the following error message: Error initializing file: \CLUFS01\WEBST01\12293\wwwroot\Testseiten\gallery\console\php/../../~data~/login-message.html (there is a ~ before and after the term "data")

What's gone wrong? What should I do?

hegi108 commented 7 years ago

Sorry, that looks wrong! There is a ~ before and after the term "data"

dpilafian commented 7 years ago

Dev note...

Adding Microsoft Windows support for the server-side: https://stackoverflow.com/a/43582590

function normalize(path) {
   return str_replace("/", DIRECTORY_SEPARATOR, path);
   }
hegi108 commented 7 years ago

Thanks. Do I have to add this statement myself? If yes: where? I downloaded it again from https://github.com/center-key/paradise but it ends with the same error. I'm using Dreamweaver CC 2017 as ftp on a Windows 64Bit System.

hegi108 commented 7 years ago

Sorry again - I didn't want to close it!!!!!

dpilafian commented 7 years ago

Sorry for the confusion... the "Dev note" about creating a normalize function is just a research note about how to fix the error you encountered. I will update the code shortly and push out a new version that will hopefully fix the problem.

dpilafian commented 7 years ago

The slashes issue looks to be red herring: https://stackoverflow.com/a/4178279

The Error initializing file: problem is most likely a permissions issue. Usually when you FTP the Paradise files up to your web server, the file ownership and permissions are set appropriately.

If you if copied the files directly to the file system, the permissions need to be set so that PHP can create folders and write files.

On Linux systems, the commands to manually set write permissions would look something like:

$ cd Testseiten
$ ls -l
$ chmod a+w -R gallery

I'm not too familiar with Microsoft Windows, but it looks like icacls is the command to use: https://superuser.com/a/318176