[PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
This might be a dumb question with an obvious answer somewhere,  but
I'm wondering if it's possible to build php extensions as shared
objects that plug into the PHP binary much like an apache shared
module plugs into apache.

Is PECL close to this?

Sorry if this is obvious. Searches on the topic are pretty noisy given
that php's installation as a shared module itself for Apache are a
fairly popular topic.

Thanks,

Weston

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Chris
Weston C wrote:
 This might be a dumb question with an obvious answer somewhere,  but
 I'm wondering if it's possible to build php extensions as shared
 objects that plug into the PHP binary much like an apache shared
 module plugs into apache.

Yes.

See http://www.php.net/dl (though a lot of hosts disable this
functionality for security reasons).

-- 
Postgresql  php tutorials
http://www.designmagick.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread Weston C
On Thu, May 29, 2008 at 7:11 PM, Chris [EMAIL PROTECTED] wrote:
 See http://www.php.net/dl (though a lot of hosts disable this
 functionality for security reasons).

Fortunately, I'll have full control of the hosting environment in the
context this matters. :)

dl is  definitely interesting, but I'm worried that runtime invocation
might mean performance hits. Is there a way to do load/startup time
inclusion?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Extensions as Shared Objects?

2008-05-29 Thread mike
On 5/29/08, Weston C [EMAIL PROTECTED] wrote:

 Fortunately, I'll have full control of the hosting environment in the
 context this matters. :)

 dl is  definitely interesting, but I'm worried that runtime invocation
 might mean performance hits. Is there a way to do load/startup time
 inclusion?

you could put it in your php ini file

extension = foo.so

then I believe the impact will be on the first instance for that php
engine. so in fastcgi mode, you'd only have the hit once every
PHP_FCGI_MAX_REQUESTS when the child restarts...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Extensions Pass-By-Reference

2005-02-25 Thread Chris Cranford
I have a PHP_FUNCTION() defined in my PHP extension.  How am I suppose to
pass variables by reference to my function without enabling call-time pass
by reference in the PHP.INI file?

Thanks

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP Extensions Pass-By-Reference

2005-02-25 Thread Richard Lynch
Chris Cranford wrote:
 I have a PHP_FUNCTION() defined in my PHP extension.  How am I suppose to
 pass variables by reference to my function without enabling call-time pass
 by reference in the PHP.INI file?

I think the definition in the C syntax of PHP_FUNCTION will do that for you.

You'll probably need to use some ZEND_xxx macro.

Check out simple functions (error_log springs to mind) that use pass by
reference.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP extensions with EasyPHP 1-7

2004-12-08 Thread Michel Gangloff
I try to use some PHP extensions with EasyPHP 1.7 on Windows XP
I have checked the path for extensions in the php.ini file ; it is correct
But when I want do add some extensions , some work well , and others 
don't (they are in the same directory )

I get the following message :
Unable to load dynamic library C:\Program 
Files\EasyPHP1-7\php\extensions\php_curl.dll  Could not find specified 
module

Same problem for php_domxml.dll  ,  php_ldap.dll
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP extensions with EasyPHP 1-7

2004-12-08 Thread Richard Lynch
Michel Gangloff wrote:
 I try to use some PHP extensions with EasyPHP 1.7 on Windows XP

 I have checked the path for extensions in the php.ini file ; it is
 correct
 But when I want do add some extensions , some work well , and others
 don't (they are in the same directory )


 I get the following message :

 Unable to load dynamic library C:\Program
 Files\EasyPHP1-7\php\extensions\php_curl.dll  Could not find specified
 module

 Same problem for php_domxml.dll  ,  php_ldap.dll

What are the extensions that DO work?

Are you sure they are not just built-in to PHP already?

Can you use http://php.net/dl on those extensions instead of the php.ini
settings?  That would help you to confirm/deny that you really are loading
the extensions you think you are loading.

I seem to recall that Apache and php.ini did not like directory names with
spaces in them -- Try moving your extensions directory to C:\php (you'll
need to create that directory) and re-start Apache.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP extensions and multiple source files?

