[PHP-DEV] Bug #12972 Updated: is_file() sends errors to error log

2001-08-27 Thread chagenbu

ID: 12972
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Filesystem function related
Operating System: Redhat 6.2
PHP Version: 4.0.5
New Comment:

Actually, the last I checked, you _do_ need to use @file_exists() if you have error 
reporting all the way up to avoid error output. That surprised me.

Previous Comments:


[2001-08-27 10:48:15] [EMAIL PROTECTED]

Wrong. You use file_exists() to first determine if something exists. The name is a bit 
misleading, you can verify existense of files, directories and links (read: any file 
type). file_exists() is written to _not_ output any error. Whereas the is_*() 
functions are for good reason.

So, if you don't want to use file_exists(), you need to use @is_*(). This is the 
expected behaviour.

- Markus



[2001-08-27 07:19:34] [EMAIL PROTECTED]

when using the is_file function and a file is not found an error is sent back to the 
error log.  I expect this simply to return false in this case.  I am aware of 
file_exists, however in the manual:

 Returns true if the filename exists and is a regular file.

Therefore I expect this to also be testing for file existence.  I do not expect 
debugging output leading me to have to use @is_file and possibly miss other crucial 
error output.





Edit this bug report at http://bugs.php.net/?id=12972edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10788 Updated: c-client linked to config test progs causes undefined symbols

2001-05-11 Thread chagenbu

ID: 10788
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: *Install and Config
Operating system: 
PHP Version: 4.0 Latest CVS (2001-05-10)
Assigned To: 
Comments:

confirmed fix

Previous Comments:
---

[2001-05-11 15:26:16] [EMAIL PROTECTED]
This should be fixed now.
Reopen if not.

--Jani


---

[2001-05-10 16:03:31] [EMAIL PROTECTED]
I see this also; Jani's latest commit didn't fix it. Here's the config.log entry:

configure:51043: checking whether to include zlib support
configure:51244: checking for gzgets in -lz
configure:51263: gcc -o conftest -g -O2  -DLINUX=2 -DEAPI -DTARGET=apache 
-DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -L/usr/lib  
-Wl,-rpath,/home/chuck/code/imap/lib -L/home/chuck/code/imap/lib 
-Wl,-rpath,/home/chuck/code/mcal/libmcal -L/home/chuck/code/mcal/libmcal conftest.c 
-lz  -lmysqlclient -lmcal -lldap -llber -lc-client -lcrypt -lresolv -lm -ldl -lnsl  
-lresolv 15
/usr/lib/libc-client.so: undefined reference to `mm_expunged'
/usr/lib/libc-client.so: undefined reference to `mm_diskerror'
/usr/lib/libc-client.so: undefined reference to `mm_lsub'
/usr/lib/libc-client.so: undefined reference to `mm_flags'
/usr/lib/libc-client.so: undefined reference to `mm_fatal'
/usr/lib/libc-client.so: undefined reference to `mm_nocritical'
/usr/lib/libc-client.so: undefined reference to `mm_notify'
/usr/lib/libc-client.so: undefined reference to `mm_searched'
/usr/lib/libc-client.so: undefined reference to `mm_status'
/usr/lib/libc-client.so: undefined reference to `mm_login'
/usr/lib/libc-client.so: undefined reference to `mm_list'
/usr/lib/libc-client.so: undefined reference to `mm_critical'
/usr/lib/libc-client.so: undefined reference to `mm_exists'
/usr/lib/libc-client.so: undefined reference to `mm_log'
/usr/lib/libc-client.so: undefined reference to `mm_dlog'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51252 configure
#include confdefs.h
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char gzgets();

int main() {
gzgets()
; return 0; }


---

[2001-05-10 09:56:33] [EMAIL PROTECTED]
The conftest progs for things like setuid fail because c-client expects to find 
mm-expunged, mm_diskerror etc. etc.

Probably related to current build issues, but not enough of an autoconf guru to figure 
it out.

./configure 
--with-apxs 
--disable-pear 
--enable-debug 
--enable-sigchild 
--enable-calendar 
--enable-ftp 
--with-ldap 
--with-mysql=/usr 
--enable-shmop 
--enable-sysvsem 
--enable-sysvshm 
--with-zlib 
--enable-inline-optimization 
--with-iconv 
--with-bz2 
--enable-wddx 
--with-openssl 
--enable-bcmath 
--enable-ctype 
--with-imap 
--with-pspell 
--enable-yp 
--with-jpeg-dir 
--with-png-dir 
--with-freetype-dir 
--with-gd 
--with-mhash 
--enable-mailparse 
--enable-jstring 
--with-cybercash=/usr/local/mck-3.2.0.3-linux 
--enable-php-streams 
--enable-mbregex 
--enable-memory-usage 
--with-mm 
$@



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10788edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10788 Updated: c-client linked to config test progs causes undefined symbols

2001-05-10 Thread chagenbu

ID: 10788
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: *Install and Config
Operating system: 
PHP Version: 4.0 Latest CVS (2001-05-10)
Assigned To: 
Comments:

I see this also; Jani's latest commit didn't fix it. Here's the config.log entry:

configure:51043: checking whether to include zlib support
configure:51244: checking for gzgets in -lz
configure:51263: gcc -o conftest -g -O2  -DLINUX=2 -DEAPI -DTARGET=apache 
-DUSE_HSREGEX -DUSE_EXPAT -DSUPPORT_UTF8 -DXML_BYTE_ORDER=12 -L/usr/lib  
-Wl,-rpath,/home/chuck/code/imap/lib -L/home/chuck/code/imap/lib 
-Wl,-rpath,/home/chuck/code/mcal/libmcal -L/home/chuck/code/mcal/libmcal conftest.c 
-lz  -lmysqlclient -lmcal -lldap -llber -lc-client -lcrypt -lresolv -lm -ldl -lnsl  
-lresolv 15
/usr/lib/libc-client.so: undefined reference to `mm_expunged'
/usr/lib/libc-client.so: undefined reference to `mm_diskerror'
/usr/lib/libc-client.so: undefined reference to `mm_lsub'
/usr/lib/libc-client.so: undefined reference to `mm_flags'
/usr/lib/libc-client.so: undefined reference to `mm_fatal'
/usr/lib/libc-client.so: undefined reference to `mm_nocritical'
/usr/lib/libc-client.so: undefined reference to `mm_notify'
/usr/lib/libc-client.so: undefined reference to `mm_searched'
/usr/lib/libc-client.so: undefined reference to `mm_status'
/usr/lib/libc-client.so: undefined reference to `mm_login'
/usr/lib/libc-client.so: undefined reference to `mm_list'
/usr/lib/libc-client.so: undefined reference to `mm_critical'
/usr/lib/libc-client.so: undefined reference to `mm_exists'
/usr/lib/libc-client.so: undefined reference to `mm_log'
/usr/lib/libc-client.so: undefined reference to `mm_dlog'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51252 configure
#include confdefs.h
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply.  */
char gzgets();

