Re: Use XPTAH v3.0 with W98
Brought to you by:
bs_php,
nigelswinson
From: Pozzer F. <fra...@in...> - 2002-06-03 08:16:16
|
Thanks very much Peter. This it is the line of code PHP where I have problem: $XpathPratica->importFromFile("http://localhost/FEDRAXPATH/SV/PHP/XML/Elenco_Pratiche.xml"); I have change this line in two way: 1. $document_root = getenv('DOCUMENT_ROOT'); $XpathPratica->importFromFile($document_root."/FEDRAXPATH/SV/PHP/XML/Elenco_Pratiche.xml"); oppure 2. $document_root = getenv('DOCUMENT_ROOT'); $fp = fopen($document_root."/FEDRADOM/SV/PHP/XML/Elenco_Pratiche.xml", "w+" ); $XpathPratica->importFromFile($fp); Let me to ask of all what it is better for the performance 1. or 2. Now I try to change in all my PHP code the path. After this I try again to test XPtah V.3.0 in W98 and W95 also. Thanks for all. If you have same help to test XPtah in W95 send me e-mail, please, with how to do I have to make. Ciao Franco. Peter Robins wrote: > it looks like you're trying to read a local file with a url which it > can't find. All the other errors are coming because of that. > > 1. does this url actually exist? :-) (can you view it in your > browser?) > 2. is allow_url_fopen on? it generally is, but you never know . . . > 3. if all you are doing is reading local files, it would be much > better/faster to read from local filesystem rather than using http > > On Wednesday 29 May 2002 10:00, Pozzer Franco wrote: > > > Thanks for all. I hope to explain well my problem. > > > > > > I have to make same little code PHP to use XPtah for to > > > understand how work it in the XML structure. > > > > > > I have two ENV where I try XPath: WinNT and W98. I describe it: > > > > > > 1. WinNT Server PII AcerPower4100; 250Mhrz; 132MB of RAM > > > In this ENV I have Apache 1.3.24 from the apache.org and PHP > > > 4.2.1 from php.net. > > > I do not use tools for Windows system like PHPTRIAD > > > (www.phpgeek.com) > > > > > > In this ENV XPTAH work fine and the performance are enough good ( > > > I compare it with DOM API Class from this site > > > http://devil.medialab.at/projects/phpdom/doc/phpDOM_Demo.html). > > > > > > In this ENV not problems, > > > now................................................. > > > > > > 2. W98 P133 Unisys 32MB of RAM . > > > Also in this ENV I have Apache 1.3.24 from the apache.org and PHP > > > 4.2.1 from php.net and I do not use any Windows tools for Apache > > > and PHP. > > > > > > In this ENV the same sample and code PHP that work fine in the > > > WinNT ENV do not work. > > > > > > The error that I have it is this: > > > > > > XPath error in Xpath.class.php:1333 In importFromFile(): > > > The url > > > 'http://localhost/FEDRAXPATH/SV/PHP/XML/Elenco_Pratiche.xml' > > > could not be found or read. > > > > > > Warning: Invalid argument supplied for foreach() in > > > C:\Programmi\Apache > > > Group\Apache\htdocs\FEDRAXPATH\SV\PHP\CLASSUTILITY\mieProve\Xpath > > >.class.php on line 1860 > > > > > > XPath error in Xpath.class.php:4224 The supplied xPath-query > > > '/Elenco_Pratiche[1]' does not match *any* node in the xml > > > document. > > > > > > XPath error in Xpath.class.php:966 Couldn't get an exclusive lock > > > on the c:/programmi/apache > > > group/apache/htdocs/FEDRAXPATH/SV/PHP/XML/Elenco_Pratiche.xml > > > file. > > > > > > Before to close my msg I have see a very strangeness. > > > > > > At the start the XML file Elenco_Pratiche.XML it is like this: > > > > > > <?xml version="1.0" ?> > > > <Elenco_Pratiche> > > > <RECORD> > > > <Cod_Pratica>null</Cod_Pratica> > > > <Mod_Base>null</Mod_Base> > > > <Denominazione>null</Denominazione> > > > <Ultimo_Agg>null</Ultimo_Agg> > > > <Ultimo_Scar>null</Ultimo_Scar> > > > <Tipo_Scar>null</Tipo_Scar> > > > </RECORD> > > > </Elenco_Pratiche> > > > > > > I want to clone this NODE and CHILD with the field and with there > > > value of the HTML page generated by PHP code. > > > > > > After to execute my code PHP and when I have a error the file XML > > > Elenco_Pratiche.xml are empty > > > > > > Thanks all for response. I like if the Fiends of the NG write me > > > also directly. Thanks. > > > > > > Ciao e grazie. Franco > > > > www.infocamere.it > > fra...@in... > > > > > > > > > > > > > > _______________________________________________________________ > > > > Don't miss the 2002 Sprint PCS Application Developer's Conference > > August 25-28 in Las Vegas -- > > http://devcon.sprintpcs.com/adp/index.cfm > > > > _______________________________________________ > > Phpxpath-users mailing list > > Php...@li... > > https://lists.sourceforge.net/lists/listinfo/phpxpath-users |