php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57843 Unable to load when php session is disabled
Submitted: 2007-09-20 18:35 UTC Modified: 2007-09-21 11:36 UTC
From: confins_de_l_univers at yahoo dot fr Assigned:
Status: Not a bug Package: memcache (PECL)
PHP Version: Irrelevant OS: Linux
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: confins_de_l_univers at yahoo dot fr
New email:
PHP Version: OS:

 

 [2007-09-20 18:35 UTC] confins_de_l_univers at yahoo dot fr
Description:
------------
When PHP is compiled using the option --disable-session, it won't be able to load memcache.so extension.

I try to compile PHP for CLI only therefore I choose to disable the session of PHP and memcache extension for PHP. I have no problem to compile but I have a startup error while loading memcache extension : PHP Warning:  PHP Startup: Unable to load dynamic library '/home/mazzu/php/test/memcache.so - /home/mazzu/php/test/memcache.so: undefined symbol: php_session_create_id in Unknown on line 0'.

Enable session makes this problem disappear.

Reproduce code:
---------------
PHP configure :
./configure --disable-session

Memcache configure :
./configure --enable-memcache --disable-memcache-session --with-php-config=/usr/bin/php-config

php-cli.ini :
extension_dir=/home/mazzu/php/test/
extension=memcache.so

hello.php :
<?php echo "Hello World"; ?>

command line :
mazzu@linux1:~/php/test$ /usr/bin/php -c ./php-cli.ini hello.php

Expected result:
----------------
Hello World

Actual result:
--------------
PHP Warning:  PHP Startup: Unable to load dynamic library '/home/mazzu/php/test/memcache.so' - /home/mazzu/php/test/memcache.so: undefined symbol: php_session_create_id in Unknown on line 0
Hello World

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-21 01:10 UTC] mikael at synd dot info
What version of PHP and pecl/memcache are you using?
 [2007-09-21 01:18 UTC] tony at daylessday dot org
You have to recompile PECL/memcache after disabling sessions support, otherwise it doesn't even know that you disabled something that was enabled before.
 [2007-09-21 11:36 UTC] confins_de_l_univers at yahoo dot fr
This bug report is indeed bogus as I used the wrong PHP header files while compiling the memcache extension.

Unfortunately, after cleaning things up, I had another problem right at the ./configure stage :
" configure: error: Cannot find php_session.h "

It seems this bug is already fixed in the CVS repository :
http://cvs.php.net/viewvc.cgi/pecl/memcache/config9.m4?r1=1.5&r2=1.6&diff_format=u

Applying the exact same patch enabled me to configure, compile and use memcache and PHP without sessions.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC