OJS 2.4.8 and PHP 7.2 Compatibility


#21

Thank you for digging this up. I have a System Admin but he is not a developer. He is now trying to install support for PHP 5.6 for Debian 9.6. If this works then we might be able to wait till you are ready with updating legacy OJS and OCS. If he fails then we are in square one.

The Git is Plask is a 3rd party module and not a Plesk function. Yes our Server has SSH access but that process is too technical for me.


#22

Now we managed to install PHP 5.6 on Debian 9 and that solved issues. I hope you guys manage to keep alive these legacy applications OCS and OJS 2.4.8 by addressing the PHP 7 compatibility issues.

For anyone might have the same issue, we followed this solution to make the OCS and OJS 2.4.8 work on Debian 9.6

Thank you sparing time to answer my questions…


#23

This issue has become a rabbit hole for us. Now we can not fix the SMTP. We have done every possible solution and we keep getting an error log as

[Wed Dec 05 06:53:17.482519 2018] [cgi:error] [pid 1876] [client 103.41.47.16:55628] AH01215: OJS SMTPMailer: Did not receive expected 220: /var/www/cgi-bin/cgi_wrapper/cgi_wrapper, referer: http://aro.koyauniversity.org/login/lostPassword

Please check whether we can do anything to solve this issue.


Ojs 2.x unable to send out mails
#24

Since this relates more to the change of server and the SMTP connection than it does to PHP 7.2 compatibility, it may be better to start a new thread for this.

That said, the message you are receiving comes immediately after a (presumably) successful network connection from your server to the SMTP server:


In this case, it appears the SMTP server is not talking SMTP.

Note that if your new server is configured to support the PHP mail() function (most are out-of-the-box) and if you are using an email domain which trusts your server (common in institutional settings), it is probably easier to just turn off SMTP and use the native PHP mail().

If you need to use SMTP, please provide additional details on your SMTP server and how you have configured SMTP within OJS in a new thread and we can try to help to troubleshoot.


#25

We are using google gsuite mail smtp within the ojs config file.

See below setting in config.inc.php

[email]

; Use SMTP for sending mail instead of mail()
smtp = On

; SMTP server settings
smtp_server = “smtp-relay.gmail.com:465

Also same setting is working with the other website with ojs 3.x


#26

Can you (or your system administrator) test to confirm that you can access port 465 of smtp-relay.gmail.com from this server? (Or alternately, is the working website on the same virtual or physical server?)


#27

Yes, I can confirm that our OJS 3 website on the same server is working properly with same setting on port 465.

Also the server support PHP Mail

Please note that we had issue with OJS 2.4.8 on this new server Debian 9.6 which supports only php 7, but we extended and installed PHP 5.6 based on instruction above. We got the site working but it seems that SMTP has issue.


#28

If the server supports the PHP mail() function, I would try using this instead by turning smtp to “Off” in config.inc.php.

OJS2 uses a custom SMTP mailing class whereas OJS3 uses the PHPMailer library. As a result, the settings required in config.inc.php for each are different, even when the same servers are involved. PHPMailer will certainly also have additional features beyond the OJS2 custom class.

If you need to use SMTP with OJS2, I think the way to discover the nature of the actual error would be to temporarily modify this function:

You would want to remove the error suppression (@ symbol prefixing fgets) on line 219, and add an else condition to the if on line 225 to dump $response to the error log. You could then test a message and view the error log to see what the server is actually responding with when OJS is expecting an SMTP 220.