Firefox PHP

Module: External Phorummail

Posted by Thomas Seifert 
Re: Module: External Phorummail
December 13, 2011 04:22PM
Trying to get External Phorummail module to work but I keep getting this message from the cron job:

****
X-Powered-By: PHP/5.2.17
Set-Cookie: phorum_session_st=deleted; expires=Mon, 13-Dec-2010 15:10:00 GMT; path=/
Set-Cookie: phorum_session_v5=deleted; expires=Mon, 13-Dec-2010 15:10:00 GMT; path=/
Content-type: text/html

This script cannot be run from a web browser.

****

According to the hosting service support people the CLI php path for php is /usr/bin/php. My cron command is:

cd /home/mydomain/public_html/forum && /usr/bin/php ./script.php --scheduled

Is it possible that there is something besides the wrong php version that throws this error? I am using phorum 5.2.18 and External Phorummail Version : 2.1.5
Re: Module: External Phorummail
December 13, 2011 04:23PM
Its probably a CGI version of php running there, not the CLI sapi. Othewise you wouldn't see the headers.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: External Phorummail
December 13, 2011 04:27PM
So no hope then for external phorum mail.
Re: Module: External Phorummail
December 13, 2011 04:29PM
Try changing /usr/bin/php to /usr/local/bin/php – worked with my hosting provider.
Re: Module: External Phorummail
December 13, 2011 04:30PM
I would just go back to your host and ask them for the real CLI version of php. Otherwise its hacking. You could hack script.php to avoid the check for the cli version in the worst case.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: External Phorummail
December 13, 2011 04:34PM
I think they don't have CLI installed. phpinfo does not show it was compiled with the cli extension.

John, thanks but I started with that path and got the same message.

Thomas, what would the downside be of hacking out the cli version check?
Re: Module: External Phorummail
December 13, 2011 04:38PM
Quote
dholeman
I think they don't have CLI installed. phpinfo does not show it was compiled with the cli extension.

Its a separate SAPI. AFAIK you wouldn't see it in the phpinfo output if its run through a separate SAPI/interface.

Quote
dholeman
Thomas, what would the downside be of hacking out the cli version check?

That everyone could run script.php-commands through the web and its not secured anymore.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Re: Module: External Phorummail
December 13, 2011 05:04PM
Thanks Thomas. I think I'll just keep fighting with the hosting company to get cli going or find out where it is.
Re: Module: External Phorummail
December 15, 2011 04:52AM
I got the CLI version of php working with

/usr/bin/php-cli /home/mysite/public_html/forum/script.php --scheduled

you need to use php-cli not just php which invokes the cgi version.

Now I'm trying to get the module working but I don't understand how to pass emails out of phorum so the user can respond.

I think I could use the mailing list module but I don't want to go to a listserve, I just want subscribers to the thread to get the message by email and be able to respond to it from their email. Can I use the phorum subscriptions module to do this?
Re: Module: External Phorummail
December 15, 2011 09:04AM
Quote
dholeman
Can I use the phorum subscriptions module to do this?

Maybe but I've got no experience with it and I can't support it.


Thomas Seifert
Phorum Development Team / Mysnip-Solutions.de
Custom Phorum and general software development
worry-free Phorum Hosting
Sorry, only registered users may post in this forum.

Click here to login