Jump to content

XAMPP with PHP 4/XSLT/XML


kvnmck18
 Share

Recommended Posts

I have uncommented all the necessary parts in the php.ini...but I still get an error when trying to parse the XML/XSLT in php...but I know there are no erros with my [php,xml,xslt] code.This is the error I get:

Warning: Sablotron error on line none: cannot open file 'C:/xampp/pagesS.xsl' in C:\xampp\htdocs\testing\page.php on line 29 Call Stack # Function Location 1 xslt_process ()
Anyone else have this problem? Any one know a solution? It's a headache haha
Link to comment
Share on other sites

What strikes me is the &apos:'s (apostrophs), you normally don't see those (well as apostrophs, not "code"). That leads me to think that you're having some extra apostrophs...Also note: It's easier to help if we can see the code that generates the error...

Link to comment
Share on other sites

The ' is because I uncommented a part in the php.ini to transform all special chars to their entity reference.php:

<?php			$xmlFile = "xml.xml";			$xsltFile = "xsl.xsl";						$args = array("pageName" => $_GET['pageName'], "localLinkAfter" => "&pageName=". $_GET['pageName'], "staff" => $_GET['staff'], "localLinkAfter" => "&staff=". $_GET['staff'], "serv" => $_GET['serv'], "localLinkAfter" => "&serv=". $_GET['serv']);						$engine = xslt_create();						$output = xslt_process($engine, $xmlFile, $xsltFile, NULL, NULL, $args);						print $output;			xslt_free($engine);?>

*This works on my website's server perfectly...and other servers that I have used it on...just not with XAMPP<--and I can't find a problem in the phpinfo at all.

Link to comment
Share on other sites

Ok...Make sure you have the right path to the file, no sure on if the / is a problem (normally it's \ on win, but can't remember how PHP treat /, think it treats them as \ )You have the PHP-file in C:\xampp\htdocs\testing\, but the xsl file in C:\xampp\ (why??), can that have anything to do with it?Make sure that the name of the file(s) is written in the same way (casing etc)Check permissions..Save a copy of the xsl-file in the same dir as the php-file and use a relative path...ps just writing what I would check, guess you've checked all of that already... ds

Link to comment
Share on other sites

It does seem the path to the XSLT file is wrong. I mean, if you have:

$xsltFile = "xsl.xsl";

how come PHP is trying to get

C:/xampp/pagesS.xsl

?It just doesn't make sence. Where did "pagesS.xsl" came from anyway?

Link to comment
Share on other sites

That's not the problem, I changed the XSLT to a different name. haha.... still having the problem. XAMPP is suppose to make life easier.(PHP/XML/XSLT are in the same folder)[i have a headache from paint fumes.]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...