# Apache has two versions on my extension loaded!

- Thread: https://externals.io/message/46714
- Original archive: https://news-web.php.net/php.internals/46714
- Started by Bruce Bailey on 2010-01-13T23:55:04+00:00
- Messages: 4
- 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

---

## #46714 — Bruce Bailey — 2010-01-13T23:55:04+00:00

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

Help!

I was patching out a new version of my PHP extension, with a different version as part of the name:

libmyext.so.1.0 is now libmyext.so.2.0

I updated php.ini (extension=libmyext.so.2.0) and restarted apache with the graceful option.  For some reason, both extensions were loaded simultaneously -- as reported by 'lsof'

What's going on here?  I don't get this behavior on other systems that have the same level of PHP and Apache.

apache version 1.3.37

PHP version 5.2.3



Thanks,

Bruce




 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/196390709/direct/01/

---

## #46730 — Antony Dovgal — 2010-01-14T08:28:19+00:00

URL: https://externals.io/message/46714#46730 · In reply to: #46714

> Help!
> 
> I was patching out a new version of my PHP extension, with a different version as part of the name:
> 
> libmyext.so.1.0 is now libmyext.so.2.0
> 
> I updated php.ini (extension=libmyext.so.2.0) and restarted apache with the graceful option.  
> For some reason, both extensions were loaded simultaneously -- as reported by 'lsof'

lsof might be wrong or you need to stop&start your apache.
In any case, you should have used ldd instead of lsof.

> apache version 1.3.37 
> PHP version 5.2.3

Btw, it's time to upgrade these.

-- 
Wbr, 
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP

---

## #46742 — Bruce Bailey — 2010-01-14T23:32:42+00:00

URL: https://externals.io/message/46714#46742

Antony

Thanks very much for your reply.  And yes, you're right, it IS time to upgrade.

Unfortunately, ldd only shows shared libraries that are automatically loaded.  My php extension is loaded by dlopen, which is not shown by ldd.

I used lsof because it shows all DSO libraries that are loaded, regardless of how they are loaded.  I was not aware that lsof was likely to be wrong.

I guess that my only recourse is to stop and start apache, and not use 'graceful' at all.

Again, thanks for your reply.

Bruce


> Date: Thu, 14 Jan 2010 11:28:19 +0300
> From: tony@daylessday.org
> To: bruce1828@hotmail.com
> CC: internals@lists.php.net
> Subject: Re: [PHP-DEV] Apache has two versions on my extension loaded!
> 
> 
> > […]
> 
> lsof might be wrong or you need to stop&start your apache.
> In any case, you should have used ldd instead of lsof.
> 
> > […]
> 
> Btw, it's time to upgrade these.
> 
> -- 
> Wbr, 
> Antony Dovgal
> ---
> http://pinba.org - realtime statistics for PHP
> 
> -- 
> 
> 
> 
 		 	   		  
_________________________________________________________________
Your E-mail and More On-the-Go. Get Windows Live Hotmail Free.
http://clk.atdmt.com/GBL/go/196390709/direct/01/

---

## #46746 — Antony Dovgal — 2010-01-15T09:54:41+00:00

URL: https://externals.io/message/46714#46746 · In reply to: #46742

> 
> Antony
> 
> Thanks very much for your reply.  And yes, you're right, it IS time to upgrade.
> 
> Unfortunately, ldd only shows shared libraries that are automatically loaded.  My php extension is loaded by dlopen, which is not shown by ldd.

ldd /path/to/your/extension
This is what I meant, of course.

-- 
Wbr, 
Antony Dovgal
---
http://pinba.org - realtime statistics for PHP
