Search…

X3 Photo Gallery Support Forums

Search…
 
shaman
Topic Author
Posts: 22
Joined: 12 Nov 2008, 14:40

CHMOD problem

13 Nov 2008, 10:48

I'm experiencing problems with CHMOD with my imagevue copy, I'm running php 5 and this versions sets 600 instead 644, so I'm gettin an error 403 instead image can I change this somewhere in upload module in imagevue? I know that in the old version of imagevue 1.x that was in uplod.php file, but couldn't find it in V2.

I'll be very grateful for any help

Cheers

Shaman
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

13 Nov 2008, 11:34

You probably could look in imagevue/admin/controllers/indexcontroller.php near
Code
	/**
	 * Upload file
	 *
	 */
	function uploadAction()
or better yet get it touch with your hosting support
firedev.com
 
shaman
Topic Author
Posts: 22
Joined: 12 Nov 2008, 14:40

13 Nov 2008, 12:02

In the old version I've put something like this:
Code
			$copy = move_uploaded_file($tmp_name,'../'.$path.$file_name); 
			chmod('../'.$path.$file_name,644);
		} 
but in the new version it doesn't seems to be working :(
Code
			$result = @move_uploaded_file($imageData['tmp_name'], $fullpath);
			chmod('../'.$path.$file_name,644);
Have You got any clue what should I change? I'm certain that it's not that hard to do, problem is that I'm not a php expert ;-)

I know that this issue it's because of the new PHP 5 security update, which is changing CHMODS automatically, so it's an important issue, to be solved!
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

13 Nov 2008, 15:39

I think it should be 0644, not 644. Octal, you know.

http://php.net/chmod
firedev.com
 
shaman
Topic Author
Posts: 22
Joined: 12 Nov 2008, 14:40

13 Nov 2008, 16:35

Yes, I know, I tryied both, at the old version was working good, but new doesn't works at all :/
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

14 Nov 2008, 04:18

Not sure what security update you talking about. Do you have a link?
Hard to say why it's not working on your server, second thing that comes to my mind - maybe you should chmod directory first? There is chmod 0777 on files by default.
firedev.com
 
shaman
Topic Author
Posts: 22
Joined: 12 Nov 2008, 14:40

15 Nov 2008, 09:56

Hi
I've been told by my hosting provider, that I'm experiencing those problems because of the new php version which is: 5.2.0-8+etch13.

On the other server, where the uploading script is working properly, there is a 5.2.1 (safe_mode is turned off on both).
Permissions are 777 for folders, and 644 for files on both servers.

Older version of gallery with a different uploading script was working on this server, after I added one line containing chmod command, but new version though have this line already doesn't seems to changing permissions while uploading a new image files.

This might be helpful:
http://bugs.php.net/bug.php?id=42291&thanks=6
 
User avatar
Nick
Imagevue Hitman
Posts: 2872
Joined: 02 May 2006, 09:13

18 Nov 2008, 17:01

Hope they upgraded your php installation too.
firedev.com