[PHP] PHP to C interface?

2005-02-18 Thread N Deepak
Hi, Is there a way to invoke C functions in a library (.so) from PHP? Like Xs in Perl? Thanks, Deepak -- N Deepak || http://www.ndeepak.info/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP to C interface?

2005-02-18 Thread N Deepak
18 Feb 2005 01:19:19 -0800, N Deepak <[EMAIL PROTECTED]> wrote: > > Hi, > > > > Is there a way to invoke C functions in a library (.so) from PHP? > > Like Xs in Perl? > > > > Thanks, > > Deepak > > -- N Deepak || http://www.ndeepak.info

Re: [PHP] PHP to C interface?

2005-02-21 Thread N Deepak
nsions' category, I get mostly presentations on HTML Tidy under PHP? http://talks.php.net/index.php/Extensions?PHPSESSID=b8b25bec4cebea1f748893292ab077e5 Thanks, Deepak -- N Deepak || http://www.ndeepak.info/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Unable to load extension (was Re: PHP to C interface?)

2005-02-21 Thread N Deepak
On Fri, Feb 18, 2005 at 09:20:02AM -0800, Richard Lynch wrote: > N Deepak wrote: > > Is there a way to invoke C functions in a library (.so) from PHP? > > Like Xs in Perl? > > By definition, then, all you have to do is learn how to write a PHP > extension, which Rasmu

[PHP] Can't load extension (was Re: PHP to C interface?)

2005-02-21 Thread N Deepak
On Fri, Feb 18, 2005 at 09:20:02AM -0800, Richard Lynch wrote: > N Deepak wrote: > > Is there a way to invoke C functions in a library (.so) from PHP? > > Like Xs in Perl? > > By definition, then, all you have to do is learn how to write a PHP > extension, which Rasmu

Re: [PHP] Can't load extension (was Re: PHP to C interface?)

2005-02-21 Thread N Deepak
/usr/local/lib/php/extensions/no-debug-non-zts-20020429/foo.so: cannot > > open shared object file: No such file or directory in > > /home/deep/php-4.3.10/ext/foo/nscli.php on line 3 > > Functions available in the test extension: > > > > Warning: Invalid argument supp

[PHP] Re: Unable to load extension (was Re: PHP to C interface?)

2005-02-21 Thread N Deepak
alid argument supplied for foreach() in > > /home/deep/php-4.3.10/ext/foo/foo.php on line 8 > > > > Module foo is not compiled into PHP > > [EMAIL PROTECTED] php-4.3.10]$ > > I'm sorry my previous mail appeared twice - I was confused by a majordomo reply

Re: [PHP] Can't load extension (was Re: PHP to C interface?)

2005-02-22 Thread N Deepak
N Deepak wrote: On Mon, Feb 21, 2005 at 02:08:28PM -0800, Richard Lynch wrote: You have to "make install" your new .so file to get copied over into your PHP extensions directory, which from the messages seems to be /usr/local/lib/php/extensions/no-debug-non-zts-20020429/ on your sys

[PHP] zend_parse_parameters seg faults on string input.

2005-02-22 Thread N Deepak
Hi all, In the PHP file, I have written: helloworld("hello, world") where helloworld is in an extension. Now, I use zend_parse_parameters() to parse input as follows: char* hstr = NULL, *wstr = NULL; argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc TSRMLS_CC, "ss", &hstr, &wstr

[PHP] Load a C library into extension?

2005-02-24 Thread N Deepak
in config.m4. Any ideas how to go about it? I have already tried editing LIBNAME and LIBSYMBOL. It says: checking for foo in -lfoo... no configure: error: wrong foo lib version or lib not found The file is present as ext/myext/lib/libfoo.so. Thanks again, Deepak -- N Deepak || http

[PHP] Re: Capturing user's IP Address

2005-02-24 Thread N Deepak
Jacques wrote: Which function can I use to capture a user's IP Address when he registers on my site. I would like to store this value in a database. print $_SERVER['REMOTE_ADDR']; --Deepak -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

[PHP] Re: Cookies

2005-02-24 Thread N Deepak
William Stokes wrote: Hello, If I send a session cookie to browser where it is stored in WinXP? Or is it stored as a separate file at all. I know that the script sends the cookie but I can't find it in the client computer harddrive. I am testing with Opera, IE6 and Firefox. This is not dependent