Re: [PHP-DEV] Re: Windows Threads

2002-11-21 Thread Nick Loman

Well, that's cool then! Why not simply include all this stuff with PHP
rather than supporting the flawed ISAPI that it currently is packaged
with?


On Thu, 21 Nov 2002, Shane Caraveo wrote:

> John Coggeshall wrote:
> 
> > Shane (and everyone else):
> >
> >
> >
> > >Why don't we move PHP into a separate executable. Design a
> > >"thin" ISAPI DLL which purely passes the data which the ISAPI
> > >DLL exposes between the IIS process and the PHP process (or
> > >process-pool for added reliability). The resulting page is
> > >processed in the application server and returned to the ISAPI
> > >DLL where it is output.
> >
> >
> > Shane and I have already been looking into a similar solution for the
> > UNIX version of PHP. In fact, if you ask'd him I think he's already got
> > something working in this respect using FastCGI. 
> 
> This is exactly what fastcgi does.
> 
> >
> >
> > Incidently, Shane weren't you involved in the Windows port of PHP? :)
> 
> Yes, I am to blame.
> 
> >
> >
> > >I think this solution will be *way* easier than trying to fix
> > >every single bug in PHP so that it is utterly thread-safe and
> > >crash-free.
> >
> >
> > That's the idea. Part of the issue is that the external libraries PHP
> > uses can't be promised to be thread-safe.
> 
> 
> An thus why I did the isapi fastcgi plugin.  www.fastcgi.com
> 
> Shane
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




Re: [PHP-DEV] error handling

2002-11-21 Thread Nick Loman

Hello PHP-Developers

I have an idea! 

I recently went through the pain of creating an ISAPI DLL for IIS and what
I found was that IIS was *incredibly* sensitive to things "going wrong" in
the DLL with the result that the IIS process would hang and the whole damn
machine would need a "reboot" on a regular basis.

So, I went back to the drawing board for version 2 of my DLL and I
designed an architecture whereby the DLL would be the "thinnest" I could
possibly make it, and the "guts" would be in a separate application
server.

I accomplished communication between the DLL and the application server
via named pipes, which are very fast and efficient on Win NT and above
servers.

This works fine and I've never had an IIS crash since.

Why don't we move PHP into a separate executable. Design a "thin" ISAPI
DLL which purely passes the data which the ISAPI DLL exposes between the
IIS process and the PHP process (or process-pool for added
reliability). The resulting page is processed in the application server
and returned to the ISAPI DLL where it is output.

Then if PHP crashes for whatever reason (i.e. database-client library
bug), a) it won't take down IIS and b) it can simply be restarted and
continue serving requests. A bit like the way it runs on UNIX really with
Apache's process-pool architecture.

I think this solution will be *way* easier than trying to fix every single
bug in PHP so that it is utterly thread-safe and crash-free.

It would also scale more nicely because you could run multiple PHP
binaries across different machines if you are doing very intensive PHP
stuff.

I think this might solve the pain of trying to run PHP on IIS in a non-CGI
environment with a relatively trivial piece of code.

If anyone wants to take this on I can give source code to my DLL and
application server to give you a kickstart in the right direction.

Additionally if there is a problem with my idea, I'd love to hear from
you all.

Nick.







On Thu, 21 Nov 2002, Maxim Maletsky wrote:

> 
> Derick Rethans <[EMAIL PROTECTED]> wrote... :
> 
> > On Thu, 21 Nov 2002, John Coggeshall wrote:
> 
> > > Again, what about IIS, etc? 
> > 
> > Who cares?  :) It really would be much better if some person who thinks 
> > IIS rulez fixes the ISAPI module. If that doesn't work correctly nobody 
> > should use it at all.
> 
> Never used IIS in my entire life, but I would be scared shall PHP start loosing
> its IIS support letting .NET and Java more space on Win32 systems.
> 
> I am sure there are cases when IIS is prefered to Apache on MS servers
> and when MS is prefered for certain production architectures and these
> architectures are prefer by certain brains. 
> 
> Don't ask me why - I hate that myself, but we should not ignore if want
> to be competitive.
> 
> 
> --
> Maxim Maletsky
> [EMAIL PROTECTED]
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


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




