Re: [PHP-DEV] newbie: my extension not getting compiled/included in Php-5.3.1 (RH linux)

2010-01-31 Thread Sanjeev Kumar
Hi,

Attaching my config.m4 for the new extension.
(I have renamed  the file to  config_m4.txt for mailing).

As I mentioned, my issue is that:  even the standard extension generated by
 ./ext_skel
doesn't get included in config/build list  by  buildconf + configure
 commands.

please let me know some pointers which I should look.

thanks,
-sanjeev kumar

On Sun, Jan 31, 2010 at 12:27 PM, Jess Portnoy  wrote:

> Hello,
>
> Please attach your config.m4 file which will help understand what's wrong.
> You should also try to compare yours with an existing one, maybe the
> problem will become apparent simply by comparison.
>
> May the source be with you,
> Best regards,
> Jess Portnoy
>
>
>
>
> Sanjeev Kumar wrote:
>
>> I am new to Php-dev and trying to add an extension to Php
>>
>> I downloaded php-5.3.1 src on RedHatLinux4 . After adding my extension,
>> the
>> configure/make doesn't build my extension and include in Php.
>>
>> commands that I ran after unzipping the php5.3.1 src:
>>
>> cd ext
>> ./ext_skel  --extname=pdo-mydbext
>> 
>>
>> cd ..
>> ./buildconf  --force
>> ./configure --enable-pdo-mydbext
>> make
>>
>> My issue:
>> No objects are compiled for my  pdo-mydbext.
>> In fact, seeing the output of  ./configure on screen, I can see that my
>> ext
>> didn't called in extensions list.
>> < .". whether to enable  pdo-myext ...">   didn't get displayed by
>> ./configure & make didn't build myext.
>>
>> What do I need to add my extension(to be compiled, and so on..)
>>
>>
>> thanks,
>> -sanjeev
>>
>>
>>
>
dnl $Id: config.m4 273413 2009-01-13 02:50:54Z sanjeevKumar $
dnl config.m4 for extension pdo_groovy
dnl vim:et:sw=2:ts=2:

PHP_ARG_ENABLE(pdo_groovy, whether to enable GROOVY support,
[  --with-pdo_groovy   Enable pdo_groovy support])

if test "$PHP_PDO_GROOVY" != "no"; then

  if test "$PHP_PDO" = "no"; then
AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
  fi

  ifdef([PHP_CHECK_PDO_INCLUDES],
  [
PHP_CHECK_PDO_INCLUDES
  ],[
AC_MSG_CHECKING([for PDO includes])
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then
  pdo_inc_path=$abs_srcdir/ext
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then
  pdo_inc_path=$abs_srcdir/ext
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then
  pdo_inc_path=$prefix/include/php/ext
else
  AC_MSG_ERROR([Cannot find php_pdo_driver.h.])
fi
AC_MSG_RESULT($pdo_inc_path)
  ])

  php_pdo_groovy="pdo_groovy.c groovy_driver.c groovy_statement.c gdb.c"

dnlPHP_ADD_INCLUDE($PDO_SQLITE_DIR/include)

AC_DEFINE(HAVE_GROOVY, 1, [whether you have GROOVY])
PHP_ADD_INCLUDE($PDO_GROOVY_DIR/include)

  dnl # --with-pdo_groovy -> check for lib and symbol presence
LIBNAME=pdo_groovy # you may want to change this
LIBSYMBOL=pdo_groovy # you most likely want to change this

PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
[
  PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PDO_GROOVY_DIR/lib, 
PDO_GROOVY_SHARED_LIBADD)
  AC_DEFINE(HAVE_PDO_GROOVYLIB,1,[ ])
 ],[
   AC_MSG_ERROR([wrong pdo_groovy lib version or lib not found])
 ],[
   -L$PDO_GROOVY_DIR/lib -lm
 ])

 PHP_SUBST(PDO_GROOVY_SHARED_LIBADD)

PHP_NEW_EXTENSION(pdo_groovy, $php_pdo_groovy, $ext_shared,,-I$pdo_inc_path 
  -I$pdo_inc_path)

  AC_CHECK_HEADERS(time.h)

  ifdef([PHP_ADD_EXTENSION_DEP],
  [
PHP_ADD_EXTENSION_DEP(pdo_groovy, pdo)
  ])
fi
-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DEV] newbie: my extension not getting compiled/included in Php-5.3.1 (RH linux)

2010-01-30 Thread Sanjeev Kumar
I am new to Php-dev and trying to add an extension to Php

I downloaded php-5.3.1 src on RedHatLinux4 . After adding my extension, the
configure/make doesn't build my extension and include in Php.

commands that I ran after unzipping the php5.3.1 src:

cd ext
./ext_skel  --extname=pdo-mydbext


cd ..
./buildconf  --force
./configure --enable-pdo-mydbext
make

My issue:
No objects are compiled for my  pdo-mydbext.
In fact, seeing the output of  ./configure on screen, I can see that my ext
didn't called in extensions list.
< .". whether to enable  pdo-myext ...">   didn't get displayed by
./configure & make didn't build myext.

What do I need to add my extension(to be compiled, and so on..)


thanks,
-sanjeev


[PHP-DEV] Invalid library (maybe not a PHP library) : Error on load of new php pdo extension

2009-09-01 Thread Sanjeev Kumar
Hello,

On Loading my new PDO-interface based driver, PHP gives the error:

"PHP: Startup: Invalid library (maybe not a PHP library) 'php_pdo_mydb.dll
in unknow on line 0 "

I wrote a PDO-based driver, modelling the code on lines of  SQLite driver.
Compiled my driver as win32-dll , added the extension to php.ini. on running
PHP, I get the above error  .

To crosscheck, I used DependencyWalker tool to see if I have missed some
Dll, I find that tools seems to find my Dll fine.
The output list of Dll pdependancies of my driver-Dll looks exactly like
that of php_pdo_sqlite.dll

Used latest PHP windows src base. (I get the invalid library problem with
both Debug & Release ver.)
I have generated my dll using VC9.0 on windows-vista(64) choosing
32-bit(X86), with following C++ options(paste from Property-pages):

/Od /I "../../main" /I "../../zend" /I "../../regex" /I "../../TSRM" /I
"../../win32" /I "../standard" /I "../pdo" /D "WIN32" /D "_MBCS" /D
"ZEND_WIN32" /D "FD_SETSIZE=256" /D "ZEND_DEBUG=0" /D "ZTS=1" /D
"_USE_32BIT_TIME" /D "PHP_WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D
"PDO_GROOVY_EXPORTS" /D "_WINDLL" /FD /EHsc /MD

Linker-Options(pasted from Property pages):
/OUT:"Release\pdo_groovy.dll" /INCREMENTAL /NOLOGO /LIBPATH:"f:\php\dev"
/DLL /MANIFEST /MANIFESTFILE:"Release\pdo_groovy.dll.intermediate.manifest"
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG
/PDB:"f:\php-sdk\php53dev\vc9\x86\php-5.3.0\ext\pdo_groovy\Release\pdo_groovy.pdb"
/SUBSYSTEM:WINDOWS /DYNAMICBASE /NXCOMPAT /MACHINE:X86 /ERRORREPORT:PROMPT
php5.lib ws2_32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
odbc32.lib

Please let me know, where could be the potential problem.

thanks,
-sanjeev kumar