PHP5 can't find Tidy

John Korchok jkorchok at hotmail.com
Tue Jan 30 20:18:35 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.

Thanks very much for the tests, Tidy is working just fine, in spite of the 
lack of any file called libtidy-0.99.0.dylib.

I have my Mac set to show all files in the finder, but I double-checked with 
Terminal. There are three files:
libtidy-0.99.0
libtidy.a
libtidy.la

and three links:
libtidy -> libtidy-0.99.0
libtidy-0.99.0.0.0 -> libtidy-0.99.0
libtidy.0.dylib -> libtidy-0.99.0.0.0.dylib

The last file being pointed at seems to not be created by the portfile. In 
the root directory I tried:
sudo find . -name 'libtidy-0.99.0.dylib'
and
sudo find . -name 'libtidy-0.99.0.0.0.dylib'
but got nothing.
Then I did:
sudo find . -name 'libtidy*'
and cross-checked the PowerMac with the working setup, its Tidy files have 
exactly the same names, but it doesn't bother PHP. I'm baffled.

_________________________________________________________________
Get live scores and news about your team: Add the Live.com Football Page  
http://www.live.com/?addtemplate=football




More information about the macports-users mailing list