php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18924 cc: toofewargs Error when building with imap-2002.RC2 support
Submitted: 2002-08-15 15:55 UTC Modified: 2002-08-15 18:34 UTC
From: vlb at gene dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.2.2 OS: Tru64 Unix
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: vlb at gene dot com
New email:
PHP Version: OS:

 

 [2002-08-15 15:55 UTC] vlb at gene dot com
I have configured php4.2.2 to builde --with-imap and have  imap-2002.RC2 downloaded and the c-client library installed.

The php build proecess gets this error:

cc: Error: php_imap.c, line 719: In this statement, "myusername_full" expects 1 arguments, but 0 are supplied. (toofewargs)
                (void) myusername_full();
-----------------------^

I have found myusername_full defined under the imap build tree as:
    char *myusername_full (unsigned long *flags)

Perhaps php_imap.c was written to support an earlier version of imap?  Or perhaps other compilers are less picky if a function wants an arg and isn't given one; I do note that myusernaame_full() checks if(flags).

But the error is a blocker for me nonetheless.  If someone would investigate. Hand in NIL?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-15 15:58 UTC] kalowsky@php.net
can you please try IMAP 2001 as that is a released verison that is known to work.  
 [2002-08-15 16:50 UTC] vlb at gene dot com
I don't really consider it appropriate to test against an old, no longer supported, relewase of IMAP except as an academic exercise. If PHP supports IMAP it should support the most recent release of IMAP based on PHP, therefore this _is_ a bug.

That said, the function declaration has not changed since at least 2000 (the version of imap currently installed on this system is Copyright 2000 University of Washington.).  I have been trying to use a more recent version of imap in order to avoid several errors from the php build (errors that the 2001 IMP may very well address as well).  However, the toofewargs error referenced in this bug report is not one I seem to be able to avoid. 

The OSF/1 compiler may be overly picky, but php_imap.c really shouldn't be calling myusername_full() with no args whenn the function expects one.

See c-client/env_unix.h in (whatever?) IMAP distribution:
...
   char *myusername_full (unsigned long *flags);
 [2002-08-15 16:53 UTC] vlb at gene dot com
Note that the same header file, env_unix.h, has this line

#define myusername() \
  myusername_full (NIL)

I see no reason why php shouldn't use the same args to call myusername_full
 [2002-08-15 18:34 UTC] kalowsky@php.net
First of all IMAP2001 is not an obsolete library.  If you notice, 2002 is still in the RC process, which is considered unstable.  Once it is stable there will be support for it, most likely with nothing needing to be done.

I'm not sure where you got your version of PHP but the code contains no line which says "myusername_full".  In fact that is not even part of the naming convention that PHP uses.  

Now looking through the IMAP source code I find this referenced everywhere.  That suggest to me that this isn't a PHP error, but an IMAP2002 bug.  Please go inform them of this issue.  Marking as Bogus
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 20:00:02 2026 UTC