int main() {
gzgets()
; return 0; }


Previous Comments:
---

[2001-05-10 09:56:33] [EMAIL PROTECTED]
The conftest progs for things like setuid fail because c-client expects to find 
mm-expunged, mm_diskerror etc. etc.

Probably related to current build issues, but not enough of an autoconf guru to figure 
it out.

./configure 
--with-apxs 
--disable-pear 
--enable-debug 
--enable-sigchild 
--enable-calendar 
--enable-ftp 
--with-ldap 
--with-mysql=/usr 
--enable-shmop 
--enable-sysvsem 
--enable-sysvshm 
--with-zlib 
--enable-inline-optimization 
--with-iconv 
--with-bz2 
--enable-wddx 
--with-openssl 
--enable-bcmath 
--enable-ctype 
--with-imap 
--with-pspell 
--enable-yp 
--with-jpeg-dir 
--with-png-dir 
--with-freetype-dir 
--with-gd 
--with-mhash 
--enable-mailparse 
--enable-jstring 
--with-cybercash=/usr/local/mck-3.2.0.3-linux 
--enable-php-streams 
--enable-mbregex 
--enable-memory-usage 
--with-mm 
$@



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10788edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10739 Updated: Zlib compile fails

2001-05-09 Thread chagenbu

ID: 10739
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: Compile Failure
Operating system: 
PHP Version: 4.0.5
Assigned To: 
Comments:

I get the same thing, and the common link seems to be IMAP - somewhere between 
revision 1.27 and the current version of ext/imap/config.m4, the build was broken such 
that it doesn't add the right include paths - the zlib test compile fails because the 
mm_* callbacks that libc-client expects to find aren't defined in any of the included 
headers.

I'll try and dig up a config.log message later if this doesn't ring a bell for someone.

Previous Comments:
---

[2001-05-08 18:43:39] [EMAIL PROTECTED]
There is more likely something else that fails.
Check the config.log file for more info.

--Jani


---

[2001-05-08 18:36:05] [EMAIL PROTECTED]
My compile options follow:

./configure 
--prefix=/usr/local/php 
--disable-debug 
--enable-shared 
--enable-inline-optimization 
--with-apxs=/usr/sbin/apxs 
--with-gd 
--with-jpeg-dir=/usr 
--with-png 
--with-zlib 
--with-db2 
--with-db3 
--with-gdbm 
--disable-debug 
--enable-sockets 
--enable-sysvsem 
--enable-sysvshm 
--enable-track-vars 
--enable-yp 
--enable-ftp 
--enable-wddx 
--with-mysql 
--with-xml 
--disable-short-tags 
--enable-trans-sid 
--with-imap 
--with-mcrypt  
--with-mhash 
--enable-bcmath 
--with-ttf 
--with-t1lib  
--with-pgsql 
--with-ldap

---

[2001-05-08 18:32:59] [EMAIL PROTECTED]
Zlib fails to compile even though it is properly installed. 

configure: error: Zlib module requires zlib = 1.0.9.

[root@websmith php-4.0.5]# rpm -qa |  grep zlib
zlib-1.1.3-22
zlib-devel-1.1.3-22

Bug 8575 says;
[2001-04-10 09:45:37] [EMAIL PROTECTED]

No feedback. If this happens with soon to be released PHP 4.0.5 too, reopen this bug
report.

--Jani

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10739edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10644 Updated: __FILE__ missing path delimiters

2001-05-05 Thread chagenbu

ID: 10644
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: Scripting Engine problem
PHP Version: 4.0.5
Assigned To: 
Comments:

fix confirmed. thanks!

Previous Comments:
---

[2001-05-05 18:13:23] [EMAIL PROTECTED]
Should be fixed in latest CVS.
Please make sure you update TSRM.

---

[2001-05-03 15:59:37] [EMAIL PROTECTED]
I also encountered this.

---

[2001-05-03 15:16:11] [EMAIL PROTECTED]
With 4.0.6 latest cvs (not 4.0.5; is there a reason the latest cvs option in the 
versions menu is dated March?), __FILE__ is returning the filename with no path 
delimiters. For example, if the script is /var/www/foo.php, __FILE__ contains 
'varwwwfoo.php'.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10644edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10679 Updated: IMAP_UID doen't return what it should

2001-05-04 Thread chagenbu

ID: 10679
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

this is not what the uid is. see previous closed bug report.

Previous Comments:
---

[2001-05-04 19:30:07] [EMAIL PROTECTED]
From: Rick Gigger [EMAIL PROTECTED]  All email messages have a unique 
identifier.  It is a long string that ususally contains a domiain name or ip address.  
It is unique to all email addresses in the world.  It would be much, much more useful 
if imap_uid would return that instead.

Previous Comments:
---

[2001-05-03 15:36:24] [EMAIL PROTECTED]
You might have the wrong idea of what uid is - what do you expect it to be? On pop 
servers the message uid will very likely just _be_ the message number...

---

[2000-10-27 03:30:55] [EMAIL PROTECTED]
When I call connect to a qmail pop server and call imap_uid all it does is return the 
message number back to me.  It DOES NOT return the uid.  I have to call imap_header 
for that and it is very slow.

---

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10679edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10644: __FILE__ missing path delimiters

2001-05-03 Thread chagenbu

From: [EMAIL PROTECTED]
Operating system: Linux (Debian) 2.2
PHP version:  4.0.5
PHP Bug Type: Scripting Engine problem
Bug description:  __FILE__ missing path delimiters

With 4.0.6 latest cvs (not 4.0.5; is there a reason the latest cvs option in the 
versions menu is dated March?), __FILE__ is returning the filename with no path 
delimiters. For example, if the script is /var/www/foo.php, __FILE__ contains 
'varwwwfoo.php'.


-- 
Edit Bug report at: http://bugs.php.net/?id=10644edit=1



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8359 Updated: imap_fetchheader and FT_PREFETCHTEXT

2001-05-03 Thread chagenbu

ID: 8359
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0.4
Assigned To: 
Comments:

Fixed in 4.0.6-cvs.

Previous Comments:
---

[2000-12-21 12:23:55] [EMAIL PROTECTED]
Referring to bug #4447: (closed)
I think you introduced a bug when solving #4447.
I believe (as did the IMP developers) that imap_fetchheader should ALWAYS return ONLY 
the header.
The flag FT_PREFETCHTEXT is just for optimization and  informs c-client that the 
message text will be needed soon as well.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8359edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8481 Updated: imap_rfc822_parse_adrlist is too STRICT

2001-05-03 Thread chagenbu

ID: 8481
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: IMAP related
PHP Version: 4.0.4
Assigned To: 
Comments:

This is the behavior of the underlying c-client function. If you want looser parsing, 
see PEAR's Mail_RFC822 class, which among other things has an option to turn 
validation off.

Previous Comments:
---

[2000-12-29 12:44:41] [EMAIL PROTECTED]
Imap_rfc822_parse_adrlist is too strict: if a double ,, is present in addresslist, 
then the parsing fails and stops (and gives various SYNTAX-ERROR/INVALID HOST)
This is really annoying as many users type double ,, or even , , (a comma, a space, a 
comma) causing most of recipients to be dropped if Imap_rfc822_parse_adrlist is used.

Example:
imap_rfc822_parse_adrlist(smith,jeff,paul,foobar.com)
WORKS
  -BUT-
imap_rfc822_parse_adrlist(smith,,jeff,paul,foobar.com)
DOES NOT WORK: only smith is extracted, BUT jeff and paul aren't

Workaround: while exploding recipient list, just IGNORE empty recipient as if they 
didn't exist (and of course continue parsing)



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8481edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9333 Updated: imap_fetchstructure()

2001-05-03 Thread chagenbu

ID: 9333
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

no feedback from user.

Previous Comments:
---

[2001-02-19 11:16:16] [EMAIL PROTECTED]
Can you please use more words to describe this problem, and perhaps provide some 
example code and an example message?

---

[2001-02-19 06:01:08] [EMAIL PROTECTED]
Hi.

I find bug IMAP related.

That is imap_fetchstructure.

In returned Objects for imap_fetchstructure() function, If type is application , 
return value must be 3.

But return value was 0.

Please Check this function in application type.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9333edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8625 Updated: can not use imap_open to authenticate with a pop3 server

2001-05-03 Thread chagenbu

ID: 8625
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0.3pl1
Assigned To: 
Comments:

Does it work if you specify a port number explicitly?

Previous Comments:
---

[2001-01-10 03:09:01] [EMAIL PROTECTED]
Below is how I call the imap_open function. It works in linux but not BSDI 4.1. Please 
help.

$this-mbox = imap_open({ . $this-hostname . / . $this-protocol . }
, $this-username, $this-password);


list of module:
'./configure' '--with-apache=../apache_1.3.12' '--with-mysql' '--with-imap' 
'--enable-track-vars'



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8625edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9209 Updated: imap_fetchstructure doesnt return envelope of 'message/rfc822'-subparts

2001-05-03 Thread chagenbu

ID: 9209
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0.4
Assigned To: 
Comments:

Ryan's comment describes the way to get at this info in c-client.

Previous Comments:
---

[2001-03-22 16:06:13] [EMAIL PROTECTED]
From: Ryan Finnie [mailto:[EMAIL PROTECTED]]

I saw your bug report on bugs.php.net -- pity a 3rd party can't add comments or I 
would have posted that there.

Anyways, php uses the c-client library, which can be broken in some aspects.  To get 
information about the envelope, you would need to do 
imap_rfc822_parse_headers(imap_fetchbody($mbox, $msgid, $part.0));

In your example in the bug, $part would be 2.  This will return an object similar to 
imap_headerinfo (IE, grabbing the envelope from the main message).  Technically, 
according to the RFC, you should grab $part.HEADER, not $part.0 -- but like I said, 
c-client is a bit screwy.  I left an explanation of that part of the problem in
http://php.net/manual/en/function.imap-fetchbody.php

Please let me know if this helps.
Ryan Finnie

---

[2001-02-10 20:49:04] [EMAIL PROTECTED]
When i connect directly via telnet to my IMAP-Server, 'fetch n (bodystructure)' 
returns the envelope of subparts with the type 'message/rfc822', as described in RFC 
2060. (I do not mean the envelope of the main-part!)

But when i call imap_fetchstructure via PHP, i do NOT get any envelope?!

Is there any other way to get these envelopes? Now i have to download the whole 
message and parse it myself. But this of course is very slow in PHP ;)

--- IMAP-Server Reply ---
BODYSTRUCTURE
(
  (
TEXT PLAIN (CHARSET iso-8859-1)
NIL NIL 7BIT 9 1 NIL NIL NIL
  )
  (
MESSAGE RFC822 (NAME Submail.eml)
NIL NIL 7BIT 335
(
  Sun, 11 Feb 2001 02:28:41 +0100
  Submail
  ((Tester NIL Tester host))
  ((Tester NIL Tester host))
  ((Tester NIL Tester host))
  ((NIL NIL Test .MISSING-HOST-NAME.))
  NIL NIL NIL NIL
)
(
  TEXT PLAIN (CHARSET iso-8859-1)
  NIL NIL 7BIT 9 1 NIL NIL NIL
)
13 NIL (ATTACHMENT (FILENAME Submail.eml)) NIL
  )
  MIXED (BOUNDARY 123) NIL NIL
)

--- PHP imap_fetchstructure Result (shortened) ---
obj [
  type = 1
  subtype = MIXED
  parameters = arr {
0 = obj [attribute = BOUNDARY value = 123]
  }
  parts = arr {
0 = obj [
  subtype = PLAIN
  lines = 1
  bytes = 9
  parameters = arr {
0 = obj [attribute = CHARSET value = iso-8859-1]
  }
]
1 = obj [
  type = 2
  subtype = RFC822
  lines = 13
  bytes = 335
  disposition = ATTACHMENT
  dparameters = arr {
0 = obj [attribute = FILENAME value = Submail.eml]
  }
  parameters = arr {
0 = obj [attribute = NAME value = Submail.eml]
  }
  parts = arr {
0 = obj [
  subtype = PLAIN
  lines = 1
  bytes = 9
  parameters = arr {
0 = obj [attribute = CHARSET value = iso-8859-1]
  }
]
  }
]
  }
]

--- Mail Sourcecode (shortened) ---
From: Tester Tester@host
To: Someone
Subject: Mailmail
Date: Sun, 11 Feb 2001 02:29:12 +0100
Content-Type: multipart/mixed;
boundary=123

This is a multi-part message in MIME format.

123
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Content

123
Content-Type: message/rfc822; name=Submail.eml
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=Submail.eml

From: Tester Tester@host
To: Test
Subject: Submail
Date: Sun, 11 Feb 2001 02:28:41 +0100
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 7bit

Content

123--


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9209edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #5084 Updated: imap_mail_compose produces a SigSegv

2001-05-03 Thread chagenbu

ID: 5084
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Assigned
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0 Release Candidate 2
Assigned To: sniper
Comments:

Can you test this with 4.0.6-cvs? It is very likely fixed now.

Previous Comments:
---

[2000-07-29 23:04:42] [EMAIL PROTECTED]
I made a partial fix to this which is committed into the CVS. But there is still some 
bugs in this. 

For now at least the script below works:

?php

$envelope[from]=[EMAIL PROTECTED];
$envelope[to]=musone@darkstar;
$envelope[cc]=[EMAIL PROTECTED];

$part1[type]=TYPEMULTIPART;
$part1[subtype]=mixed;

$filename=/tmp/imap.c.gz;
$fp=fopen($filename,r);
$contents=fread($fp,filesize($filename));
fclose($fp);
$part2[type]=TYPEAPPLICATION;
$part2[encoding]=ENCBINARY;
$part2[subtype]=octet-stream;
$part2[description]=basename($filename);
$part2[contents.data]=$contents;


$part3[type]=TYPETEXT;
$part3[subtype]=plain;
$part3[description]=description3;
$part3[contents.data]=contents.data3nnnt;

$body[1]=$part1;
$body[2]=$part2;
$body[3]=$part3;
echo nl2br(imap_mail_compose($envelope,$body));

?

I will write some kind of documentation of this soon as possible.

--Jani

---

[2000-07-29 02:49:38] [EMAIL PROTECTED]
IMAP related. 

--Jani

---

[2000-07-29 02:43:54] [EMAIL PROTECTED]
Same as #3337

--Jani

---

[2000-06-16 17:11:06] [EMAIL PROTECTED]
?php

print blabrn;
$env = array(From: [EMAIL PROTECTED]);
$body = array(Part 1);

print imap_mail_compose($env,$body);
?


./configure  --with-apache=../apache_1.3.9 --with-ldap=/opt/ldap
--with-gdbm --with-imap=/opt/apache/apache/src/c-client/imap-4.7b/ --with-zlib 
--enable-sysvshm

gdb backtrace:
Program received signal SIGSEGV, Segmentation fault.
0x80ae8a6 in php_if_imap_mail_compose (ht=2, return_value=0x839834c, this_ptr=0x0, 
return_value_used=1) at php_imap.c:3094
3094bod-nested.part=mail_newbody_part();
(gdb) bt
#0  0x80ae8a6 in php_if_imap_mail_compose (ht=2, return_value=0x839834c, this_ptr=0x0, 

return_value_used=1) at php_imap.c:3094
#1  0x81038dc in execute (op_array=0x83971d4) at ./zend_execute.c:1574
#2  0x8087fab in php_execute_script (primary_file=0xbbec) at main.c:1200
#3  0x80a2b20 in apache_php_module_main (r=0x837f674, fd=40, display_source_mode=0)
at sapi_apache.c:93
#4  0x80844db in send_php ()
#5  0x808451c in send_parsed_php ()
#6  0x8150263 in ap_invoke_handler ()
#7  0x81639b9 in process_request_internal ()
#8  0x8163a1c in ap_process_request ()
#9  0x815b34e in child_main ()
#10 0x815b4fc in make_child ()
#11 0x815b659 in startup_children ()
#12 0x815bc86 in standalone_main ()
#13 0x815c419 in main ()
#14 0x400f6cb3 in __libc_start_main (main=0x815c0cc main, argc=2, argv=0xbda4, 
init=0x8082928 _init, fini=0x822b90c _fini, rtld_fini=0x4000a350 _dl_fini, 
stack_end=0xbd9c) at ../sysdeps/generic/libc-start.c:78


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=5084edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9461 Updated: imap_open crash when connecting to nntp with username and password

2001-05-03 Thread chagenbu

ID: 9461
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0 Latest CVS (26/02/2001)
Assigned To: 
Comments:

Can you try 4.0.6-cvs and see if Andi's strlcopy change had any affect on this?

Previous Comments:
---

[2001-05-02 16:49:11] [EMAIL PROTECTED]
From:  James Treleaven [EMAIL PROTECTED] 

Like the author of bug #9461, I also tracked the problem down to mm_login() in 
ext/imap/php_imap.c [that is where my stack was getting stomped].  I replaced the 
later two calls to strncpy() in the function, with calls to strcpy(), and now I can 
use the function to login to news servers with no 
problem! 

The code in mm_login() looks correct to me - but I cannot believe that there is a bug 
in Linux's libc.a:strncpy(). I have a web based gateway up and running with hundreds 
of user's using my modified imap_open() to successfully connect to nntp with their 
usernames and passwords (we always require authentication).  My modification seems to 
be a good workaround - but I don't know why. 

---

[2001-02-26 08:36:22] [EMAIL PROTECTED]
function that causes crash
?php
imap_open('{newsserver/nntp}'.'test.test','username','password') || die(can't 
connect: .imap_last_error());
/php


backtrace from gdb ( i know it says nothing but i did as described in the backtrace 
faq.)
#0  0x0 in ?? ()

I have a problem with imap_open:
I can do imap_open on nntp server that has no authentication. But when i try on
a nntpserver that requires a password.. php dumps core (signal 11 gdb backtrace
is #0 0x0 in ?? ()) ( i executed the cgi version of php to be sure that apache
has nothing to do with it.)
i tested c-client with the mtest program and it worked perfectly.
I've tried to compile php4 with -enable-debug but i'm not so experienced with
gdb so when i load the core-file i still get no symbols or references to the
instruction that causes the problem.
it should be simple to test:


try to connect to a nntp server without username and password
try to connect to a nntp server that requires username and password


i have looked through the c-client code and the php4 extension and i could
imagine the problem might be in mm_login but i'm not certain.


the server is running:
php4.0.5-dev latest cvs
linux 2.2.12-20smp
imap (imap-2001.BETA.SNAP-0102201858) also tried (imap-4.7c)
All help is appreciated and if anybody wants more information or maybe a test
nntp account i can provide that (just send me a mail [EMAIL PROTECTED]).

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9461edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9335 Updated: configure fails to add -lc-client

2001-05-03 Thread chagenbu

ID: 9335
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: IMAP related
Bug Type: Compile Failure
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

reclassifying

