php-install Digest 5 Sep 2001 17:55:01 -0000 Issue 445
Topics (messages 4200 through 4208):
Php built in extensiond
4200 by: Larry Cotton
Php built in extensions
4201 by: Larry Cotton
4208 by: Rasmus Lerdorf
Re: Installation problem with NT
4202 by: Brad Harriger
4205 by: Phil Driscoll
Php extensions - linking to external libs
4203 by: Larry Cotton
Php extensions - linking to external libraries
4204 by: Larry Cotton
php with java
4206 by: Manfred Hansen
php 4.0.4 was working, now not
4207 by: Doug
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Imerge Limited Tel :- +44 (0)1954 783600
Unit 6 Bar Hill Business Park Fax :- +44 (0)1954 783601
Saxon Way Web :- http://www.imerge.co.uk
Bar Hill
Cambridge
CB3 8SL
United Kingdom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I've written some functions which I want to use as php extensions on linux.
I've downloaded php-4.0.6 and built it successfully.
I auto-generated the files using the instuctions in the Zend documenteation
at http://www.zend.com/apidoc/c269.php
They tell you to do something like this :
cd /usr/local/src/php4/ext
./ext_skel my_module --extname=module_name
The I edited the generated files to include some of the zend functions I've
already written and get rid of the page request init functions and added
another source file to Makefile.in. i also uncommented the line :
[ --with-phpwebinterface Include phpwebinterface support])
in the config.m4 file
It then says to run the following commands :
./buildconf --with-phpwebinterface
./configure
vi ext/my_module/my_module.c
make
When I try to make the php I get an err message :
internal_functions.c:47: 'phpext_phpwebinterface_ptr' undeclared here <not
in a function>
internal_functions.c:47: initializer element for php_builtin_extensions[4]'
is not constant
make[2]: *** [internal_functions.lo] Error 1
I don't know when / how internal functions.c is generated, but when I run
all the configuration commands listed above it seems to include
phpext_phpwebinterface_ptr in the php_builtin_extensions[] array of module
pointers, buit for some reason does not #include php_phpwebinterface.h. When
I manually #include this file I still get the same error on make.
My php_phpwebextensions.h looks like :
#ifndef PHPWEBINTERFACE_H
#define PHPWEBINTERFACE_H
//#if HAVE_WEBPROD
#ifdef PHP_WIN32
#define PHP_WEBINTERFACE_API __declspec(dllexport)
#else
#define PHP_WEBINTERFACE_API
#endif
//webphpif_module_entry
#ifdef __cplusplus
extern "C" zend_module_entry phpwebinterface_module_entry;
#else
extern zend_module_entry phpwebinterface_module_entry;
#endif
#define phpwebinterface_module_ptr &phpwebinterface_module_entry
#include "PhpExportsV1.h"
#define phpext_phpwebinterface_ptr &phpwebinterface_module_entry
//#endif HAVE_WEBPROD
#endif //PHPWEBINTERFACE_H
Note :
PhpExportsV1.h simply declares the the exported functions using the zend
macros :
ZEND_MINIT_FUNCTION(phpwebinterface);
ZEND_MSHUTDOWN_FUNCTION(phpwebinterface);
Anyone have any idea what might be going wrong here ?
Cheers
Larry
.... rtc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Imerge Limited Tel :- +44 (0)1954 783600
Unit 6 Bar Hill Business Park Fax :- +44 (0)1954 783601
Saxon Way Web :- http://www.imerge.co.uk
Bar Hill
Cambridge
CB3 8SL
United Kingdom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I would suggest using current PHP CVS at this point for custom extension
development. There have been some changes in the API and you would need
to go back and fix your extensions anyway to get them to work with 4.0.7+
ext_skel has also changed quite a bit. If you recreate your extension
using the current cvs version of ext_skel and post the results, I can give
you a hand.
-Rasmus
On Wed, 5 Sep 2001, Larry Cotton wrote:
> I've written some functions which I want to use as php extensions on linux.
>
> I've downloaded php-4.0.6 and built it successfully.
>
> I auto-generated the files using the instuctions in the Zend documenteation
> at http://www.zend.com/apidoc/c269.php
>
> They tell you to do something like this :
> cd /usr/local/src/php4/ext
> ./ext_skel my_module --extname=module_name
>
> The I edited the generated files to include some of the zend functions I've
> already written and get rid of the page request init functions and added
> another source file to Makefile.in. i also uncommented the line :
> [ --with-phpwebinterface Include phpwebinterface support])
> in the config.m4 file
>
> It then says to run the following commands :
> ./buildconf --with-phpwebinterface
> ./configure
> vi ext/my_module/my_module.c
> make
>
> When I try to make the php I get an err message :
> internal_functions.c:47: 'phpext_phpwebinterface_ptr' undeclared here <not
> in a function>
> internal_functions.c:47: initializer element for php_builtin_extensions[4]'
> is not constant
> make[2]: *** [internal_functions.lo] Error 1
>
> I don't know when / how internal functions.c is generated, but when I run
> all the configuration commands listed above it seems to include
> phpext_phpwebinterface_ptr in the php_builtin_extensions[] array of module
> pointers, buit for some reason does not #include php_phpwebinterface.h. When
> I manually #include this file I still get the same error on make.
>
> My php_phpwebextensions.h looks like :
>
> #ifndef PHPWEBINTERFACE_H
> #define PHPWEBINTERFACE_H
>
> //#if HAVE_WEBPROD
>
> #ifdef PHP_WIN32
> #define PHP_WEBINTERFACE_API __declspec(dllexport)
> #else
> #define PHP_WEBINTERFACE_API
> #endif
>
> //webphpif_module_entry
> #ifdef __cplusplus
> extern "C" zend_module_entry phpwebinterface_module_entry;
> #else
> extern zend_module_entry phpwebinterface_module_entry;
> #endif
>
> #define phpwebinterface_module_ptr &phpwebinterface_module_entry
>
> #include "PhpExportsV1.h"
>
> #define phpext_phpwebinterface_ptr &phpwebinterface_module_entry
>
> //#endif HAVE_WEBPROD
>
> #endif //PHPWEBINTERFACE_H
>
> Note :
> PhpExportsV1.h simply declares the the exported functions using the zend
> macros :
> ZEND_MINIT_FUNCTION(phpwebinterface);
> ZEND_MSHUTDOWN_FUNCTION(phpwebinterface);
>
> Anyone have any idea what might be going wrong here ?
>
> Cheers
> Larry
> .... rtc
>
>
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Imerge Limited Tel :- +44 (0)1954 783600
> Unit 6 Bar Hill Business Park Fax :- +44 (0)1954 783601
> Saxon Way Web :- http://www.imerge.co.uk
> Bar Hill
> Cambridge
> CB3 8SL
> United Kingdom
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
>
>
After commenting out the Action application line, I'm asked what application I
would like to open the file with.
Phil Driscoll wrote:
> On Tuesday 04 September 2001 4:49 pm, Brad Harriger wrote:
> > I was accessing the file directly.
> Well that won't ever work - you have to access the file via a web server.
>
> > When I try requesting it via the
> > webserver, I get a 500 error with the following line in the error log:
> >
> > [Tue Sep 04 11:46:30 2001] [error] [client 127.0.0.1] Premature end of
> > script headers: c:/php/php.exe
>
> I'm not an Apache expert so hopefully someone else might chip in here with
> what might be the cause of this. I'd double check the configuration, and also
> check that if you put a plain .htm file in the same folder as your php file
> you can access that ok via the web server.
>
> Cheers
> --
> Phil Driscoll
On Wednesday 05 September 2001 1:31 pm, Brad Harriger wrote:
> After commenting out the Action application line, I'm asked what
> application I would like to open the file with.
Sorry - I just don't know enough about apache on Windows to help here. Maybe
if you ask on the php-win list someone might have been there, done that.
--
Phil Driscoll
Hi
I have written a php extension which relies on external libraries.
Does anyone know what I need to do to link to these libraries when building
php ?
Cheers
Larry
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Imerge Limited Tel :- +44 (0)1954 783600
Unit 6 Bar Hill Business Park Fax :- +44 (0)1954 783601
Saxon Way Web :- http://www.imerge.co.uk
Bar Hill
Cambridge
CB3 8SL
United Kingdom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Help
Anyone out there know where and how I should sepecify external libraries to
link to ?
At the moment I have a line in my config.m4 which looks like :
EXTRA_LIBS="$EXTRA_LIBS -lwebprodssinterface -llibrcgateway -llibplaylist"
but whenever I build I get an error :
/usr/bin/ld: cannot open -lwebprodssinterface
I have LDPATH and LD_LIBRARY_PATH set to the directory containing these
libraries.
Anyone know how to specify the link directories and files in the php build
system ?
Cheers
Larry
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Imerge Limited Tel :- +44 (0)1954 783600
Unit 6 Bar Hill Business Park Fax :- +44 (0)1954 783601
Saxon Way Web :- http://www.imerge.co.uk
Bar Hill
Cambridge
CB3 8SL
United Kingdom
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hello,
here is my debug.log
CONFIGURE: './configure' '--with-java=/usr/lib/java' '--with-mysql'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS: -DSUPPORT_UTF8
CXX:
CXXFLAGS:
INCLUDES: -I$(top_builddir)/Zend -I/usr/src/php-4.0.6/ext/mysql/libmysql
LDFLAGS:
LIBS: -l -lcrypt -lresolv -lm -ldl -lnsl -lresolv
DLIBS:
SAPI: cgi
PHP_RPATHS:
uname -a: Linux edv-orga-18 2.2.19 #1 Sun Jun 24 15:06:27 EST 2001 i686 unknown
gcc -o conftest -g -O2 -DSUPPORT_UTF8 conftest.c -l -lcrypt -lresolv -lm -ldl -lnsl
-lresolv 1>&5
/usr/bin/ld: cannot find -l--library=crypt
collect2: ld returned 1 exit status
This is the debug.log from the machine Debian Woddy, but the same is by SUSE 7.2 too.
yours sincerely
Manfred Hansen
I had the standard install of php 4 from RH7.1 and apache 1.3.19 and it was
working fine. It now returns blank objects for the php scripts and sometimes
just the script as text, even phpinfo doesn't work. I also have tomcat 3.3
and jGenerator 1.3.0 integrated into the apache server and both of those are
still working fine. I have uninstalled and reinstalled the package to no
avail. I also tried upgrading to php4.0.6 and that had the same results too.
Any help or insights would be greatly appreciated.
thanks,
doug