PHP Ajax File Browser 2.0.1

A new version of PHP Ajax File Browser is now available. It fixes two major problems:

  • Fixed normal user account admin privileges bug
  • Fixed accented characters prevented from listing. Still has some display problems in IE6.

Download

Be Sociable, Share!
This entry was posted by jc on Monday, November 13th, 2006 at 10:29 am and is filed under Ajax File Browser. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

38 Comments : Leave a Reply

  1. [...] Update: Version 2.0.1 is available. Update post found here. [...]

  2. Scott says:

    Very nice! I was quite happy to stumble across your PHP Ajax File Browser as I was looking for an easy way to set up a shared folder on my web server.

    The only thing missing (or maybe I just couldn’t find it?) – is the ability to create a new directory. Any chance that might make it into a future release?

  3. jc says:

    Perhaps, although I’m toying with the Yahoo UI Library lately, and I’m thinking of vastly improving the look and feel of the application. At the moment, I’m unsure how to implement a schmick directory creation interface. It’s on the board though :)

  4. Scott says:

    Good to know it’s at least a “maybe” or “someday” feature! ;-)

    I’ve also thought of another feature request — I’d love to have a setting that would allow me to force unique names (i.e., protect against overwriting files). Ideally, it could be set on a per share basis. I’m trying to set up a system where colleagues can upload their edits for others to view, but not overwrite the originals (and you can’t always trust folks to remember to rename the file before uploading).

    Thanks again — keep up the great work!

  5. jc says:

    Hmm yes I have thought of that, but not really applied an example to those thoughts.

    I must admit I’ve made this feature aleady, but only for shares with upload permissions but not listing permissions, because a user can’t see the existing files they shouldn’t be able to overwrite them.

    So in essence, it would take 1 minute to add that feature, as an option for file uploads.

    Maybe I should keep a feature list..

  6. adam says:

    Hello,

    First of all, i’d just like to say what a great idea this is and how cool of you to make this opensource!

    Second thing though (and I know you aint a tech helpline, but I just wanted to ask); I can’t seem to make it work on my server, here is what i have done and the outcome:

    I have unzipped to a new directory (htdocs/bla/) and then CHMOD’ed to 777 temp. then opened up ./bla/index.php

    But when I do this I get an error 505 Internal Server Error.

    What could cause this, have I uploaded something wrong or is there an initial config.php thing to set up that I’ve missed?

    Cheers mate!!

    PS. Added this site to Stumbleapone now :)

  7. jc says:

    Hi adam and thanks for the rap. Good news! I know what’s going on there.

    In the zip file there is a file named “.htaccess”. It is meant to alter some php values, but some hosting providers don’t support this method and produce the 505 message. You can safely delete the .htaccess file, it only exists to enforce UTF-8 stuff anyway.

    From my experience, if you find this problem again with other applications, you should be able to create a php.ini file to replace the .htaccess file. You would only specify the php values you want to change in that file. Double check with your host to be sure.

  8. have a Portuguese language ?
    if not, want you PHP Ajax File Browser 2.0.1 translated for Portuguese ?

    PS> : Congratulations for this great JOB – Works fine in my Home/Work

  9. David says:

    Hi

    AjaxFB dont work with PHP 5.0.4

    Notice: Trying to get property of non-object in /var/www/vhosts/includes/functions_afb.inc.php on line 62

    Notice: Trying to get property of non-object in /var/www/vhosts/includes/functions_afb.inc.php on line 62

    Notice: Undefined index: share in /var/www/vhosts/index.php on line 41

  10. David says:

    Hi again
    Notice: Trying to get property of non-object in /var/www/vhosts/includes/functions_afb.inc.php on line 62

    The error is present in

    if ($afbAccount->account['account_admin'] == ‘yes’)
    {
    $perms = array(‘r’=>true,’dl’=>true,’ul’=>true,’del’=>true);
    return $perms;
    }

  11. jc says:

    David, I’ve installed 5.0.4 myself and didn’t get any errors. One thing you could do is run the phpinfo() page and save it, send it to me. Also, you could export the database tables (removing any passwords) and send that aswell.

  12. DNAphil says:

    I tried to install this program on a Linux system running Apache 2, PHP 5.1.4 and MySQL 5.0.18. The install page is fine, but when the page reloads I get the following errors at the top of my page:

    Notice: Undefined variable: REMOTE_ADDR in /var/www/html/ajaxfb/includes/settings.inc.php on line 3

    Notice: Undefined variable: HTTP_SERVER_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 23

    Notice: Undefined variable: HTTP_GET_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 24

    Notice: Undefined variable: HTTP_POST_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 25

    Notice: Undefined variable: HTTP_COOKIE_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 26

    Notice: Undefined variable: HTTP_POST_FILES in /var/www/html/ajaxfb/includes/magic_quotes.php on line 27

    Notice: Undefined variable: HTTP_ENV_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 28

    Notice: Undefined variable: HTTP_SESSION_VARS in /var/www/html/ajaxfb/includes/magic_quotes.php on line 31

    Notice: Undefined index: default_theme in /var/www/html/ajaxfb/includes/auth.inc.php on line 99

    Notice: Undefined index: share in /var/www/html/ajaxfb/index.php on line 26

    Any ideas?

  13. David V says:

    Hi jc,

    I wrote a message here yesterday but apparently it was never posted.

    First of all, thanks for the ajax file browser. It is a cool looking script that is very easy to use.

    feedback about installation: once I got it installed (a couple of minutes) and I tried to log in, I got the message below the login screen that there was a problem with my details. I tought I had misspelled the username or entered a wrong password. So I tried again but still no luck. After a while I realized I was already logged in and that I could go to the admin area. After I started adding shares and user groups I did not get that warning anymore when login on.

    I also changed the theme to red. I noticed that when you initially load the page, you will first see the blue theme but after a second it becomes the correct red theme.

    If you are thinking about adding more features to this beautifull script then here are a few things you could think of:

    - possibility to create folders
    - unique filename when uploading
    - upload progress bar
    - possibility to friendly file names (or descriptions) instead of real filename
    - black theme

    thats about it. If I think of more features I will post again. Keep up the good work.

    Greetings,

    David

  14. jc says:

    DNAphil, Error reporting settings in your PHP.ini file on your server.

  15. jc says:

    Some useful ideas there. There is one thing I don’t have the ability to achieve, progress bar on file uploads. We all know that the browsers of this world are terrible at displaying this important information. There are ways to get this done, one involves AJAX and a modified PHP/Apache installation (not possible for everyone). Another involves using Flash to upload, which is something I’m not familiar with. Instead I usually provide a ‘Please Wait…’ dialog in my other apps. It will find it’s way into this one too.

    Oh and about the “possibility to friendly file names (or descriptions) instead of real filename” request.

    The purpose of this app is to list and display a file structure dynamically, without constant maintenance in a web admin. To achieve a friendly filename and description thereof, you would have to edit these values on a per file basis, making administration a tedious job. I’m sure there are other applications out there that can allow that, but it conflicts with the main purpose of the application, sorry.

  16. David V says:

    Hi jc,

    you are right about the friendly names, it would probably make it harder to maintain and slower. Better like it is now. Easy and fast.

    I am having a small issue I can’t really get a grip on it. This problem happens only with IE7. Firefox is no problem. If you have IE7, go to my page, http://www.kiekjesalbum.com/MioSoftware/
    and without clicking opening any other folder, click on “Oki ROMS”. So far so good. But now, if you click on the folder above it “Mitac ROMS”, then the folders under Oki ROMS are totally offset. This will only happen sometimes when you open a share from down the list and then open a share higher in the list. Strange…

    About the progressbar, I am trying out a few ones for myself. This one could be usefull http://thinkingphp.org/demos/cake-timer/ but I have not tried that one out yet on my site.

    greetings,

    David

  17. jc says:

    Indeed that is a problem. I’ve recently encountered this even with firefox on other projects. I don’t have a solution for it though. I plan to use the Yahoo UI library in the next version, which provides some useful tools like a Treeview. Apparently, you can upload files using AJAX with it too, but haven’t found a practical example of it.

    The CakeTimer also uses a Perl script, which would mean windows users have to install Perl too :(

  18. Eric says:

    Great app. i would like to see shares within shares so I can have a deeper hierarchy of folders.

    any chance of that happening?

  19. Eric says:

    Nevermind i see how you do it. Just make subfolders under the main share. Nice, but not obvious at first

  20. Juan says:

    Hi,
    Great application!! It is hard to find something that works like this around on the net.
    Unfortunated I haven’t be able to install it.
    Please help anyone!
    here is link to my phpinfo() http://www.sampleinstruments.com/test.php

    Thanks in andvanced!

  21. jc says:

    Well, are there any on screen errors? what do you see when you try to view the site?

    [Edit] As a resolved note here, after discussions with Juan, Mysql was not properly installed within PHP, and errors are suppressed.

  22. David V says:

    Hi jc,

    I have recently noticed that IE6 does not display folder names correctly when they contain spaces (whitespace) in the folder names.

    If you can, check my website with IE6 and you will se what I mean when you open up the shares. Also the icons of the shares disappear in IE6 when you open a share.

    greetings,

    David

  23. jc says:

    I hear you david, and I must say I don’t normally voice my hatred for IE6 publicly, but that browser will be the death of us all!

    You have no idea what lengths I had to go to just to make the AFB theme work in IE6. Although, from a professional point of view, I should have done a better job in the first place.

    However, the spaces being converted to %20 things in IE (and other escaped characters) is a Javascript problem that I haven’t been able to put my finger on. I haven’t looked at the code for a while now but from memory IE6 does not unescape characters, when I use the unescape() function. Works in everything else though!

    I’ve got some time off work over xmas, and i hope (don’t hold your breath) that I will get a chance to work on version 3, with most of the features requested and a new gui.

    As a side rant, why the hell won’t MS allow every copy of windows the opportunity to use IE7 without authentication? Sure they’re getting ripped off, but as I see it, if the software is a ‘Critical Update’ then everyone should get it like every other critical update. I don’t condone software piracy, but for the majority of the population that does, they’re stuck with a non-standards compliant browser. It’s a mistake that is continuing to cost designers time and money.

  24. David V says:

    I can imagine how much effort it must have taken to make it work on IE6. I use IE7 and firefox so for me it’s not a problem.

    If you are thinking about version 3 (no pressure :-)), there is something that you might consider adding: file resume functionality to download.inc.php. Pausing a big download would be nice. Or the ability to use a tool like Free download manager to open more than one section to the same file to download.

    I have some sample code (http://nl2.php.net/fread) but I have not tested it myself. If I get it working on the fileajaxbrowser I will let you know.

    greetings,

    David

  25. jc says:

    That is an awesome idea. It’s been a passing thought in many projects but I’ve never checked it out. The example looks easy enough, I could modify that before the next version…

  26. Mike says:

    Sorry to bother.. is it possible to change the max upload size?

  27. jc says:

    Well it seems that your htaccess file doesn’t like php values being set, which would indicate that your hosting provider may support php.ini files aswell. You should be able to upload a php.ini file that contains only the values you want to change.

    The values you would set are:
    - post_max_size : The total size of the POST and all files being posted.
    - upload_max_filesize : The max size of each individial file being sent.

    Don’t forget to put the values beneath a [PHP] section.

    If your host doesn’t support php.ini files, you can try to change the values on the fly with the ini_set function; put these lines anywhere in the /includes/config.inc.php file:

    ini_set(‘post_max_size’,’50M’);
    ini_set(‘upload_max_filesize’,’10M’);

    But I suggest you try the first method first.

  28. Mike says:

    Oh thank you thats a very nice thing to know for the future as well. PS, i don’t know if you’ve heard of it or if your interested but there’s this cool wordpress extension called ajax comments. I don’t even know if it will work with your theme but I just thought I’d share. Thanks again.

  29. Mike says:

    Hey, I was just having the hardest time blacklisting a file. I thought maybe it was the characters in it or something, so I kept playing with it till it worked. It turned out, the characters were fine, the spaces, the capital letters, all ok except… when you blacklist a file you must have it all lowercase even if the actual file has caps in it. I don’t know if you realized this or if it’s even fixable. It’s not a huge problem but I just thought I’d mention it to possibly save somebody else from getting frustrated over something so easy to fix. :)

  30. jc says:

    Yes that is a good point. Thanks for finding the bug! Will fix in next release.

  31. Nick says:

    So with the new version, what database and tables do I need to set up?

  32. jc says:

    They will probably be the same, and the install script will handle all the updating and inserting anyway.

  33. BBY says:

    I have unzipped to a new directory (public_html/ajupload/) and then CHMOD’ed to file install.php 777 . then opened up http://bupbeyeu.net/ajupload/install.php

    500 Internal Server Error

    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator, webmaster@bupbeyeu.net and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    ——————————————————————————–

    Apache/1.3.36 Server at http://www.bupbeyeu.net Port 80

  34. jc says:

    Refer comment above:
    http://blog.jc21.com/2006-11-13/php-ajax-file-browser-201/#comment-95

    And the comment following that for the solution.

  35. Kelly says:

    I am on the login page (index.php) but it seems that I can’t get the right username and password. I assume the login info is in afb_accounts table, right? I can’t log in for some reason. Any idea why? Thanks a bunch,

    Kelly

  36. Kelly says:

    Nevermind, i made it working by switching to IE 6. it wasn’t working for Firefox/2.0.0.1. Will there be new updates that fix this problem? Thanks a lot. Great application!

  37. Jurek says:

    Can’t get the file
    http://blog.jc21.com/files/ajaxfb_2-0-1.zip

    Error 404 – Not Found

  38. jc says:

    That’s because version 3 has replaced it:
    http://sourceforge.net/projects/ajaxfb