Author Topic: can't create folders or view documentation  (Read 5004 times)

0 Members and 1 Guest are viewing this topic.

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
can't create folders or view documentation
« on: August 16, 2007, 18:46:06 »
Hi Mike. Thanks for creating this package. I am using it on my new website: http://www.ozpolitic.com/cgi-bin/album.pl

I can't seem to create new folders. There is no menu option at the moment. I had three orange buttons come up yesterday at the top, with one to create a new folder, but I got an error after filling out the details, something about a java routine not existing. I'll try to reproduce it when I can see the button again. Also, it asked for the location to put the folder. I had no idea what to enter there.

I can see three orange buttons under the picture I just loaded up.

Also, I can't access http://www.ozpolitic.com/cgi-bin/album.html. I tried playing around with the chmods for that file, but nothing worked.
Founding member of

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #1 on: August 17, 2007, 03:21:00 »
I have reproduced the error:

http://www.ozpolitic.com/cgi-bin/album.pl?admincreate=1;album=

Directory (filesystem) name: album

Enter your new title: test

Owner: left blank because there were no options in the list

description: test

Who can view this photo? Anyone



Software error:
Undefined subroutine &main::javaAlert called at /home2/ozpolit/public_html/cgi-bin/Modules/album_admin.pm line 1284.

For help, please send mail to the webmaster (webmaster@ozpolitic.com), giving this error message and the time and date of the error.



also tried with: Directory (filesystem) name: test

Upload button only visible when three buttons under image I loaded yesterday are visible. There were buttons under the image I loaded today, but they are no longer visible.
Founding member of

Offline Mike Bobbitt

  • album.pl Author
  • Administrator
  • I Spend Too Much Time Here
  • *****
  • Posts: 3381
  • Karma: +35/-2
    • Mike's Development Archive
Re: can't create folders or view documentation
« Reply #2 on: August 17, 2007, 14:11:18 »
Hi freediver,

It almost seems like a permissions problem. Can you check to see that the Modiles directory and all files in it are readable/executable? If you have access to the server logs they may help too.

The "missing" javaAlert subroutine is in album_display.pm, can you also make sure that's in the Modules directory? (It seems to be, but maybe the permissions are wrong or something...?)

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #3 on: August 19, 2007, 00:37:49 »
Thanks for the response. This is what I have:

cgi-bin - 755
Modules - 755

in modules folder:
   
 album_admin.pm 63 k 0755
 album_display.pm 5 k 0755
 album_login.pm 3 k 0755
 album_ratings.pm 12 k 0755
 album_recent.pm 14 k 0755
 album_upload.pm 18 k 0755
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: can't create folders or view documentation
« Reply #4 on: August 26, 2007, 22:23:27 »
You must have solved something! I do get 2 alert boxes:
one tells me I "must be an administrator in order to perform this function" when I try to submit a new album create request on your site,
the second says "cannot create album directory test..."
Both are appropriate responses to someone who's not logged in.


Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #5 on: August 26, 2007, 23:49:06 »
I haven't been able to produce those alert boxes. I've tried as a guest on the yabb forum, as a regular member and as the administrator. I always get the same error message.

I'll try from a different PC next time I get the chance.

I added a folder via the cpanel which worked OK, but I want my members to be able to create folders.
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: can't create folders or view documentation
« Reply #6 on: August 29, 2007, 16:32:04 »
If I try this link without logging in, http://fristersoft.mine.nu/cgi-bin/album.pl?admincreate=1;album=
then I get the same results on my site as I do on your site.


If I disable java support in the browser, then what I get directly after clicking "create album" is
Quote
ERROR: Line 935 ()
Cannot create album directory: test (No such file or directory)

and no alert boxes.

Also, html files typically can't reside in the cgi-bin directory. You should move them to your file root or some other static content directory.

If you feel like sending me your config file and a test login to your forums I could try to debug.

JJ

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #7 on: August 29, 2007, 20:22:13 »
What config file? I noticed a lot of the files in the cgi-bin directory are ".tml" rather than ".html".  Is that a problem?

