php-windows Digest 4 Mar 2006 15:28:41 -0000 Issue 2903

Topics (messages 26736 through 26740):

Re: DOM/XML -> PHP 5.0.3 HowTo?
        26736 by: Rob
        26737 by: S.F. Alim

variable in an array?
        26738 by: John Ellingsworth

Re: variable in an array? Answer: Double quotes
        26739 by: John Ellingsworth

Re: Fsockopen with ssl takes 8.4 seconds to return on Windows
        26740 by: George Cherian

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 ---
S.F. Alim wrote:
Hi list,

i took this tutorial for creating xml file from scratch. toturial is is
present at sitepoint. www.sitepoint.com/print/management-system-php.

ok i dont know how to enable DOM/XML feature, when i do phpinfo(); it does
give that DOM/XML is enable but i cant run this tutorial. i try to debug and
found out that i cant create document root. ie. $doc =
domxml_new_doc("1.0"); [this part comes when u create addArticle.php file]it
gives me blank page.

any idea what is wrong?

That's a tutorial for the domxml ext in PHP 4.
See http://www.php.net/manual/en/ref.dom.php for DOM in PHP 5.

Rob

--- End Message ---
--- Begin Message ---
ah ha for PHP 4

man starting of this tutorial say PHP 4.2.1 or higher, so i thought it would
be same but unfortunately not.

thanks man. i will check link tomorrow.

take care
faisal

-----Original Message-----
From: Rob [mailto:[EMAIL PROTECTED]
Sent: Friday, March 03, 2006 10:11 PM
To: S.F. Alim
Cc: [email protected]
Subject: [PHP-WIN] Re: DOM/XML -> PHP 5.0.3 HowTo?


S.F. Alim wrote:
> Hi list,
>
> i took this tutorial for creating xml file from scratch. toturial is is
> present at sitepoint. www.sitepoint.com/print/management-system-php.
>
> ok i dont know how to enable DOM/XML feature, when i do phpinfo(); it does
> give that DOM/XML is enable but i cant run this tutorial. i try to debug
and
> found out that i cant create document root. ie. $doc =
> domxml_new_doc("1.0"); [this part comes when u create addArticle.php
file]it
> gives me blank page.
>
> any idea what is wrong?

That's a tutorial for the domxml ext in PHP 4.
See http://www.php.net/manual/en/ref.dom.php for DOM in PHP 5.

Rob

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

--- End Message ---
--- Begin Message ---
Hi.

I am sure there is an easy answer to this, but I do not know it and have not found the answer anywhere. I want to be able to dynamically set my database from an array of options:

$database = array(
   array(
        "type" => "mssql",
        "name" => "database1",
        "hostName" => "hostname1",
        "username" => "username1",
        "password" => "password1",
        "databaseName" => "database1"),
    array(
        "type" => "mssql",
        "name" => "database2",
        "hostName" => "hostname2",
        "username" => "username2",
        "password" => "password2",
        "databaseName" => "database2"),
   );

// default database
$id = 0;

I am trying to use this line using PEAR DB, but the variable does not get interpreted so it never works (the line wraps; it is not the line wrapping):

$dsn = "{$servers[$id]["type"]}://{$servers[$id]["username"]}:{$servers[$id]["password"[EMAIL PROTECTED]"hostName"]}/{$servers[$id]["databaseName"]}";

This works, so the problem is translating $id properly:
$dsn = "{$servers[0]["type"]}://{$servers[0]["username"]}:{$servers[0]["password"[EMAIL PROTECTED]"hostName"]}/{$servers[0]["databaseName"]}";

I would appreciate any help with this.

--
Regards,

John Ellingsworth
http://john.ellingsworth.org

--- End Message ---
--- Begin Message ---
The answer to the interpolation problem is to use double quotes:
$dsn = "{$servers["$id"]["type"]}://{$servers["$id"]["username"]}:{$servers["$id"]["password"[EMAIL PROTECTED]"$id"]["hostName"]}/{$servers["$id"]["databaseName"]}";


John Ellingsworth wrote:
Hi.

I am sure there is an easy answer to this, but I do not know it and have not found the answer anywhere. I want to be able to dynamically set my database from an array of options:

$database = array(
   array(
        "type" => "mssql",
        "name" => "database1",
        "hostName" => "hostname1",
        "username" => "username1",
        "password" => "password1",
        "databaseName" => "database1"),
    array(
        "type" => "mssql",
        "name" => "database2",
        "hostName" => "hostname2",
        "username" => "username2",
        "password" => "password2",
        "databaseName" => "database2"),
   );

// default database
$id = 0;

I am trying to use this line using PEAR DB, but the variable does not get interpreted so it never works (the line wraps; it is not the line wrapping):

$dsn = "{$servers[$id]["type"]}://{$servers[$id]["username"]}:{$servers[$id]["password"[EMAIL PROTECTED]"hostName"]}/{$servers[$id]["databaseName"]}";

This works, so the problem is translating $id properly:
$dsn = "{$servers[0]["type"]}://{$servers[0]["username"]}:{$servers[0]["password"[EMAIL PROTECTED]"hostName"]}/{$servers[0]["databaseName"]}";

I would appreciate any help with this.


--
Thanks,

John Ellingsworth
Project Leader, Virtual Curriculum
Academic Programs
School of Medicine
University of Pennsylvania
(215) 573-4451

Virtual Curriculum
http://www.cu2000.med.upenn.edu
AIM: vc2000support

To contact the Virtual Curriculum team:
[EMAIL PROTECTED]

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

  I wam trying to to use fsockeopen in a simple client written for my own 
simple server. The problem is that on Windows, the fsockopen call seems to take 
around 8 seconds to return.  But once the client exits, and starts up, 
fsockopen takes 8 seconds. Has anyone faced the same problem. Is this a bug?

  Thanks in advance.

 George

--- End Message ---

Reply via email to