Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 22:03

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Problems with chmod
PostPosted: 1. Sep 2005, 01:10 
Hi!

I tried to integrate the gallery into my page...worked fine on my local webserver...but when i upload it to my webspace there were access problems...i tried to set the chmod for some of the directories as it is described in the HOW-TO(How to make it secure) but it did not work. Some directories i had to set chmod to 777 in order to run it without problems. But even with that setting the debug function did not work because it complained about access on the debug file...so i had to disable it.

Any ideas?

Thanks in advance


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 11:55 
The debug file is by default written in the xml folder.

1. check you local installation and check if you find xml/_mydebug.out
If this is fine (not present) you can copy everything to the webserver.
If not - something is wrong - check the debug file

2. depending on your rights on the webserver you have to make the restrictions less strict. Please use a htaccess file then in the directories you want to protect. This is a template for a .htacces file
-- start
<Files .htaccess>
order allow,deny
deny from all
</Files>

IndexIgnore */*
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?domain.com/.*$ [NC]
RewriteRule .(gif|jpg|txt|xml|png)$ - [F]
-- end

you have to save this file e.g. in the xml folder as .htaccess and change the domain name to yours.

It's important to get the debug messages on the webserver - most likley something on your local server is present that is not on the web server - the debug file tells you - try to modify the location of the debug file in the config.php to a directory you are shure you can write to (root is most of the time not good!).

If you have still problems please post a link to the gallery that I can take a look (or use mail if you don't want to post it).

/Michael


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 12:42 
ok for the first:

there are these errors in the debug file when i run the gallery on my local webserver:

09.01.2005 12:37:10 - ERROR 8 in s\seite\gallery\inc\topnavigation.inc.php, line 50: Undefined variable: spaces_printed

09.01.2005 12:37:10 - ERROR 8 in s\seite\gallery\inc\topnavigation.inc.php, line 73: Undefined variable: spaces_printed

09.01.2005 12:37:10 - ERROR 8 in s\seite\gallery\inc\topnavigation.inc.php, line 81: Undefined variable: spaces_printed

second:
that htaccess thing sounds good...may try it...what directories should i secure?

will try to change the path of the debug file on my webspace too and see if that works.

I will report back :)


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 13:15 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
all right,

you have disabled everything in the navigation! Haven't checked this in the last time :).

found it - i forgot to define a variable (normaly php don't care but I have set php to report everything).

redownload the 1.2 and replace the inc/topnavigation.inc.php.

The error should be gone then.

I would wait with the makeing everything secure until everything is running fine.
.htaccess makes sense depending on your settings. If you have private directoies I would protect the xml and the pictures folder. If you just want that your directories cannot be listet - I have index.htm files in all directories to do this.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 1. Sep 2005, 13:21 
ok here is it:

i set now the directories xml, cache and counter to chmod 777

besides the errors i posted above it runs fine now (debug works too)

so it would be good to secure these three directories with htaccess right?

all the other dirs have the normal chmod (755)


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 13:25 
oh read your post too late :)

will redownload the version...thanks!

at the moment i dont have any private galleries (and dont plan to make any)...so no need for htaccess?

listing is disabled by the server (if there is no index file) but as you say you made then in all of the directories so its its fine

Thanks for the fast help! :wink:


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 13:30 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

you only need htaccess if you want to secure more then you can do with the global rights.

cache : 755 is fine
xml : 700 or 770
counter: 755 because the counter.png is in there - with htaccess you could protect the .txt but leave the counter.png accessable.

in 1.3 I will move the counter.png to the cache - than the counter dir can be protected with 700 or 770 as well.

depanding if you want to protect your original images you have to make the pictures folder secure as well. a htaccess file is good here if you use private.png or folder.png - in 1.2 they are accessed directly. if you don't use them - chmod 700 or 770 is fine (if you disable direct download :)).

/michael


Top
 Profile  
 
 Post subject:
PostPosted: 1. Sep 2005, 13:41 
ok...with 777 all works fine and no errors...

will try to change chmod as you suggested in your post.

thanks :D


Top
  
 
 Post subject:
PostPosted: 1. Sep 2005, 23:16 
tried the chmod settings you suggested but with no success :cry:

cache, xml and counter need chmod 777 otherwise i get a Permission denied error
pictures folder works with 755


Top
  
 
 Post subject:
PostPosted: 2. Sep 2005, 09:27 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
seems your php does nor run as your user or in your group.
If you don't have a private folder it should not matter.

If you want to use private folders later you have to deal with htaccess ;).

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 2. Sep 2005, 17:52 
ok, good.

Thanks for the great support :D


Top
  
 
 Post subject:
PostPosted: 26. Jan 2009, 16:14 
Offline

Joined: 26. Jan 2009, 13:31
Posts: 13
Please could someone how to create the .htaccess file. Sorry for such a basic question but Im very new to all this. Do you just use a txt editor or do I need something else?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 26 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy