[PHP] Compiling PDO statically into PHP 5.0.4

2005-06-06 Thread Andreas Korthaus
Hi! I would like to compile PDO + PDO_sqlite statically into PHP 5.0.4. First I downloaded PDO-0.3.tgz and PDO_SQLITE-0.3.tgz and extracted them to /my/phpsrcdir/ext. I renamed the directories from PDO-0.3 to pdo and from PDO_SQLITE-0.3 to pdo_sqlite. I tried to follow these instructions:

[PHP] DOMElement::setAttribute() manual example question

2006-03-03 Thread Andreas Korthaus
Hi! I've a question regarding the example in DOMElement::setAttribute() chapter of the PHP manual: http://de3.php.net/dom-domelement-setattribute There, an attribute is added to an element this way: ?php $doc = new DOMDocument(1.0); $node = $doc-createElement(root); $newnode =

Re: [PHP] Coding Practice: Use global $var or pass in by refernce

2006-03-03 Thread Andreas Korthaus
Hi Gustav! Gustav Wiberg wrote: My oponion is that is insane to use global variables. The main drawback with global variables is that is very easy to mix up variables, and keep track of what variable belongs to what. So an advice: Don't use it! Ok, so what's your recommendation to solve the

[PHP] Re: DOMElement::setAttribute() manual example question

2006-03-05 Thread Andreas Korthaus
Hi Rob! Rob wrote: ?php $doc = new DOMDocument(1.0); $node = $doc-createElement(root); $node-setAttribute(align, left); $doc-appendChild($node); echo $doc-saveXML(); ? Both ways are perfectly valid. $node and $newnode refer to the same object. It was written the 1st way to demonstrate the

[PHP] simplify DOM api

2006-03-05 Thread Andreas Korthaus
Hi Rob! Rob wrote: $node = new DOMElement(root); In this case the element is not associated with a document. In DOM, you really aren't supposed to have a node not associated with any document, but this syntax allows the DOM classes to be extended in PHP. Once the node is associated with a

[PHP] create xml root-element with xmlns and xsd link (using DOM)

2006-03-05 Thread Andreas Korthaus
Hi! The XML-Code I have to create (http://news.php.net/php.general/231486), needs a root-element, with xmlns and XML schema link, something like that: Test xmlns=http://example.com/test; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://example.com/test

[PHP] Re: create xml root-element with xmlns and xsd link (using DOM)

2006-03-06 Thread Andreas Korthaus
Rob wrote: That's how namespaced attributes, which is nothing more than you are creating, are supposed to be created in DOM. OK, thank you! best regards Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: simplify DOM api

2006-03-06 Thread Andreas Korthaus
Rob Richards wrote: You can also look at using xmlwriter, when creating serialized trees, that automatically does escaping for you. Hm, AFAIK latest xmlwriter versions provide an OO API. Do you know about any documentation for it? The only code I've seen so far is:

Re: [PHP] Extending a class with a static constructur (like PEAR::DB)

2006-03-10 Thread Andreas Korthaus
[EMAIL PROTECTED] wrote: Ahhh! I'd kept thinking what connect() returned was a db object, but it does look like it returns varying objects depending on which database you're using. correct Maybe I'd want to extend DB_common instead of DB_mysql, so that the methods would be inhereted by

Re: [PHP] Extending a class with a static constructur (like PEAR::DB)

2006-03-10 Thread Andreas Korthaus
Chris wrote: You'll need to: $dbtoy = new DBToyExt(); $dbtoy-connect() $dbtoy-testext('testing'); But you cannot do: $dbtoy = new DBToyExt(); $dbtoy-connect() $dbtoy-testext('testing'); $result = $dbtoy-query('SELECT...'); //[...] You have to do something like this: $dbtoy = new

Re: [PHP] how should MS Access DATETIME be handled in PHP?

2006-04-13 Thread Andreas Korthaus
Hi! Bing Du wrote: Excellent! Yes, it now does give me a clue to see what's actually in the object. print_r($rec[0]) shows: stdClass Object ( [year] = 2005 [month] = 8 [day] = 31 [hour] = 0 [minute] = 0 [second] = 0 [fraction] = 0 ) I've never dealt with object in PHP. Something new learnt

[PHP] Re: HTTP headers, IE and downloading

2003-12-22 Thread Andreas Korthaus
Hi! Andreas Magnusson wrote: I'm writing a script to view/download an email-attachment. If the file happens to be an MS Word document and the browser IE (only tried with 6.0), then the download fails. If I choose to download (Content-Disposition: attachment; filename=whatever.doc) then only

[PHP] Re: HTTP headers, IE and downloading

2003-12-22 Thread Andreas Korthaus
Hi! Andreas Magnusson wrote: Have a look at: http://pear.php.net/package/HTTP_Download I looked at it and it's hard to see what it does differently from what I do... Use Ethereal or your own tracer to find out! And compare to a direct request to a real file! AFAIK the headers sent here are:

[PHP] Re: HTTP headers, IE and downloading

2003-12-23 Thread Andreas Korthaus
Hi! Andreas Magnusson wrote: For a normal file (not through PHP) the headers are: Accept-Ranges: bytes Connection: Close Content-Length: 25600 Content-Type: application/msword Date: Tue, 23 Dec 2003 09:51:19 GMT ETag: 08f72d578c3c31:8d0 Last-Modified: Tue, 16 Dec 2003 02:03:44 GMT

[PHP] Welcher Bugtracker in/für PHP?

2004-01-02 Thread Andreas Korthaus
Hi! Suche nen netten/einfachen Bugtracker für ein PHP-Projekt. Welchen könnt Ihr empfehlen? Grüße Andreas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: which Bugtracker for a PHP-project?

2004-01-02 Thread Andreas Korthaus
Andreas Korthaus wrote: Suche nen netten/einfachen Bugtracker für ein PHP-Projekt. Welchen könnt Ihr empfehlen? Oh sorry, I it wasn't the german list ;-) But perhaps it's also a question for this group: I am looking for a nice/easy Bug-Tracker for my PHP-Project. What would you recommend