PHP Classes

PHP 7.2 compatibility

Recommend this page to a friend!

      POP3 e-mail client  >  All threads  >  PHP 7.2 compatibility  >  (Un) Subscribe thread alerts  
Subject:PHP 7.2 compatibility
Summary:Class not working properly in 7.2
Messages:9
Author:Klemen
Date:2018-06-21 11:59:56
 

  1. PHP 7.2 compatibility   Reply   Report abuse  
Picture of Klemen Klemen - 2018-06-21 11:59:56
Hello,

I've been using this class for years and it worked great.

Currently I upgraded from PHP 5.6 to 7.2 and it no longer works (nothing else changed). I am getting errors like:

fopen(pop3://0/1): failed to open stream:"pop3_stream::stream_open" call failed

Or

feof(): pop3_stream::stream_eof is not implemented! Assuming EOF

when using "while (!feof($fp))" on the stream.

Has anyone had similar experience or is running the POP3 class successfully on PHP 7.2?

Thank you

  2. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2019-07-18 03:47:33 - In reply to message 1 from Klemen
Hello Klemen,

Sorry for the huge delay. I don't know if this will still be useful for you but I will soon have to upgrade packages like this that I use in my projects and also need to upgrade to PHP 7.x.

Can you please ask me here again next month, so I can give you the status of updating packages like this?

  3. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of Max Mustermann Max Mustermann - 2019-07-23 12:34:49 - In reply to message 2 from Manuel Lemos
Hello Manuel,

I want to upgrade to PHP7.3 / PHP7.4 in future too. Still using PHP5.6 and have not started any upgrade-tests. I will have a look at this thread also :-)

Best regard
Olli

  4. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of kelvin kelvin - 2023-09-07 13:03:05 - In reply to message 1 from Klemen
Is there an update/fix to sort out the incompatibility with PHP 7.2?
I am getting the same issue with feof() not being supported on the file stream and so unable to correctly extract attachments. Help!!

  5. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2023-09-07 22:16:40 - In reply to message 4 from kelvin
Hello Kelvin,

We use this class in PHP 7.4 and PHP 8, and it works well.

Can you share a minimal example code that does not work well for you in PHP 7.2 so I can reproduce the issue?

  6. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of kelvin kelvin - 2023-09-08 10:54:17 - In reply to message 5 from Manuel Lemos
Thanks for the quick reply. I've been using the original library for several years and never had an issue with PHP 5. Now using PHP 7.4 and every 5 emails or so an attachment raises an feof() error.

$pop3->GetConnectionName($connection_name);
$message_file='mlpop3://'.$connection_name.'/'.$message;
$mime = new mime_parser_class;
$mime->decode_bodies = 1;
$parameters=array('File'=>$message_file);
$success = $mime->Decode($parameters, $decoded);

<<< PHP Warning: feof(): pop3_stream::stream_eof is not implemented! Assuming EOF in /srv/xxxmydomainxx/public/htdocs/mime_parser.php on line 1441 >>>

  7. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2023-09-11 05:14:49 - In reply to message 6 from kelvin
Hello Kelvin,

This is not enough for me to reproduce the issue. Maybe there is something specific with your POP3 server that the POP3 stream server is not handling very well.

Could you pass me a complete script to reproduce the issue?

If necessary, you can contact me by email to pass on any sensitive information.

If you need to pass user names and passwords to access a test account, you should change the current password before sending any account credentials so you can change the password back after I test the script.

  8. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of kelvin kelvin - 2023-09-11 09:25:54 - In reply to message 7 from Manuel Lemos
As this is essential to several businesses I've had to put in a quick alternative parser. It's not ideal but it is saving attachemnts in PHP 7.4 I hope to be able to come back to you at a later date on this - so thank you it's much appreciated.

  9. Re: PHP 7.2 compatibility   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2023-09-12 07:59:21 - In reply to message 8 from kelvin
I understand. I have been overloaded with work for customers and also the upcoming PHP Classes marketplace.

Would you still be interested that I can make it work for you after next weekend?