If I move the files, won't that screw with the program?
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: can't create folders or view documentation
« Reply #8 on: August 29, 2007, 22:57:38 »
config file = album.cfg,  If you want to mail it to me.
tml files are the template files which contain snippets of html, perl and java, used to define the look of your album site.

The orange buttons you're now missing are related to being logged in as the admin or displaying your own member album.

If you allow per-member uploads:
a) each member gets their own album (named after the member),
b) each member can create sub-albums within their album
c) each member can upload only to their album. If that's not the intended destination for the photo, then they can move it afterwards to any other directory where they have write permission.

If you allow uploads, but they are not per-member,
a) only the overall admin can create albums after logging in (and assign another owner, and overall permissions)
b) members can upload to any album where admin has given permission
c) Only owners and admins can move or delete a photo.

Seems you've set your cfg without per-member uploads. While logged in to your site, I was able to upload photos and then move and delete them, but I am unable to create an album. If I force the admincreate parameter I get the same undefined routine error you stated originally. Therefore, I am not one of your album administrators.

When I'm not logged in to your site at all and try to force admincreate, I get the alert boxes.

When I do the same tests on my own site, I always get the alert boxes.

Conclusion: I'm puzzled. If i use the debug code from your cfg file, I could trace the error better.

Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #9 on: August 30, 2007, 02:49:46 »
OK thanks for that explanation. It sounds like per member upload is what I want. I thought this option was the more restrictive one.

So I changed it to per member, but now I cannot upload photos any more. I get the following error:

Cannot write to file: /home2/ozpolit/public_html/album/members//descriptions.txt (No such file or directory)

I also cannot create albums.
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: can't create folders or view documentation
« Reply #10 on: August 31, 2007, 09:57:52 »
I apologize for passing incomplete info.

Add your member name to the default_admins list so you can manage all albums.
Then create an album called members (name must match what you have in album.cfg)

With per_member=1, you need to create the "members" album equivalent to the /home2/ozpolit/public_html/album/members directory before it can be used by everyone else.

As to the
Quote
Undefined subroutine &main::javaAlert called at /home2/ozpolit/public_html/cgi-bin/Modules/album_admin.pm line 1284.

error you get when invoking http://www.ozpolitic.com/cgi-bin/album.pl?admincreate=1;album= :
If not logged in, I get the alert boxes. If logged in, I get the error message. With either login status, but with the debug parameter on, I get the alert boxes. So, I've gotten nowhere on that.


Offline freediver

  • album.pl Tester
  • **
  • Posts: 27
  • Karma: +0/-0
    • OzPolitic
Re: can't create folders or view documentation
« Reply #11 on: September 02, 2007, 22:36:35 »
Thanks. I just checked with a non-admin account and it uploads photos and creates user sub-folders properly. Haven't checked on moving photos around yet.

Problem: It doesn't seem to recognise that I have logged out and logged back in as someone else. I have tried refresh and ctrl-F5. Even if I upload and enter in the new name and pwd, it still uses the one I was logged in under earlier.
« Last Edit: September 02, 2007, 22:57:52 by freediver »
Founding member of

Offline frister

  • album.pl Donor
  • album.pl Hacker
  • ****
  • Posts: 230
  • Karma: +42/-0
  • half baked ideas are better than none
    • fristersoft travelogue
Re: can't create folders or view documentation
« Reply #12 on: September 03, 2007, 16:33:01 »
If you log in through the forum, it uses the forum's cookies. Logging out of the forum deletes the forum cookies. Then, refreshing the album page shows that you're not logged in.

If you log in through the album, it creates cookies based on the album, and based on www.ozpolitic.com rather than just ozpolitic.com. Since you don't display a logout button, the cookies won't get deleted until you exit the browser.

Simplest would be to  remove the login button from the album page by commenting or deleting the line that says ####LOGIN#### from album_header.tml. As an alternative, you could edit album.pl where it creates the login tag so that it points to the forum's login page.

Glad the other stuff's working.