OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Error assigning a Section Editor

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Error assigning a Section Editor

Postby Colin K » Sat Jul 09, 2005 10:31 pm

When attempting to assign a Section Editor at:

index.php/demo/editor/assignEditor?articleId=1

I get the following error:

Fatal error: Cannot redeclare class mail in /classes/mail/Mail.inc.php on line 19

Is this a bug or a problem with our server configuration?

Running OJS 2.0

Apache 1.3.27
MySQL 4.0.12
PHP 4.3.7
FreeBSD

Any help would be appreciated.

TIA
Colin K
 
Posts: 4
Joined: Sat Jul 09, 2005 10:14 pm

Postby kevin » Sun Jul 10, 2005 1:41 am

The only thing that comes to mind is that perhaps your PHP/Apache configuration has an auto_prepend_file directive causing PEAR's Mail class to be included.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby Colin K » Sun Jul 10, 2005 7:32 pm

Ohhh. Nice one Kevin. In fact the local value of the auto_prepend_file directive was set to PEAR's Mail class.

Earlier today I attempted to override the auto_prepend_file directive using the ini_set() function in the index.php page but had no luck.

Unfortunatly, I do not have access to the php.ini file but I have contacted the server admin to set the directive to blank.

I will let you know if that solves the problem.

ty,

ck
Colin K
 
Posts: 4
Joined: Sat Jul 09, 2005 10:14 pm

Postby Colin K » Mon Jul 11, 2005 9:44 pm

Hi Kevin,

Our sysadmin does not want to override his implementation of the PEAR mail class being used. I won't go into all the details but he has laid out some pretty sound security reasons as to why he has done this that makes sense to me (so far).

So my question is this. Do you think that perhaps it is an oversite that the '/classes/mail/Mail.inc.php' file uses the same namespace for it's email class that is used by PEAR. I don't think this namespace clash can easily be resolved unless all reference to OJS' custom 'Mail' class be changed to something like perhaps 'OJS_Mail'.

I am greatly interested any insights you may have regarding this issue.

TIA,

ck
Colin K
 
Posts: 4
Joined: Sat Jul 09, 2005 10:14 pm

Postby kevin » Mon Jul 11, 2005 10:06 pm

That's curious. Perhaps I'm overlooking something, but I find it difficult to understand the rationale behind what your sysadmin is doing; presumably if you loaded OJS on your server you can load any PHP code you like so I don't see what that could possibly be preventing other than naming another class "Mail".

I don't think we will be changing our code anytime soon to accomodate this. Since OJS does not use PEAR I do not really consider it a namespace conflict anymore than if OJS happened to have a class/function name in common with some other third-party library or application.

Note, though, that auto_prepend_file can be overridden on a per-directory basis from a .htaccess file or httpd.conf, so that may be an alternative solution (if you sysadmin will allow you to do so).
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm

Postby Colin K » Mon Jul 11, 2005 11:37 pm

Hi Kevin...

The mail replacement function was a work around for programs which did not support using mail servers which are not configured as open relay's (i.e. a simple call to the mail function without username or password authentication...) Due to abuse from a variety of easily exploitable open source "form-mail" type scripts we had to disable simple "mail" functionality. The work around adds it back in, but in a traceable form (adding key headers to enable us to backtrace to who has been hacked / abused).

The key issue, is that the default mail script will not deliver mail - it results in an error as relaying will be disallowed.

A "simple" fix from my point of view and one that seems VERY popular in other open source content managers, forums etc. is to implement support for Authenticated SMTP, which will support non-localhost mail servers using the RFC standard ESMTP authentication. Our work around uses PEAR, which causes the namespace conflict - if the OJS supported Authenticated SMTP there would be no problem.

Hopefully that explains the issues / reasoning better.

Thanks!
Colin K
 
Posts: 4
Joined: Sat Jul 09, 2005 10:14 pm

Postby kevin » Tue Jul 12, 2005 12:32 am

I see, that makes more sense (although IMO something more appropriate to integrate at the mail server level than by interfering with PHP).

Sending email through an external SMTP server on non-Windows servers is a function we've planned to get into OJS within the next release or two.
kevin
 
Posts: 338
Joined: Tue Oct 14, 2003 8:23 pm


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: Bing [Bot] and 4 guests

cron