coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 permissions => Topic started by: desrtfx on July 08, 2006, 10:56:29 AM

Title: Error when setting Album Permissions
Post by: desrtfx on July 08, 2006, 10:56:29 AM
Hi all!
Maybe that issue has been raised before and I didn't find it - if that's the case - sorry for me repeating.

I installed coppermine gallery on a freebie UNIX server (1500mb.com) where PHP is running in safe mode, mysql DB, etc.
Installation completed successfully, folder permissions are set correctly, but I get an error.

My albums contain no images (yet) as I am still trying to work out album permissions.
Whenever I try to assign album access to a particular user group (any of my self-created groups) I get the following:
Parse error: syntax error, unexpected T_ARRAY, expecting T_STRING in /.../copper/include/mailer.inc.php on line 2168
Line 2168 reads:    function Mail($from)

I have set all e-mail notifications OFF.

Basically, what I want to do is to have one public album and two private albums to restricted user groups.

Hope that anybody can help with that matter.

Regards,
Georg (desrtfx)
Title: Re: Error when setting Album Permissions
Post by: Abbas Ali on July 08, 2006, 11:42:37 AM
Replace include/mailer.inc.php with a fresh copy. That file is corrupted.
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 08, 2006, 02:26:02 PM
First of all, thanks for the quick reply!

Still, I tried to upload the file 5 times from differently downloaded original files of coppermine - same result.
Furthermore, the filesize differs from the one I see on my local machines (could be a Windows/Unix misunderstanding -
I'm a Unix newbie - Windows user determined by company).

I used Filezilla and also the integrated uploader of 1500mb.com

Regards,
Georg (desrtfx)
Title: Re: Error when setting Album Permissions
Post by: Joachim Müller on July 08, 2006, 05:03:40 PM
Make sure to upload using the proper FTP mode, make sure your FTP client is set up to actually replace exiting files.
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 08, 2006, 05:13:32 PM
Yep, did that and even deleted the file on the server prior to uploading.
Still, same result.
Even deleted - logged out (Windows habit) - logged in - uploaded - no change

Maybe something with the php mail config?
Title: Re: Error when setting Album Permissions
Post by: Joachim Müller on July 09, 2006, 12:37:43 AM
The error message you get means that PHP doesn't understand the command. This indicates that something with your version of the file is fishy, as this error doesn't show up for thousands of others. As a result, there must be something fishy with your file.
Just for troubleshooting purposes, create an empty file, name it mailer.inc.php and save it to your webserver (replacing the copy that is supposedly broken). Please report if this temporarily cures your issue.
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 09, 2006, 07:16:33 AM
Will try that and keep you up to date.

I know that Coppermine is reliable - I am using ist on my Intranet since more than a year.

Regards,
Georg (desrtfx)
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 09, 2006, 10:18:21 AM
This is very strange!!!
When I replace the mailer.inc.php with an empty file of the same name, everyting seems to work OK.

On my local machines (Win2K or XP pro) the file mailer.inc.php always is: 84,470 bytes.
On the server (Unix) the size always differs. - My last upload through the server control panel file manager showed: 81,827 bytes.
I can't seem to get the correct filesize, no matter from which client PC I try to upload or by which means.

Well, I don't strictly need the mailer functions anyway, since all albums created will be view only. I will be the only uploader.

Regards,
Georg (desrtfx)
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 09, 2006, 10:21:15 AM
Just had an idea...

I will try to create a new, empty file directly on the server and use the online editing tool to copy and paste the contents of the mailer.inc.php into it - see if that works!?!

Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 09, 2006, 10:44:39 AM
Still the same, even creating the new file resulted in the same error.
Title: Re: Error when setting Album Permissions
Post by: Abbas Ali on July 10, 2006, 07:17:53 AM
What is the PHP version on the server?
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 10, 2006, 09:04:19 AM
According to the phpInfo, it is Version 4.4.2 - Built on June,13 2006 with GD2 support, eaccelerator 0.9.5-beta2, Mail environment variable set to:     /var/spool/mail/root

Strange thing is, that even since I tried again, changed the line 2168 online (I found that instead of function Mail($from) { there was function array($from) {) the problem persisted.

The same happened every time I uploaded the file.

I think, that if the system works when I just replace the mailer.inc.php file with an empty one, I might as well leave it at that. Can't seem to do any harm to the integrity of the system.

Also on my local installation (Apache 2 from the XAMPP distribution, PHP 5, MySQL 5, Windows 2000 System) all works perfectly normal. Unfortunately, the local installation is from a completely different Project.

Regards,
Georg (desrtfx)
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 10, 2006, 09:27:02 AM
Tried again to edit online and found that if the function name is not Mail(...) the problem does not seem to occur. I changed the function name to _Mail(...) and it stayed at what I changed it to. Looks to me like there is an issue with eaccelerator or the PHP installation my host is using.
Title: Re: Error when setting Album Permissions
Post by: Sami on July 10, 2006, 09:49:37 AM
seems like a security mod behavior!
don't you have any?
Title: Re: Error when setting Album Permissions
Post by: desrtfx on July 10, 2006, 10:11:33 AM
Sorry, but you lost me there - how can I find out if I have any or not?

Unfortunately, I'm not firm on Unix hosts - only Windows.

Thanks
Title: Re: Error when setting Album Permissions
Post by: Sami on July 10, 2006, 10:16:43 AM
ask your host