php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41029 Parse Error before zval
Submitted: 2007-04-09 16:54 UTC Modified: 2007-04-28 14:45 UTC
From: dgrimes at scvl dot com Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 5.2.1 OS: Tru64 V5.1
Private report: No CVE-ID: None
 [2007-04-09 16:54 UTC] dgrimes at scvl dot com
Description:
------------
Receiving the following error during compile:

/usr/include/arpa/nameser_compat.h:164:1: warning: "INT16SZ" redefined
In file included from /user01/dgrimes/cdev/php-5.2.1/ext/standard/php_standard.h:26,
                 from /user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:27:
/user01/dgrimes/cdev/php-5.2.1/ext/standard/dns.h:51:1: warning: this is the location of the previous definition
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c: In function `php_ini_get_option':
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5548: parse error before "zval"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5548: parse error before "zval"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5548: parse error before ')' token
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5549: parse error before "int"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5549: parse error before "int"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:5549: parse error before ')' token
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c: In function `copy_request_variable':
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6228: parse error before "char"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6228: parse error before "char"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6228: parse error before ')' token
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6229: parse error before "uint"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6229: parse error before "uint"
/user01/dgrimes/cdev/php-5.2.1/ext/standard/basic_functions.c:6229: parse error before ')' token
make: *** [ext/standard/basic_functions.lo] Error 1


Reproduce code:
---------------
Compile Options:

gcc version 3.1
make 3.79

CC="gcc"
CXX="g++"
CFLAGS="-pthread -O4 -ansi_alias -ansi_args"
CXXFLAGS="-pthread -O4 -ansi_alias -ansi_args"
export CC CXX CFLAGS CXXFLAGS

Configure options:

configure \
            --with-mysql=/usr/local/mysql \
            --with-oracle \
            --with-libxml-dir=/user01/dgrimes/libxml2 \
            --with-xsl=/user01/dgrimes/libxslt \
            --with-zlib-dir=/usr/local \
            --with-freetype-dir=/usr/local \
            --with-png-dir=/usr/local \
            --with-tiff-dir=/usr/local \
            --with-jpeg-dir=/usr/local \
            --with-gd \
            --without-sqlite \
            --without-pdo-sqlite \
            --enable-ftp \
            --enable-soap \
            --enable-sysvsem \
            --enable-sysvshm \
            --disable-reflection

Let me know if there is any additional information you require.

Thanks,
Dean



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-09 16:59 UTC] tony2001@php.net
va_arg() declaration is missing?
 [2007-04-09 18:32 UTC] dgrimes at scvl dot com
I found the following in /usr/include/varargs.h:

/*
 * *****************************************************************
 * *                                                               *
 * *   Copyright 2002 Compaq Information Technologies Group, L.P.  *
 * *                                                               *
 * *   The software contained on this media  is  proprietary  to   *
 * *   and  embodies  the  confidential  technology  of  Compaq    *
 * *   Computer Corporation.  Possession, use,  duplication  or    *
 * *   dissemination of the software and media is authorized only  *
 * *   pursuant to a valid written license from Compaq Computer    *
 * *   Corporation.                                                *
 * *                                                               *
 * *   RESTRICTED RIGHTS LEGEND   Use, duplication, or disclosure  *
 * *   by the U.S. Government is subject to restrictions  as  set  *
 * *   forth in Subparagraph (c)(1)(ii)  of  DFARS  252.227-7013,  *
 * *   or  in  FAR 52.227-19, as applicable.                       *
 * *                                                               *
 * *****************************************************************
 */
/*
 * HISTORY
 */
/* $Header: /share/buffer/build/rcs.dsk1/os/src/usr/include/alpha/varargs.h,v 1.2.11.3 1998/07/17 13:15:44 Arvind_Jagannath Exp $ */

#ifndef _VARARGS_H_
#define _VARARGS_H_

#include <va_list.h>            /* defines va_list */

#define va_dcl long va_alist;
#define va_start(list) __builtin_va_start(list, va_alist, 0)
#define va_end(list) ((void)0)
#if defined(__LINT)
#define va_arg(list, mode) \
                (*(mode *)(((list)._offset += ((int)sizeof(mode) + 7) & -8)))
#else
#define va_arg(list, mode) \
        (*((__builtin_isfloat(mode) && sizeof(mode) > sizeof(double)) ? \
           *(((list)._offset += ((int)sizeof(mode *) + 7) & -8), \
             (mode **)( ((char *)(list)._a0) + (list)._offset - \
                (((int)sizeof(mode *) + 7) & -8))) : \
           (((list)._offset += ((int)sizeof(mode) + 7) & -8), \
            (mode *)( ((char *)(list)._a0) + (list)._offset - \
                     ((__builtin_isfloat(mode) && (list)._offset <= (6 * 8)) ? \
                      (6 * 8) + 8 : ((int)sizeof(mode) + 7) & -8)))))

#endif /* __LINT */
#endif /* _VARARGS_H_ */
 [2007-04-09 18:41 UTC] tony2001@php.net
That's good, but is /usr/include/varargs.h included?
What exactly is on line 5548 before zval?
From what I can see, there is nothing before zval, so the error message is quite mislading.

 [2007-04-09 18:56 UTC] dgrimes at scvl dot com
