Click to See Complete Forum and Search --> : PHP --with-sablot on Linux
I'm having trouble getting PHP built with the --with-sablot option enabled on my linux box.
Specs are as follows:
Linux: Mandrake 7.1
Apache: 1.3.14
Expat: 1.95.1
Sablotron: 0.50
PHP: 4.0.4
the debug.log file created when I run configure says it can't find -lxmltok (which I assume means it's looking for the xmltok library?) I don't know where to find that file, except that I've got a few files named xmltok.h and xmltok.c in /php-4.0.4/ext/xml/expat/xmltok/.
I've made apache (no problems), Expat (no problems, and Sablotron (no problems), and PHP without Sablotron enabled (no problems), but I'm wanting to do some stuff with XML/XSLT.
Can anybody help me out? What am I missing?
I'm having the same problem but, same Sablotron, expat and PHP version, the only difference is that I have a SUSE 6.3 (not that I think it means anything fot this problem).
I was just wondering if you found a way to compile PHP with Sablotron withouu gettinh this error.
Thanks
Martino
The problem you are experiencing results from the fact that the sablot-extension for PHP4.04 uses Sablotron 0.44 or lower.
Sablot 0.5 uses a newer version of expat (1.95.*) which won't work with PHP.
Just take Sablot 0.44 (don't forget the expat distribution that comes along!) and it should work fine.
Greetings,
Joachim
Yeah! it just work fine the way tou said
Thanks a lot, I must have missed some README or so...
Greetings
Martino
actually, Sablot-0.50 with expat-1.95 <b>will work</b> with php4 (e.g. 4.04), just that you need to tweak certain things. Since the php4 configure scripts uses <tt>-lxmltok</tt> and <tt>-lxmlparse</tt>, the quickest way is to simply symlink <tt>libexpat.so</tt> to <tt>libxmltok.so</tt> and <tt>libxmlparse.so</tt>, and rerun ldconfig or something (or if static libs, <tt>*.a</tt> respectively).. this has advantages to keep reverse compatibility, in case you have some other progs that uses the XML libs.
another way is to edit your configure scripts---you have several options here, replace all occurences of <tt>-lxmltok</tt> and <tt>-lxmlparse</tt> with <tt>-lexpat</tt>, or tweak it to allow for <tt>./configure --with-expat=/path/to/expat</tt>.
i\\\'ll check on the devel version to see if it\\\'s incorporated... post a patch maybe
I have the exact same problem with \\\'-lxmltok\\\' and \\\'-lxmlparse\\\' on RedHat 6.2. Can someone provide step by step instructions on how to fix this problem ?
There doesn\\\'t seem to any docs on how to make the Sablot-0.50 version work with php4.0.4pl1. Someone not familiar with Linux is hopelessly lost. Plz help...
E S Tan\'s solution worked on my intel Redhat 6.2 machine. Does anyone know if there is a patch (planned) for this yet?
mavoetberg
04-12-2001, 09:21 AM
YES !!!
Thank,
Finally I got it to compile. I got rid of that -lxmltok problem when I did:
cd /usr/local/bin
ln -s libexpat.so libxmltok.so
ln -s libexpat.so libxmlparse.so
mavoetberg
04-13-2001, 07:51 AM
Unfortunatly it seems that Sablot-0.51 in combination with php-4.04 is not completely stable.
It works but not all the time. Refreshing the page gives "Fatal error: msgtype: error ..." and the next time you hit refresh it works normally.
So I would suggest to all waiting a while for things to get more stable ... :-(
Marco
You are lucky... For my part I gave up after one day of fight... Apache says that "sablot.so" (generated by the php source) is not a php library... ;) maybe it has built the windows library? or one for the mac?
Anyway can anyone give me an address where I can download Sablot 0.44 ? It seems that it has dissappeared from the net, and I can find only Sablot 0.52... :(
jovollrath
04-24-2001, 01:45 PM
Apologies to all for not participating in this thread for such a long time.
After nearly endless hours of stupid trying-out I finally have a running system with Sablot /and/ DOMXML.
If I really wrote how I feel about the documentation out there I'd probably get banned from this site!
I hope to bring an end to this absolutely unproductive way of working with following instructions:
1) Get Sablot 0.44 and Expat 1.1.2 sources from http://www.gingerall.com/charlie-bin/get/webGA/act/download_old.act since you're there already also get the patch to Sablot 0.44.1.
Extract Sablot sources to desired directory. Extract Expat-Sources /into/ that directory. Patch Sablot sources ("man patch" might help you with that). Make and install Sablot.
If you don't need DOMXML skip to 3)
2) Get libxml2-2.2.11 sources from http://ftp.net.lut.ac.uk/gnome/stable/sources/libxml/?M=A or somewhere else. Extract, make and install it.
2.5) Rumors are that you need zlib in order to run DOMXML. I'm not sure about that. You should have zlib or scimilar libs (libz) on your system anyway. I used the according configure-option just in case - you never know with php :-).
3) Get a fresh version of php4 (= 4.06) from http://snaps.php.net. Use your desired configuring options plus:
--with-apxs --with-sablot --with-zlib
note that domxml takes --with-dom
I needn't mention that this is out of the semi-standard of using the name of the according extension-directory and that there is not the slightest hint to that in any of the docs ;-)
If php should ever not compile try specifying the location of your libs for the options.
4)run ldconfig
5)test it, it should work ;-)
Currently I am working on a project in university using all this stuff. I might summarize my experiences in an article here on phpbuilder - if I ever manage to get finished and have the time.
Regards,
Joachim
PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved.