[PHP] Event-Driven Programing

2005-07-27 Thread cron
Hello, 

 

Anyone willing to share knowledge or points to articles that try to implement 
event-driven programming in PHP. 

 

And yes, I know php is not event driven language but I like the approach when 
working with 3 layers patterns.

 

Regards, 

Angelo


Re: [PHP] PHP and Active Directory

2005-08-12 Thread cron
Some years ago i did this with ASP and a VB activex component i belive you 
can access a Activex from php.

Angelo

- Original Message - 
From: <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: 
Sent: Friday, August 12, 2005 2:24 AM
Subject: Re: [PHP] PHP and Active Directory



Is this something you're looking for?

_http://www.phpfreaks.com/scripts/User_Authentication/16.php_
(http://www.phpfreaks.com/scripts/User_Authentication/16.php)



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



[PHP] Re: PHP Security

2005-08-29 Thread cron
Sorry for the split of threds, i dont have the original email.

 

This is the answer from computerworld regarding the article 
http://www.computerworld.com/securitytopics/security/holes/story/0,10801,104124,00.html
 , 



>Thank you for taking the time to write in. I see your point. 

>The article should have said that there was a flaw in *a* Web service protocol 
>*for* PHP. Saying "the PHP Web services protocol" may have given readers the 
>wrong >idea. 

>However, this particular PEAR implementation is bundled with one of the newer 
>release candidates of PHP (PHP 4.4.0RC2), at which point it gets difficult to 
>determine >whether something is or is not part of "PHP." In any case, I have 
>issued a clarification at 

>http://www.computerworld.com/news/corrections 

>Regards, 



--
Sharon Machlis
Online Managing Editor
Computerworld
http://www.computerworld.com 

One Speen Street
P.O. Box 9171
Framingham, MA  01701-9171
Phone: +1 508 820 8231
E-mail: [EMAIL PROTECTED] 




To:[EMAIL PROTECTED] 
cc:[EMAIL PROTECTED] (bcc: cweditor) 

Subject:PHP hit by another critical flaw (104124) 


 
Hello,

This article is wrong, XML-RPC for PHP has a security flaw not PHP itself and 
php is not a Web Service Protocol. 

Angelo 





Re: [PHP] upload file - clients path to file?

2005-08-31 Thread cron
Interaction to write to a input file type is denied in browsers not to read
the value so you can  can get the full path using JavaScript like any other
input in the form(document.formname.inputname.value) and pass it to other
input field lets say input fullpath using something like
document.formname.fullpath = document.formname.inputname.value <-- all using
javascript



So yes you can get the fullpath however you should  redirect your question
to a JavaScript List or perhaps a javascript-php list.



Regards



Angelo



- Original Message - 
From: "Jasper Bryant-Greene" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, August 30, 2005 7:14 AM
Subject: Re: [PHP] upload file - clients path to file?


> [EMAIL PROTECTED] wrote:
> > I havent found an answer after looking at the manual. I'm trying to find
> > out if it possible to find the path of the file on the clients pc once
> > a  form has been submitted with the file upload form.
> > I know its possible to get the file name but I need the whole path.
> > is this possible?
>
> Not with pure PHP. Maybe with some JavaScript, but most browsers heavily
> limit any interaction with  controls from JavaScript.
> So probably not at all.
>
> -- 
> Jasper Bryant-Greene
> Freelance web developer
> http://jasper.bryant-greene.name/
>
> If you find my advice useful, please consider donating to a poor
> student! You can choose whatever amount you think my advice was
> worth to you. http://tinyurl.com/7oa5s
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] email validation (no regex)

2005-09-21 Thread cron


As an admin I would assume this as spammers trying to get some emails and I 
would block this on the firewall.



- Original Message - 
From: "Michael Sims" <[EMAIL PROTECTED]>

To: 
Sent: Wednesday, September 21, 2005 4:22 PM
Subject: RE: [PHP] email validation (no regex)



Jim Moseby wrote:

There's no requirement for an MX-record, so you'd need to check the
A-record ($domain) too.


Excellent answer.  No requirement for MX record?

[showing my ignorance]
How does email routing happen if there is no mail exchanger in the
zonefile for a particular domain?
[/ignorance]


