php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57596 configure script looks php_session.h in %/php/include
Submitted: 2007-03-28 13:49 UTC Modified: 2007-03-29 07:32 UTC
From: samuel at debian-ce dot org Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: 4.4.2 OS: Ubuntu
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: samuel at debian-ce dot org
New email:
PHP Version: OS:

 

 [2007-03-28 13:49 UTC] samuel at debian-ce dot org
Description:
------------
Trying to install memcache pecl module in a Ubuntu Edgy Eft box i get the error on ./configure

checking for session includes... configur: error: Cannot find php_session.h

Checking at the configure script, on line 4109:

  if test "$PHP_MEMCACHE_SESSION" != "no"; then
        { echo "$as_me:$LINENO: checking for session includes" >&5
echo $ECHO_N "checking for session includes... $ECHO_C" >&6; }
    if test -f $abs_srcdir/include/php/ext/session/php_session.h; then
      session_inc_path=$abs_srcdir/include/php
    elif test -f $abs_srcdir/ext/session/php_session.h; then
      session_inc_path=$abs_srcdir
    elif test -f $prefix/include/php/ext/session/php_session.h; then
      session_inc_path=$prefix/include/php
    else
      session_inc_path=""
    fi


But in Ubuntu the package php4-dev install it includes on /usr/include/php4/ext/session
all tests check in include/php, to build this module i have to create a sym link /usr/include/php to /usr/include/php4

Thanks.



Reproduce code:
---------------
./configure when php4 devel files aren?t in /usr/include/php

Expected result:
----------------
./configure finish without error.

Actual result:
--------------
checking for the location of ZLIB... no
checking for the location of zlib... /usr
checking for session includes... configure: error: Cannot find php_session.h

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-28 13:57 UTC] tony2001 at phpclub dot net
>But in Ubuntu the package php4-dev install it includes 
>on /usr/include/php4/ext/session

That's not something we can fix.
If they use patched PHP, you have to patch PECL/memcache accordingly.
 [2007-03-29 07:32 UTC] samuel at debian-ce dot org
Hmm, ok!

I was thinking in something like:

10a11,13
> PHP_ARG_WITH(dev-headers, specify path of php headers files,
> [  --with-dev-headers[=PATH]       specify path of php headers files], no, no)
>
73a77,78
>     elif test -f $PHP_DEV_HEADERS/ext/session/php_session.h; then
>       session_inc_path=$PHP_DEV_HEADERS


Then a user can specify in case like debian/ubuntu or when he compile and dont install on default places!

Thanks for attention.
 [2007-07-11 10:32 UTC] admin at kupke-mg dot de
Have the same Problem with a Debian Sarge (3.1)

My workaround:
 ln -s /usr/include/php4 /usr/include/php

Fixed things for me.
 [2007-10-17 07:55 UTC] hans at parse dot nl
"That's not something we can fix.
If they use patched PHP, you have to patch PECL/memcache accordingly."

What kind of BS reply is that?!

The configure script for memcache looks in some predefined locations which are based on assumption instead of using the *properly detected* location of the include files earlier in the configure script through php-config.

See here:

checking for PHP includes... -I/usr/lib/php4/include/php -I/usr/lib/php4/include/php/main -I/usr/lib/php4/include/php/TSRM -I/usr/lib/php4/include/php/Zend
[...]
checking for session includes... configure: error: Cannot find php_session.h

If the configure script would just check the locations returned by the PHP includes check, all would be fine.
 [2007-10-17 08:36 UTC] hans at parse dot nl
After some more digging i found out that the current config9.m4 already sort-of looks in the include dirs returned by php-config, only the problem is, the current approach only works for php5.

Memcache's config9.m4 uses the $phpincludedir m4 var which, afaik, is not available in php4 phpize (compare phpize.m4 between php5 and php4 and see what i mean)

One bit hackish way to fix it would be to add a check for:

${prefix}/include/php/ext/session/php_session.h
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC