#22868 [NoF->Opn]: xslt_process() not reading files relative to script

From: Date: Wed, 23 Apr 2003 03:00:09 +0000
Subject: #22868 [NoF->Opn]: xslt_process() not reading files relative to script
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-38114@lists.php.net to get a copy of this message
ID: 22868 User updated by: kirk at coraldesigns dot com Reported By: kirk at coraldesigns dot com -Status: No Feedback +Status: Open Bug Type: XSLT related Operating System: Windows XP -PHP Version: 4.3.2RC1 +PHP Version: 4.3.2 Stable 22 April New Comment: I just checked it in the latest stable release, it still doesn't work. I still had to copy both the XSL and XML files to the directory with php.exe to get it to work. It however works flawlessly with 4.3.1 under Linux. So this is a Win32 bug alone. Previous Comments: ------------------------------------------------------------------------ [2003-04-21 09:18:32] sniper@php.net No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Open". Thank you. ------------------------------------------------------------------------ [2003-04-09 16:48:13] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-03-25 02:16:45] kirk at coraldesigns dot com The xslt_process() command is expecting a uri relative to the path of php.exe and not that of the script calling it. Using an XML file and an XSL with the following script: // script location: c:/apache/htdocs/pathto/test.php <?php $xsltproc = xslt_create(); $html = xslt_process($xsltproc, 'test.xml', 'test.xsl'); // some error checking left out for simplicity echo $html; ?> I get the following error: XSLT processing error: cannot open file 'c:/apache/php/test.xsl' I read the archives, and saw that this bug was previously reported for 4.3.0 and then closed as fixed in CVS. However 4.3.2 RC1 still exhibits this behaviour. This was then re-tagged as a documentation error, however this behaviour is not right, as developers should not have access to the path with php.exe. Some possible fixes which were recommended were to override the base path with xslt_set_base(), however this would make the scripts machine specific and reduce portability. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22868&edit=1

« previous php.bugs (#38114) next »