php-windows Digest 27 Apr 2002 07:27:51 -0000 Issue 1114

Topics (messages 13334 through 13351):

Re: Excel not closing after using it via COM
        13334 by: Scott Hurring
        13337 by: Scott Hurring
        13338 by: Alan Brown
        13344 by: Neil Lincoln

Re: Security Alert!-cgi.force_redirect=0
        13335 by: Scott Hurring

Re: MySQL / PHP - possible to run many sql statements i n the same execution?
        13336 by: Scott Hurring

passing variables with 4.2
        13339 by: Chris Dion
        13341 by: Rasmus Lerdorf
        13342 by: Mike Flynn

php and apache 2.0 on windows installed ok?
        13340 by: scott.eesco.com
        13350 by: Alan Popow

Apache 1.3.20 and PHP 4.1.2 on Win2k Server
        13343 by: Stuart Dallas
        13346 by: Rasmus Lerdorf

DDE and PHP; printing a spreadsheet with COM?
        13345 by: Scott Hurring

Showing a Blob field in a browser
        13347 by: Waldemar Brand Neto
        13348 by: Dash McElroy
        13351 by: George Nicolae

PDFextension freezes web services
        13349 by: Ethan Nelson

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
Son of a ....

Yep.  After splitting up the DisplayAlerts line into
two lines, (and putting in an unset($application))
Excel is no longer resident after the script exits.

Is temporary-object behaviour supposed to happen
in cases like $obj->another->func(), or is this
an unintended side-effect of something else?

Does PHP usually create temp-objects when referencing
$obj->another, or is that behaviour only part of 
the COM subsystem?

Sorry for asking questions that are probably obvious,
but i'm not really too familiar with the details
of PHP's object handling.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Alan Brown [mailto:[EMAIL PROTECTED]]
> Subject: Re: [PHP-WIN] Excel not closing after using it via COM
> 
> There is a missing "Release" call in the COM code when 
> temporary objects are
> created for a construct such as
> 
> $excel->application->DisplayAlerts = False;
> 
> This is not as visible a problem with an inproc server as 
> with a localserver
> such as Excel.
> 
> It is fairly easy to work around this (until I get a real fix 
> into the base)
> by breaking it up thus:
> 
> $application = $excel->application;
> $application->DisplayAlerts = False;
> 
> This has to be done in two places in the example I saw. 
> However I note that
> if you put in a logic error such as this:
> $book = $workbooks->Open($file);
> $sheet = $books->Worksheets(1);
> 
> After the exception a copy of Excel is still left running. I 
> wiill look more
> at this over the weekend and test my Release() call on the 
> temporary object.
> It seems to work, but I fear that it will break something else....
> 
> Alan.
--- End Message ---
--- Begin Message ---
Neil: Go through your code and make sure there are no
indirect object references like $obj->obj->func();

>From what i understand, it seems that this type of
construction is causing a temporary object to be
left around (which is, in turn, causing excel to
remain zombie, becuase the temp-object is never
properly cleaned up)

Anyone with knowledge of COM... is this intended
behaviour?  Do COM objects *need* a Quit() signal
to die, even if the program that was manipulating
the COM object dies (as is the case with PHP
finishing up and EXCEL still in memory when a
temp-object is not properly unset())?

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 9:23 AM
> To: Alan Brown; Scott Hurring; Php-Win (E-mail)
> Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> 
> 
> We have tried this and it doesn't help. And yes, any non 
> normal exit from
> the EXCEL COM object results in a "zombie".
> 
> -----Original Message-----
> From: Alan Brown [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 8:00 AM
> To: Scott Hurring; Php-Win (E-mail)
> Subject: Re: [PHP-WIN] Excel not closing after using it via COM
> 
> There is a missing "Release" call in the COM code when 
> temporary objects are
> created for a construct such as
> 
> $excel->application->DisplayAlerts = False;
> 
> This is not as visible a problem with an inproc server as 
> with a localserver
> such as Excel.
> 
> It is fairly easy to work around this (until I get a real fix 
> into the base)
> by breaking it up thus:
> 
> $application = $excel->application;
> $application->DisplayAlerts = False;
> 
> This has to be done in two places in the example I saw. 
> However I note that
> if you put in a logic error such as this:
> $book = $workbooks->Open($file);
> $sheet = $books->Worksheets(1);
> 
> After the exception a copy of Excel is still left running. I 
> wiill look more
> at this over the weekend and test my Release() call on the 
> temporary object.
> It seems to work, but I fear that it will break something else....
> 
> Alan.
> 
> ----- Original Message -----
> From: "Scott Hurring" <[EMAIL PROTECTED]>
> To: "Php-Win (E-mail)" <[EMAIL PROTECTED]>
> Sent: Thursday, 25 April, 2002 13:51
> Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> 
> 
> > I'm not doing this through Apache.
> >
> > I tried out Win32 command line PHP and Perl.
> >
> > So even though it might be an issue with Excel being
> > owned by "SYSTEM" when run thru Apache, PHP still leaves
> > it open whereas Perl does not.
> >
> > (And to boot, my Apache service is configured to
> >  RunAs my account "scott", so it shouldn't be plauged
> >  by the "SYSTEM" ownership issue... even though
> >  i haven't tested it)
> >
> > Please check out: http://furt.com/code/php/com_issues/
> > (Read 'readme.txt')
> >
> > ---
> > Scott Hurring
> > Systems Programmer
> > EAC Corporation
> > [EMAIL PROTECTED]
> > Voice: 201-462-2149
> > Fax: 201-288-1515
> >
> > > -----Original Message-----
> > > From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, April 25, 2002 1:20 PM
> > > To: Scott Hurring; Php-Win (E-mail)
> > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > >
> > >
> > > On our systems the EXCEL COM object executes as a member of
> > > "SYSTEM" instead
> > > of as a child of the owner of the Apache/php server. When the
> > > COM object
> > > completes it leaves the EXCEL hanging around as a child of a
> > > SYSTEM process.
> > >
> > > -----Original Message-----
> > > From: Scott Hurring [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, April 25, 2002 11:59 AM
> > > To: Php-Win (E-mail)
> > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > >
> > > I went back and ran some perl code using the
> > > Excel COM object.  Excel does properly exit...
> > > so it looks like you are correct -- it's
> > > probably a bug in PHP's COM code.
> > >
> > > Attached is is sample Perl, PHP and Excel,
> > > if anyone wants to verify that excel does
> > > indeed die after the perl script is finished,
> > > yet stays alive when the PHP script is
> > > finished.
> > >
> > > ---
> > > Scott Hurring
> > > Systems Programmer
> > > EAC Corporation
> > > [EMAIL PROTECTED]
> > > Voice: 201-462-2149
> > > Fax: 201-288-1515
> > >
> > > > -----Original Message-----
> > > >    Try
> > > >
> > > >     $book->Close("False");
> > > >
> > >
> > > Doesnt do anything.
> > >
> > > >    But then one has to ask, why does it work fine from other
> > > > languages, e.g. Perl? If the API were broken, it would seem
> > > > that it would be broken regardless of the language one was
> > > > using.
> > > >
> > > >      Scott
> > >
> > > Yeah.. that's the way it seems now.
> > >
> > >
> > > ---
> > > Incoming mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > >
> > > ---
> > > Outgoing mail is certified Virus Free.
> > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > >
> > >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> 
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> 
> 
--- End Message ---
--- Begin Message ---
Not intended behaviour. A fix has been checked into CVS already.

----- Original Message ----- 
From: "Scott Hurring" <[EMAIL PROTECTED]>
To: "Php-Win (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 16:08
Subject: RE: [PHP-WIN] Excel not closing after using it via COM


> Neil: Go through your code and make sure there are no
> indirect object references like $obj->obj->func();
> 
> >From what i understand, it seems that this type of
> construction is causing a temporary object to be
> left around (which is, in turn, causing excel to
> remain zombie, becuase the temp-object is never
> properly cleaned up)
> 
> Anyone with knowledge of COM... is this intended
> behaviour?  Do COM objects *need* a Quit() signal
> to die, even if the program that was manipulating
> the COM object dies (as is the case with PHP
> finishing up and EXCEL still in memory when a
> temp-object is not properly unset())?
> 
> ---
> Scott Hurring
> Systems Programmer
> EAC Corporation
> [EMAIL PROTECTED]
> Voice: 201-462-2149
> Fax: 201-288-1515
> 
> > -----Original Message-----
> > From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 26, 2002 9:23 AM
> > To: Alan Brown; Scott Hurring; Php-Win (E-mail)
> > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > 
> > 
> > We have tried this and it doesn't help. And yes, any non 
> > normal exit from
> > the EXCEL COM object results in a "zombie".
> > 
> > -----Original Message-----
> > From: Alan Brown [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 26, 2002 8:00 AM
> > To: Scott Hurring; Php-Win (E-mail)
> > Subject: Re: [PHP-WIN] Excel not closing after using it via COM
> > 
> > There is a missing "Release" call in the COM code when 
> > temporary objects are
> > created for a construct such as
> > 
> > $excel->application->DisplayAlerts = False;
> > 
> > This is not as visible a problem with an inproc server as 
> > with a localserver
> > such as Excel.
> > 
> > It is fairly easy to work around this (until I get a real fix 
> > into the base)
> > by breaking it up thus:
> > 
> > $application = $excel->application;
> > $application->DisplayAlerts = False;
> > 
> > This has to be done in two places in the example I saw. 
> > However I note that
> > if you put in a logic error such as this:
> > $book = $workbooks->Open($file);
> > $sheet = $books->Worksheets(1);
> > 
> > After the exception a copy of Excel is still left running. I 
> > wiill look more
> > at this over the weekend and test my Release() call on the 
> > temporary object.
> > It seems to work, but I fear that it will break something else....
> > 
> > Alan.
> > 
> > ----- Original Message -----
> > From: "Scott Hurring" <[EMAIL PROTECTED]>
> > To: "Php-Win (E-mail)" <[EMAIL PROTECTED]>
> > Sent: Thursday, 25 April, 2002 13:51
> > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > 
> > 
> > > I'm not doing this through Apache.
> > >
> > > I tried out Win32 command line PHP and Perl.
> > >
> > > So even though it might be an issue with Excel being
> > > owned by "SYSTEM" when run thru Apache, PHP still leaves
> > > it open whereas Perl does not.
> > >
> > > (And to boot, my Apache service is configured to
> > >  RunAs my account "scott", so it shouldn't be plauged
> > >  by the "SYSTEM" ownership issue... even though
> > >  i haven't tested it)
> > >
> > > Please check out: http://furt.com/code/php/com_issues/
> > > (Read 'readme.txt')
> > >
> > > ---
> > > Scott Hurring
> > > Systems Programmer
> > > EAC Corporation
> > > [EMAIL PROTECTED]
> > > Voice: 201-462-2149
> > > Fax: 201-288-1515
> > >
> > > > -----Original Message-----
> > > > From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, April 25, 2002 1:20 PM
> > > > To: Scott Hurring; Php-Win (E-mail)
> > > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > > >
> > > >
> > > > On our systems the EXCEL COM object executes as a member of
> > > > "SYSTEM" instead
> > > > of as a child of the owner of the Apache/php server. When the
> > > > COM object
> > > > completes it leaves the EXCEL hanging around as a child of a
> > > > SYSTEM process.
> > > >
> > > > -----Original Message-----
> > > > From: Scott Hurring [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, April 25, 2002 11:59 AM
> > > > To: Php-Win (E-mail)
> > > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > > >
> > > > I went back and ran some perl code using the
> > > > Excel COM object.  Excel does properly exit...
> > > > so it looks like you are correct -- it's
> > > > probably a bug in PHP's COM code.
> > > >
> > > > Attached is is sample Perl, PHP and Excel,
> > > > if anyone wants to verify that excel does
> > > > indeed die after the perl script is finished,
> > > > yet stays alive when the PHP script is
> > > > finished.
> > > >
> > > > ---
> > > > Scott Hurring
> > > > Systems Programmer
> > > > EAC Corporation
> > > > [EMAIL PROTECTED]
> > > > Voice: 201-462-2149
> > > > Fax: 201-288-1515
> > > >
> > > > > -----Original Message-----
> > > > >    Try
> > > > >
> > > > >     $book->Close("False");
> > > > >
> > > >
> > > > Doesnt do anything.
> > > >
> > > > >    But then one has to ask, why does it work fine from other
> > > > > languages, e.g. Perl? If the API were broken, it would seem
> > > > > that it would be broken regardless of the language one was
> > > > > using.
> > > > >
> > > > >      Scott
> > > >
> > > > Yeah.. that's the way it seems now.
> > > >
> > > >
> > > > ---
> > > > Incoming mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > > >
> > > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> > 
> > 
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > 
> > 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

--- End Message ---
--- Begin Message ---
GREAT!

-----Original Message-----
From: Alan Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 26, 2002 3:24 PM
To: Scott Hurring; Php-Win (E-mail)
Subject: Re: [PHP-WIN] Excel not closing after using it via COM

Not intended behaviour. A fix has been checked into CVS already.

----- Original Message -----
From: "Scott Hurring" <[EMAIL PROTECTED]>
To: "Php-Win (E-mail)" <[EMAIL PROTECTED]>
Sent: Friday, April 26, 2002 16:08
Subject: RE: [PHP-WIN] Excel not closing after using it via COM


> Neil: Go through your code and make sure there are no
> indirect object references like $obj->obj->func();
>
> >From what i understand, it seems that this type of
> construction is causing a temporary object to be
> left around (which is, in turn, causing excel to
> remain zombie, becuase the temp-object is never
> properly cleaned up)
>
> Anyone with knowledge of COM... is this intended
> behaviour?  Do COM objects *need* a Quit() signal
> to die, even if the program that was manipulating
> the COM object dies (as is the case with PHP
> finishing up and EXCEL still in memory when a
> temp-object is not properly unset())?
>
> ---
> Scott Hurring
> Systems Programmer
> EAC Corporation
> [EMAIL PROTECTED]
> Voice: 201-462-2149
> Fax: 201-288-1515
>
> > -----Original Message-----
> > From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 26, 2002 9:23 AM
> > To: Alan Brown; Scott Hurring; Php-Win (E-mail)
> > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> >
> >
> > We have tried this and it doesn't help. And yes, any non
> > normal exit from
> > the EXCEL COM object results in a "zombie".
> >
> > -----Original Message-----
> > From: Alan Brown [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, April 26, 2002 8:00 AM
> > To: Scott Hurring; Php-Win (E-mail)
> > Subject: Re: [PHP-WIN] Excel not closing after using it via COM
> >
> > There is a missing "Release" call in the COM code when
> > temporary objects are
> > created for a construct such as
> >
> > $excel->application->DisplayAlerts = False;
> >
> > This is not as visible a problem with an inproc server as
> > with a localserver
> > such as Excel.
> >
> > It is fairly easy to work around this (until I get a real fix
> > into the base)
> > by breaking it up thus:
> >
> > $application = $excel->application;
> > $application->DisplayAlerts = False;
> >
> > This has to be done in two places in the example I saw.
> > However I note that
> > if you put in a logic error such as this:
> > $book = $workbooks->Open($file);
> > $sheet = $books->Worksheets(1);
> >
> > After the exception a copy of Excel is still left running. I
> > wiill look more
> > at this over the weekend and test my Release() call on the
> > temporary object.
> > It seems to work, but I fear that it will break something else....
> >
> > Alan.
> >
> > ----- Original Message -----
> > From: "Scott Hurring" <[EMAIL PROTECTED]>
> > To: "Php-Win (E-mail)" <[EMAIL PROTECTED]>
> > Sent: Thursday, 25 April, 2002 13:51
> > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> >
> >
> > > I'm not doing this through Apache.
> > >
> > > I tried out Win32 command line PHP and Perl.
> > >
> > > So even though it might be an issue with Excel being
> > > owned by "SYSTEM" when run thru Apache, PHP still leaves
> > > it open whereas Perl does not.
> > >
> > > (And to boot, my Apache service is configured to
> > >  RunAs my account "scott", so it shouldn't be plauged
> > >  by the "SYSTEM" ownership issue... even though
> > >  i haven't tested it)
> > >
> > > Please check out: http://furt.com/code/php/com_issues/
> > > (Read 'readme.txt')
> > >
> > > ---
> > > Scott Hurring
> > > Systems Programmer
> > > EAC Corporation
> > > [EMAIL PROTECTED]
> > > Voice: 201-462-2149
> > > Fax: 201-288-1515
> > >
> > > > -----Original Message-----
> > > > From: Neil Lincoln [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, April 25, 2002 1:20 PM
> > > > To: Scott Hurring; Php-Win (E-mail)
> > > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > > >
> > > >
> > > > On our systems the EXCEL COM object executes as a member of
> > > > "SYSTEM" instead
> > > > of as a child of the owner of the Apache/php server. When the
> > > > COM object
> > > > completes it leaves the EXCEL hanging around as a child of a
> > > > SYSTEM process.
> > > >
> > > > -----Original Message-----
> > > > From: Scott Hurring [mailto:[EMAIL PROTECTED]]
> > > > Sent: Thursday, April 25, 2002 11:59 AM
> > > > To: Php-Win (E-mail)
> > > > Subject: RE: [PHP-WIN] Excel not closing after using it via COM
> > > >
> > > > I went back and ran some perl code using the
> > > > Excel COM object.  Excel does properly exit...
> > > > so it looks like you are correct -- it's
> > > > probably a bug in PHP's COM code.
> > > >
> > > > Attached is is sample Perl, PHP and Excel,
> > > > if anyone wants to verify that excel does
> > > > indeed die after the perl script is finished,
> > > > yet stays alive when the PHP script is
> > > > finished.
> > > >
> > > > ---
> > > > Scott Hurring
> > > > Systems Programmer
> > > > EAC Corporation
> > > > [EMAIL PROTECTED]
> > > > Voice: 201-462-2149
> > > > Fax: 201-288-1515
> > > >
> > > > > -----Original Message-----
> > > > >    Try
> > > > >
> > > > >     $book->Close("False");
> > > > >
> > > >
> > > > Doesnt do anything.
> > > >
> > > > >    But then one has to ask, why does it work fine from other
> > > > > languages, e.g. Perl? If the API were broken, it would seem
> > > > > that it would be broken regardless of the language one was
> > > > > using.
> > > > >
> > > > >      Scott
> > > >
> > > > Yeah.. that's the way it seems now.
> > > >
> > > >
> > > > ---
> > > > Incoming mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > > >
> > > > ---
> > > > Outgoing mail is certified Virus Free.
> > > > Checked by AVG anti-virus system (http://www.grisoft.com).
> > > > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> > > >
> > > >
> > >
> > > --
> > > PHP Windows Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > >
> >
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
> >
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.351 / Virus Database: 197 - Release Date: 4/19/2002
 

--- End Message ---
--- Begin Message ---
I have absolutely no idea if this will help, but i've
never seen that "Security Alert", and this is the way
i've always configured Apache:

Try routing PHP requests through a ScriptAlias like so:

ScriptAlias /php-bin/ "C:\PHP"
Action application/x-httpd-php "/php-bin/php.exe"

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Webmaster [mailto:[EMAIL PROTECTED]]
> Subject: [PHP-WIN] Re: Security Alert!-cgi.force_redirect=0
> 
> You might need to have the second line in PHP.INI too:
> 
> cgi.force_redirect=0
> cgi.redirect_status_env ENV_VAR_NAME
> 
> 
> Cor van de Veen
> 
> 
> "Matthew Gotth-Olsen" <[EMAIL PROTECTED]> schreef in bericht
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I'm running IIS on a WinXP box, I've got everything 
> installed, however
> > whenever I try to access a php script I get this error 
> which I'm sure you
> > all are familiar with:
> >
> > 
> ----------------------------------------------------------------------
> > Security Alert! PHP CGI cannot be accessed directly.
> > This PHP CGI binary was compiled with force-cgi-redirect 
> enabled. This
> means
> > that a page will only be served up if the REDIRECT_STATUS 
> CGI variable is
> > set. This variable is set, for example, by Apache's Action directive
> > redirect.
> >
> > You may disable this restriction by recompiling the PHP binary with
> > the --disable-force-cgi-redirect switch. If you do this and 
> you have your
> > PHP CGI binary accessible somewhere in your web tree, 
> people will be able
> to
> > circumvent .htaccess security by loading files through the 
> PHP parser. A
> > good way around this is to define doc_root in your php.ini file to
> something
> > other than your top-level DOCUMENT_ROOT. This way you can 
> separate the
> part
> > of your web space which uses PHP from the normal part using 
> .htaccess
> > security. If you do not have any .htaccess restrictions 
> anywhere on your
> > site you can leave doc_root undefined. If you are running 
> IIS, you may
> > safely set cgi.force_redirect=0 in
> >
> php.ini. 
> -------------------------------------------------------------------
> > -------
> >
> > So I reread through the documentation, and I made sure that
> > "cgi.force_redirect=0" under my php.ini under c:\windows\ is there
> something
> > I'm missing? I've tried the insteller and the manual 
> install, and bothe
> give
> > me the same message... I've even tried removing php completely and
> > re-installing it both ways... no dice... an help would be 
> appreciated...
--- End Message ---
--- Begin Message ---
You could also use semaphores/locks :)

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515

> -----Original Message-----
> From: Svensson, B.A.T. (HKG) [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 26, 2002 7:22 AM
> To: Matt Babineau
> Cc: 'Php-Win (E-mail)'
> Subject: RE: [PHP-WIN] MySQL / PHP - possible to run many sql 
> statements
> in the same execution?
> 
> 
> > What I would need to do here is either lump all the 
> queryioes into one
> > SQL execution or lock the PHP code so it is single threaded 
> like this:
> 
> I understand this as that you are trying to deal with the (in)famous
> readers&writer problem here? There is a basic technique to deal with
> this, and it is called an "atomic action".
> 
> In an RDBMS you can perform an atomic action by starting up a 
> transacation
> with the highest isolation level. However, in most case you 
> don't need to be
> _that_ much "atomic", and a lower transaction lever might 
> very well be optimal
> solution most purposes (unnecessary high isolation levels 
> degrades performance.)
> 
> 
>       //Anders - idiot
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
Is there something I am missing here.  With php 4.1.2 i can do
blah.php?action=foo but with 4.2 I can't.  What am I doing wrong?  The php
page just acts like nothing was passed.  Happens with form data too.

--Chris


--- End Message ---
--- Begin Message ---
Turn on register_globals in your php.ini file and go read
http://www.php.net/manual/en/security.registerglobals.php

-Rasmus

On Fri, 26 Apr 2002, Chris Dion wrote:

> Is there something I am missing here.  With php 4.1.2 i can do
> blah.php?action=foo but with 4.2 I can't.  What am I doing wrong?  The php
> page just acts like nothing was passed.  Happens with form data too.
>
> --Chris
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Didja think to check the version 4.1.2 release notes before posting your 
question?

http://www.php.net/release_4_2_0.php

At 03:26 PM 4/26/02 -0500, Chris Dion wrote:
>Is there something I am missing here.  With php 4.1.2 i can do
>blah.php?action=foo but with 4.2 I can't.  What am I doing wrong?  The php
>page just acts like nothing was passed.  Happens with form data too.
>
>--Chris

--- End Message ---
--- Begin Message ---
Has anyone done this?
I just tried installing apache 2.0 (latest on their site) and the latest php as a 
module for apache (not cgi), and found it doesnt seem to work.

When apache starts, it says module not found.

I know php is installed right, because the same php folder works under apache vers 1.

Anyone else had this problem?

Thanks!

--- End Message ---
--- Begin Message ---
On Fri, 26 Apr 2002 16:35:30 -0400, you wrote:

>Has anyone done this?
>I just tried installing apache 2.0 (latest on their site) and the latest php as a 
>module for apache (not cgi), and found it doesnt seem to work.
>
>When apache starts, it says module not found.
>
>I know php is installed right, because the same php folder works under apache vers 1.
>
>Anyone else had this problem?

Are you loading the php4_module from the apache2filter dll in the
'experimental' folder, or are you still pointing to the php4apache dll in
the 'sapi' folder?

If you're not using the apache2filter dll, change the loadmodule line in
your httpd.conf file.

Alan

--- End Message ---
--- Begin Message ---
Hi All,

I've got a very strange problem. I have a dual processor server with the
above software configuration running several sites. Most of the PHP that is
used on the sites is commercial (e.g. vBulletin) but there is also some
home-grown. Occasionally we are seeing sytax errors being shown for files
that are being include()d or require()d by PHP. Refresh the page and the
problem goes away. Having witnessed several of these occasions I checked the
files that are accused of being syntactically challenged. On none of the
occasions was there an error on the line given. In fact some of the errors
pointed to blank lines or comments. I am at a loss to explain this and it is
becoming a pain - errors like this on your corporate website do not present
a very professional image!!

Any help would be appreciated.

TIA,
Stuart

--- End Message ---
--- Begin Message ---
I have never seen such an error, but I have also never run anything
serious on a Windows server.

Sorry, can't help you.

-Rasmus

On Fri, 26 Apr 2002, Stuart Dallas wrote:

> Hi All,
>
> I've got a very strange problem. I have a dual processor server with the
> above software configuration running several sites. Most of the PHP that is
> used on the sites is commercial (e.g. vBulletin) but there is also some
> home-grown. Occasionally we are seeing sytax errors being shown for files
> that are being include()d or require()d by PHP. Refresh the page and the
> problem goes away. Having witnessed several of these occasions I checked the
> files that are accused of being syntactically challenged. On none of the
> occasions was there an error on the line given. In fact some of the errors
> pointed to blank lines or comments. I am at a loss to explain this and it is
> becoming a pain - errors like this on your corporate website do not present
> a very professional image!!
>
> Any help would be appreciated.
>
> TIA,
> Stuart
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Does anyone here know if there are any plans
to add DDE support to PHP (or is there already
DDE support, but i stupidly overlooked it)?

I ran into a snag while developing a project using
PHP+COM+Excel; i couldn't find anyway to get Excel
to send the currently opened spreadsheet to the
printer... which is what i need to do after i 
work with the sheets.

I found a way to do it with DDE, but then realized
that PHP doesn't support DDE; so i resorted to
writing a Perl script to loop through each
of my files and send a DDE command to Excel
telling it to print the file.

But i'd really rather like to keep everything
centered around PHP+COM, instead of now having
to use two separate languages with two separate
interfaces to manipulate and print spreadsheets.

---
Scott Hurring
Systems Programmer
EAC Corporation
[EMAIL PROTECTED]
Voice: 201-462-2149
Fax: 201-288-1515
--- End Message ---
--- Begin Message ---
Hi, I am a newbie in PHP and Mysql and i´m trying to show a blob field from a Mysql 
database in to a browser. Could anyone help me.

Thanks.

The Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Teste.php</title>
</head>
<BODY BGCOLOR=#3366FF>
<CENTER>
<FORM>
<h1> Kompatscher & Cia Ltda </h1>
<hr>
<?php
$con = mysql_connect(*****************) or die ("Erro ao conectar!");
mysql_select_db("**************", $con) or die ("Erro ao selecionar a database!");
$comando="SELECT codigo,nome,material,temperatura,pressao,fluido,descricao,foto FROM 
cadgrupo WHERE codigo=10";
$res = mysql_query($comando,$con);
$linha = mysql_fetch_array($res);
echo "<TABLE ALIGN=CENTER>";
echo "<tr>";
echo "<td>";
echo "Foto";
echo "</td>";
echo "<td>";
$i= $linha['foto'] ;
$len=strlen($i);
header("Content-type: image/jpeg");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=temp.jpg");
echo "<input type=image src=temp.jpg border=0>";
echo "</td>"; 
echo "</tr>"; 
echo "</TABLE>";
mysql_close($con);
?>
</FORM>
</CENTER>
</BODY>
</html>

The anwser of the browse



Kompatscher & Cia Ltda 

--------------------------------------------------------------------------------

      Foto 
      Warning: Cannot add header information - headers already sent by (output started 
at C:\Inetpub\wwwroot\Teste.php:11) in C:\Inetpub\wwwroot\Teste.php on line 25

      Warning: Cannot add header information - headers already sent by (output started 
at C:\Inetpub\wwwroot\Teste.php:11) in C:\Inetpub\wwwroot\Teste.php on line 26

      Warning: Cannot add header information - headers already sent by (output started 
at C:\Inetpub\wwwroot\Teste.php:11) in C:\Inetpub\wwwroot\Teste.php on line 27
     


--- End Message ---
--- Begin Message ---
Waldemar,

You need to put the header(); commands before you output any text to the
browser.

  <?php
  header(header code here);
  ?>
  <!DOCTYPE...>

Otherwise the header commands won't work.

-Dash

p.s. this may not fix your problem, but it will fix the header problem...

-----Original Message-----
From: Waldemar Brand Neto [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 26, 2002 4:24 PM
To: Php
Subject: [PHP-WIN] Showing a Blob field in a browser


Hi, I am a newbie in PHP and Mysql and i´m trying to show a blob field from
a Mysql database in to a browser. Could anyone help me.

Thanks.

The Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Teste.php</title>
</head>
<BODY BGCOLOR=#3366FF>
<CENTER>
<FORM>
<h1> Kompatscher & Cia Ltda </h1>
<hr>
<?php
$con = mysql_connect(*****************) or die ("Erro ao conectar!");
mysql_select_db("**************", $con) or die ("Erro ao selecionar a
database!");
$comando="SELECT
codigo,nome,material,temperatura,pressao,fluido,descricao,foto FROM cadgrupo
WHERE codigo=10";
$res = mysql_query($comando,$con);
$linha = mysql_fetch_array($res);
echo "<TABLE ALIGN=CENTER>";
echo "<tr>";
echo "<td>";
echo "Foto";
echo "</td>";
echo "<td>";
$i= $linha['foto'] ;
$len=strlen($i);
header("Content-type: image/jpeg");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=temp.jpg");
echo "<input type=image src=temp.jpg border=0>";
echo "</td>"; 
echo "</tr>"; 
echo "</TABLE>";
mysql_close($con);
?>
</FORM>
</CENTER>
</BODY>
</html>

The anwser of the browse



Kompatscher & Cia Ltda 

----------------------------------------------------------------------------
----

      Foto 
      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 25

      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 26

      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 27
     


--- End Message ---
--- Begin Message ---
The header() information must be send first before sending any character to
browser. That why you receive this error. Try to move the php code first. If
you want to display only an image remove any html codes.
--


Best regards,
George Nicolae
IT Manager
___________________
PaginiWeb.com  - Professional Web Design
www.PaginiWeb.com


"Waldemar Brand Neto" <[EMAIL PROTECTED]> wrote in message
009801c1ed79$769fe2a0$[EMAIL PROTECTED]">news:009801c1ed79$769fe2a0$[EMAIL PROTECTED]...
Hi, I am a newbie in PHP and Mysql and i´m trying to show a blob field from
a Mysql database in to a browser. Could anyone help me.

Thanks.

The Code

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Teste.php</title>
</head>
<BODY BGCOLOR=#3366FF>
<CENTER>
<FORM>
<h1> Kompatscher & Cia Ltda </h1>
<hr>
<?php
$con = mysql_connect(*****************) or die ("Erro ao conectar!");
mysql_select_db("**************", $con) or die ("Erro ao selecionar a
database!");
$comando="SELECT
codigo,nome,material,temperatura,pressao,fluido,descricao,foto FROM cadgrupo
WHERE codigo=10";
$res = mysql_query($comando,$con);
$linha = mysql_fetch_array($res);
echo "<TABLE ALIGN=CENTER>";
echo "<tr>";
echo "<td>";
echo "Foto";
echo "</td>";
echo "<td>";
$i= $linha['foto'] ;
$len=strlen($i);
header("Content-type: image/jpeg");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=temp.jpg");
echo "<input type=image src=temp.jpg border=0>";
echo "</td>";
echo "</tr>";
echo "</TABLE>";
mysql_close($con);
?>
</FORM>
</CENTER>
</BODY>
</html>

The anwser of the browse



Kompatscher & Cia Ltda

----------------------------------------------------------------------------
----

      Foto
      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 25

      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 26

      Warning: Cannot add header information - headers already sent by
(output started at C:\Inetpub\wwwroot\Teste.php:11) in
C:\Inetpub\wwwroot\Teste.php on line 27






--- End Message ---
--- Begin Message ---
Unfortunately this is not the case.  I know because all my MSSQL connections
work and thats off of the mssql.dll extention.  Everything works great until
I un-comment the pdfdll line under extensions in the php.ini file.  Is there
something special I have to have in the pdf-related directory?

-Ethan


-----------------------
Probably you have not set the dll folder right in your php.ini file.

Example:

If you make an extentions directory in c:\php you must point php.ini to it

extention_dir="c:\php\extentions"

It works with me....

Cor van de Veen



"Ethan Nelson" <[EMAIL PROTECTED]> schreef in bericht
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm trying to use the PDF extensions and have just upgraded to 4.2.0.
When
> I enable the extension in the PHP.INI file, all my sites just hang when I
> try to load them.  Any ideas?
>
> Thanks,
>
> -Ethan
>
> ___________________________________
> Ethan Nelson, Systems Administrator
> Net Solutions, LLC
> 840 Lawrence Street
> Eugene, OR 97401
> [EMAIL PROTECTED]
> http://www.netsolutionsllc.com
> Voice +1 541 345-7087
> Fax   +1 541 485-5519
>

--- End Message ---

Reply via email to