2010-08-23 121 views
2

我在CPanel中创建了一个管道脚本,并在我的脚本的开头放置了hashbang:#!/usr/bin/php -q。该脚本确实运行并将电子邮件的日志放入我的DB中的表中。

但是......它发送电子邮件回声称电子邮件没经过和出现...CPanel电子邮件管道到PHP

This message was created automatically by mail delivery software. 

A message that you sent could not be delivered to one or more of its 
recipients. This is a permanent error. The following address(es) failed: 

pipe to |/home/xxxxx/xxxxx.php 
    generated by [email protected] 

The following text was generated during the delivery attempt: 

------ pipe to |/home/xxxxxx/xxxx.php 
     generated by [email protected] ------ 

PHP Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 
<br /> 
<b>Deprecated</b>: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in <b>Unknown</b> on line <b>0</b><br /> 

我已删除了所有的私人信息,但没有什么是有关我的问题。

可能是我的问题?

回答

1

我认为你必须升级你的服务器php版本最近,即5.2.x到5.3。

PHP 5.3不支持magic_quotes_gpc

因此在php.ini中注释掉或删除该行。在cPanel服务器上,php.ini的路径为/usr/local/lib/php.ini

对于评论,您应该使用;

; magic_quotes_gpc = on 
1

如果你的PHP脚本为您的电子邮件被拒绝任何原因(在这种情况下,魔术引号错误)(即使你可能已经处理的电子邮件在你的脚本)将失败。系统“假定”如果发生脚本错误,则消息传递失败。

正如其他人所说,解决魔术引号问题...