Re: [PHP] XSLT parsing causes "passed by reference" error

2002-03-18 Thread Erik Price


On Friday, March 15, 2002, at 06:46  PM, Edward Tanguay wrote:

> I have this hosted at my ISP. The phpinfo() shows that they have:
>
> Linux 2.4.3
> PHP Version 4.0.4pl1
> Sablotron XSLT support: enabled
>
> Which annotations are you refering to?
>

Ask them if they will upgrade to a PHP 4.1.x version, preferrably 
4.1.2.  I understand that there was a significant change to the XSLT 
functions in PHP between 4.0.x and 4.1.x (you can check the SourceForge 
CVS changelog for the details, but I'm almost positive of it).  That is 
really the only advice I have, since I know nothing about the inner 
workings of these extensions -- only that in my PHP 4.1.2 installation, 
everything seems to work (though I haven't done any advanced XSLT 
processing).

Good luck Edward, sorry I can't be of better help.  Oh, on second 
thought, maybe I can!  I recorded every step I made in recompiling PHP 
with XSLT (as well as MySQL) on my RH 7.2 Linux box.  If you or your ISP 
would like a copy of this document, I'll send it to you -- it details 
every step I made in setting up PHP with XSLT enabled, as well as my 
(easy) installation of expat and Sablotron (both of which are required 
for these XSLT functions).

Good luck, and btw by annotations I meant the user-input at the bottom 
of every PHP man page.


Erik





Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] XSLT parsing causes "passed by reference" error

2002-03-15 Thread Edward Tanguay

Hello Erik,

I have this hosted at my ISP. The phpinfo() shows that they have:

Linux 2.4.3
PHP Version 4.0.4pl1
Sablotron XSLT support: enabled

Which annotations are you refering to?

The odd thing is that I have copied the code from two different examples
from the web and both give me this same "only variables can be passed by
reference" error.  My ISP says that Sablotron is installed correctly but
doesn't know why I am getting this error.

I cannot find any reference to this error and Sablotron at www.deja.com or
elsewhere on the net. Am I the only one that is getting this error?

I can't wait to get this going. Thanks for the help.

Edward
www.tanguay.info


"Erik Price" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> On Wednesday, March 13, 2002, at 06:13  PM, Edward Tanguay wrote:
>
> > Fatal error: Only variables can be passed by reference in
> > /home/tanguay/test/testxslt.php on line 7
> >
> > when I run this code:
> >
> >  >
> > // Allocate a new XSLT processor
> > $xh = xslt_create();
> >
> > // Process the document, returning the result into the $result variable
> > $result = xslt_process($xh, 'content.xml', 'website.xsl');
> >
>
> I was curious about this, since I just recompiled with XSLT and
> Sablotron support myself.  I read through the annotated manual page for
> xslt_process().  Have you checked it out?  It appears that this
> extension is still fairly experimental, so the way that the program
> behaves may differ depending on which version you're running.
>
> Which version of PHP are you using, for which OS?  Did you compile using
> the --enable-xslt and --with-xslt-sablot configure parameters?  Try some
> of the workarounds suggested in those annotations, specifically the one
> which suggests that xslt_process() doesn't like NULL arguments.  It'll
> be ugly, but perhaps you can use implode() to read those files into a
> string, and get it to work by passing string references rather than
> filenames.  If you really want to use filenames, try using an absolute
> path, try using ./ before the file names (assuming those files are in
> the same directory as the script itself).  Finally, consider passing a
> joke array as the 5th and 6th arguments to the function.  It may be that
> in your particular build you need to use workarounds.
>
> Be sure to post the results of your experimentation for the benefit of
> the rest of us.
>
>
>
>
> 
>
> Erik Price
> Web Developer Temp
> Media Lab, H.H. Brown
> [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] XSLT parsing causes "passed by reference" error

2002-03-14 Thread Erik Price


On Wednesday, March 13, 2002, at 06:13  PM, Edward Tanguay wrote:

> Fatal error: Only variables can be passed by reference in
> /home/tanguay/test/testxslt.php on line 7
>
> when I run this code:
>
> 
> // Allocate a new XSLT processor
> $xh = xslt_create();
>
> // Process the document, returning the result into the $result variable
> $result = xslt_process($xh, 'content.xml', 'website.xsl');
>

I was curious about this, since I just recompiled with XSLT and 
Sablotron support myself.  I read through the annotated manual page for 
xslt_process().  Have you checked it out?  It appears that this 
extension is still fairly experimental, so the way that the program 
behaves may differ depending on which version you're running.

Which version of PHP are you using, for which OS?  Did you compile using 
the --enable-xslt and --with-xslt-sablot configure parameters?  Try some 
of the workarounds suggested in those annotations, specifically the one 
which suggests that xslt_process() doesn't like NULL arguments.  It'll 
be ugly, but perhaps you can use implode() to read those files into a 
string, and get it to work by passing string references rather than 
filenames.  If you really want to use filenames, try using an absolute 
path, try using ./ before the file names (assuming those files are in 
the same directory as the script itself).  Finally, consider passing a 
joke array as the 5th and 6th arguments to the function.  It may be that 
in your particular build you need to use workarounds.

Be sure to post the results of your experimentation for the benefit of 
the rest of us.






Erik Price
Web Developer Temp
Media Lab, H.H. Brown
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php