php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57818 undefined symbol: php_url_parse_ex in Unknown on line 0
Submitted: 2007-09-01 12:20 UTC Modified: 2008-02-29 03:32 UTC
Votes:4
Avg. Score:4.0 ± 1.0
Reproduced:0 of 0 (0.0%)
From: remicollet@php.net Assigned:
Status: Wont fix Package: memcache (PECL)
PHP Version: 4.3.9 OS: Linux (RHEL4)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: remicollet@php.net
New email:
PHP Version: OS:

 

 [2007-09-01 12:20 UTC] remicollet@php.net
Description:
------------
Build under RHEL4 is ok, but not loading.


PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/memcache.so' - /usr/lib/php4/memcache.so: undefined symbol: php_url_parse_ex in Unknown on line 0

After a little search i found a solution on 
http://pecl.php.net/bugs/bug.php?id=9067

Patch proposal below

Reproduce code:
---------------
--- memcache-2.1.2/memcache_session.c.orig      2007-09-01 18:10:33.000000000 +0200
+++ memcache-2.1.2/memcache_session.c   2007-09-01 18:11:35.000000000 +0200
@@ -32,6 +32,10 @@
 #include "ext/standard/url.h"
 #include "php_memcache.h"
 
+#if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && PHP_RELEASE_VERSION < 10
+#       define php_url_parse_ex(u, l) php_url_parse(u)
+#endif
+
 #if HAVE_MEMCACHE_SESSION
 
 ps_module ps_mod_memcache = {



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-02 03:45 UTC] mikael at synd dot info
Hi, 

The extension supports PHP version 4.3.11 and above. Also, this renamed function is not the only problem with older PHP versions so if we'd fix this problem, we'd had to fix/circumvent the other issues as well. Please consider upgrading to 4.4+ (or preferably 5 :)

If that's not possible, you can compile the extension without session support using the --disable-memcache-session flag, which should make the library load fine.

//Mikael
 [2007-09-22 05:16 UTC] Fedora at FamilleCollet dot com
Just a note about this issue.

I personnaly use latest php version, but i also maintain this package for Fedora + EPEL and RHEL/CentOS 4 still provides php-4.3.9 (and are largely still used).

As 2.1.2 seems to work with the patch proposal, i will keep  this release for EL4.

Regards.
 [2008-01-28 12:23 UTC] njt1982 at yahoo dot com
I agree with remicollet - our hosts use RHEL4 and will not actively support and PHP release which is not shipped on the RedHat Updated Network. Therefore we are stuck with 4.3.9.

At the *very least* I think there should be a note in the README specifying the bare minimum requirements.

What else in 2.2.2 wont work with PHP 4.3.9?
 [2008-01-28 12:46 UTC] njt1982 at yahoo dot com
I just noticed the download page specifies the minimum PHP requirement at the bottom. I didn't see that before.
 [2008-01-28 12:47 UTC] mikael at synd dot info
As I've said, you can compile without session support using --disable-memcache-session, this flag has also been added to the PEAR installer so it can be specified when installing with pear.

package2.xml, which is used by the PEAR installer as well as the pecl.php.net website specifies that the package depends on PHP 4.3.11, see "Dependencies" on http://pecl.php.net/package/memcache

Consider using an older and stable release such as 2.1.2 if upgrading is not an option.
 [2008-02-29 02:57 UTC] artagesw at yahoo dot com
For those who are stuck with php 4.3.9, the workaround patch 
posted above is
not sufficient if you have more than a single memcached 
server in your session.save_path
string. Replacing the patch code with the following does the 
trick:

#if PHP_MAJOR_VERSION == 4 && PHP_MINOR_VERSION == 3 && 
PHP_RELEASE_VERSION < 10
	PHPAPI php_url *php_url_parse_ex(char const *str, 
int length)
	{
		char* tmp = estrndup(str, length);
		php_url *ret = php_url_parse(tmp);
		STR_FREE(tmp);
		return ret;
	}
#endif
 [2008-02-29 03:32 UTC] tony at daylessday dot org
Those who are stuck with PHP 4.3.9 must upgrade it as soon as possible.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Oct 08 09:01:27 2024 UTC