|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2007-04-25 09:47 UTC] webmaster at prontonyc dot com
Description:
------------
When I try to encrypt a short text with gnupg_encrypt(), the script exits abruptly.
The script does successfully run gnupg_addencryptkey(). I am also able to run gnupg_keyinfo() and get back information that appears to be accurate.
Thank you.
Reproduce code:
---------------
putenv("GNUPGHOME=/home/pronto/.gnupg/");
$res = gnupg_init();
$gpgak = gnupg_addencryptkey
( $res, '9F5C955672FE54F6F793051C5BC1FB2C98410BC4' );
if (FALSE == $gpgak) {
echo gnupg_geterror($res) . "<hr />\n";
}
$gpgcr = $cryptemail = gnupg_encrypt($res, 'test');
if (FALSE == $gpgcr) {
echo gnupg_geterror($res). "<hr />\n";
}
print "<p>Encryption finished. Now preparing message.</p>\n";
Expected result:
----------------
The final message.
Actual result:
--------------
Nothing. The script terminates without executing or printing anything after the call to gnupg_encrypt().
Until last night, the following error appeared in the error log:
"[9996] EACCELERATOR: PHP crashed on opline 34 of gnupg_encrypt() at /home/pronto/public_html/test/18/pgpemailtest.php:92".
After I reported this to my hosting company, they stopped the error from appearing, but the function still doesn't work.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 05:00:01 2025 UTC |
They also sent this, which may be useful to you: pid 32365] <... read resumed> "-----BEGIN PGP MESSAGE-----\nVers"..., 4096) = 1014 [pid 32365] select(12, [4 11], [], NULL, {1, 0} <unfinished ...> [pid 26388] open("/home/pronto/.gnupg/random_seed", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0600 <unfinished ...> [pid 32365] <... select resumed> ) = 1 (in [4], left {1, 0}) [pid 26388] <... open resumed> ) = 15 [pid 32365] select(5, [4], [], NULL, {0, 0} <unfinished ...> [pid 26388] write(15, "\3479\0\263\323\3408Q\334\200\3244v\'\203.i\342+\335\225"..., 600 <unfinished ...> [pid 32365] <... select resumed> ) = 1 (in [4], left {0, 0}) [pid 32365] read(4, <unfinished ...> [pid 26388] <... write resumed> ) = 600 [pid 32365] <... read resumed> "[GNUPG:] END_ENCRYPTION\n", 1024) = 24 [pid 26388] close(15 <unfinished ...> [pid 32365] select(12, [4 11], [], NULL, {1, 0} <unfinished ...> [pid 26388] <... close resumed> ) = 0 [pid 26388] munmap(0xb7f98000, 32768) = 0 [pid 26388] unlink("/home/pronto/.gnupg/.#lk0x800af138.ocean.hostingzoom.com.26388") = 0 [pid 26388] exit_group(0) = ? Process 26388 detached <... select resumed> ) = 1 (in [11], left {0, 996000}) select(12, [11], [], NULL, {0, 0}) = 1 (in [11], left {0, 0}) read(11, "", 4096) = 0 close(11) = 0 select(5, [4], [], NULL, {1, 0}) = 1 (in [4], left {1, 0}) select(5, [4], [], NULL, {0, 0}) = 1 (in [4], left {0, 0}) read(4, "", 1024) = 0 close(4) = 0 open("/dev/tty", O_RDWR|O_NONBLOCK|O_NOCTTY) = 4 writev(4, [{"*** glibc detected *** ", 23}, {"double free or corruption (!prev"..., 33}, {": 0x", 4}, {"0856b7f8", 8}, {" ***\n", 5}], 5*** glibc detected *** double free or corruption (!prev): 0x0856b7f8 *** ) = 73 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 kill(32365, SIGABRT) = 0 --- SIGABRT (Aborted) @ 0 (0) --- +++ killed by SIGABRT (core dumped) +++