Most all mail transfer agents will fall back to looking for an A record if 
an MX
record doesn't exist.  It's good practice to define an MX record but it 
isn't

required...

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




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



Re: [PHP] File complete check (FTP)

2005-09-22 Thread cron

How about check file size?

Crom
- Original Message - 
From: "Johannes Tyra" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, September 22, 2005 5:04 PM
Subject: [PHP] File complete check (FTP)


Hello,
i want to check if a file (jpg image) is completely uploaded on a server.
If checked für the to last bytes (ffd9), but these method is not save.

Anybody know how it works??


--
Mit freundlichem Gruß,

| Johannes Tyra
| ---
| BrainData - InterNet Services
| ---
| Tel: +49.209.8181788
| Fax: +49.209.8181789
| ---
| www.BrainData.de
| mailto:[EMAIL PROTECTED]

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

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



Re: [PHP] ftp_site problem

2005-09-22 Thread cron

try:

if(ftp_site($conn_id, "SITE chmod 0777 
/public_html/EditPage/cd_ef_W.txt")) echo 'successful';

else 'failed';


it works for me

Crom
- Original Message - 
From: "Al" <[EMAIL PROTECTED]>

To: 
Sent: Thursday, September 22, 2005 9:34 PM
Subject: [PHP] ftp_site problem



I can't get ftp_site() to chmod a file.

WS_FTP utility changes them OK.

I can connect and log-in via ftp OK

Then I send

if(ftp_site($conn_id, "chmod 0777 /public_html/EditPage/cd_ef_W.txt")) 
echo 'successful';

else 'failed';

And get "successful" OK

But, the file's permissions don't change.  Have tried "777" as well as 
"0777".


Any suggestions?

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




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



[PHP] Bitwise operators

2005-09-26 Thread cron
Hello,

>From php manual:

$a << $b Shift leftShift the bits of $a $b steps to the left (each step
means "multiply by two")
$a >> $b Shift rightShift the bits of $a $b steps to the right (each step
means "divide by two")


So i ask what this output?

$a = 4;
$b = 3;

echo  $a << $b;
echo  $a >> $b;


Angelo

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



Re: [PHP] Bitwise operators

2005-09-26 Thread cron
I tested; I don't want to waste peoples time. Rewriting the question:

 

$a = 4;
$b = 3;

 

$c =   $a << $b;
$d =  $a >> $b;

 

echo "c = " . $c . "";
echo "d = " . $d . "";

 

this outputs:

 

c = 32
d = 0

 

The question is why?

 

Angelo



- Original Message - 
From: "Chris W. Parker" <[EMAIL PROTECTED]>
To: 
Sent: Monday, September 26, 2005 1:28 PM
Subject: RE: [PHP] Bitwise operators


[EMAIL PROTECTED] 
on Monday, September 26, 2005 9:18 AM said:

> So i ask what this output?
> 
> $a = 4;
> $b = 3;
> 
> echo  $a << $b;
> echo  $a >> $b;

You just spent 3-5 minutes writing an email and now almost 10 minutes
waiting for a reply to something that would have taken you 2 minutes to
test on your own.

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

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



Re: [PHP] Bitwise operators

2005-09-26 Thread cron
The second value is the number of spaces to shift, dint realize that.



Thanks for your time Chris.



Angelo



- Original Message - 
From: "Chris Boget" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; 
Sent: Monday, September 26, 2005 2:02 PM
Subject: Re: [PHP] Bitwise operators


> >I tested; I don't want to waste peoples time. Rewriting the question:
> > this outputs:
> > c = 32
> > d = 0
> > The question is why?
>
> First row is the bit's number and the second row is the bit's value:
>
> #8  | #7  | #6 | #5 | #4 | #3 | #2 | #1
> ---
> 128 | 64  | 32 | 16 |  8 |  4 |  2 |  1
>
> So your variable $a, which has a value of 4 starts out in the bit position
> of #3 with that bit turned on..  Shift it left 3 (value of $b) spaces and
> you
> end up with bit #6 getting turned on giving you a value of 32, which is
what
> $c is echoing out.
>
> Shifting to the right 3 spaces from the same starting position nets you 0
> with
> all the bits turned off.  At least, I'm pretty sure that's right.
>
> thnx,
> Chris
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Re: displaying image from blog

2005-10-04 Thread cron
You have to echo a single image and only the image(no html tags) as binary
for this to work. One must also set the header from the page to the correct
mime type for the image work.

ex:

Page: displayImg.php

header('Content-Type: image/jpeg');  // set correct header, more info
on:http://us2.php.net/manual/en/function.header.php

include_once("../includes.list.php");
$ms_sql= new ms_db();
$my_sql=new Database();
$query="select photo from cars where id=" $_GET["id"];
$data=$ms_sql->query($query);
while($obj = $ms_sql->objects('',$data)){
echo $obj->photo;
}
$data=$ms_sql->disconnect();

Page where image goes:


 
 
 


 
 

Angelo



- Original Message - 
From: "blackwater dev" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, October 04, 2005 2:14 PM
Subject: [PHP] Re: displaying image from blog


> Sorry, meant BLOB, not blog.
>
> On 10/4/05, blackwater dev <[EMAIL PROTECTED]> wrote:
> > I am querying a MSSQL db where an jpg image is stored as a blog.
> >
> > I have this code:
> >
> > 
> > 
> > 
> > 
> > 
> >  > //Do the query
> > include_once("../includes.list.php");
> >   $ms_sql= new ms_db();
> >   $my_sql=new Database();
> >   $query="select photo from cars where id=22";
> >   $data=$ms_sql->query($query);
> >while($obj = $ms_sql->objects('',$data)){
> > echo $obj->photo;
> >}
> > $data=$ms_sql->disconnect();
> > ?>
> > 
> > 
> >
> > But when viewed I just get all the junk code:
> >
> > !1AQaq"2B'¡±Á #3RðbrÑ
> >
$4á%ñ&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š'""•–—˜™š¢£¤¥¦
§¨(c)ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øù
> >
> > What is wrong?
> >
> > Thanks!
> >
>

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



Re: [PHP] Re: How do I POST data with headers & make the browser follow?

2005-10-06 Thread cron
Print out the form and on the body  tag put some javascript to do the post 
stuff


ex:




style="display:none", this will hide form from the user

- Original Message - 
From: "Ragnar" <[EMAIL PROTECTED]>

To: 
Sent: Friday, October 07, 2005 1:30 AM
Subject: [PHP] Re: How do I POST data with headers & make the browser 
follow?




Message-ID: <[EMAIL PROTECTED]>
To: php-general@lists.php.net
Date: Thu, 06 Oct 2005 15:04:41 +0200
From: Petr Smith <[EMAIL PROTECTED]>
Subject: Re: How do I POST data with headers & make the browser follow?


I have to apologize if this issue has been discussed in detail before but

I

couldn't find anything obvious so far.

What I need/want to do is to :

1. Take POST data from a form (no problem)
2. Do whatever i need to on the target page (no problem)
3. Pass some other data on to a 3rd page as a POST
   request.
4. Get the browser to follow to said 3rd page.


All this is happening via SSL.

So basically what i am trying to do is to "fake" whatever happens
at a normal POST request that is handled by the browser.

Now point 4. in my example above is giving me a massive headache,
I have managed to pass data on to the 3rd page as POST quite comfortably
using cURL but the browser doesn't follow (ie. the URL in the address bar
remains unchanged).

I did see that there is a FOLLOWLOCATION option you can set in cURL when

you

do you request, and though "wicked, just what I needed" only to find out
that it's not working (probably because I understand what it does wrong).

Pretty pretty please if anyone knows a solution for the above, let me

know.


Oh, and I'd also like to add that the information I am trying to get to

the

3rd page in the example is sensitive (Credit Card details etc.), so $_GET
and $_COOKIE are out of the question.



Hi,

it seems you have no understanding how http protocol works.. I can't
learn you the whole thing, but I can give you some hints. Read something
about HTTP
(http://www.digital-web.com/articles/powering_the_web_with_http/),
install some network sniffer (ethereal, HttpWatch for IE - great tool
for beginners) and see what happens.

- you cannot force browser to POST something somewhere with PHP. You
have to realize, that PHP is running on server, but the browser is the
client.
- you cannot use curl to do it. With curl it all happens on the server.
If you want to use curl, you have to use same technique used by "web
based anonymous proxy". Return all loaded data to client, rewrite urls
to your script, handle everything correctly until client closes browser.
Very complex stuff
- followlocation has nothing to do with browser. it only says to curl to
evaluate Location header and do auto-redirection
- sensitive information? GET, POST, COOKIE, everything could be
intercepted
- your only help is javascript. You can generate something like this to
client browser with php. But you couldn't hide sensitive information
this way.




- think about your problem and possible solutions again



Petr


Hi Petr,

thanks for the reply, first off i certainly didn't claim to be an expert 
on

the HTTP, which is why i was asking the question I did.
I do realise that PHP runs on the server and can't force the browser to do
anything directly, I was merely wondering why header("Location:"); got the
browser to follow and if there was a way for me to get the same behaiviour
working when PHP was posting data.

Anyway, I will look at my problem at hand again and will try something 
else.


Thanks for the tips.


--
Highspeed-Freiheit. Bei GMX supergünstig, z.B. GMX DSL_Cityflat,
DSL-Flatrate für nur 4,99 Euro/Monat*  http://www.gmx.net/de/go/dsl

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




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



Re: [PHP] Memory Leak?

2005-10-23 Thread cron
I think the php GC only kicks in at the end of a script some calls to 
mysql_free_result might help




Angelo

- Original Message - 
From: "Richard Lynch" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Cc: 
Sent: Saturday, October 22, 2005 11:40 PM
Subject: Re: [PHP] Memory Leak?



On Sat, October 22, 2005 9:24 pm, [EMAIL PROTECTED] wrote:

Sucks that you don't have more control over the incoming data.


Just for the record, for when the source of this data reads this thread.

I am ECSTATIC to have this data, period.

:-)

I know we'll work out a viable solution in time, even if replication
is not in the cards.

--
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 General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] PHP 5 && OO && performance && exceptions

