What operating system are you using? PHP modules are OS-specific. If you are using Windows, is the php_tidy.dll in your path? Also, is the java.library.path system property being set on the jvm command line? If so, does it include the directory where php_tidy.dll is located?
Thanks for your quick reply. I am using Kubuntu version of Linux.
Hmm. The Win32 variant of the JBoss Native PHP download includes php_tiny.dll in the bin/ext directory. But the Linux variant does not, so I am not sure how the tiny module gets packaged. Downloading the tiny tar.gz from the PHP site doesn't help, either. Perhaps it gets bundled into the lib*.so files in the lib directory?
And unfortunately the update from Kunbuntu 7.11 to 8.4 made my Kunbuntu desktop unusable and I am in the middle of installing 8.4 from scratch so I cannot research the problem at this time. And JavaOne is next week, so I will be away from my desktop for a week. If you haven't found a solution by May 12th, ping me again, I will probably have time then.
Of course, any PHP experts out there should feel free to chime in. The solution is to make sure that the tiny module (whichever .so file it is in) is in the LD_LIBRARY_PATH, or that it is included in the java.library.path system property setting.
By the way, if you followed the typical JBoss Native PHP installation instructions, I seem to recall that it asks you to copy the libphp5.so file to the jboss_home/bin/native directory. If that is what you did, try copying over the rest of the lib*.so files from PHP/lib to bin/native.
I have installed tidy using the command "apt-get install tidy", it added tidy binary in /usr/bin and tidy libs in /usr/lib. Then I have tried adding directly the /usr/lib in LD_LIBRARY_PATH, however it also didn't help me.
I had also tried to put all the tidy related files in bin/native directory but no luck :(
Could you please help me to resolve this error?
Nitin, I haven't forgotten about you. I should be able to give this a try sometime today or tomorrow.
First, the apt-get command you issued installs the command-line tidy utility, it does not install the tidy module for PHP. For that you need to specify package php_tidy. (Warning: I did this on Fedora, not on Ubuntu, so your package name might be different.)
I got tidy to work on Windows, but cannot get it to work on Linux.
I did the following:
0) Started the app server with JBoss Native and PHP support installed, and the php-examples.war deployed.
1) Accessed the info.php file in php-examples.war and noted the location of the php.ini file. (c:/windows) [On linux, the location was: /home/jfclere/Linux_i686_tools/PHP/lib)
2) Created a php.ini file in that location and put in two entries: extension_dir and extension:
extension_dir = F:/opt/jboss/web/php5servlet-windows-i586-SP1/php5servlet-windows-SP1-i586/PHP/bin/ext
extension = php_tidy.dll
On linux, I had:
extension_dir = /usr/lib/php/modules
extension = tidy.so
On Linux I had to install the tidy support (yum install php_tidy) and then locate the installed module. On Windows, PHP comes with tidy support.
3) Restarted the app server, accessed info.php again and checked that 'tidy' showed up in the list on installed modules.
At that point I could use tidy on Windows. But for some reason on Linux the tidy module is not loading.
The PHP level on my Fedora box is 5.2.4. The PHP level in the PHP servlet is 5.2.3. Could be a version incompatibility issue.