Re: [PHP3] calendar.so
| From: | Robert E Webb | Date: | Tue, 22 Feb 2000 22:50:26 +0000 |
| Subject: | Re: [PHP3] calendar.so | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-15808@lists.php.net to get a copy of this message | ||
John, this did not work. Still same error. I even tried with both php3
(3.0.14) and php4 (4.0b4pl1). FBSD version is 3.2
Warning: Invalid library (maybe not a PHP3 library) 'calendar.so' in (null)
on line 8
Fatal error: Call to unsupported or undefined function jdmonthname() in
/usr/local/apache/htdocs/phpcal.php3 on line 9
Here is the dl.c for php4:
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle,
"get_module");
if(get_module==NULL) {
get_module = (zend_module_entry *(*)(void)) DL_FETCH_SYMBOL(handle,
"_get_module");
}
Here is the dl.c for php3:
get_module = (php3_module_entry *(*)(void)) dlsym(handle, "get_module");
if(get_module==NULL) {
get_module = (php3_module_entry *(*)(void)) dlsym(handle, "_get_module");
}
Both compiled fine. Still same error.
Bob/
----- Original Message -----
From: "John Wright" <john@dryfish.org>
To: "Robert E Webb" <bwebb@fred.net>
Cc: <php3@lists.php.net>
Sent: Tuesday, February 22, 2000 11:36 AM
Subject: Re: [PHP3] calendar.so
> On Tue, Feb 22, 2000 at 10:51:05AM -0500, Robert E Webb wrote:
> > John, thanks for the reply. Could you be more specific as to the
remedies. I
> > am not an experienced c programmer, so I don't know exactly what you are
> > saying.
> >
> > I prefer remedy 2, since then I just have to recompile calendar, and not
the
> > full php. But whatever is easier progamatically :)
>
> It's safer (and tidier) to change php, imho.
>
> Edit php-3*/functions/dl.c
>
> Search for dlsym
>
> After:
> get_module = (php3_module_entry *(*)(void)) dlsym(handle,
"get_module");
>
> Append:
> if (get_module == NULL)
> get_module = (php3_module_entry *(*)(void)) dlsym(handle,
"_get_module");
>
> php4 has a dl.c file also for which a similar fix can be done.
>
> > > 2) edit calendar.c so that get_module is one letter shorter then
> > > edit calendar.o and change the new function name to get_module --
> > > nice and hacky.
> >
> > In calendar.c, I found the following line:
> >
> > #if COMPILE_DL
> > DLEXPORT zend_module_entry *get_module(void) { return
> > &calendar_module_entry; }
> > #endif
> >
> > I do not see a _get_module, and there are no further references to
> > get_module, so I am a little confused. Did you mean to make get_module
into
> > _get_module in calendar.c? Make it longer not shorter? Also, calendar.o
is
> > an object binary. How do I edit it to change to the new name.
>
> The get_module function will, when compiled, be stored as _get_module.
>
> BFN, John.
> --
> Dryfish.