2005-11-09 Thread cron
Hello, 

 

Currently I'm make some utilities classes and I took the idea from java to make 
some wrappers class like String, Integer and so on. This allows me to use the 
type hint for basic types in php.  Anyone have a clue if replacing the all in 
one type in php for objects types will degrade the performance?

 

Also for every controller class that I'm making I'm also making exceptions 
class of every error that it can generate.  Same questions: It will degrade 
performance to throw an exception instead of lest say a pear error or return 
false?

 

Just for know, I'm doing this because I believe that it will eliminate some o 
problems o development and will eliminate some basic validations.





Any tips appreciate



Angelo





Re: [PHP] PHP 5 && OO && performance && exceptions

2005-11-10 Thread cron
I was not considering that, I was using $obj_string->getValue(), the 
__toString method and type casting could save me some keystrokes :)




Anyway, did you abandon the development with the basic types class?



Angelo



- Original Message - 
From: "Jake Gardner" <[EMAIL PROTECTED]>

To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 09, 2005 1:37 PM
Subject: Re: [PHP] PHP 5 && OO && performance && exceptions


I myself was considering creating classes such as String, but I ran
into more basic problems before performance, for example:

class String {
  protected $Value;
  function __construct($Value) {
  $this->Value = $Value;
  }
}
$SomeString = new String("Hello World!");
Print($SomeString); // Does not print "Hello World!"

