[nzlug] ermm.... help??

Cliff Pratt enkidu at cliffp.com
Sun Feb 18 14:57:12 NZDT 2007


Nevyn wrote:
> On 2/18/07, Nevyn <nevynh at gmail.com> wrote:
>> On 2/18/07, Cliff Pratt <enkidu at cliffp.com> wrote:
>> > Nevyn wrote:
>> > > On 2/18/07, Cliff Pratt <enkidu at cliffp.com> wrote:
>> > >> Nevyn wrote:
>> > >>> For some strange reason apache has stopped working for me (this
>> > >>> is an over night thing). Suddenly it appears I have a corrupted
>> > >>> file. When trying to restart apache I get the following error:
>> > >>>
>> > >>> Starting web server (apache2)...apache2: Syntax error on line 185
>> > >>> of /etc/apache2/apache2.conf: Syntax error on line 1 of
>> > >>> /etc/apache2/mods-enabled/php5.load: API module structure
>> > >>> `php5_module' in file /usr/lib/apache2/modules/libphp5.so is
>> > >>> garbled - perhaps this is not an Apache module DSO? failed
>> > >>>
>> > >>> Of course I can't just remove php5 and try reinstalling it due to
>> > >>>  dependancies. Anyone know how to get past this? I'm running
>> > >>> Debian.
>> > >>>
>> > >> Get someone to send you libphp5.so and cross fingers that they are
>> > >> the same level?
>> > >>
>> > >> If you post your distro details and the module details here, then
>> > >> someone may be able to help.
>> > >>
>> > >> However, you may have bigger problems ie, why did it go bad in the
>> > >> first place? You might need to take a closer look at your hard
>> > >> disk.
>> > >
>> > > Since then I figure I could just reinstall the package - which
>> > > resulted in it still being corrupt so perhaps it's a problem with the
>> > >  repository. Then noticed that it was an unsigned package so
>> > > commented out the dotdeb sources in apt and did and update and tried
>> > > re-installing again.
>> > >
>> > I think that it is extremely unlikely that a corrupt module found its
>> > way to the repository, even the dotdeb ones.
>> > >
>> > > Needless to say it didn't work. Fine thinks I. I uninstall it
>> > > removing anything that had has dependancies to it (so long as I
>> > > remember what I removed) - short list - mediawiki and torrentflux.
>> > > Removed it, and then went to install torrentflux. Whoops. I'm running
>> > > apache 2 yet it put apache 1 style configuration files around the
>> > > place. Just plain messy. Think I might have gotten this all under
>> > > control now (should know after an hours worth of downloading).
>> > >
>> > That sounds strange. It's possible that the dotdeb repositories have
>> > apache2 and the standard Sarge ones have apache1. I don't like 
>> backports
>> > and run mixed systems, so I don't know for sure.
>> >
>> > Cheers,
>> >
>> > Cliff
>>
>> After a bit of thinking I figured that the problem was more likely a
>> file being corrupted when downloading. So did an apt-get clean to
>> force everything to download again (moan and grumble and moan again).
>> Installing mediawiki which should get all of it's dependancies sorted
>> out. After that installing torrentflux will with any luck sort itself
>> out.
> 
> *mumble* after reinstalling mediawiki, I pointed a browser where I
> would normally point it to get to my own 'lil wiki. Complete and utter
> bummer - it asked me where I'd like to download the file.
> Righty'o, out with a trusty editor (nano I'll have you know :p) and
> add a line to /etc/apache2/apache2.conf which says:
> AddType application/x-httpd-php .php
> 
> Restart apache - no joy. Check under mods-enabled and find that php
> isn't there. Add php5 there and get the original error again:
> 
> Forcing reload of web server (apache2)...apache2: Syntax error on line
> 185 of /etc/apache2/apache2.conf: Syntax error on line 1 of
> /etc/apache2/mods-enabled/php5.load: API module structure
> `php5_module' in file /usr/lib/apache2/modules/libphp5.so is garbled -
> perhaps this is not an Apache module DSO?
> failed!
> 
> There... and that's howto go in a complete circle ;)
> 
> Any other clues??
> 
You are using a Debian based system. What are the version of the php 
packages you have installed?

Try 'dpkg -l | grep php5'

Then if someone has the same version, maybe they would let you have a 
copy of theirs.

Just did a web search and found this:

"• API module structure `php5_module' in file . . . is garbled
If you get a message like this:

     httpd: Syntax error on line 195 of 
/usr/local/apache/conf/httpd.conf: API module
     structure `php5_module' in file 
/usr/local/apache/modules/libphp5.so is garbled
     - perhaps this is not an Apache module DSO

it's because your version of PHP wasn't built for the version of Apache 
you are using (For PHP 4, substitute php4_module . . . libphp4.so). 
Recompile PHP in a "fresh" source directory (where you haven't built PHP 
before) and make sure --prefix, --with-config-file and --with-apxs2 
points to the correct Apache directories you are using and the 
libphp4.so file has been copied to your /usr/local/apache/modules 
directory."

http://dan.drydog.com/apache2php.html

Are either of php or apache compiled by you? If not, you should maybe 
let whoever you got the binary from of the problem. If you got php5 from 
dotdeb it may be compiled for a different version of apache.

Cheers,

Cliff




More information about the NZLUG mailing list