when i try to upload any file to ojs 2.4.8 at the last steps i get error page (The page is not working) but the file successfully uploaded https://mysite/index.php/AJFSFM/author/saveSubmit/5
Hi @muazsid,
Check your PHP error log for details.
Regards,
Alec Smecher
Public Knowledge Project Team
[Mon Jul 02 12:52:22.803643 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP Fatal error: Cannot redeclare PHPMailerAutoload() (previously declared in /var/www/html/lib/pkp/classes/mail/PHPMailerAutoload.php:24) in /var/www/html/lib/pkp/classes/mail/PHPMailerAutoload.php on line 24, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803680 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP Stack trace:, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803693 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 1. {main}() /var/www/html/index.php:0, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803704 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 2. PKPApplication->execute() /var/www/html/index.php:64, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803713 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 3. Dispatcher->dispatch() /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php:178, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803723 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 4. PKPPageRouter->route() /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php:134, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803733 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 5. PKPRouter->_authorizeInitializeAndCallRequest() /var/www/html/lib/pkp/classes/core/PKPPageRouter.inc.php:220, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803740 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 6. call_user_func() /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php:362, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803749 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 7. SubmitHandler->saveSubmit() /var/www/html/lib/pkp/classes/core/PKPRouter.inc.php:362, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803758 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 8. PKPNotificationManager->createNotification() /var/www/html/pages/author/SubmitHandler.inc.php:171, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803767 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 9. PKPNotificationManager->sendNotificationEmail() /var/www/html/lib/pkp/classes/notification/PKPNotificationManager.inc.php:340, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803776 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 10. MailTemplate->send() /var/www/html/lib/pkp/classes/notification/PKPNotificationManager.inc.php:458, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803785 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 11. PKPMailTemplate->send() /var/www/html/classes/mail/MailTemplate.inc.php:172, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
[Mon Jul 02 12:52:22.803794 2018] [:error] [pid 1168] [client 10.0.111.201:62976] PHP 12. Mail->send() /var/www/html/lib/pkp/classes/mail/PKPMailTemplate.inc.php:237, referer: https://musite111/index.php/AJFFFM/author/submit/5?articleId=484
i have 5 journals on my portal just 2 journal affected by this error and the other working fine
Hi @muazsid,
Where did the file lib/pkp/classes/mail/PHPMailerAutoload.php
come from? That doesn’t appear to be part of the OJS package.
Regards,
Alec Smecher
Public Knowledge Project Team
i develop phpmailer for use microsoft office 365 email and it is working fine for me on the other journals to send auto email with office 365 this is the contain of file -
function PHPMailerAutoload($classname)
{
** //Can’t use DIR as it’s only in PHP 5.3+**
** $filename = dirname(FILE).DIRECTORY_SEPARATOR.‘class.’.strtolower($classname).’.php’;**
** if (is_readable($filename)) {**
** require $filename;**
** }**
}
if (version_compare(PHP_VERSION, ‘5.1.2’, ‘>=’)) {
** //SPL autoloading was introduced in PHP 5.1.2**
** if (version_compare(PHP_VERSION, ‘5.3.0’, ‘>=’)) {**
** spl_autoload_register(‘PHPMailerAutoload’, true, true);**
** } else {**
** spl_autoload_register(‘PHPMailerAutoload’);**
** }**
} else {
** /****
** * Fall back to traditional autoload for old PHP versions**
** * @param string $classname The name of the class to load**
** /*
** function __autoload($classname)**
** {**
** PHPMailerAutoload($classname);**
** }**
}
Hi @muazsid,
I think this is a problem with the customization you’ve made. Essentially the same class name is being declared in two places, and they’re colliding.
Regards,
Alec Smecher
Public Knowledge Project Team
but my customization it is working on the the other 2 journals i try different solution i am frustrated
but my customization it is working on the the other 2 journals i try different solution i am frustrated
It is going to be extremely hard for anyone to help troubleshoot your own local customization from just the samples you’ve given.
If you can publish your code to Github or a similar platform where you can show your changes in the context of the full source code, someone may be able to spot the error.
@asmecher’s advice above should point you in the right direction. You’ll need to identify why lib/pkp/classes/mail/PHPMailerAutoload.php
line 24
is defining PHPMailerAutoload
for a second time.