[PHP-DEV] SOAP and CORBA

2002-01-01 Thread Nick Loman


Hello PHP developers,

Interesting to think about what might make a nice foundation technology 
for all the exciting potential of PHP5. SOAP is obviously an important
technology for websites in the future. But given that (I guess) most of us
are not really that keen to follow in the nervous footsteps of Microsoft, 
and given that XML brings me out in a horrible rash, why don't we think
about CORBA as a fundamental PHP technology?

CORBA is now finally in a state where people can actually use it
without running away screaming. There are now enough free implementations
on enough platforms to enable mainstream PHP support. David Eriksson
has done some nice stuff with Universe/Satellite, but I don't think PHP's
CORBA support is currentl "plug n' go" enough to really be capitalised on
(it currently relies on a fair amount of knowledge of CORBA).

What would be fantastic is a situation where newbie PHP coders feel
confident enough to use CORBA services exposed to the Internet (not many
exist at the moment, the "classic" example is Random.org but this
could change). If it was easy enough to start interacting with ORBs
exposed to the 'Net, and it was easy enough for PHP developers to write
their own net-facing ORBs, we could potentially be facing an interesting
paradigm shift whereby PHP users are exposing their interesting objects
(which may, e.g. provide access to databases, content) to the 'net. Much
sexier than say RDF, no?

If anyone would like to help me in my quest to make CORBA more mainstream
(CORBA isn't really scary, at its most basic its just cross-platform
remote procedure calls) I would love to work with you.

All the best for 2002 everyone,

Nick.







-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Equivalent to JSP scope="application" in PHP

2001-08-21 Thread Nick Loman


On Tue, 21 Aug 2001, Derick Rethans wrote:

> > Been using JSP recently (yeah, I know) and have found one (1) good thing
> > about it which is that if you create a "bean" with scope=application you
> > can then store data (e.g. a cached content array) within the bean which
> > all pages can access the same instance of. I can't think of the equivalent
> > thing in PHP, can anyone else?
> 
> You should have a look at www.vl-srm.net. SRM will be able to do this. If
> you have questions about it, feel free to ask them on the
> [EMAIL PROTECTED] mailing list, or by private e-mail.

Looks pretty good Derick! I will try this when it's released.

Nick.



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Equivalent to JSP scope="application" in PHP

2001-08-21 Thread Nick Loman


Hey,

Been using JSP recently (yeah, I know) and have found one (1) good thing
about it which is that if you create a "bean" with scope=application you
can then store data (e.g. a cached content array) within the bean which
all pages can access the same instance of. I can't think of the equivalent
thing in PHP, can anyone else?

Quite useful as a middle ground in terms of page weight between going to
SQL for content each page and pre-caching it all as HTML.

Nick.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Zdnet Article

2001-05-17 Thread Nick Loman


"get some skills" please ZDNet - that has to be one of the poorest reviews
of anything on any platform ever.

No comments system either -- probably using BroadVision :/

Is there a php-advocacy list? I'm getting sick of having to explain
exactly why PHP is better than ColdFusion et al. It would be good to
co-ordinate efforts :)

Nick.



On Fri, 18 May 2001, Emmanuel FAIVRE wrote:

> http://www.zdnet.com/products/stories/reviews/0,4161,2711724,00.html
> 
> no word to comment that !
> 
> just see a adbanner for ColdFusion on the same page !
> 
> Manu
> 
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] How safe is PHP?

2001-05-02 Thread Nick Loman


After having these crashes which I think were due to file upload (but who
knows!) recently, I've been mulling the question: how safe is PHP? Namely
how effective is the memory_limit directive?

Forgive me because I don't know enough about PHP's architecture but is
this memory_limit directive an absolute? Is there absolutely positively no
way a child process can use more than memory_limit? Or are there
situations where it can be exceeded, e.g. can certain bugs in PHP modules
cause it to be ignored?

An additional question is does Apache's RLimitMem/CPU directives work on
PHP? Or is this only applicable to CGI processes?

Any response appreciated.

Nick.



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #8377 Updated: File uploads with POST methodstakes full Server processing capacity and memory

2001-05-01 Thread Nick Loman


Could this be my problem? I am seeing something very similar to this, but
its taking down the entire server very quickly.

What is the maximum recommended file size on a P-III 450Mhz machine with
256MB (usually <50MB free) running RH6.0

Currently I am allowing 20Mb uploads

Nick.

On 2 May 2001 [EMAIL PROTECTED] wrote:

> ID: 8377
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Status: Open
> Bug Type: Feature/Change Request
> PHP Version: 4.0.4
> Assigned To: 
> Comments:
> 
> Just to note that this is still a problem..
> I tried with 1Gb file and my system almost crashed.
> (On Linux)
> 
> --Jani
> 
> 
> Previous Comments:
> ---
> 
> [2000-12-22 16:34:12] [EMAIL PROTECTED]
> This is a known inefficiency.  Jim Winstead is looking addressing this using 
>libapreq which is smarter about handling large file uploads.
> 
> (Moving to feature request)
> 
> ---
> 
> [2000-12-22 10:16:58] [EMAIL PROTECTED]
> When doing a file upload on a big file (say 22MB), PHP takes up progressingly more 
>CPU capacity for the whole duration of the upload.
> 
> The server doesn't crashes but it is so slow that other people can't reach my 
>server, when i'm uploading a big file.
> 
> I now use a ASP-component on the server-side which handles the uploading and this 
>component doesn't slow my server down when uploading a big file.
> 
> Can PHP handle big file uploads in the future?
> 
> This is the HTML that uploads the file:
> 
> 
> 
> ---
> 
> 
> 
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at http://bugs.php.net/?id=8377&edit=2
> 
> 
> -- 
> PHP Development Mailing List 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Re: Bug #10582 Updated: Error message corruption -- possible infiniteloop

2001-05-01 Thread Nick Loman


Jani,

Do you refer to:

http://cvs.php.net/viewcvs.cgi/php4/main/rfc1867.c?rev=1.62&content-type=text/vnd.viewcvs-markup&sortby=date

Or something else? If you think that one may be important I will apply and
see if it changes anything.

The above doesn't seem to be in PHP 4.0.5 but the other important
revisions, e.g. 1.59 do appear to be.

Nick.




On 2 May 2001, Bug Database wrote:

> ID: 10582
> Updated by: sniper
> Reported By: [EMAIL PROTECTED]
> Old-Status: Open
> Status: Feedback
> Old-Bug Type: *General Issues
> Bug Type: HTTP related
> PHP Version: 4.0.5
> Assigned To: 
> Comments:
> 
> Could you please try the latest CVS. There has been
> some fixes on this and I'm not sure if they maded to 4.0.5.
> 
> --Jani
> 
> 
> Previous Comments:
> ---
> 
> [2001-05-01 12:35:27] [EMAIL PROTECTED]
> I'm getting the following error message very occasionally (once daily) on a server 
>with approximately 1000 file uploads.
> 
> httpd: PHP Warning:  File Upload Error - No Mime boundary found after start of file 
>header in Unknown on line 0
> httpd: PHP Warning:  Cannot send session cache limiter - headers already sent 
>(output started at À]Q:40) in /web/script.php on line 12
> 
> This is co-inciding with an httpd process going crazy and using up all available CPU 
>and memory and bringing the machine down. I suspect there's a problem with the file 
>uploader client which is fine, but the crash is giving me major concerns.
> 
> This is proving hard to track down but the corruption in that second error message 
>leads me to think there may be something obvious to look at.
> 
> The script.php uses sessions, trans-sid and use_cookies 1
> 
> 
> Nick.
> 
> 
> 
> ---
> 
> 
> 
> ATTENTION! Do NOT reply to this email!
> To reply, use the web interface found at http://bugs.php.net/?id=10582&edit=2
> 
> 


