-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP Safe Mode Fix 1/2 #6
base: master
Are you sure you want to change the base?
Conversation
Hmm, does this add a significant enough advantage versus someone uploading the archive themselves through FTP (they already had to upload the install.php and need to edit the data.xml so they have a connection open anyway)? Plus from my quick browsing (feel free to correct me if I am wrong) it will always throw the FTP page at a user due to "if( true )" and you've commented out the downloading of the stylesheet. Those are two issues I spotted when looking through it a little bit. |
@Dearon Reason I made it true every-time is that my version of PHP does not support safe_mode. It was deprecated as of PHP 5.3.0 and was removed of as of PHP 5.4.0. I didn't feel like downloading an older version of PHP just for the sake of testing so I made it always throw it at the user. The reason I commented out the downloading of the style sheet is that the URL it pulls it from has an outdated version of the style sheet, and it would overwrite my changes. I corrected the problem of it throwing the ftp connection at the user every-time in my second commit to the branch. Presskit()'s installation and update process includes the creation directories, the download of remote files, and the renaming of files. Would you want to upload archive.zip(and unzip it) manually every single time you had to update presskit() or for that matter, install it? The main advantage of this fix is automation. |
The single file install is inspired by Steam, which allows for super rapid installation, moving and updating. I like how elegant it is. As soon as I merge this pull request and prepare for updating, I can update the .css and archive.zip on my own server. |
@ramiismail or we can do this: $randVar = file_put_contents("master.zip",
file_get_contents("https://github.com/ramiismail/dopresskit/archive/master.zip")
//unzip routine I'm thinking pull updates from GitHub, use your server as backup(in case GitHub is down), this way you'd only need to update the repo(which is easier). |
I'd be OK with that if that works. make it dopresskit/master/archive.zip On Mon, Dec 2, 2013 at 7:24 PM, Code_Assassin notifications@github.comwrote:
|
@ramiismail Okay, after I complete the other half to the PHP_SAFE_MODE fix I'll work on the Updating Presskit() issue. |
@CodeCow Yeah I get that it's useful in development. But the master branch on this repo should always be stable and as bug-free as possible, if only due to the fact that every big project on Github does things that way. So any code being merged into it should always be production ready, thus my comment on that :) And yeah, I do think that entering your FTP credentials and so forth into the page is barely any better than unzipping the zip yourself and uploading, but that can just be me (or, in other words, if Rami is happy with it then I am not going to complain). |
@Dearon You are right, but thanks to modern browser sophistication and _SESSION variables you can make the browser remember your credentials ;) |
@CodeCow Is your code ready to be merged into the master branch? |
@ramiismail No not yet. I haven't worked on the second part to the fix in a while, due to finals :( If someone is able to pick up my slack, I'd appreciate it. |
If not, that's not a problem. I'd appreciate it if you'd have some time Success with your finals! On Tue, Dec 10, 2013 at 6:15 AM, Code_Assassin notifications@github.comwrote:
|
Did this ever get completed? I just bought a website and would love to install presskit(). However, I am unable to turn off PHP safe mode and can't figure out how to install presskit() because of that :( |
@Wikzo No, but what you can do is upload everything inside of the archive directory and it should work without a problem. The only downside is that you can't use the single-file setup for installing/updating. |
I am pretty new to this thing. I have taken the all the files inside the archive folder and uploaded it via FTP. What am I supposed to do then? When I try to go to my website, I just get the "Server Environment Check Failed: PHP Safe Mode Enabled" text. E.g. http://tunnelvisiongames.com/press/archive/index.php What page/file am I supposed to go to next? I have read the manual. I even tried CodeCow's fix. With this I am able to get to the install page and insert the server/password, but when I hit enter nothing happens. |
@Wikzo, Hmm, I thought those checks weren't there. Anyway, replace the content of install.php with https://gist.github.com/Dearon/9078530. You'll also want to create a directory called "images" and one called "trailers" in the same dir as the install.php file. Hopefully it will work at that point (also sorry for the trouble, it is a bit cumbersome like this). |
Thanks a lot! |
@Wikzo Does it work that way? Might be able to change the code a bit so that it at least offers a manual way of installing for people without safe mode enabled |
Yep, it worked! I now have http://tunnelvisiongames.com up and running :) |
Awesome! Good to see it worked out |
Sorry for being a complete website newbie here, but how do I create a simple clickable URL link inside my main text? Sorry about the poor formatting, but here is what I am trying to do (see attached image). What am I doing wrong? Also, I know this is not the right place to ask questions like this, but I don't know where else to go. |
@Wikzo It's probably much easier to tackle this through chat, are you on any IRC networks or use Skype or such? |
@Wikzo it works for me too, thanks for the tip! |
@Wikzo Aah of course, that's exactly how you should do it since XML. Glad you found a solution! |
Ah, cool. Thanks. I think this would be nice to include in the standard _data.xml example in the future :) |
This prevents the presskit(); installation from breaking the webpage if PHP_SAFE_MODE is enabled. I'm not sure if it's the most elegant fix to do so, but it solves the problem. It does not carry out the whole installation process(I am still working on this), however the functionality to connect to a FTP server (creating directories / deleting and creating files) has been established.