ramiismail / dopresskit

presskit() - spend time making games, not press.
GNU General Public License v3.0
133 stars 50 forks source link

Installation fails on servers with PHP SAFE MODE on #2

Open ramiismail opened 10 years ago

ramiismail commented 10 years ago

Install.php does not gracefully error or offer alternatives when PHP SAFE MODE is enabled.

Dearon commented 10 years ago

Is the step of downloading and unzipping archive.php necessary? If those files were included in the download then it seems like safe mode would no longer be necessary from the parts I have looked over.

tjallingt commented 10 years ago

When safe mode is enabled ask users to upload the zip archive using their ftp connection, and run the install file again after which it will extract the files and finish the install.

The php code would first check if there is a zip archive in the './' directory, if there is, skip the downloading steps and start extracting etc...

CodeCow commented 10 years ago

@Dearon We don't want safe-mode enabled in the first place, as it will prevent us from creating files/directories with the server. It's a real nuisance.

@tjallingt I think using an FTP Connection to upload is our only alternative if PHP_SAFE_MODE is enabled.

@ramiismail I agree, something should definitely be done about the way presskit(); handles errors. Calling die() is poor design and straight-up ugly.

I'll see if I can work on a fix for this issue.

Dearon commented 10 years ago

@CodeCow Sure, I agree with that (especially since safe mode is gone with PHP 5.4.0). But that still doesn't change that if we would bundle the files that would otherwise separately be downloaded and unzipped that we would at least remove that part of the problem.

Another thing there is that bundling those files would mean they would also exist in this repo, whereas currently we only have the installer for presskit and not presskit itself. So my question was mainly aimed at getting a better understanding for why @ramiismail made it function this way and if that could be improved.

ramiismail commented 10 years ago

The reason it works this way is because many people need a sort of first step into editing XML. The install.php script functions as a bit of a tutorial (and allows for updating).

The files are all available in /archive.

Dearon commented 10 years ago

@ramiismail Oh! You are right, that's totally my bad, sorry. The tutorial is definitely useful and needed, but it seems (to me) to be a unnecessary step to download a archive.zip and unzip it when those files could be there already when you download presskit. However I don't know why you made the choices you made, so I'd rather ask first rather than diving in and making changes that won't work for some reason I hadn't thought of :)

ramiismail commented 10 years ago

I honestly just liked the elegance of having to download a single file. I'd prefer offering a manual download if the automated one fails for some reason.

On Fri, Nov 29, 2013 at 2:06 AM, Dearon notifications@github.com wrote:

@ramiismail https://github.com/ramiismail Oh! You are right, that's totally my bad, sorry. The tutorial is definitely useful and needed, but it seems (to me) to be a unnecessary step to download a archive.zip and unzip it when those files could be there already when you download presskit. However I don't know why you made the choices you made, so I'd rather ask first rather than diving in and making changes that won't work for some reason I hadn't thought of :)

— Reply to this email directly or view it on GitHubhttps://github.com/ramiismail/dopresskit/issues/2#issuecomment-29491182 .

CodeCow commented 10 years ago

@ramiismail I'm still working on the other half to the safe_mode fix, which is the installation itself via an FTP connection, however the install file is getting pretty cluttered and I think it would be nice if we had two install files? One that communicated directly with the server and one that uses and FTP connection. This way the install file won't be as cluttered, but at the cost of sacrificing the elegance of a one file download.

ramiismail commented 10 years ago

I'm OK with a cluttered install file, to be honest. Having the single file install is really something I want to keep.

On Sun, Dec 1, 2013 at 7:31 PM, Code_Assassin notifications@github.comwrote:

@ramiismail https://github.com/ramiismail I'm still working on the other half to the safe_mode fix, which is the installation itself via an FTP connection, however the install file is getting pretty cluttered and I think it would be nice if we had two install files? One that communicated directly with the server and one that uses and FTP connection. This way the install file won't be as cluttered, but at the cost of sacrificing the elegance of a one file download.

— Reply to this email directly or view it on GitHubhttps://github.com/ramiismail/dopresskit/issues/2#issuecomment-29579584 .

Wikzo commented 10 years ago

Any updates on this? :)