The way around this was still unsatisfactory:
class String {
  protected $Value;
  function __construct($Value) {
 $this-> Value = $Value;
 }
 function __toString() {
 return $this->Value;
 }
}
$SomeString = new String("Hello World!");
Print($SomeString); // Prints "Hello World!"

Because this has obvious limitations, and is only a fix for strings;
this doesnt work for functions that expect integer values.

In reality, there really is no way to use PHP to rewrite a type in PHP
without using the PHP "omni-type".

However, you can use type casting as it is:

http://us2.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting

http://us2.php.net/manual/en/function.settype.php


On 11/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Hello,



Currently I'm make some utilities classes and I took the idea from java to 
make some wrappers class like String, Integer and so on. This allows me to 
use the type hint for basic types in php.  Anyone have a clue if replacing 
the all in one type in php for objects types will degrade the performance?




Also for every controller class that I'm making I'm also making exceptions 
class of every error that it can generate.  Same questions: It will 
degrade performance to throw an exception instead of lest say a pear error 
or return false?




Just for know, I'm doing this because I believe that it will eliminate 
some o problems o development and will eliminate some basic validations.






Any tips appreciate



Angelo







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



Re: [PHP] PHP 5 && OO && performance && exceptions

2005-11-11 Thread cron
Some more thought.



