Hi,
I am extremely stuck trying to port a PHP app from one server to
another while making use of the PEAR Mail_mimeDecode package. We have
just upgraded from RedHat 7.x to RedHat Enterprise Linux ES Basic v3
because of the end-of-life statement from RedHat. Basically, this
means a change from Apache 1.3 to 2 and PHP 4.1.2 to 4.3.2.
After initial problems getting Mail_mimeDecode to return any
attachments to emails I downloaded and installed the latest version
from pear.php.net. However, this still does not work and only returns
the body in array element part[0], but nothing in part[1] as it used
to. I tried wholesale copying the PEAR directory and a very simple
test script to a RedHat 7.x server and everything works perfectly, but
a perfect byte-for-byte replica on the RHEL3 server only returns the
body.
The test script is:
#!/usr/bin/php -q
<?
require_once('/usr/share/php/Mail.php');
require_once('/usr/share/php/Mail/mimeDecode.php' );
$stdin = fopen('php://stdin','r');
if( !$stdin ) {
echo 'ERROR: Cannot open stdin';
exit();
}
$msg = fread($stdin,10 00000);
fclose($stdin);
$params['include_bodies '] = TRUE;
$params['decode_bodies'] = TRUE;
$params['decode_headers '] = TRUE;
$params['input'] = $msg;
$params['crlf'] = "\n";
$mail = Mail_mimeDecode ::decode($param s);
print_r($mail);
?>
and I pipe the email to it on the command line. On RHEL I get:
[root@pe2500 smbtest]# cat test|./test.php
stdClass Object
(
[headers] => Array
(
[from] => "HIDDEN" <HIDDEN@HIDDE N>
[to] => <HIDDEN@HIDDE N>
[subject] => HIDDEN
[date] => Wed, 11 Feb 2004 09:11:43 -0000
[mime-version] => 1.0
[content-type] => multipart/mixed;
boundary="----=_NextPart_000_ 136C_01C3F24A.3 AE231F0"
[x-priority] => 3
[x-msmail-priority] => Normal
[x-mimeole] => Produced By Microsoft MimeOLE
V6.00.2800.1165
)
[ctype_primary] => multipart
[ctype_secondary] => mixed
[ctype_parameter s] => Array
(
[boundary] => ----=_NextPart_000_ 136C_01C3F24A.3 AE231F0
)
[parts] => Array
(
[0] => stdClass Object
(
[headers] => Array
(
[content-type] => text/plain;
charset="iso-8859-1"
[content-transfer-encoding] => 7bit
)
[ctype_primary] => text
[ctype_secondary] => plain
[ctype_parameter s] => Array
(
[charset] => iso-8859-1
)
[body] => Lots of body content here
)
)
)
with no sign of any second MIME part, whereas I get
[1] => stdClass Object
(
[headers] => Array
(
[content-type] => application/pdf;
name="05041534. pdf"
[content-transfer-encoding] => base64
[content-disposition] => attachment;
filename="05041 534.pdf"
)
[ctype_primary] => application
[ctype_secondary] => pdf
[ctype_parameter s] => Array
(
[name] => 05041534.pdf
)
[disposition] => attachment
[d_parameters] => Array
(
[filename] => 05041534.pdf
)
[body] => %PDF-1.1
3 0 obj
<</Type /XObject
/Subtype /Image
etc etc etc
following the first MIME part on the 7.x machine.
I am completely dumbfounded. Are there *any* changes between PHP
4.1.2 and 4.3.2 which break Mail_mimeDecode ?? I've tried looking
through the source, but none of the functions jump out as having
undergone any changes between those PHP versions.
Many thanks in anticipation,
Louis 1 4005 lo***@6internet .com (Louis Aslett) wrote in message news:<88******* *************** ****@posting.go ogle.com>... Hi,
I am extremely stuck trying to port a PHP app from one server to another while making use of the PEAR Mail_mimeDecode package. We have just upgraded from RedHat 7.x to RedHat Enterprise Linux ES Basic v3 because of the end-of-life statement from RedHat. Basically, this means a change from Apache 1.3 to 2 and PHP 4.1.2 to 4.3.2.
After initial problems getting Mail_mimeDecode to return any attachments to emails I downloaded and installed the latest version from pear.php.net. However, this still does not work and only returns the body in array element part[0], but nothing in part[1] as it used to. I tried wholesale copying the PEAR directory and a very simple test script to a RedHat 7.x server and everything works perfectly, but a perfect byte-for-byte replica on the RHEL3 server only returns the body.
The test script is:
[SNIP] following the first MIME part on the 7.x machine.
I am completely dumbfounded. Are there *any* changes between PHP 4.1.2 and 4.3.2 which break Mail_mimeDecode ?? I've tried looking through the source, but none of the functions jump out as having undergone any changes between those PHP versions.
Many thanks in anticipation,
Louis
For anyone interested, I've found that the problem is definitely
PHP/PEAR related and not Red Hat Enterprise Linux. After much
downloading/compiling of old PHP versions it transpires that the move
from PHP 4.3.1 to 4.3.2 is where this functionality broke. Everything
upto and including 4.3.1 work, but 4.3.2 and everything since don't.
There is a new bug at http://pear.php.net/bugs/bug.php?id=779 which
I've opened to report the issue.
Louis This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Arne Kösling |
last post by:
Hi !
I am new to Web Services. Therefore I ve set up a PHP Installation on Windows
(PHP 4.3.2 and Apache 1.3.29). I have tested PHP alone and then installed
PEAR. Now I am stuck there (Before that, I had many problems with the
PHP-dlls)
I've set up several SOAP Testscripts that I found on WebSites and in PHP-Books
to get a PHP Client and a PHP Server communicate over Web Services
(using PEAR::SOAP).
|
by: Jan Holland |
last post by:
I am trying to install pear on a shared server/host
following the instructions from:
<http://uk.builder.com/architecture/web/0,39026570,20283197,00.htm>
So I made a subdir on my site like:
http://www.urlname.urlextension/pear/
to install the pear into by running
go-pear.php fromthat subdir "pear"
|
by: junkmail |
last post by:
on a win 2k server
apparantly it is saying i dont have it. or it cant find it.
im using mySQL 4.1
php 4.3.x
apache 3.0.53
im new to php and am doing some tutorials, but when i run the sripts it
tells mea it can not run pear/soap, because it can not be found.the book im
learning form does not tell me how to install or configure this extension.
so now im looking for help.
|
by: Gonzalo |
last post by:
Just upgraded php (5.0.3) - compiled from source.
I'm trying to upgrade & install some Pear packages but get the following
error:
$ pear upgrade pear
downloading PEAR-1.3.5.tgz ...
Starting to download PEAR-1.3.5.tgz (108,423 bytes)
..........................done: 108,423 bytes
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to
|
by: George |
last post by:
I've got an interesting problem that I just have not been able to
figure out. I'm trying to use Mail_Mime to send multi-part/mixed
emails from a Linux server and I am having trouble getting everything
to work together correctly. I recently migrated this client from one
Linux server to another, and unfortunatley have no access to the old
server to figure out what has changed or is different between the two.
Needless to say, the email used...
| |
by: Alan Prescott |
last post by:
I'm running SuSE Linux 9.3, fully up to date
running # pear install db responds with ...
downloading DB-1.7.6.tgz ...
Starting to download DB-1.7.6.tgz (124,807 bytes)
.............................done: 124,807 bytes
requires package `PEAR' >= 1.0b1
DB: Dependencies failed
Googling around this ng I found someone with a similar problem who solved it
|
by: bwhitehd |
last post by:
I'm having a problem installing php. The compile seems to go fine, but
when it gets to the install step I get the following errors. Does
anyone have an idea of what might be the problem? We build our
applications under three different environments (Linux i686, Linux
x86_64, Solaris 8 Sparc). This is the first of the three on a RHEL 3
system using the current stable versions of the GNU toolchain in a
segregated environment. Basically...
|
by: IchBin |
last post by:
I remember having problems with pear when I first installed it but got
it running some time ago. This is on a windoze XP SP OS. I did not think
it was correct because it pointed to "C\php\pear\PEAR". I writing a pear
front-end GUI and I want to have it installed correctly.
It seemed to have some duplication of directories between the lower and
upper cased pear dir names. Should there be a "php\pear\PEAR"
subdirectory? I thought it should...
|
by: Dan Fulbright |
last post by:
I'm trying to install PHP 5.2.2 on Windows, but I keep getting errors
when running go-pear.bat:
mmap cache can't open phar://go-pear.phar/index.php
mmap cache can't open phar://go-pear.phar/PEAR/Start/CLI.php
mmap cache can't open phar://go-pear.phar/PEAR/Start.php
There are 20 of these lines. After continuing through the script, it
dies with this error:
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |