php-windows Digest 30 Sep 2001 23:33:00 -0000 Issue 782

Topics (messages 9619 through 9627):

Re: mysql_fetch_array() doesn't work
        9619 by: Web user

Permissions in C:\WINNT\system32 - PHP4.0.6 Windows installer CGI error
        9620 by: Maurice Delaney

Re: PHP4.0.6 Windows installer - that CGI error again!
        9621 by: Phil Driscoll
        9622 by: Phil Driscoll

Re: COM /DCOM
        9623 by: alain samoun

time limt
        9624 by: roel
        9627 by: Frank M. Kromann

Re: Using COM
        9625 by: Crawley
        9626 by: Alain Samoun

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 ---
Hello,
First, Thank you all for your help!
I  finally found the reason for why does  the IE always show info as below:
"Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or
`T_NUM_STRING' in c:\program files\apache
group\apache\htdocs\web\site1\list.php on line --[the number of line]"

It is because the echo (including print) doesn't work at the line below,
echo "<tr><td><a href=\"profile.php?id=$arr['user_id']\"  target='_top'>";
showing the error info as I mentioned. ( but it should work according to PHP
books)

It only works when  the $arr['user_id'] is out of the quotes.
echo "<tr><td><a href=\"profile.php?id=".$arr['user_id']."\"
target='_top'>";
then IE showed no error any longer.

So I have to let all $arr['key']  out of the quotes, then the scripts are
Ok.

Regards
Mike









--- End Message ---
--- Begin Message ---
Whan I made the anonymous user to me,  PHP began to work, so it was 
permissions.

So I gave IUSR_server Read (RX) permissions to C:\WINNT\system32, and 
the error went away, PHP worked!

It's a bit drastic though as a solution. I already had Read (RX) 
 permissions for  MSVCRT.DLL and that wasn't working. I tried giving all 
MSVCRT*.* (MS Visual C Runtime libraries) files RX but that didn't work.

So WHAT ARE THOSE FILES IN C:\WINNT\system32 THAT IUSR_server NEEDS 
PERMISSION FOR?

Oh well, at least I can start developing.

Maurice


--- End Message ---
--- Begin Message ---
By way of an experiment, remove the .php app mapping in the management 
console. You should then just get your php source code served up. Do you?

-- 
Phil Driscoll
--- End Message ---
--- Begin Message ---
On Sunday 30 September 2001 7:24 pm, Phil Driscoll wrote:
> By way of an experiment, remove the .php app mapping in the management
> console. You should then just get your php source code served up. Do you?
Scrub that - sorry - I didn't read your later post.
-- 
Phil Driscoll
--- End Message ---
--- Begin Message ---
Did you set-up the permissions in DCOMCNFG.EXE? This applies for COM and
DCOM in win2000 and NT.
Also, DCOM has to be enabled when compiling PHP4.x
Alain

-----Original Message-----
From: Mike [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 29, 2001 4:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] COM /DCOM


Hi All
Where is some good info on useing COM or DCOM with PHP?

Both of my scripts bellow fail and I cannot seem to find why.

<?php

$Instance = new COM
(string "Word.Application", string "216.0.0.0");

?>
or
<?
$word = new COM("word.application") or die("Unable to instanciate Word");
print "Loaded Word, version {$word->Version}\n";
$word->Visible = 1;
$word->Documents->Add();
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("Useless test.doc");
$word->Quit();
?>

Running on Win2K PHP 4.0.6



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

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

set_time_limit() and max_execution_time() wont work on this script.

$url  = "http://www.example.com";;
$file = implode('',file($url));
if(!$file)
 {
          print("error");
 }

My question is how can I make the script time out if the server where I want
to connect to is busy. Now the script will time out after 30 (default)
seconds. I want to connect, if the server is busy then a message "server
busy" should appear but not after 30 seconds!

I'm not working local so I can't change the default 30 sec.

Thanks very much!
Roel


--- End Message ---
--- Begin Message ---
You can't set any timeout when using the file() function 

if you use fsockopen() you can also use socket_set_timeout().

Read more at

http://php.net/manual/en/function.fsockopen.php
http://php.net/manual/en/function.socket-set-timeout.php

- Frank

> Hi,
> 
> set_time_limit() and max_execution_time() wont work on this script.
> 
> $url  = "http://www.example.com";;
> $file = implode('',file($url));
> if(!$file)
>  {
>           print("error");
>  }
> 
> My question is how can I make the script time out if the server where I want
> to connect to is busy. Now the script will time out after 30 (default)
> seconds. I want to connect, if the server is busy then a message "server
> busy" should appear but not after 30 seconds!
> 
> I'm not working local so I can't change the default 30 sec.
> 
> Thanks very much!
> Roel
> 
> 
> 
> -- 
> PHP Windows 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]
> 
> 
> 



--- End Message ---
--- Begin Message ---

"David Broker" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Rich,
> Microsoft claims (in the IIS help) that this is an object which you can
access
> with any language which supports COM.
>
> In the VBscript found on any Win2K server it is called like this:
> varname = GetObject("IIS://localhost/w3scv")
>
> So I'm assuming that IIS://localhost/w3scv is an object.
>
> My problem was that I could not access that object, as that format (the
> "IIS://")is not supported in the non-dev releases.
>
> I will (probably) be running it on a local machine so I shouldn't have a
> problem there.
>
> Regards,
> David

Right mate, Ive had a quick search on Google and found this....

Under Foxpro - you access it like
loIIS=CREATE("wwIISAdmin.IIS4Config")
IF loIIS.ConnectPath("IIS://LOCALHOST/W3SVC/1/ROOT")
   ? loIIS.GetValue("AuthBasicIsolated")
   ? loIIS.GetValue("DefaultDoc")

   ? loIIS.m_oIISObj.Stop()
   * ? loIIS.m_oIISObj.Start()
ELSE
wait window "Unable to retrieve path..."
ENDIF

So I would suspect that the interface is "wwIISAdmin.IIS4Config" or
something like that.  Thus if Im correct you would need something like

<?php

$IIS_Admin = COM( "wwIISADmin.IIS4Config" );
if( $IIS_Admin->ConnectPath( "IIS://Localhost/W3SVC/1/ROOT" ) )
{
....

you get the idea.

Hope that helps.

Rich



--- End Message ---
--- Begin Message ---
Except that it should be:
 $IIS_Admin = new COM( "wwIISADmin.IIS4Config" );
;0 -----------^
Alain

On Sun, Sep 30, 2001 at 10:21:43PM +0100, Crawley wrote:
> 
> "David Broker" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Rich,
> > Microsoft claims (in the IIS help) that this is an object which you can
> access
> > with any language which supports COM.
> >
> > In the VBscript found on any Win2K server it is called like this:
> > varname = GetObject("IIS://localhost/w3scv")
> >
> > So I'm assuming that IIS://localhost/w3scv is an object.
> >
> > My problem was that I could not access that object, as that format (the
> > "IIS://")is not supported in the non-dev releases.
> >
> > I will (probably) be running it on a local machine so I shouldn't have a
> > problem there.
> >
> > Regards,
> > David
> 
> Right mate, Ive had a quick search on Google and found this....
> 
> Under Foxpro - you access it like
> loIIS=CREATE("wwIISAdmin.IIS4Config")
> IF loIIS.ConnectPath("IIS://LOCALHOST/W3SVC/1/ROOT")
>         ? loIIS.GetValue("AuthBasicIsolated")
>    ? loIIS.GetValue("DefaultDoc")
> 
>    ? loIIS.m_oIISObj.Stop()
>    * ? loIIS.m_oIISObj.Start()
> ELSE
> wait window "Unable to retrieve path..."
> ENDIF
> 
> So I would suspect that the interface is "wwIISAdmin.IIS4Config" or
> something like that.  Thus if Im correct you would need something like
> 
> <?php
> 
> $IIS_Admin = COM( "wwIISADmin.IIS4Config" );
> if( $IIS_Admin->ConnectPath( "IIS://Localhost/W3SVC/1/ROOT" ) )
> {
> ....
> 
> you get the idea.
> 
> Hope that helps.
> 
> Rich
> 
> 
> 
> 
> -- 
> PHP Windows 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]
--- End Message ---

Reply via email to