--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Bug #10582: Error message corruption -- possibleinfinite loop

2001-05-01 Thread Nick Loman


On 1 May 2001 [EMAIL PROTECTED] wrote:

> From: [EMAIL PROTECTED]
> Operating system: RedHat Linux 6.0
> PHP version:  4.0.5
> PHP Bug Type: *General Issues
> Bug description:  Error message corruption -- possible infinite loop
> 
> I'm getting the following error message very occasionally (once
daily) on a server with approximately 1000 file uploads 
(a day)

> httpd: PHP Warning:  File Upload Error - No Mime boundary found after start of file 
>header in Unknown on line 0
> httpd: PHP Warning:  Cannot send session cache limiter - headers already sent 
>(output started at À]Q:40) in /web/script.php on line 12
> 
> This is co-inciding with an httpd process going crazy and using up all available CPU 
>and memory and bringing the machine down. I suspect there's a problem with the file 
>uploader client which is fine, but the crash is giving me major concerns.
> 
> This is proving hard to track down but the corruption in that second error message 
>leads me to think there may be something obvious to look at.
> 
> The script.php uses sessions, trans-sid and use_cookies 1

I would also like to know if there's any way of protecting my machine if
an httpd process does decide to run away and take the machine down with
it.

Nick.



--
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Using Zend Engine in Applications

2001-04-01 Thread Nick Loman


Hi all,

Does there exist a guide or some instructions for beginning to use PHP
code in applications outside the web-server (e.g. non-module,
non-CGI)? Especially calling code and executing a function from a C
program and retrieving the result, for example.

Any details appreciated,

Nick.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] CORBA/Satellite

2001-03-24 Thread Nick Loman


Spending another evening hacking away trying to get Satellite working on
my PHP4.0.4pl1 installation!

I've tracked the segfaulting code down the call on line 142 of object.c:

Object->mCorbaObject = CORBA_ORB_string_to_object(
orbit_get_orb(),
pIor,
orbit_get_environment());

Taking a peek at the orbit_* functions in corba.c I see this comment:

/*
 * Control access to CORBA_ORB and CORBA_Environment objects
 * Adjust these functions to get thread safety!
 */

So my question is -- is the lack of thread safety a possible reason for
the segfault? If so, how do I adjust the functions, or can I compile PHP
with different flags to get around this problem?

I compile with ZEND_THREAD_SAFETY off currently.

Any tips would be greatly appreciated as I'm tearing my hear out here!

Nick.



-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Quick help needed

2001-03-22 Thread Nick Loman


Hey all,

Anyone give me a few tips on how to use gdb to debug Apache? Specifically
the -X mode doesn't seem to do very much (I can't seem to get pages in
this mode). I would really like to be able to get core files from
segfaults of child processes. Is this possible? Then are there any special
tricks after that in gdb?

Thanks!

Nick.





-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] CORBA/PHP

2001-03-21 Thread Nick Loman


Hi

I've got a fairly urgent requirement to get Satellite working properly on
my PHP 4.0.4pl1 system and can't get in touch with David Eriksson. Has
anyone had luck with the setup, specifically accessing objects through 
IIOP over TCP/IP who would be prepared to share configs with me? I am
compiled OK and the mod is installed but it seg faults each time with
glib errors in the log file whenever I call new Object.

Or if anyone knows where David is likely to be I would very much 
appreciate being put in touch with him.

Thanks!

Nick.


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]