-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Start the installer directory with a simple installation sanity check
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
include("include/init.php"); | ||
|
||
# In theory, this should just be checked right after installation but before users start signing up | ||
# as it is purely an administration issue. | ||
login_ensure_loggedin(); | ||
|
||
# Per the README, if you are using Flickr PuSH backups (for photo uploads and faves), | ||
# your static directory will need to be writable by the web server. | ||
# Instead of doing tricky-dicky stuff to figure out the user of the web server process | ||
# and various Unix privileges, we'll simply try to write to the directory, if it works, | ||
# thumbs up and congratulations. Not sure what the best way to do this for S3, without poking | ||
# at it (and that case should be a lot more obvious if it doesn't work. | ||
|
||
|
||
$is_s3 = false; | ||
if ($GLOBALS['enable_feature_storage_s3']) { | ||
$is_s3 = true; | ||
} else { | ||
|
||
$path = $GLOBALS['cfg']['flickr_static_path'] . "/test"; | ||
|
||
$can_write = @mkdir($path, 0755, true); | ||
|
||
if ($can_write) { | ||
$cleaned_up = rmdir($path); | ||
} | ||
} | ||
|
||
$GLOBALS['smarty']->assign('is_s3', $is_s3); | ||
$GLOBALS['smarty']->assign('can_write', $can_write); | ||
$GLOBALS['smarty']->assign('cleaned_up', $cleaned_up); | ||
|
||
$GLOBALS['smarty']->display("page_account_installation_check.txt"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{capture assign="page_title"}your parallel-flickr installation check{/capture} | ||
{include file="inc_head.txt"} | ||
{include file="inc_account_head.txt"} | ||
|
||
<div style="background-color:yellow;border:1px solid red;padding:10px;">Warning: This page does various sanity checks for your hosting to make sure that parallel-flickr can run properly. Information about your system can and will be leaked if this file is left hanging around. After checking that things work, please move this file back out of the web root or delete it.</div> | ||
|
||
<div style="font-weight:bold;text-decoration:underline;margin:10px 0px;">Static File Storage</div> | ||
{if $is_s3} | ||
<p>You have S3 enabled. If you can run any of the backup scripts and see photos being stored, it works!</p> | ||
{else} | ||
{if $can_write} | ||
<p>Your web server <span style="color:green;font-weight:bold;text-decoration:underline;">can</span> write to your static storage directory. This is good as it means you can make use of the push backups features, amongst other things.</p> | ||
{else} | ||
<p>If you want to make use of the PuSH backup scripts, you'll need to make sure that "{$cfg.flickr_static_path|escape}" is writable by your web server. Currently it is not!</p> | ||
{/if} | ||
{/if} | ||
|
||
{include file="inc_foot.txt"} |