Previous Comments:
---

[2001-02-19 07:25:23] [EMAIL PROTECTED]
subject says it.
also when i use phpize in ext imap to build a shared module for an already installed 
php i get:
cd php4/ext/imap
phpize
./configure
make
...
/bin/sh /home/thies/devel/imap/libtool --mode=link gcc  -I. -I/home/thies/devel/imap/ 
-I/home/thies/devel/imap/main -I/home/thies/devel/imap -I/usr/local/include/php 
-I/usr/local/include/php/main -I/usr/local/include/php/Zend 
-I/usr/local/include/php/TSRM -I/usr/include/imap   -g -O2   -o imap.la -avoid-version 
-module -rpath /home/thies/devel/imap/modules  php_imap.lo  -lcrypto -lssl 
-lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -Ryes/lib -Lyes/lib -limap
libtool: link: only absolute run-paths are allowed
...
config_vars.mk has a line saying:
IMAP_SHARED_LIBADD = -lcrypto -lssl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err 
-Ryes/lib -Lyes/lib -limap

which is obviously incorrect.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9335edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10356 Updated: imap_utf7_encode cann't encode Chinese correctly

2001-05-03 Thread chagenbu

ID: 10356
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Old-Bug Type: Mail related
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

reclassifying

Previous Comments:
---

[2001-04-16 22:46:59] [EMAIL PROTECTED]
I try to use the imap_utf7_encode and imap_utf_decode to
decode and encode the example in RFC2060. But they are
not correct. 
I compile with the c-client of imap2000a.

example¡G
echo imap_utf7_decode('U,BTFw-');
echo imap_utf7_encode('¥x¥_');



---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10356edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9242 Updated: base64_encode, decode and imap_binary

2001-05-03 Thread chagenbu

ID: 9242
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: Mail related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

You may be doing something wrong in your script; there are many PHP webmail programs 
that generate attachments using those functions just fine.

Previous Comments:
---

[2001-02-13 12:44:53] [EMAIL PROTECTED]
when building mime attachments for emails with chunk_split(base64encode(something)) 
oder imap_binary(something) the rusult cant be read by the email clients. decoding of 
the result ends up in the same file then the original was. looks like some general 
error in encoding/decoding. when using an external routing in that srcipt (eg 
uuenview) to encode it and add the result into the mime email everything ´works fine.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9242edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #8452 Updated: imap_fetchstructure problem

2001-05-03 Thread chagenbu

ID: 8452
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0.4
Assigned To: 
Comments:

Is this still the case, and are you using an updated version of c-client?

Previous Comments:
---

[2000-12-28 09:03:32] [EMAIL PROTECTED]
when reading a mail which have no attachment (single part mail), 

imap_fetchstructure-type is always text
imap_fetchstructure-subtype is always plain

even if in the header we have

Content-Type: text/html

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=8452edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10376 Updated: abnormal program termination on imap_body($box,0)

2001-05-03 Thread chagenbu

ID: 10376
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

Fixed in 4.0.6-cvs.

Previous Comments:
---

