LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 02-08-2009, 05:32 PM   #1
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 95

Rep: Reputation: 21
PHP - Mail.php and Mail/mime.php issues


OK, so PHP is throwing errors and I have no idea why. Basically, opening 'Mail.php' and 'Mail/mime.php' fails. The errors even indicate they're looking in the correct path (/usr/share/pear), so what gives?

Errors:
[Sun Feb 08 16:53:31 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once(Mail.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/html/base/includes/base_action.inc.php on line 29

[Sun Feb 08 16:53:31 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'Mail.php' for inclusion (include_path='.:/php/includes:/usr/share/pear:/usr/share/php') in /var/www/html/base/includes/base_action.inc.php on line 29

[Sun Feb 08 16:53:31 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once(Mail/mime.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: No such file or directory in /var/www/html/base/includes/base_action.inc.php on line 30

[Sun Feb 08 16:53:31 2009] [error] [client xxx.xxx.xxx.xxx] PHP Warning: include_once() [<a href='function.include'>function.include</a>]: Failed opening 'Mail/mime.php' for inclusion (include_path='.:/php/includes:/usr/share/pear:/usr/share/php') in /var/www/html/base/includes/base_action.inc.php on line 30


I've verified I do have both 'Mail.php' and 'Mail/mime.php' (and even in the correct path mentioned in the error):

[root@someids ~]# locate ".php" | egrep -i "(mail|mime)"
...
/usr/share/pear/Mail.php
/usr/share/pear/Log/mail.php
/usr/share/pear/Mail/RFC822.php
/usr/share/pear/Mail/mail.php
/usr/share/pear/Mail/mime.php
/usr/share/pear/Mail/mimeDecode.php
/usr/share/pear/Mail/mimePart.php
/usr/share/pear/Mail/null.php
/usr/share/pear/Mail/sendmail.php
/usr/share/pear/Mail/smtp.php
...

Pear output:
[root@someids ~]# pear install Mail Mail_mime
Ignoring installed package pear/Mail
Ignoring installed package pear/Mail_mime
Nothing to install

Yum output:
Setting up Install Process
Parsing package install arguments
Package php-pear-Mail-Mime - 1.4.0-1.el5.centos.noarch is already installed.
Package php-pear-Mail - 1.1.14-1.el5.centos.noarch is already installed.
Nothing to do

Permissions:
[root@someids ~]# ll -h /usr/share/pear/
...
drwxr-xr-x 2 root root 4.0K Feb 8 14:25 Mail
-rw-r--r-- 1 root root 8.8K Feb 8 14:25 Mail.php
...

I've even chowned the above file/folder to apache.apache to no avail.

Here's lines 29 and 30 of base_action.inc.php mentioned in the error logs, for reference:
include_once("Mail.php"); // r.rioux added for PEAR::Mail
include_once("Mail/mime.php"); //r.rioux added for PEAR::Mail attachments

Also for reference, this is a CentOS 5.2 and its current primary services are apache, mysql, snort and base (acid). I wanted to keep it as minimal as possible too, so when I was installing the OS, I didn't include ANY additional packages. I just install packages through yum on 'as needed' basis. Is it possible I'm missing a critical php package thats usually included by default?

Not sure if this matters, but I've verified sendmail is listening on TCP port 25 and is functioning correctly.

I feel like I've tried everything. Any help would be appreciated.
 
Old 02-08-2009, 05:44 PM   #2
LVsFINEST
Member
 
Registered: Aug 2006
Posts: 95

Original Poster
Rep: Reputation: 21
I'm thinking its a permission issue... SELinux is turned off, and the following doesn't work either:

[root@someids ~]# chmod 777 /usr/share/pear
[root@someids ~]# chmod 777 /usr/share/pear/Mail*
[root@someids ~]# service httpd restart

AHHHHH!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to send mail with php mail() command - minimum config required? FeathersMc Linux - Server 2 10-26-2008 12:21 AM
Problem with basic PHP MIME mail tooparam Linux - Newbie 1 02-09-2006 10:11 AM
PHP Website with e-mail forms, what mail daemon? gbkyle Linux - Software 1 07-05-2005 12:33 PM
php: different mail server from php.ini rayds Programming 0 09-14-2004 03:48 AM
Cannot send mail with mail() command in PHP 4.3.4, Apache 2.0.48, Mandrake Linux 10 arcanum Linux - General 3 06-27-2004 06:06 PM


All times are GMT -5. The time now is 07:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration