OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



ojs-2.3.8 warning fsocket when emailing from ojs

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

ojs-2.3.8 warning fsocket when emailing from ojs

Postby btbell » Thu Apr 04, 2013 8:36 am

I am running OJS-2.3.8/PHP 5.3.3 on a test VM. I have tested SMTP via telnet with success. However, when i try to send an email via OJS - Send Mail gui, i get the following error in my server log and the email is not sent:

Thu Apr 04 11:06:59 2013] [error] [client ::1] ojs2 has produced an error\n Message: WARNING: fsockopen(): unable to connect to smtp.pitt.edu:25 (Permission denied)\n In file: /var/www/html/ojs-2.3.8-alt/lib/pkp/classes/mail/SMTPMailer.inc.php\n At line: 166\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.3.3\n Apache Version: Apache/2.2.15 (Oracle)\n DB Driver: mysql\n DB server version: 5.1.67, referer: http://localhost/ojs-2.3.8-alt/index.ph ... ople%2Fall

I realize there is a permission error in the above message, but again, i can send an email from this server via telnet to my smtp server with no problems. I have double checked my config.ini.php with an OJS instance running on a different physical server that is email working correctly. Any ideas?
btbell
 
Posts: 16
Joined: Tue Nov 06, 2012 1:19 pm

Re: ojs-2.3.8 warning fsocket when emailing from ojs

Postby asmecher » Thu Apr 04, 2013 8:41 am

Hi Brian,

That's probably an SELinux permissions issue. See http://yml.com/fv-b-1-619/selinux--apache-httpd--php-establishing-socket-connections-using-fsockopen---et-al.html.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Re: ojs-2.3.8 warning fsocket when emailing from ojs

Postby btbell » Thu Apr 04, 2013 10:57 am

Thanks Alec. SELinux was the issue. I disabled it and email is working as it should.
btbell
 
Posts: 16
Joined: Tue Nov 06, 2012 1:19 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests