# Can't compile PHP6 snapshot

- Thread: https://externals.io/message/25840
- Original archive: https://news-web.php.net/php.internals/25840
- Started by Markus Fischer on 2006-09-27T06:51:38+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #25840 — Markus Fischer — 2006-09-27T06:51:38+00:00

URL: https://externals.io/message/25840#25840

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've trouble compiling the snapshot, it bails out in php_apache.c .

=Configure=
./configure --prefix=/opt/php6 --enable-bcmath --enable-calendar
- --enable-exif --enable-ftp --enable-gd-native-ttf --enable-pcntl
- --enable-shmop --enable-soap --enable-sockets --enable-sqlite-utf8
- --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx
- --enable-zip --enable-memory-limit --with-apxs --with-openssl
- --with-zlib --with-bz2 --with-curl --with-gd --with-ldap --with-mcrypt
- --with-mhash --with-mysql --with-pdo-mysql --with-tidy

=Compile error=
php6.0-200609261230/sapi/apache/php_apache.c: In function
'zif_apache_request_headers':
php6.0-200609261230/sapi/apache/php_apache.c:364: error: expected
expression before 'do'
php6.0-200609261230/sapi/apache/php_apache.c: In function
'zif_apache_response_headers':
php6.0-200609261230/sapi/apache/php_apache.c:384: error: expected
expression before 'do'
make: *** [sapi/apache/php_apache.lo] Error 1


=Source in php_apache.c=
The line it fails is the one with add_assoc_string:
PHP_FUNCTION(apache_request_headers)
{
    array_header *env_arr;
    table_entry *tenv;
    int i;

    array_init(return_value);
    env_arr = table_elts(((request_rec *) SG(server_context))->headers_in);
    tenv = (table_entry *)env_arr->elts;
    for (i = 0; i < env_arr->nelts; ++i) {
        if (!tenv[i].key) {
            continue;
        }
        if (add_assoc_string(return_value, tenv[i].key,
(tenv[i].val==NULL) ? "" : tenv[i].val, 1)==FAILURE) {
            RETURN_FALSE;
        }
    }
}

=System=
I'm trying to compile on Debian testing with gcc version 4.1.2 20060901
(prerelease) (Debian 4.1.1-13)


thanks for any pointers,
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGh961nS0RcInK9ARAucfAKDin6sCKxNMYwik2Pjd3S5VHTazQgCfWRhT
EHRRc2x0k8qrkNuYrP5EiLw=
=nHks
-----END PGP SIGNATURE

---

## #25841 — Markus Fischer — 2006-09-27T11:18:32+00:00

URL: https://externals.io/message/25840#25841 · In reply to: #25840

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Markus Fischer wrote:
> I've trouble compiling the snapshot, it bails out in php_apache.c .
> 
> =Configure=
> ./configure --prefix=/opt/php6 --enable-bcmath --enable-calendar
[...]

I can compile a cli/cgi version, but not the with apache support. When I
use a minimalistig configure:

./configure --prefix=/opt/php6 --with-apxs

I get exactly the same error.

My apache version is Apache/1.3.34 .

Is there any known incompatibility ?

thanks,
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFGl4I1nS0RcInK9ARAtuQAKCdawlAlRLAUWl379lRW6hn/o+lkwCdE2LK
jSsEklRafu6lB0MbZXXMDQo=
=uB9X
-----END PGP SIGNATURE

---

## #25845 — Antony Dovgal — 2006-09-27T19:46:01+00:00

URL: https://externals.io/message/25840#25845 · In reply to: #25841

Derick has fixed it in CVS ~1 hour ago.
Thanks for the heads up.


> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> 
> Markus Fischer wrote:
> > […]
> [...]
> 
> I can compile a cli/cgi version, but not the with apache support. When I
> use a minimalistig configure:
> 
> ./configure --prefix=/opt/php6 --with-apxs
> 
> I get exactly the same error.
> 
> My apache version is Apache/1.3.34 .
> 
> Is there any known incompatibility ?
> 
> thanks,
> - - Markus
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFGl4I1nS0RcInK9ARAtuQAKCdawlAlRLAUWl379lRW6hn/o+lkwCdE2LK
> jSsEklRafu6lB0MbZXXMDQo=
> =uB9X
> -----END PGP SIGNATURE-----
> 


-- 
Wbr, 
Antony Dovgal

---

## #25850 — Markus Fischer — 2006-09-28T07:55:13+00:00

URL: https://externals.io/message/25840#25850 · In reply to: #25845

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Antony Dovgal wrote:
> Derick has fixed it in CVS ~1 hour ago.
> Thanks for the heads up.

Marvelous!

Didn't ran real tests yet, but it compiled fine away and phpinfo works.


It seems HEAD doesn't identify itself as php6 in all places. My existing
libphp5.so was overwritten and also the LoadModule directive in apache
needs to specify php5_module. Is there any reason to delay changing
these things? I was lucky to have subversioned by libphp5.so so I could
easily revert ...

=Output of make install=
Installing PHP SAPI module:       apache
[activating module `php5' in /etc/apache/httpd.conf]
cp libs/libphp5.so /usr/lib/apache/1.3/libphp5.so
chmod 755 /usr/lib/apache/1.3/libphp5.so
cp /etc/apache/httpd.conf /etc/apache/httpd.conf.bak
cp /etc/apache/httpd.conf.new /etc/apache/httpd.conf
rm /etc/apache/httpd.conf.new
Installing PHP CLI binary:        /opt/php6/bin/
Installing PHP CLI man page:      /opt/php6/man/man1/
Installing build environment:     /opt/php6/lib/php/build/
Installing header files:          /opt/php6/include/php/
Installing helper programs:       /opt/php6/bin/
  program: phpize
  program: php-config
Installing man pages:             /opt/php6/man/man1/
  page: phpize.1
  page: php-config.1


=Directive needed in Apache 1=
LoadModule php5_module /usr/lib/apache/1.3/libphp6.so


HTH,
- - Markus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFG3/h1nS0RcInK9ARAlh9AKCk3LF2uw0MhDJakaH4dM02JqrICACg3XB9
eU5dex/QEZ+TBK3EWwXVhy0=
=SumA
-----END PGP SIGNATURE

---

## #25852 — Antony Dovgal — 2006-09-28T08:06:13+00:00

URL: https://externals.io/message/25840#25852 · In reply to: #25850

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Antony Dovgal wrote:
> > […]
> 
> Marvelous!
> 
> Didn't ran real tests yet, but it compiled fine away and phpinfo works.
> 
> 
> It seems HEAD doesn't identify itself as php6 in all places. 

Yup, this is still to be done.

> My existing
> libphp5.so was overwritten and also the LoadModule directive in apache
> needs to specify php5_module. Is there any reason to delay changing
> these things? 

Well, yes, people are mostly focusing on different things like Unicode support, 
but I guess it should change before RC1.

> I was lucky to have subversioned by libphp5.so so I could
> easily revert ...


-- 
Wbr, 
Antony Dovgal
