PDA

View Full Version : Cmotion 403 error



derfalcon
03-04-2009, 01:20 AM
Hi John, very grateful that you and others are still looking after this marvellously simple script -- I'd like to pose my question as follows:
1) Script Title: Cmotion gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm

3) Describe problem: I have missed something in my config because I am receiving a '403' error when the new window pops up -- my images directory that I have set the path to is set to '755' I also tried '777' briefly.

http://www.kayleenkauffman.com/gallery.html
(there's another simple gallery on the page)

Also, apologies if you have answered this in a previous thread, but is it possible to have the large image open on the page instead of in a new window?

Thanks in advance everyone, I have not been coding in a long time and forgot all about DD, good to see it's still thriving!

DF

jscheuer1
03-04-2009, 04:42 AM
The best thing to do about that would be to take it up with your host. Something is obviously set wrong, but they may prefer it that way as a security measure, or it may just be an error on your part that they can help you with. It's been a long time since I've had to concern myself with folder settings (my current FTP client takes care of that stuff automatically), but I do remember that the chmod (or whatever it's called) for a folder - to make it accessible - is a different number than the one for a file - that might be what you are doing wrong. Or there may be a .htaccess file involved. If so, settings in it would have to be altered or the file removed. But regardless, if your host wants things this way, you cannot change them unless they allow you to. The images are accessible, just not from the root of the image folder, which obviously has some odd setting and is required to be accessed separately when opening into a separate window.

To answer your other question, you could do this (addition highlighted):


<script type="text/javascript" src="/script/motiongallery.js">

/***********************************************
* CMotion Image Gallery- Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
* Modified by Jscheuer1 for autowidth and optional starting positions
***********************************************/

</script>
<script type="text/javascript">
function enlargeimage(path){ //function to enlarge image. Change as desired.
document.images.myspot.src = path;
}
</script>

Then place this anywhere on your page in the body section:


<div>
<img name="myspot" src="/images/image_02.jpg" alt="">
</div>

derfalcon
03-04-2009, 03:35 PM
John,

I will check my folder settings again as well, pointing out that folders have different permissions rang a bell, I'll read up on it and contact my hosting company which I just started using.

Thanks so much for your assistance, I'll give it a shot and let you know how it works!

Jeff

Edit: I added that snippet and it resolved both questions! I'll tuck something in paypal for you when I have a chance.

Thanks again!

jscheuer1
03-04-2009, 06:32 PM
Looking at the permissions on the two most frequently used servers for me here shows one has:

folders: -rwxr-xr-x
files: -rw-r--r--

Which is:

folders: 755
files: 644

The other:

folders: -rwxr--r-x
files: -rw-r--r--

Which is:

folders: 745
files: 644

So, perhaps you have tried to grant too much access to the folder and as a result had it automatically revert to something else, or just remain the same as it was.

Also, you should be able to look at the directory listings to see which permissions are actually set for both files and folders using the ls command, or just looking at the listing if one is already provided in your folder view (if any) that you have.

If you cannot chmod successfully, either you are doing it wrong, are not allowed to, or not allowed to chmod to the number you are using.

If you are chmodding successfully and aren't getting the desired result, there is another issue, probably something set on the server side by your host.