[PHP] Is it possible to create a php.so

2007-09-07 Thread Khai
I have several background processes written in PHP.  In our design, we 
have the parent process which check if there is work to process, and if 
so launch a child process via exec() to do actual work.  By design, we 
want the child process to do just what it was told to do and gracefully 
terminate.  We don't want the child process to live longer than 10 
minutes.


My coworker looked at ZendPlatform, and APC, but he found that these 
does not do anything for PHP program that are run from command line.  I 
know at this point ZendPlatform does not support command line.  Is this 
true with APC?  Is there any other caching implementation that we can use?


Is it possible to compile PHP so that the core of it is in a dynamically 
 linked library (I am running in a Linux/Unix environment)?


Can I turn my PHP code into a dynamic link library ?

Thanks
Khai

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



[PHP] Is there a way to redefine a constant?

2007-02-08 Thread Khai
STDERR and STDOUT are defined as constants.  Is there a way to redefine 
these constants?


Thanks
Khai

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



[PHP] override core function

2006-08-02 Thread Khai
Is it possible to override the core built-in function exit() in PHP.  If 
so, how can I call the the built-in exit() from within my function?


Thanks
Khai

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



Re: [PHP] What is the effect of --enable-memory-limit

2006-03-21 Thread Khai
This page does not explain the consequence of what may happen if my 
script indeed need more memory than what is set in php.ini .  Will PHP / 
Apache / OS (Linux, Unix) terminate the request with a 500 internal 
server error ?  Will the script be allowed to finished, and Apache/PHP 
gracefully terminate the child afterward ?


Thanks,
Khai
Chris wrote:

Khai wrote:

If I compile php with --enable-memory-limit and set a memory limit in 
php.ini, what will this do ?



http://www.php.net/manual/en/ini.core.php#ini.memory-limit



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



[PHP] CLI versus apache module

2006-03-15 Thread Khai
I have a.php includes b.php .  b.php is used by other pages that are 
served through apache.  a.php used to be started through apache, but now 
 need to be started from command line.  How do I know if a php file is 
running as apache module or as CLI ?


Thanks
Khai

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



[PHP] Can I specify alternative php.ini in httpd.conf

2006-03-15 Thread Khai

Hi All,

I am using php as an apache module.  In my httpd.conf, is there a way to 
specify which php.ini to use?


Thanks
Khai

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



[PHP] equivalent of perl's ithread

2006-03-11 Thread Khai
As of perl 5.6, perl has a concept of interpreter thread (called 
ithread).  Basically, any variable that you want to be shared across 
threads, you have to explicitly shared it.  This apply not only to 
regular variables, but also apply to super global variables such as $_, 
making it easy to write threadsafe modules in perl.


Does PHP has an equivalent concept?  If I am developing php pages that 
are to be run under apache2 threaded worker mpm, can I use $_SERVER 
variable ?


Thanks
Khai

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



[PHP] database connection pool

2006-03-11 Thread Khai

Hello,

My name is Khai.  I am new to PHP.  I am well versed with mod_perl and 
apache.  With mod_perl, I can use Apache::DBI to cache database 
connections.  Is there a module for PHP that does the same thing ?


Thank you,

Khai

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



[PHP] What is the effect of --enable-memory-limit

2006-03-09 Thread Khai
If I compile php with --enable-memory-limit and set a memory limit in 
php.ini, what will this do ?


Thanks
Khai

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



[PHP] Can php.ini include another config file

2006-02-23 Thread Khai
In my development environment I have Zend Debugger / Zend Studio 
installed.  I like to put all the directives for this into studio.ini, 
and include this file into the main php.ini somehow.  Is this possible? 
 Also can I put php directives into the apache httpd.conf file?


Khai

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