ID: 24474 Updated by: [EMAIL PROTECTED] Reported By: grest at interia dot pl -Status: Open +Status: Feedback Bug Type: DOM XML related Operating System: WinXp PHP Version: 4.3.2 New Comment:
can you provide the output from phpinfo either as a link to it or via email. Make sure it is run under apache and run from the same directory as your example is. Previous Comments: ------------------------------------------------------------------------ [2003-07-09 18:19:52] grest at interia dot pl When I use in XSL file(filmy.xsl) just <xsl:variable name="out" select="document('today.xml')"/> it works fine. I needn`t to insert a full path('d:\www\grugar\today.xml') In XML it doesn`t work. I use: <!DOCTYPE LIST SYSTEM "filmy.dtd"> or <!DOCTYPE LIST SYSTEM "d:/www/grugar/filmy.dtd"> and always when I use get_element_by_id, I get a NULL! I`m sure that XML is not validated with filmy.dtd. I tested XML with two identical id (without error while loading!) or insert a mistakes into filmy.dtd and the domxml_open_file($fileName, DOMXML_LOAD_VALIDATING)does NOT return any errors or warnings. Conclusion: "filmy.dtd" is not loaded. Earlier, in similar case domxml_open_file returns error. ------------------------------------------------------------------------ [2003-07-09 14:55:10] [EMAIL PROTECTED] Works fine using syntax: "d:/www/grugar/filmy.dtd" or just "filmy.dtd". Looks like some pathing got fixed with apache 2. Unless you give full path for the save location, your output file will end up in Apache root directory. Are you sure that you are getting NULL back from get_element_by_id or is the problem that you just dont get your output file? ------------------------------------------------------------------------ [2003-07-09 14:07:46] grest at interia dot pl Little mistake in line 5. Once again: I try various path in filmy.xml to dtd file, like: <!DOCTYPE LIST SYSTEM "D:\WWW\grugar\filmy.dtd"> <!DOCTYPE LIST SYSTEM "D:/WWW/grugar/filmy.dtd"> <!DOCTYPE LIST SYSTEM "\\Serwer\WWW\grugar\filmy.dtd"> <!DOCTYPE LIST SYSTEM "d:/www/grugar/filmy.dtd"> and none of them works !! How should this path look?! For example the path in XSL file (filmy.xsl) works: filmy.xsl ... <xsl:variable name="out" select="document('d:/www/grugar/today.xml')"/> ... ------------------------------------------------------------------------ [2003-07-09 08:02:02] [EMAIL PROTECTED] Using Apache under windows you must use fullpath names with domxml. All filepaths are handled by libxml (not PHP) which when loaded uses the apache bin directory as the root directory. This includes the path to the DTD within your xml document, which is the reason that get_element_by_id is not working, as the DTD is not being loaded. ------------------------------------------------------------------------ [2003-07-09 07:44:26] grest at interia dot pl I have installed PHP as Apache 2.0.46 module (earlier i used OmniHttp). That caused two problems: 1. The functions like domxml_open_file,domxml_xslt_stylesheet_file need now full path to work, for example $filename = "d:\Www\grugar\filmy.xsl"; $xmldoc = domxml_open_file("d:\Www\grugar\filmy.xml",DOMXML_LOAD_VALIDATING); earlier it works fine with $filename = "filmy.xsl" Another function like "fopen" work good without full path 2. (MOST IMPORTANT) get_element_by_id stoped working, and return always null (earlier with OmniHttp that works fine) Is this a bug or not? I don`t know, which category of bug should i choose. Sorry for my English :) ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/24474 -- Edit this bug report at http://bugs.php.net/?id=24474&edit=1