To solve this problem would be necessary to create some utility class like
System in java and that way should be possible to do a System::echo($string)
based on type, i guess this can be accomplished using overloading.



Am I making any sense?



- Original Message - 
From: <[EMAIL PROTECTED]>
To: 
Sent: Thursday, November 10, 2005 6:47 PM
Subject: Re: [PHP] PHP 5 && OO && performance && exceptions


> I was not considering that, I was using $obj_string->getValue(), the
> __toString method and type casting could save me some keystrokes :)
>
>
>
> Anyway, did you abandon the development with the basic types class?
>
>
>
> Angelo
>
>
>
> - Original Message - 
> From: "Jake Gardner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 09, 2005 1:37 PM
> Subject: Re: [PHP] PHP 5 && OO && performance && exceptions
>
>
> I myself was considering creating classes such as String, but I ran
> into more basic problems before performance, for example:
>
> class String {
>protected $Value;
>function __construct($Value) {
>$this->Value = $Value;
>}
> }
> $SomeString = new String("Hello World!");
> Print($SomeString); // Does not print "Hello World!"
>
> The way around this was still unsatisfactory:
> class String {
>protected $Value;
>function __construct($Value) {
>   $this-> Value = $Value;
>   }
>   function __toString() {
>   return $this->Value;
>   }
> }
> $SomeString = new String("Hello World!");
> Print($SomeString); // Prints "Hello World!"
>
> Because this has obvious limitations, and is only a fix for strings;
> this doesnt work for functions that expect integer values.
>
> In reality, there really is no way to use PHP to rewrite a type in PHP
> without using the PHP "omni-type".
>
> However, you can use type casting as it is:
>
>
http://us2.php.net/manual/en/language.types.type-juggling.php#language.types.typecasting
>
> http://us2.php.net/manual/en/function.settype.php
>
>
> On 11/9/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> >
> >
> > Currently I'm make some utilities classes and I took the idea from java
to
> > make some wrappers class like String, Integer and so on. This allows me
to
> > use the type hint for basic types in php.  Anyone have a clue if
replacing
> > the all in one type in php for objects types will degrade the
performance?
> >
> >
> >
> > Also for every controller class that I'm making I'm also making
exceptions
> > class of every error that it can generate.  Same questions: It will
> > degrade performance to throw an exception instead of lest say a pear
error
> > or return false?
> >
> >
> >
> > Just for know, I'm doing this because I believe that it will eliminate
> > some o problems o development and will eliminate some basic validations.
> >
> >
> >
> >
> >
> > Any tips appreciate
> >
> >
> >
> > Angelo
> >
> >
> >
> >
> >
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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



Re: [PHP] Virtual includes of PHP into SSI pages.

2005-11-16 Thread cron
For this to work you must set html and shml as a php file extension in
apache.

This is because shml includes are made before it reaches apache output, so
if you have file "a" including file "b" it the same as having only one file
"a" with copy and paste of file "b" with shml file extension and thus this
is never parsed to php.

Hope i´m making any sense here, bad english

Angelo



- Original Message - 
From: "Neil Hoggarth" <[EMAIL PROTECTED]>
To: 
Sent: Monday, November 14, 2005 11:01 AM
Subject: [PHP] Virtual includes of PHP into SSI pages.