2003-06-12 Thread Marek Kilimajer
Simply list *.c all files as arguments to gcc:

gcc one.c two.c three.c -shared -o my_ext.so

Ed wrote:
Howdy folks!

Is there a way to have multiple *.c source files and still end up with a single *.so while using gcc?  How would that be reflected in the config.m4 file?

I searched for examples in the source tree, but did not find one.  I tried different things, but ended up with multiple *.so's.  I have been using *.h for a few pieces, but compiling gets long and the source a bit unwieldy.

Thanks!


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] PHP extensions and multiple source files?

2003-06-11 Thread Ed
Howdy folks!

Is there a way to have multiple *.c source files and still end up with a single *.so 
while using gcc?  How would that be reflected in the config.m4 file?

I searched for examples in the source tree, but did not find one.  I tried different 
things, but ended up with multiple *.so's.  I have been using *.h for a few pieces, 
but compiling gets long and the source a bit unwieldy.

Thanks!

Re: [PHP] PHP extensions and multiple source files?

2003-06-11 Thread Evan Nemerson
Good question, but wrong place for it. Ask [EMAIL PROTECTED]


On Wednesday 11 June 2003 08:31 pm, Ed wrote:
 Howdy folks!

 Is there a way to have multiple *.c source files and still end up with a
 single *.so while using gcc?  How would that be reflected in the config.m4
 file?

 I searched for examples in the source tree, but did not find one.  I tried
 different things, but ended up with multiple *.so's.  I have been using *.h
 for a few pieces, but compiling gets long and the source a bit unwieldy.

 Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP Extensions: are they inefficient when using the extension keyword in php.ini?

2003-03-24 Thread Mike Papper
After reading the PHP online documentation for Chapter 25. Extension 
Possibilities I am confused. I have a set of questions below:

1) compiled versus extension versus dl function:

It appears to say that if an extension is NOT compiled in and IS used as a 
shared module that the module is loaded at each request and unloaded after 
each page finishes. And that this is slooow.

Even if we use the extension keyword in the php.ini file it is still 
slooow 
(i.e., the same effect as using the dl() function).

a) Can somone who knows clarify/assert this? 

b) Because we use pgsql as an extension (set in php.ini) and we use it very 
heavily on every page. One would think that there would be significant 
performance advantages to gain by compiling in this module. Would this be 
the case? 

2) I was also under the impression that all of the built-in PHP modules 
(which, to me is the entire set of modules in the documentation pages at 
the 
PHP web site) are compiled in and fast and that php doesnt need to load 
them 
in for EVERY request. I am dissappointed that PHP needs to load and unload 
each shared module for EVERY request.

3) The PHP documentation laso states that this loading and unloading of the 
shared module is very slow. Can anyone qualify this - what do they really 
mean? We are using it with Apache.

Mike Papper

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] .php extensions versus .html

2003-01-31 Thread Justin French
I think what you've seen is shtml / ssi / server side includes, but anyway,
since you asked:

1. create a .htaccess file which pushes *all* .php pages through PHP

I *THINK* the code is something like:

Files ~ \.html$
ForceType application/x-httpd-php
/Files

But you should check the apache manual, list or some tutorials.


2. change your code to:

html
head
titleUntitled/title
/head
body
HELLO WORLD!!!
P
?php include(helloworld2.php); ?
/body
/html


Why can't you just use the .php extension?


Justin


on 31/01/03 5:46 PM, Guru Geek ([EMAIL PROTECTED]) wrote:

 I was wondering, can you call a php script in the middle of a html page?
 
 I've seen some sites use code like this:
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 
 html
 head
 titleUntitled/title
 /head
 body
 HELLO WORLD!!!
 P
 !--#include file=helloworld2.php --
 /body
 /html
 
 but when I try it, the php script doesn't run.
 
 
 Does anyone else know how to use php on a page and yet keep the .html
 extension?
 
 Thanks in advance,
 Roger
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] .php extensions versus .html

2003-01-31 Thread Chris Shiflett
--- Guru Geek [EMAIL PROTECTED] wrote:
 I was wondering, can you call a php script in the middle
 of a html page?
...
 Does anyone else know how to use php on a page and yet
 keep the .html extension?

Configure your Web server to treat .html files as PHP. This
has been discussed before, so there are probably some
examples in the archives of how to do this.

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] .php extensions versus .html

2003-01-30 Thread Guru Geek
I was wondering, can you call a php script in the middle of a html page?

I've seen some sites use code like this:
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN

html
head
titleUntitled/title
/head
body
HELLO WORLD!!!
P
!--#include file=helloworld2.php --
/body
/html

but when I try it, the php script doesn't run.


Does anyone else know how to use php on a page and yet keep the .html
extension?

Thanks in advance,
Roger



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP extensions

2002-11-15 Thread Mako Shark
 Email extension?  Aren't you talking about Manuel
 Lemos' mimemail class?
 It's just an include file that you have in your
 directory structure.

I know some people made reference to a 'really good'
e-mail package out there that did attachments and
stuff that seemed to be the better choice considering
the alternative (the one that comes with PHP). I
wanted to check into it.

__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP extensions

2002-11-15 Thread Justin French
That's probably the one -- have a look on phpclasses.org -- handles
attachments, multi-part stuff (HTML email), etc etc.

Justin


on 16/11/02 5:19 AM, Mako Shark ([EMAIL PROTECTED]) wrote:

 Email extension?  Aren't you talking about Manuel
 Lemos' mimemail class?
 It's just an include file that you have in your
 directory structure.
 
 I know some people made reference to a 'really good'
 e-mail package out there that did attachments and
 stuff that seemed to be the better choice considering
 the alternative (the one that comes with PHP). I
 wanted to check into it.
 
 __
 Do you Yahoo!?
 Yahoo! Web Hosting - Let the expert host your site
 http://webhosting.yahoo.com

Justin French

http://Indent.com.au
Web Developent  
Graphic Design



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP extensions

2002-11-13 Thread Mako Shark
Is there a list of PHP extensions out there somewhere,
and what the function of each one is? And does anyone
have the URL of that e-mail extension everyone finds
so useful?

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP extensions

2002-11-13 Thread Justin French
Email extension?  Aren't you talking about Manuel Lemos' mimemail class?
It's just an include file that you have in your directory structure.

Justin


on 13/11/02 11:24 PM, Mako Shark ([EMAIL PROTECTED]) wrote:

 Is there a list of PHP extensions out there somewhere,
 and what the function of each one is? And does anyone
 have the URL of that e-mail extension everyone finds
 so useful?
 
 __
 Do you Yahoo!?
 U2 on LAUNCH - Exclusive greatest hits videos
 http://launch.yahoo.com/u2

Justin French

Creative Director
http://Indent.com.au
Web Developent  
Graphic Design



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] php/extensions directory

2002-11-05 Thread Pierre Vaudrey
I would like know the use of the following directory :
/usr/lib/php/extensions/no-debug-non-zts-20010901

Thanks for your help.


Pierre Vaudrey
email [EMAIL PROTECTED]


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Php extensions

2002-02-01 Thread Mauricio Lairet P.

Hi!

I wanted to know somehting. If my hosting provider does not inlude PEAR in
their PHP installation, am I able to do it myself?

I mean like you do with some Perl modules that are not installed and you use
use lib 'path_to_lib' in Perl.

Is there a way to do something similar with Php extensions?

Thanks in advance,
Mauricio


-- 
PHP General 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]




[PHP] php extensions

2001-09-19 Thread Cristóvão Dalla Costa

I'm trying to create an extension to PHP to provide an access interface to
the proprietary database server my company uses. However, I cannot seem to
suceed even at the simplest module, the one provided by ext_skel. I run
buildconf, configure and compile the module, however dl() won't load the
resulting .o, libmodule.la saying the file format is invalid. If I manually
link the object file to a shared library, dl() will tell me the library is
invalid.

So I'm stuck. If someone could help me that would be gratly appreciated. I'm
using FreeBSD 4.3 and the (patched) PHP sources from the ports tree.

Thanks.

Cristovao Dalla Costa



-- 
PHP General 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]