I'm thinking of using Mail-Mime which does not appear to be installed. PEAR 1.4.9 is installed
I tried to install: pear install Mail_Mime-1.5.2 but says pear/Mail_Mime requires PEAR Installer (version >= 1.6.0), installed version is 1.4.9 pear/Mail_mimeDecode requires PEAR Installer (version >= 1.6.0), installed version is 1.4.9 pear/Mail_mimeDecode requires package "pear/Mail_Mime" (version >= 1.4.0, excluded versions: 1.4.0)
tried using : pear upgrade-all didn't work as I thought then : pear channel-update pear.php.net
but PEAR is not upgrading to latest, not sure I know what the procedure is to upgrade this any help would be appreciated.
thanks Brian
my config is:
Operating system CentOS Linux 5.3
Webmin version 1.470
Virtualmin version 3.67 Pro
i dont know how to troubleshoot this but it looks like that after the latest update i have pear 1.6.2 installed (centos 5.3), odd that you haven't
shouldn't yum update pear do the trick?
yum update pear gives "No Packages for Update"
thanks for advice
when I do this: yum list | grep pear
this shows as 1.4.0, is this the package that is in the repository ?
if so I see the need for 1.6 version, how does one upgrade.
thanks Brian
php-pear-Mail-Mime.noarch 1.4.0-1.el5.centos extras
php-pear.noarch 1:1.4.9-4.el5.1 installed
wbm-php-pear.noarch 2:1.5-1 installed
php-pear-Auth-SASL.noarch 1.0.2-4.el5.centos extras
php-pear-DB.noarch 1.7.13-1.el5.centos extras
php-pear-Date.noarch 1.4.7-2.el5.centos extras
php-pear-File.noarch 1.2.2-1.el5.centos extras
php-pear-HTTP-Request.noarch 1.4.2-1.el5.centos extras
php-pear-Log.noarch 1.9.13-1.el5.centos extras
php-pear-MDB2.noarch 2.4.1-2.el5.centos extras
php-pear-MDB2-Driver-mysql.noarch 1.4.1-3.el5.centos extras
php-pear-Mail.noarch 1.1.14-1.el5.centos extras
php-pear-Mail-Mime.noarch 1.4.0-1.el5.centos extras
php-pear-Net-SMTP.noarch 1.2.10-1.el5.centos extras
php-pear-Net-Sieve.noarch 1.1.5-2.el5.centos extras
php-pear-Net-Socket.noarch 1.0.8-1.el5.centos extras
php-pear-Net-URL.noarch 1.0.15-1.el5.centos extras
php4-pear.i386 4.4.8-1vm virtualmin
when i run yum list | grep pear i see that php-pear 1.1.6.2 isn't from centos. it comes from jasons repo : utterrambling which provides php 5.2.6 (centos is on 5.1.6 i think)
You might want to look in the virtualmins bleeding edge repo, i believe it has php 5.2.6 too.
thanks for reply.
I'm still trying to get to grips with the structure, so sorry for dumb questions. :)
I don't know enough of the architecture of where things are and how to point to somehwre else to get the updates. I can download them and try a manual upgrade
I though it would be possible to do this via Virtualmin and the PHP Pear modules section, but the list of modules to install seems out of date.
tried to upgrade using:
<b>pear upgrade PEAR</b>
but this says things are out of date.
pear/Archive_Tar requires PEAR Installer (version >= 1.5.4), installed version is 1.4.9
pear/PEAR dependency package "pear/Archive_Tar" installed version 1.3.1 is not the recommended version 1.3.3, but may be compatible, use --force to install
No valid packages found
upgrade failed
ok, have found this info regarding latest
[ur]http://www.virtualmin.com/forums/help-home-for-newbies/bleeding-edge-rep...
have decided will have to find another solution.
not sure I want to go down the route of bleeding edge, too many risks.
<div class='quote'>not sure I want to go down the route of bleeding edge, too many risks.</div>
While I agree with you that going down the bleeding edge path is risky, I suspect using our bleeding edge PHP packages is the least risky option you have, if you need a very recent version of PEAR.
--
Check out the forum guidelines!
Oh, wait...it doesn't appear that pear is even built from the PHP src.rpm, anymore. That's weird. But it means that php-pear is not in the bleeding edge repo, at all, right now. I'll make sure a new version gets added, ASAP.
--
Check out the forum guidelines!
Joe,
thanks. if you thinks it's ok, then I'll give it a try. will wait for your update.
I have html emails, not with attachments or images though. have been looking inot it and I will see if I can add the code to do so, using Pear would be much easier though :o)
php-pear 1.8.0 is now in the bleeding edge repository, and seems to work in my limited testing.
--
Check out the forum guidelines!
wow,
that was quick :o)
will give that a go as soon as i can.
(p.s. sorry about multiple messages)
should I just do a "rpm -U" on this package ?
I notice reference to modifying in yum.repos.d and a section [vmbleed] but I think I should just install the package by itself.
You could do it either way. It is slightly more complicated to do it with yum, since you'd also want to edit the .repo file and add includePkgs for just the packages you want (php-pear, in this case).
--
Check out the forum guidelines!
thanks. used rpm -U
and seems to have installed :)
installed Mail_mime pachage and it looks ok
can't try it now, will try as soon as I get back.
Select all. | Invert selection.
Module name Version number PHP version Install state
Archive_Tar 1.3.2 5 stable
Console_Getopt 1.2.3 5 stable
Mail_Mime 1.5.2 5 stable
Mail_mimeDecode 1.5.0 5 stable
PEAR 1.8.0 5 stable
Structures_Graph 1.0.2 5 stable
XML_RPC 1.5.1 5 stable
XML_Util 1.2.1 5 stable
mail_mime isn't working, not sure how to solve this problem (yet)
SELinux is preventing php-cgi (httpd_suexec_t) "accept" to
/var/run/mod_fcgid/12738.0 (httpd_t).
host=domain.com type=AVC msg=audit(1239621399.546:104871): avc: denied { accept } for pid=12752 comm="php-cgi" path="/var/run/mod_fcgid/12738.0" scontext=root:system_r:httpd_suexec_t:s0 tcontext=root:system_r:httpd_t:s0 tclass=unix_stream_socket
just wondering if this is the right thing to do ?
http://docs.fedoraproject.org/selinux-faq-fc5/#id2961385
Ahh, is SELinux enabled? What does this command show:
cat /etc/selinux/config
The Virtualmin installer normally disables that upon installation.
-Eric
# This file controls the state of SELinux on the system.
# SELINUX=disabled
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0
also just noticed this in 'phpinfo'
is this compiled '--without-pear' causing the problem I am having ?
part of phpinfo:
'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl
<div class='quote'>also just noticed this in 'phpinfo'
is this compiled '--without-pear' causing the problem I am having ?</div>
No. That's because pear has become a separate package, and isn't built along-side PHP. This is normal and expected and has nothing to do with SELinux issues.
--
Check out the forum guidelines!
mail_mime isn't working, not sure how to solve this problem (yet)
SELinux is preventing php-cgi (httpd_suexec_t) "accept" to
/var/run/mod_fcgid/12738.0 (httpd_t).
host=domain.com type=AVC msg=audit(1239621399.546:104871): avc: denied { accept } for pid=12752 comm="php-cgi" path="/var/run/mod_fcgid/12738.0" scontext=root:system_r:httpd_suexec_t:s0 tcontext=root:system_r:httpd_t:s0 tclass=unix_stream_socket
ok, thanks. so I guess I need to enable it in this case and set this up.
I'm learning.
all this just for Mail-Mime, must be a better way ;o)
have not done this yet.
when looking into enabling it gave me a warning and I had to reboot server.
I think i need to do this on a (local) test server first before attempting this.
having a local testserver is good policy though not waterproof (I learned the hard way)
I just don't understand why requiring a class Mail_mime is all this difficult. I must be missing something :o)
I'm currently going to try and create a script myself, it just needs the mime stuff in the right place (have basic html working but not an image or attachment), then I'll try and get the class sorted.
<div class='quote'>I just don't understand why requiring a class Mail_mime is all this difficult.</div>
I don't understand what is difficult. What problem are you having? I thought you'd gotten it installed successfully earlier?
--
Check out the forum guidelines!
yep, what you did got mail_mime installed eaily :o)
however, when you try and call the script you get these selinux security errors, so that needs to be enabled somehow. I was concerned when I tried to set up that I might do something to prevent access to my server, and so I think I need to try this on a local server, which I hope to do this week sometime.
my comment was directed at mail_mime, in that why does it not just install some scripts onto the server instead of having so many other things needing set up
<div class='quote'>however, when you try and call the script you get these selinux security errors, so that needs to be enabled somehow.</div>
As Eric and I mentioned earlier...just disabling SELinux is probably the simplest solution. We disable it by default when you install Virtualmin with install.sh.
You can do that with:
setenforce 0
It can be quite challenging to get a policy that works smoothly in a virtual hosting environment. The existing policies just don't really fit very comfortably into a multi-user hosting environment.
--
Check out the forum guidelines!
ok, I mis-undertsood.
I thought when you said that you had disabled it then I had to enable it.
I have done 'setenforce 0'
error appears to have gone now, but a class error now occurs.
[Wed Apr 15 10:48:05 2009] [warn] mod_fcgid: stderr: PHP Warning: include(Mail.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in /home/fife/public_html/mail_test.php on line 10
[Wed Apr 15 10:48:05 2009] [warn] mod_fcgid: stderr: PHP Warning: include() [<a href='function.include'>function.include</a>]: Failed opening 'Mail.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php') in /home/fife/public_html/mail_test.php on line 10
[Wed Apr 15 10:48:05 2009] [warn] mod_fcgid: stderr: PHP Fatal error: Class 'Mail' not found in /home/fife/public_html/mail_test.php on line 32
I did notice that after installing the class then that there was no file ("Mail.php") as used by the example from PEAR.
<?
include('Mail.php');
include('Mail/mime.php');
I see the 'mime.php' file loaded in the pear folder, but no Mail.php.
Mime_Mail doesn't provide Mail.php, and isn't supposed to. I see Mail.php in the php-pear-Mail package. So install that, and this error will go away.
--
Check out the forum guidelines!
Oh, and I'm talking about an RPM, so you can install it with yum:
yum install php-pear-Mail
--
Check out the forum guidelines!
Joe, thanks once again, for your invaluable help.
anyway, as I said earlier sending mail should be easy :o)
and I have found out why I was having a problem before.
I could not get images to work in html emails (just manually building a message and headers for use in 'mail', hence why I wanted to use Pear package mail_mime)
I went back last night to first principles and used my new server for the test. and mysteriously the html emails worked fine. wow !
what I did find is that when I tried to use images on www.happygolf.co.uk they did not work in the email, very strange indeed. I thought it was maybe something to do with leech settings, but don't think so. so now I can get on with this customer and finish setting up wonderfull looking emails ;o)
We generally disable SELinux. There are way too many little gotchas like this that pop up, at this point, even with the most relaxed standard policy, and the tools for correcting issues are still really weak. Virtualmin does have some support for adding SELinux policy, but it's still pretty minimal, and we need to do a lot more testing on systems with various SELinux policies in place (CentOS and the latest Fedora, for example are pretty wildly divergent at this point, so we couldn't use the same policy modifications across the two).
During install using install.sh SELinux gets disabled, and it's still how we run on our servers.
Anyway, now that most of our supported distributions have roughly agreed that SELinux is the way forward for more advanced access control in Linux (for several years, Debian/Ubuntu and others were chasing AppArmor instead), we'll spend some more time with it in the coming months.
--
Check out the forum guidelines!