folderblog
What is folderblog?
Folderblog is a free PHP script that automatically displays the images placed in a given directory, no database needed. It can be used as a blog or gallery — and anything in between.

» demo blog   » learn more   » download now

Discussion
Cant get it to install(back to index)
Hi guys. I've been trying to install FB3, but it simply doesn't want to co-operate. I've tried following all the instructions in the documentation.

For one thing, my vars.php file doesn't seem to have the same variables in as the example posted in the InstallingFolderBlog page, and the visual guide isn't working.

Here is the code that arrived in my file

<?php
$blog_title = "folderblog 3.0"; // Blog Title
$pass = ""; // Password
$email_comments_to = ""; // Enter an email address for new comment notification
$sort = 0; // 0: Sort by file modified date; 1: Sort alphabetically by filename
$allow_comments = 1; // 1: Allow comments; 0: Disable comments

$reverse = 0; // 0: Newest photo first; 1: Oldest photo first
$loop_photos = 0; // 0: Normal; 1: Photos loop around
$include_cats = 1; // 1: Include subcategories in main directory; 0: do not include categories

$thumb_maxsize = 100; // Maximum dimension for a generated thumb (in pixels)
$square_thumbs = 0; // 0: Normal thumbs; 1: Thumbnails are square (cropped)
$show_thumbs = 5; // Number of thumbs to show on main page
$show_empties = 1; // 0: draw empty $thumb_format box; 1: don't draw box

$rand_thumbs = 0; // Display how many random thumbnails?
$require_captcha = 1; // 1: Require CAPTCHA on commenting; 0: don't require CAPTCHA

$fbrss = "rss.xml"; // filename for RSS feed; leave blank for no feed
$template_name = "template"; // template filename prefix (i.e. prefix_main.php)

$photo_directory = "photos/"; // Directory for photos (with trailing slash)
$captions_directory = "photos/"; // Directory for captions
$comments_directory = "comments/"; // Directory for comments
$thumb_directory = "thumbs/"; // Directory for thumbnails
$file_extension = ".jpg"; // File extension to index
?>

I have php 4.3.11, so it's not that, but when the files are in the root directory, i simply get nothing from putting post.php into my browser. Please help.
posted by EotL on 17 Jun 05 at 12:52 PM
every article in the wiki (as far as accessible) is adressed to v2.02 folderbloggers. all you need to know about fb3 beta is in the latest forum entries or the "learn more" section.
1) extract then upload all files from the fb3b.zip
on your webspace.
2) create the subfolders (like shown here)
3)upload a few images into /photos directory for testing ---> done! you can now go to step
4) open your browser and point to your fb.php or whatever name you assigned to it
if you should run into any problems, post again (and forget the wiki for the moment)
posted by erik on 17 Jun 05 at 1:34 PM
There's no more post.php. Go to fb.php/post/ instead.

I'll get around to fixing up that documentation shortly.
posted by donald on 17 Jun 05 at 6:04 PM
Can't get this installed either...I goto mysite.com/index.php and get [No image files found in photos/index.php/. Please upload files or confirm directory location and permissions.]
if I put a / after the index.php I get [No input file specified.]

I've set the folder permissions to 755 even tried 777 no dice.

I'm not super savvy with webprogramming- My work is more on the photo and traditional design side. Do I need to update any info within the files provided, i.e. hostname, etc...that's not very clear to the novice.
help.
PS if you try to look at my site it autodirects to one of my other sites, I think because there is no index file it recognizes- could this be the problem?
posted by Garrison on 21 Jun 05 at 2:00 PM
just tried moving the directory into it's own photoblog directory within projectblur.com and still no luck.
posted by Garrison on 21 Jun 05 at 2:03 PM
Garrison, someone else has the same (baffling) error. I can't duplicate it on my script, so I'll post some debug code later this afternoon that the two of you can try out.
posted by donald on 21 Jun 05 at 2:54 PM
sounds great! Incidentally if it helps, my hosting service is using php4.3.10 hosted on linux based machines- don't know what version...I know that can be looked up though. I'm not setting up a DB for this right?. I'm posting files from an OS X Tiger machine using Transmit (panic.com)
posted by Garrison on 21 Jun 05 at 3:10 PM
Garrison, could you create a file called info.php in your folderblog directory that contains
<?php phpinfo(); ?>
?
posted by donald on 21 Jun 05 at 3:44 PM
here ya go
http://projectblur.com/photoblog/info.php
posted by Garrison on 21 Jun 05 at 8:37 PM
Garrison, thanks. I think I may have snagged the white page/no images bug, but the "No input file specified." one seems to be tied to your host (running PHP-as-CGI) rather than folderblog — you get the same error when you add a slash to the info.php file. I'm not sure if I can work around it — might you ask your host's tech support about the error?
posted by donald on 22 Jun 05 at 12:31 AM
https://panel.dreamhost.com/kbase/index.cgi?area=2933

This tech string may shed some light on things- any suggestions? Take a look at the fix for n74's problem- it sounds similar, but I might as well be reading greek. I have no idea what this support thread is really saying, but it looks like it might help.
posted by Garrison on 22 Jun 05 at 11:26 AM
Garrison, I (hopefully) got it. Try unzipping this file to your folderblog directory, and upgrading to the newest version (fb3b06.zip).
posted by donald on 22 Jun 05 at 5:20 PM
Running into the same issues that Garrison was having above. We happen to be on the same webhost (dreamhost). I've installed two instances of folderblog on my site (one v2, one v3 beta). Version 2 is working fine:
http://shutter.dirtystylus.com/folderblog/folderblog.php. Version 3 gives me the same 'No input file specified' error: http://shutter.dirtystylus.com/folderblog3/fb.php. I've tried unzipping the .htaccess file, but i get the same issue. Just wondering if you were able to resolve this. Let me know if you want me to try anything on my server.
posted by Mark Llobrera on 29 Jun 05 at 3:28 PM
Mark, thanks for the response. The problem with dreamhost is that the fb3 style URLs aren't allowed when running PHP-as-CGI. Because my server isn't running PHP-as-CGI, I'm just making educated guesses about what will work. I went over the .htacess file more closely, though, and try either redownloading it or just replacing the text with:

# Start folderblog redirecting 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule fb.php(.*)$ ?cgi_uri=%{REQUEST_URI}
</IfModule>
#End


Let me know if it works.
posted by donald on 29 Jun 05 at 4:13 PM
Thanks for the quick reply. I tried that and it just gives me the directory listing.

I can open a ticket with my webhost's support team if you let me know what to ask for - this mod_rewrite stuff is over my head, so I don't really know what to tweak in the .htaccess file.
posted by Mark on 29 Jun 05 at 4:58 PM
Ack, try this one:
# Start folderblog redirecting 
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule fb.php.*$ fb.php?cgi_uri=%{REQUEST_URI}
</IfModule>
#End


(If it's not evident, this mod_rewrite stuff is over my head as well. But I'm really hoping this one will work.)
posted by donald on 29 Jun 05 at 5:05 PM
That didn't work either. I'm going to do some more digging for related issues on my webhost. Thanks for the help so far.
posted by Mark on 29 Jun 05 at 5:38 PM
Mark, sorry I haven't been able to sort it out. The DreamHost support page on the issue says:
"Variables in the URL won't work without using mod_rewrite (example.com/blah.php/username/info/variable)."

What the .htaccess is trying to do is catch all requests for fb.php* and pass the request URI as a query string variable (cgi_uri).

The rewriting works on my server, and query strings seem to work fine on your site, so I'm not sure what the problem is. But let me know what you can figure out.

(If worse comes to worse, it seems you can disable PHP-as-CGI or configure your own php.ini — see the link above.
posted by donald on 29 Jun 05 at 6:01 PM
Thanks again for trying. One more thing before I start messing with this on my own - does the fb.php file expect a url in the format (fb.php/image/sf_2005_11/)? I'm just trying to figure out what I should be rewriting the clean urls to. Should I be aiming for something of the format (fb.php?image=sf_2005_11) and will the script handle that?
posted by Mark on 29 Jun 05 at 6:08 PM
fb.php can take URLs in three formats, really:
Preferred format:
- fb.php/image/sf_2005_11/ (no category)
- fb.php/people/sf_2005_11/ (category)
- fb.php/post/people/sf_2005_11/ (post)
- fb.php/people/sf_2005_11/comments/ (comments)

cgi_uri format (this is what I was trying to point to with mod_rewrite):
- fb.php?cgi_uri=/folder/fb.php/image/sf_2005_11/

fb2 backwards compatible format (deprecated):
- fb.php?image=sf_2005_11
- fb.php?cat=people&image=sf_2005_11
- fb.php?comments=sf_2005_11

If it's not too much trouble, can you try one last shot in the dark for me? Replace your .htaccess file with
php_value cgi.fix_pathinfo 1

This attempts to change the cgi.fix_pathinfo ini value automatically — I'm assuming the value can't be changed at this point (i.e. you'd have to recompile), but it's worth a try.

Hope you get it sorted.
posted by donald on 29 Jun 05 at 6:29 PM
after struggling with this for hours, I finally solved the htaccess need for PHP as CGI users (Dreamhosters et al)

RewriteEngine On
RewriteRule ^index.php(.+) /fb/index.php?p=$1

note: you should change the index.php filename and fb directory to whatever you're using (default: fb/fb.php)
posted by geoff on 8 Nov 05 at 4:59 PM
other notes... the concept of doing this is a bit complex but most non-coders trying to deal with php as cgi can grasp it if they take care:
1. the $use_alt_url variable in fb_settings.php needs to be set to 1 (or true). This is because what the mod_rewrite does is mask the fact that you are not showing the 'p=...' in the URI, but it is there, hidden. The script you request is not the script that the server interprets when you're mod_rewriting with htaccess.
2. if you're using Dreamhost with extra security enabled, you may find that your htaccess file to rewrite uri's in your fb directory mysteriously appear in your parent directory, possibly screwing up subdirectories of that parent directory. My solution has been to keep a blank .htaccess file in the parent folder and then WATCH IT everytime I make a change to my fb's htaccess.
3. The final glitch I've found in my solution is that the fb.php file links will be turning up as index.phpimage/filename.jpg instead of index.php/image/...
The solution to this is to put a slash after the three instances of $fbfile$post in your fb.php (my index.php) file.
posted by geoff on 9 Nov 05 at 1:57 AM
Post a Reply:

Name:    Remember me
URL:    
(include http:// or mailto:)
(back to index)