Here is the text by line numer:

  5546  static int php_ini_get_option(zend_ini_entry *ini_entry, int num_args, v
a_list args, zend_hash_key *hash_key)
  5547  {
  5548   zval *ini_array = va_arg(args, zval *);
  5549   int module_number = va_arg(args, int);
  5550   zval *option;
  5551
  5552   if (module_number != 0 && ini_entry->module_number != module_number) {
  5553      return 0;
  5554   }
  5555
  5556   if (hash_key->nKeyLength == 0 || hash_key->arKey[0] != 0) {
  5557
  5558      MAKE_STD_ZVAL(option);
  5559      array_init(option);
  5560
  5561      if (ini_entry->orig_value) {
  5562         add_assoc_stringl(option, "global_value", ini_entry->orig_value, 
ini_entry->orig_value_length, 1);
  5563      } else if (ini_entry->value) {
  5564         add_assoc_stringl(option, "global_value", ini_entry->value, ini_e
ntry->value_length, 1);
  5565      } else {
  5566         dd_assoc_null(option, "global_value");
 [2007-04-09 19:01 UTC] tony2001@php.net
Is /usr/include/varargs.h used?
 [2007-04-09 19:16 UTC] dgrimes at scvl dot com
I guess I'm not exactly sure what you mean. Are you asking if it's included in any of the php.[hc] files? If so, then here is the list of files that reference varargs:

./ext/mbstring/oniguruma/regerror.c
./ext/sqlite/libsqlite/src/printf.c
./ext/standard/formatted_print.c
./main/php.h
./main/php_config.h

However, they all reference <sys/varargs.h>. I checked /usr/sys/include/varargs.h and it is there too and it's the same version as that in /usr/include.

Is there an easy way to see if it's being used?

Thanks,
Dean
 [2007-04-09 19:25 UTC] tony2001@php.net
Please provide an SSH account on this machine.
 [2007-04-09 20:16 UTC] dgrimes at scvl dot com
I'll have to work on getting an SSH account. Usually what we do is use Cisco VPN client. Our Operations group has been discussing allowing SSH but their concern is they don't have as much control over access as they do with Cisco VPN.

The main thing you probably aren't going to like about it is that it isn't going to allow you access to your network while you're connected to ours. It'll make it harder for you to troubleshoot because you won't have access to your regular development utilities. Are you open to using the Cisco VPN client?

At any rate, I probably won't have access for you until Thursday. I'm going to be out of the office on Tuesday and Wednesday. I have to put in a request and justification for your access and then await a response. So if there is any other way for me to provide you with any information to help you troubleshoot, I'm only too happy to do so.

Thanks,
Dean
 [2007-04-09 20:46 UTC] tony2001@php.net
Tru64 is noway a popular platform, so I don't think I can find any machine with Tru64 installed to test it.
If you want me to look at the problem - please provide an unprivileged SSH account (I'd need GCC and may be cvs binary, that's all). I don't think VPN is required for that.
You can always ask your local developers to take a look at it and send use the patch.
 [2007-04-17 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2007-04-17 19:27 UTC] dgrimes at scvl dot com
I don't know if this helps or not, but PHP-4.4.5 compiles, installs and runs OK on this same system.

Anyway, I'm not able to provide access via SSH. Would you be willing to use Cisco VPN client? I can have you setup pretty quickly if you are.

Thanks,
Dean
 [2007-04-17 19:42 UTC] tony2001@php.net
>I don't know if this helps or not, but PHP-4.4.5 compiles, 
>installs and runs OK on this same system.

Thanks, it doesn't help much.

>Would you be willing to use Cisco VPN client? 
>I can have you setup pretty quickly if you are.

I don't think so.
 [2007-04-17 20:02 UTC] dgrimes at scvl dot com
Cisco does provide a Linux version of the VPN client and it's pretty easy to setup. The reason we can't use SSH is because the Cisco VPN concentrator doesn't support SSH at this time. I would greatly appreciate it if you could take a look at this. I have a project that requires SOAP and I would really like to take advantage of the built-in SOAP functions.

Thanks,
Dean
 [2007-04-18 18:59 UTC] dgrimes at scvl dot com
Hi,

I was wondering if you had a chance to look at my last post? If you're still unable to look at our system using the Cisco VPN client, I was wondering if there was a way for me to download earlier versions of PHP5 until I find one that works? I have a version of PHP5 from November of 2005 that compiles. So I was thinking that maybe I could track down the problem by comparing the two versions where the problem started. What do you think?

Thanks,
Dean
 [2007-04-19 19:16 UTC] dgrimes at scvl dot com
I realize you're pretty busy but I was wondering if you had given any more thought to my last posts? Also, I have one more request, would you be willing to look at this issue for a fee on an hourly basis?

Thanks,
Dean
 [2007-04-19 20:21 UTC] tony2001@php.net
I'm ready to help you for free, your problem is weird enough and I'm curious to see what might cause it.
Though I'd like to use something convenient to access the server.
Simple port forwarding is enough to do it provide SSH access (ANY firewall is able to do it, it's one of their basic functions).
 [2007-04-19 21:09 UTC] dgrimes at scvl dot com
OK... I got operations to agree to this. What I need is the IP address you'll be coming in on. I will send you the particulars tomorrow.

Thank you,
Dean
 [2007-04-26 17:18 UTC] dgrimes at scvl dot com
Hi,

Operations has setup SSL for you to connect using your browser. After your browser makes a connection you can use SSH to connect to our test server. However, I don't want to publish this information in the bugs system so if you could send me a private email, I'll reply back with the details.

Thanks,
Dean
 [2007-04-28 14:45 UTC] tony2001@php.net
GCC does not like native stdarg.h -> not PHP problem.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jun 17 22:01:35 2025 UTC