> Hi Folks,
>
> I'm attempting to diagnose an apparent problem with my Apache/PHP
> server setup. The platform is SPARC Solaris 9. I'm running Apache httpd
> 2.0.55 and PHP 4.4.1, built from NetBSD pkgsrc.
>
> I have a user who has .shtml (server side include) pages which include
> PHP fragments using directives like 
> (and yes, I know this is silly, and that obvious thing to do is to use
> PHP for the top level pages rather than SSI; unfortunatly I'm the
> sysadmin providing the service, rather than the person maintaining the
> content).
>
> I wanted to check to see if anyone knows of any known problems or
> gotchas in this area?
>
> I'm told that this mechanism was working okay until recently, but it
> broke at some point in the last few months. I've done a number of
> upgrades to both the apache2 and PHP packages over the time period in
> question, in response to security advisories; unfortunately the user
> can't pinpoint exactly when things started to fail.
>
> I've recreated a very simple test case:
>
> test.shtml:
>
>
>
>Test Page
>
>
>Begin Test
>
>End Test
>
>
>
> foo1.php:
>
>Hello From PHP
>
> Fetching "test.shtml" produces the output:
>
>Begin Test
>
>End Test
>
> (no sign of the included fragment in the output).
>
> Editing the test harness to teplacing the include of foo1.php with an
> include of a plain HTML or SHTML file produces the expected output
> (included content appears in the output between the begin and end
> markers).
>
> Furthermore, if I edit the test harness to include an HTML file and
> *then* the PHP fragment, I get a reproduceable segmentation fault in
> PHP:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0xfecb541c in zend_hash_index_update_or_next_insert (ht=0xfed3c1c4, h=0,
> pData=0xffbfdec8, nDataSize=12,
>  pDest=0x0, flag=1) at
> /export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/Zend/zend_hash.c:390
> 390 p = ht->arBuckets[nIndex];
> (gdb) where
> #0  0xfecb541c in zend_hash_index_update_or_next_insert (ht=0xfed3c1c4,
> h=0, pData=0xffbfdec8,
>  nDataSize=12, pDest=0x0, flag=1)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/Zend/zend_hash.c:390
> #1  0xfecb8cc0 in zend_list_insert (ptr=0x299250, type=2)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/Zend/zend_list.c:45
> #2  0xfecb8eb8 in zend_register_resource (rsrc_result=0x0,
rsrc_pointer=0x299250, rsrc_type=2)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/Zend/zend_list.c:98
> #3  0xfec693d8 in _php_stream_alloc (ops=0xfed31528, abstract=0x1eb770,
persistent_id=0x0,
>  mode=0xfece83f0 "rb") at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:281
> #4  0xfec6e0b0 in _php_stream_fopen_from_fd (fd=22, mode=0xfece83f0 "rb",
persistent_id=0x0)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:2072
> #5  0xfec6de5c in _php_stream_fopen (filename=0x297cb8
"/usr/pkg/share/httpd/htdocs/foo1.php",
>  mode=0xfece83f0 "rb", opened_path=0xffbfeb90, options=165)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:2004
> #6  0xfec6d5cc in _php_stream_fopen_with_path (filename=0x297cb8
"/usr/pkg/share/httpd/htdocs/foo1.php",
>  mode=0xfece83f0 "rb", path=0xfece7fc8 ".:/usr/pkg/lib/php",
opened_path=0xffbfeb90, options=165)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:1784
> #7  0xfec6efd4 in php_plain_files_stream_opener (wrapper=0xfed31598,
>  path=0x297cb8 "/usr/pkg/share/httpd/htdocs/foo1.php", mode=0xfece83f0
"rb", options=165,
>  opened_path=0xffbfeb90, context=0x0)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:2489
> #8  0xfec6fb18 in _php_stream_open_wrapper_ex (path=0x297cb8
"/usr/pkg/share/httpd/htdocs/foo1.php",
>  mode=0xfece83f0 "rb", options=173, opened_path=0xffbfeb90,
context=0x0)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:2696
> #9  0xfec6ff34 in _php_stream_open_wrapper_as_file_handle (
>  path=0x297cb8 "/usr/pkg/share/httpd/htdocs/foo1.php", mode=0xfece83f0
"rb", options=141, fh=0xffbfeb88)
>  at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/streams.c:2823
> #10 0xfec53900 in php_open_wrapper_for_zend (filename=0x297cb8
"/usr/pkg/share/httpd/htdocs/foo1.php",
>  fh=0xffbfeb88) at
/export/scratch/pkgsrc/www/ap-php/work/php-4.4.1/main/main.c:764
> #11 0xfe