Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #231860
| From | Gary Dale <gary@extremeground.com> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: php-pear etc. on an Apache2 server [resolved] |
| Date | 2021-02-19 15:20 +0100 |
| Message-ID | <BKeNs-5gk-5@gated-at.bofh.it> (permalink) |
| References | <BJhu2-1JA-1@gated-at.bofh.it> <BJSae-8pO-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2021-02-18 09:06, Gary Dale wrote: > On 2021-02-16 17:56, Gary Dale wrote: >> I'm running Buster on my local server which, among other things, I >> use for developing web sites before copying them onto a public host. >> I've recently been getting into a little php coding because there >> seem to a lot of sample code out there for things I want to do. >> Usually they work right away when I try running them after having >> installed libapache2-mod-php. >> >> Right now I'm trying to get a script working that is actually fairly >> small and seems straightforward. It displays a form that allows you >> to send an e-mail with an attachment. I actually have some similar >> scripts working locally that do pretty much the same thing, but I'm >> trying to get this one to work because the host I use for one site >> that needs this type of form has broken the script I had been using >> (I also didn't like it because it seemed overly complicated and >> under-featured). >> >> This script use the Pear libraries to handle the heavy lifting, which >> seems like a reasonable design decision. I installed the php-pear >> package and also php-mail-mime. Unfortunately, the script failed to >> work. It was uploading the file but failing to send the e-mail. >> >> I was able to find the line that was failing but it puzzles me. The >> line is >> >> $message = new Mail_mime(); >> >> which should be working. I ran the (frequently recommended) php-info >> page (<?php phpinfo();) and it shows a lot of information but >> nothing about mime. I'd expect that is something php handles though. >> >> I got the script to send an e-mail by removing all the mime parts and >> just using the php mail() function. However that's not really useful. >> I need the mime bits to add the attachment. >> >> Anyway, it looks like I need to do something more (besides restarting >> Apache2) to get php to use the php-mail-mime library but I'm not sure >> what. All the Debian information I've found just says "install the >> package php-<whatever> and it will work". Can anyone help me here? >> > > The issue turned out to be that script had an incorrect include. It > asked for Mail_Mime/mime.php when the actual include should have been > Mail/mime.php. I suspect that the php package names may have changed > since the author wrote the script and they never bothered to update it. Further to above, when I went to move the script to my host, I discovered that the cPanel php-pear installer used the package names from the original script. Their Mail_Mime package was actually called that while their Mail package doesn't include mime.php. My host's cPanel php-pear packages appear to be relatively recent as some of the documentation has dates from last year. Perhaps the different package names is a Debian thing?
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
php-pear etc. on an Apache2 server Gary Dale <gary@extremeground.com> - 2021-02-17 00:00 +0100
Re: php-pear etc. on an Apache2 server [resolved] Gary Dale <gary@extremeground.com> - 2021-02-18 15:10 +0100
Re: php-pear etc. on an Apache2 server [resolved] Gary Dale <gary@extremeground.com> - 2021-02-19 15:20 +0100
Re: php-pear etc. on an Apache2 server [resolved] Gary Dale <gary@extremeground.com> - 2021-02-19 23:30 +0100
csiph-web