PHP5 can't find Tidy

Ryan Schmidt ryandesign at macports.org
Mon Jan 29 22:02:19 PST 2007


On Jan 29, 2007, at 11:40, John Korchok wrote:

> >>I installed php5 +apache2 +mysql5 on OS 10.4.8 Intel. When I try to
> >>restart Apache I get the following:
> >>
> >>httpd: Syntax error on line 119 of /opt/local/apache2/conf/  
> httpd.conf:
> >>Cannot load /opt/local/apache2/modules/libphp5.so into  server:  
> Library
> >>not loaded: /opt/local/lib/libtidy-0.99.0.dylib\n   Referenced from:
> >>/opt/local/apache2/modules/libphp5.so\n  Reason:  image not found
> >>
> >>I have uninstalled and reinstalled php5 (5.2.0.0) and tidy
> >>(20051026_0) separately and together and can't get them to play
> >>together. I've cleaned, synced, selfupdated and upgraded to no   
> avail.
> >>I have a nearly identical setup running on a PowerPC Mac  with no
> >>problem, same version of php (5.2.0.0) but tidy is  20051025_0.  
> Am I missing something?
>
> >Also works fine for me on PowerPC. Haven't tried Intel.
>
> >Do you have /opt/local/lib/libtidy-0.99.0.dylib?
>
> >Do you have /opt/local/bin/tidy and does it work?
>
> /opt/local/lib/libtidy-0.99.0.dylib does not exist on either the  
> Intel or the PowerPC, but it doesn't seem to bother PHP on the  
> PowerPC.
>
> /opt/local/lib has libtidy-0.99.0, libtidy.a and libtidy.la plus 3  
> aliases (libtidy and libtidy-0.99.0.0.0, both of which point to  
> libtidy-0.99.0 and libtidy.0.dylib which does not appear to point  
> at anything). Uninstalling deletes all these files, reinstalling  
> recreates all of them. I tried creating an alias called  
> "libtidy-0.99.0.dylib" pointing to libtidy-0.99.0, but that didn't  
> work. PHP complained the image was not the right size.

/opt/local/lib/libtidy-0.99.0.dylib does exist on my PowerPC, and  
libtidy-0.99.0 does not. The symlinks do not point at libtidy-0.99.0;  
they point at libtidy-0.99.0.dylib. How are you determining that  
libtidy-0.99.0.dylib does not exist -- by looking at /opt/local/lib  
in the Finder? If so, is your Finder "helpfully" hiding the file  
extension, as it does by default for some file extensions unless you  
tell it not to be so silly? If so, please try looking at the  
directory in the Terminal to see what's really on your disk, by  
typing "ls -l /opt/local/lib/*tidy*"


> /opt/local/bin/tidy is present, but I don't know how to test if it  
> is working.

tidy analyzes HTML and tells you what's wrong with it. To try it out,  
go grab some HTML and test it. For example, grab the source of  
Google's homepage; it's relatively small:

curl -o /tmp/google.html http://www.google.com/

Then run it through tidy:

tidy /tmp/google.html

If it issues various warnings about incorrect HTML in various lines  
of the file, then outputs the corrected HTML, then outputs further  
recommendations for improving the HTML, it's working correctly. Since  
tidy uses libtidy-0.99.0.dylib, that would also indicate that that  
library is working correctly.

If instead you get a message that libtidy-0.99.0.dylib cannot be  
found, then we can confirm that something about that library needs to  
be fixed.


> I have an identical Intel Mac running PHP 5.1.6 and Tidy 20051025_0  
> with no problem.
>
> Is it possible to transfer a portfile from another machine and  
> install it over the newer version of PHP?

I don't know that there's a particularly good way to do that, no.


> Any help to get PHP running again would be appreciated.

I'll try to help but it's difficult since I don't have the same setup  
as you, and on my setup it works correctly.





More information about the macports-users mailing list