[2001-04-18 08:32:17] [EMAIL PROTECTED]
if(!$box=imap_open('{localhost/pop3:110}INBOX','mybox','mypassword'))
die('Can't Open box!');

// Here is abnormal program termination
// I think returning of NULL is better solution
// imap_header is Ok (warning is generated)
$B=imap_body($box,0);

imap_close($box);

for PHP.INI see the bug #9819


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10376edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9609 Updated: imap_getsubscribed core dumps if there are no subscribed folders

2001-05-03 Thread chagenbu

ID: 9609
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

I can't reproduce this with 4.0.6-cvs, and I don't remember running into it earlier, 
either. Can you still reproduce it, and if so, can you give a backtrace?

Previous Comments:
---

[2001-03-07 21:22:57] [EMAIL PROTECTED]
The imap_getsubscribed on my setup will core dump if there are no subscribed folders.  
It's sister function imap_getmailboxes however works fine.

I have tried this with 4.0.3pl1, 4.0.4, and 4.0.4pl1 using uw imap 2000a, and 
2001-beta.

configured with:
'./configure' '--with-mysql=/usr/local/mysql' '--with-config-file-path=/etc' 
'--with-system-regex' '--disable-debug' '--with-exec-dir=/' '--enable-sysvshm=yes' 
'--enable-sysvsem=yes' '--enable-ftp' '--enable-trans-sid' 
'--enable-inline-optimization' 
'--with-cybercash=/usr/local/work/mck-3.2.0.6-i586-pc-linux-gnulibc2.1' 
'--with-imap=/usr/local/work/imap-2001.beta' '--with-oci8'

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9609edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #7486 Updated: imap_uid does not return the uid

2001-05-03 Thread chagenbu

ID: 7486
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0.2
Assigned To: 
Comments:

From: Rick Gigger [EMAIL PROTECTED]

All email messages have a unique identifier.  It is a long string that ususally 
contains a domiain name or ip address.  It is unique to all email addresses in the 
world.  It would be much, much more useful if imap_uid
would return that instead.

Previous Comments:
---

[2001-05-03 15:36:24] [EMAIL PROTECTED]
You might have the wrong idea of what uid is - what do you expect it to be? On pop 
servers the message uid will very likely just _be_ the message number...

---

[2000-10-27 03:30:55] [EMAIL PROTECTED]
When I call connect to a qmail pop server and call imap_uid all it does is return the 
message number back to me.  It DOES NOT return the uid.  I have to call imap_header 
for that and it is very slow.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7486edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #7486 Updated: imap_uid does not return the uid

2001-05-03 Thread chagenbu

ID: 7486
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Feedback
Status: Bogus
Bug Type: IMAP related
PHP Version: 4.0.2
Assigned To: 
Comments:

That's the Message-ID header. The uid which imap_uid() is intended to return is a 
unique identifier of that that message in that mailbox that won't change over time. It 
has nothing to do with the Message-ID header.

Previous Comments:
---

[2001-05-03 17:14:14] [EMAIL PROTECTED]
From: Rick Gigger [EMAIL PROTECTED]

All email messages have a unique identifier.  It is a long string that ususally 
contains a domiain name or ip address.  It is unique to all email addresses in the 
world.  It would be much, much more useful if imap_uid
would return that instead.

---

[2001-05-03 15:36:24] [EMAIL PROTECTED]
You might have the wrong idea of what uid is - what do you expect it to be? On pop 
servers the message uid will very likely just _be_ the message number...

---

[2000-10-27 03:30:55] [EMAIL PROTECTED]
When I call connect to a qmail pop server and call imap_uid all it does is return the 
message number back to me.  It DOES NOT return the uid.  I have to call imap_header 
for that and it is very slow.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=7486edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10330 Updated: imap-2001.BETA and imap-ssl support in PHP4

2001-05-02 Thread chagenbu

ID: 10330
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0 Latest CVS (14/04/2001)
Assigned To: 
Comments:

The --with-imap-ssl option is only intended for cases when you've compiled c-client 
with SSL support.

Previous Comments:
---

[2001-05-02 00:17:00] [EMAIL PROTECTED]
It's imap-2001.BETA that is broken here.
Use imap-2000. That works just fine.

--Jani


---

[2001-04-14 23:22:22] [EMAIL PROTECTED]
I've built the imap-2001.BETA toolkit with SSL (OpenSSL 0.9.6a) support and copied the 
c-client header files in a 'standard' location and c-client library files, but when 
compiling PHP4-cvs --with-imap-ssl support I get the following error:

config.nice:

./configure 
--with-apxs 
--with-config-file-path=/var/www/conf 
--with-gdbm 
--with-gettext 
--with-imap 
--with-imap-ssl 
--with-mysql 
--with-openssl 
--with-regex=system 
--with-zlib 
--enable-memory-limit 
--enable-safe-mode 
--enable-track-vars 
--enable-bcmath 
--enable-wddx 
--enable-xml 

$ make
...
-DTARGET=httpsd -DUSE_HSREGEX -DUSE_EXPAT -DAPACHE_SSL -DSUPPORT_UTF8 
-DXML_BYTE_ORDER=12 -g -O2  -c php_imap.c
php_imap.c: In function `php_minit_imap':
php_imap.c:450: `auth_ssl' undeclared (first use in this function)
php_imap.c:450: (Each undeclared identifier is reported only once
php_imap.c:450: for each function it appears in.)
make[3]: *** [php_imap.lo] Error 1
make[3]: Leaving directory `/home/raul/src/cvs/php4/ext/imap'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/raul/src/cvs/php4/ext/imap'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/raul/src/cvs/php4/ext'
make: *** [all-recursive] Error 1

~/src/imap-2001.BETA.SNAP-0104140025$ cat c-client/linkage.c
  mail_link (mboxdriver);  /* link in the mbox driver */
  mail_link (imapdriver);  /* link in the imap driver */
  mail_link (nntpdriver);  /* link in the nntp driver */
  mail_link (pop3driver);  /* link in the pop3 driver */
  mail_link (mhdriver);/* link in the mh driver */
  mail_link (mxdriver);/* link in the mx driver */
  mail_link (mbxdriver);   /* link in the mbx driver */
  mail_link (tenexdriver); /* link in the tenex driver */
  mail_link (mtxdriver);   /* link in the mtx driver */
  mail_link (mmdfdriver);  /* link in the mmdf driver */
  mail_link (unixdriver);  /* link in the unix driver */
  mail_link (newsdriver);  /* link in the news driver */
  mail_link (philedriver); /* link in the phile driver */
  mail_link (dummydriver); /* link in the dummy driver */
  auth_link (auth_md5);/* link in the md5 authenticator */
  auth_link (auth_pla);/* link in the pla authenticator */
  auth_link (auth_log);/* link in the log authenticator */
  ssl_onceonlyinit ();

Thank you.


Raul

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10330edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9461 Updated: imap_open crash when connecting to nntp with username and password

2001-05-02 Thread chagenbu

ID: 9461
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: IMAP related
PHP Version: 4.0 Latest CVS (26/02/2001)
Assigned To: 
Comments:

From:  James Treleaven [EMAIL PROTECTED] 

Like the author of bug #9461, I also tracked the problem down to mm_login() in 
ext/imap/php_imap.c [that is where my stack was getting stomped].  I replaced the 
later two calls to strncpy() in the function, with calls to strcpy(), and now I can 
use the function to login to news servers with no 
problem! 

The code in mm_login() looks correct to me - but I cannot believe that there is a bug 
in Linux's libc.a:strncpy(). I have a web based gateway up and running with hundreds 
of user's using my modified imap_open() to successfully connect to nntp with their 
usernames and passwords (we always require authentication).  My modification seems to 
be a good workaround - but I don't know why. 

Previous Comments:
---

[2001-02-26 08:36:22] [EMAIL PROTECTED]
function that causes crash
?php
imap_open('{newsserver/nntp}'.'test.test','username','password') || die(can't 
connect: .imap_last_error());
/php


backtrace from gdb ( i know it says nothing but i did as described in the backtrace 
faq.)
#0  0x0 in ?? ()

I have a problem with imap_open:
I can do imap_open on nntp server that has no authentication. But when i try on
a nntpserver that requires a password.. php dumps core (signal 11 gdb backtrace
is #0 0x0 in ?? ()) ( i executed the cgi version of php to be sure that apache
has nothing to do with it.)
i tested c-client with the mtest program and it worked perfectly.
I've tried to compile php4 with -enable-debug but i'm not so experienced with
gdb so when i load the core-file i still get no symbols or references to the
instruction that causes the problem.
it should be simple to test:


try to connect to a nntp server without username and password
try to connect to a nntp server that requires username and password


i have looked through the c-client code and the php4 extension and i could
imagine the problem might be in mm_login but i'm not certain.


the server is running:
php4.0.5-dev latest cvs
linux 2.2.12-20smp
imap (imap-2001.BETA.SNAP-0102201858) also tried (imap-4.7c)
All help is appreciated and if anybody wants more information or maybe a test
nntp account i can provide that (just send me a mail [EMAIL PROTECTED]).

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9461edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10536 Updated: imap_expunge() can't really expunge mail

2001-04-28 Thread chagenbu

ID: 10536
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Bogus
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

Your second example is correct, and is also a heck of a lot more efficient.

The first example doesn't work because every time you call imap_expunge(), the pop3 
server actually deletes the messages, and the message numbers change. So if you have 
messages 1, 2, 3, 4, you delete 1, and you call imap_expunge, you don't have 2, 3, 4, 
you have 1, 2, 3. Your code then tries to delete number 2, leaving you with 1, 2 ... 
you see where this is going.

Previous Comments:
---

[2001-04-28 10:25:50] [EMAIL PROTECTED]
As I wrote the following code I found the strong situation in imap_expunge(). It will 
expunge mails with odd number only but not every mail as I expected.

$mbox =  imap_open({localhost/pop3:110INBOX, test, test);

$num_msg = imap_num_msg($mbox);
echo start at $num_msg...br;
for ( $i=1; $i=$num_msg; $i++ ) {

   imap_delete($mbox, $i);
   imap_expunge($mbox);
   echo doing $ibr;
}
imap_expunge($mbox);
$num_msg = imap_num_msg($mbox);
echo now is $num_msgbr;
imap_close($mbox);

I have the following output:

start at 10...
doing 1
doing 2
doing 3
doing 4
doing 5
doing 6
doing 7
doing 8
doing 9
doing 10
now is 5

If I modify the code as following the problem solved:

for ( $i=1; $i=$num_msg; $i++ ) {
   imap_delete($mbox, $i);
   echo doing $ibr;
}
imap_expunge($mbox);

The result is coreect and all mail has been deleted.
This bug occurs if a web mail system with a pop server try to delete lots of spam at a 
time.


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10536edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10493 Updated: Secure IMAP server connection failure

2001-04-25 Thread chagenbu

ID: 10493
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: IMAP related
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

Support for imap-ssl wasn't correctly added until revision 1.62 of php_imap.c, which 
was first in php4.0.5 RC1.

Previous Comments:
---

[2001-04-25 13:11:38] [EMAIL PROTECTED]
When running script below, I keep getting the following error:
---
Warning: Couldn't open stream {hostname.domain.tld/ssl/novalidate-cert} in 
/full-path-to-website/test.php on line 2

Mailboxes


Warning: Unable to find stream pointer in /full-path-to-website/test.php on line 5
Call failed

Headers in INBOX


Warning: Unable to find stream pointer in /full-path-to-website/test.php on line 16
Call failed

Warning: Unable to find stream pointer in /full-path-to-website/test.php on line 26
-
Non-SSL connections work normally. Script:
--
?php
$mbox = imap_open ({hostname.domain.tld/ssl/novalidate-cert}, user, passwd);
 
echo ph1Mailboxes/h1n;
$folders = imap_listmailbox ($mbox, {hostname.domain.tld/ssl/novalidate-cert}, *);
 
if ($folders == false) {
echo Call failedbrn;
} else {
while (list ($key, $val) = each ($folders)) {
echo $val.brn;
}
}
 
echo ph1Headers in INBOX/h1n;
$headers = imap_headers ($mbox);
 
if ($headers == false) {
echo Call failedbrn;
} else {
while (list ($key,$val) = each ($headers)) {
echo $val.brn;
}
}
 
imap_close($mbox);
?

This script is a modified variant of the one found with the imap_open() manual page on 
the www.php.net site.

PHP was compiled as follows:
./configure --prefix=/usr --with-apxs=/var/lib/apache/sbin/apxs --with-mod_charset 
--enable-force-cgi-redirect --enable-discard-path --disable-debug --with-openssl=/usr 
--with-bz2 --with-zlib --with-zlib-dir=/usr/include --enable-ftp 
--with-imap-ssl=path-to-cclient --with-imap=path-to-cclient 
--with-mysql=path-to-mysql --with-mm --with-snmp --enable-ucd-snmp-hack --enable-yp 
--with-tsrm-pthreads --enable-EAPI=yes

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10493edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10260 Updated: imap_sort segaults if no mail is in the user's mailbox

2001-04-23 Thread chagenbu

ID: 10260
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Duplicate
Bug Type: Reproduceable crash
PHP Version: 4.0.4pl1
Assigned To: 
Comments:

duplicate of 9908

Previous Comments:
---

[2001-04-10 10:48:15] [EMAIL PROTECTED]
The following code causes a segfault if there is no mail in the user's mailbox:

$mbox = imap_open({localhost:143}INBOX, user, pass);
$arr = imap_sort($mbox, SORTARRIVAL, 0, SE_UID)




---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10260edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #10094 Updated: Segfault in Apache

2001-04-23 Thread chagenbu

ID: 10094
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Duplicate
Bug Type: IMAP related
PHP Version: 4.0 Latest CVS (31/03/2001)
Assigned To: 
Comments:

duplicate of 9908

Previous Comments:
---

[2001-03-31 11:51:22] [EMAIL PROTECTED]
PHP Compile Options:
./configure' '--with-zlib' '--with-mm' '--with-mysql'
'--with-mcal=../libmcal' '--with-ldap' '--with-imap=../imap'
'--with-gettext' '--enable-ftp' '--with-mcrypt'
'--with-apxs=/usr/local/etc/apache/bin/apxs'

Apache Compile Opts:
EAPI_MM=../mm-1.1.3 
SSL_BASE=SYSTEM 
./configure 
--with-layout=Apache 
--prefix=/usr/local/etc/apache/ 
--enable-module=ssl 
--enable-shared=ssl 
--enable-module=so 
--enable-module=rewrite 
--enable-module=proxy

I'm trying to use IMP.  Apache receives sig(11)
Here is gdb backtrace:


[root@mail bin]# gdb httpd

(gdb) run -X -f conf/httpd
Starting program: /usr/local/etc/apache/bin/httpd -X -f
conf/httpd
fopen: No such file or directory
httpd: could not open document config file
/usr/local/etc/apache/conf/httpd

Program exited with code 01.
(gdb) run -X -f conf/httpd.conf
Starting program: /usr/local/etc/apache/bin/httpd -X -f
conf/httpd.conf
warning: find_solib: Can't read pathname for load map:
Input/output error


Program received signal SIGSEGV, Segmentation fault.
0x40330365 in php_if_imap_sort (ht=5,
return_value=0x81bfb24, this_ptr=0x0,
return_value_used=1) at php_imap.c:2750
2750for (sl = slst; *sl; sl++) {
(gdb) bt
#0  0x40330365 in php_if_imap_sort (ht=5,
return_value=0x81bfb24, this_ptr=0x0,
return_value_used=1) at php_imap.c:2750
#1  0x402faad6 in execute (op_array=0x816056c) at
./zend_execute.c:1494
#2  0x40308850 in zend_execute_scripts (type=8,
file_count=3) at zend.c:743
#3  0x40319d51 in php_execute_script
(primary_file=0xb920) at main.c:1194
#4  0x403167c2 in apache_php_module_main (r=0x8143518,
display_source_mode=0)
at sapi_apache.c:89
#5  0x403170e6 in send_php (r=0x8143518,
display_source_mode=0, filename=0x0)
at mod_php4.c:521
#6  0x40317118 in send_parsed_php (r=0x8143518) at
mod_php4.c:532
#7  0x8083e33 in ap_invoke_handler () at mcrypt_modules.c:245
#8  0x8097df9 in process_request_internal () at
mcrypt_modules.c:245
#9  0x8097e5c in ap_process_request () at mcrypt_modules.c:245
#10 0x808f39e in child_main () at mcrypt_modules.c:245
#11 0x808f54c in make_child () at mcrypt_modules.c:245
#12 0x808f6a9 in startup_children () at mcrypt_modules.c:245
#13 0x808fce6 in standalone_main () at mcrypt_modules.c:245
#14 0x8090483 in main () at mcrypt_modules.c:245
#15 0x400c39cb in __libc_start_main (main=0x809012c main,
argc=4, argv=0xbae4,
init=0x805063c _init, fini=0x80c6f7c _fini,
rtld_fini=0x4000aea0 _dl_fini,
stack_end=0xbadc) at ../sysdeps/generic/libc-start.c:92


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10094edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #9908 Updated: imap_sort() seg fault

2001-04-23 Thread chagenbu

ID: 9908
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Feedback
Bug Type: IMAP related
PHP Version: 4.0 Latest CVS (20/03/2001)
Assigned To: 
Comments:

I just committed a fix to CVS. Please verify it.

Previous Comments:
---

[2001-03-21 21:55:17] [EMAIL PROTECTED]
Under certain cercumstances imap_sort() will cause an apache child process to seg 
fault.

Script:

?php
  $mbox = imap_open('{host.com/imap:143}INBOX', 
'login', 'password', OP_READONLY);
  $results = imap_sort($mbox, 0, 0, SE_UID, 'UNSEEN');
  var_dump($results);
  imap_close($mbox);
?

Run against a mailbox with 1 UNSEEN message, produces the correct output:

array(1) { [0]= int(953) } 

However running against a mailbox without any UNSEEN messages, apache dies.  Attached 
is a gdb backtrace:


(gdb) run ./httpd -X -DSSL
Starting program: /usr/local/build/apache-build/apache-1.3.19/src/./httpd ./httpd -X 
-DSSL

Program received signal SIGSEGV, Segmentation fault.
0x80c0aa7 in php_if_imap_sort (ht=5, return_value=0x83f1234, this_ptr=0x0, 
return_value_used=1)
at php_imap.c:2750
2750for (sl = slst; *sl; sl++) { 
(gdb) bt
#0  0x80c0aa7 in php_if_imap_sort (ht=5, return_value=0x83f1234, this_ptr=0x0, 
return_value_used=1)
at php_imap.c:2750
#1  0x8156bdf in execute (op_array=0x840c4cc) at ./zend_execute.c:1494
#2  0x812f25b in zend_execute_scripts (type=8, file_count=3) at zend.c:743
#3  0x80b37eb in php_execute_script (primary_file=0xb8b4) at main.c:1194
#4  0x813b97b in apache_php_module_main (r=0x834d98c, display_source_mode=0) at 
sapi_apache.c:89
#5  0x80b0ef6 in send_php ()
#6  0x80b0f2e in send_parsed_php ()
#7  0x81614a9 in ap_invoke_handler ()
#8  0x81763af in process_request_internal ()
#9  0x817641a in ap_process_request ()
#10 0x816d276 in child_main ()
#11 0x816d451 in make_child ()
#12 0x816d5cc in startup_children ()
#13 0x816dc3c in standalone_main ()
#14 0x816e48c in main ()
#15 0x400d49cb in __libc_start_main (main=0x816e0d4 main, argc=4, argv=0xbb44, 
init=0x80818c4 _init, fini=0x826dfa4 _fini, rtld_fini=0x4000ae60 _dl_fini, 
stack_end=0xbb3c) at ../sysdeps/generic/libc-start.c:92


This happens with both https and http as well as imaps and regular imap.

other info: c-client 2000c

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9908edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9333 Updated: imap_fetchstructure()

2001-02-19 Thread chagenbu

ID: 9333
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: IMAP related
Assigned To: 
Comments:

Can you please use more words to describe this problem, and perhaps provide some 
example code and an example message?

Previous Comments:
---

[2001-02-19 06:01:08] [EMAIL PROTECTED]
Hi.

I find bug IMAP related.

That is imap_fetchstructure.

In returned Objects for imap_fetchstructure() function, If type is application , 
return value must be 3.

But return value was 0.

Please Check this function in application type.

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9333edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9167 Updated: imap_status()

2001-02-07 Thread chagenbu

ID: 9167
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Status: Open
Bug Type: IMAP related
Assigned To: 
Comments:

I remember this problem being solved by putting a valid entry for localhost into 
/etc/hosts on the machine in question. Do you have an entry, and if not, does adding 
one fix the problem?

Previous Comments:
---

[2001-02-07 17:18:24] [EMAIL PROTECTED]
This works:
$mbox = imap_open ("{rapanden.dk:143}", "$login", "$passwd",
OP_HALFOPEN);
$status =
imap_status($mbox,"{rapanden.dk:143}INBOX",SA_MESSAGES);

and this dos'nt:
$mbox = imap_open ("{localhost:143}", "$login", "$passwd",
OP_HALFOPEN); $status =
imap_status($mbox,"{localhost:143}INBOX",SA_MESSAGES);

The problem is that imap_status will only accept the machine
name, even if I use mail.rapanden.dk that points to the same
ip as rapanden.dk it won't work.

I found another description of the problem here:
http://faqchest.dynhost.com/prgm/imp-l/imp-00/imp-0012/imp-001206/imp00121423_34248.html


Troels Liebe Bentsen

---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9167edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] PHP 4.0 Bug #9081 Updated: Typo in pear/Mail/smtp.php

2001-02-02 Thread chagenbu

ID: 9081
Updated by: chagenbu
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Assigned
Bug Type: Mail related
Assigned To: 
Comments:

yup, how about that. nice catch - it's fixed now.

Previous Comments:
---

[2001-02-02 13:35:28] [EMAIL PROTECTED]
I think this is a typo:
function Mail_smtp($params)
{
if (isset($params['host'])) $this-host = $params['host'];
if (isset($params['port'])) $this-host = $params['port'];
if (isset($params['auth'])) $this-host = $params['auth'];
if (isset($params['username'])) $this-host = $params['username'];
if (isset($params['password'])) $this-host = $params['password'];
}

It should be:
function Mail_smtp($params)
{
if (isset($params['host'])) $this-host = $params['host'];
if (isset($params['port'])) $this-port = $params['port'];
if (isset($params['auth'])) $this-auth = $params['auth'];
if (isset($params['username'])) $this-username = $params['username'];
if (isset($params['password'])) $this-password = $params['password'];
}


---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=9081edit=2


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]