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 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 



-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to