PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > php.general > LAMP Server setup
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
LAMP Server setup

Réponse
 
LinkBack Outils de la discussion
Vieux 08/09/2007, 16h07   #1
Randy Patterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut LAMP Server setup

Hey,

I have setup a test system on my home network in the past to develop & test
PHP apps by installing an ISAPI PHP dll in IIS. It worked great but now I
trying to setup a LAMP server on Debian/Lenny. I ran the following command;

aptitude install apache2 php5 libapache2-mod-php5

But got the following error message;

Setting up apache2-mpm-prefork (2.2.4-3) ...
Starting web server: apache2apache2: Syntax error on line 187
of /etc/apache2/apache2.conf: Syntax error on line 3
of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so into
server: /etc/apache2/modules/libphp5.so: cannot open shared object file: No
such file or directory
failed!
invoke-rc.d: initscript apache2, action "start" failed.

The error is pointing to this line in the httpd.conf;

LoadModule php5_module modules/libphp5.so

But this directory or file don't exist in the /etc/apache2 directory.

Not sure how to fix this. I'm a newbie when it comes to the LAMP server apps.
Any would be appreciated.

Thanks,
Randy
  Réponse avec citation
Vieux 08/09/2007, 16h50   #2
brian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] LAMP Server setup

Randy Patterson wrote:
> Hey,
>
> I have setup a test system on my home network in the past to develop & test
> PHP apps by installing an ISAPI PHP dll in IIS. It worked great but now I
> trying to setup a LAMP server on Debian/Lenny. I ran the following command;
>
> aptitude install apache2 php5 libapache2-mod-php5
>
> But got the following error message;
>
> Setting up apache2-mpm-prefork (2.2.4-3) ...
> Starting web server: apache2apache2: Syntax error on line 187
> of /etc/apache2/apache2.conf: Syntax error on line 3
> of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so into
> server: /etc/apache2/modules/libphp5.so: cannot open shared object file: No
> such file or directory
> failed!
> invoke-rc.d: initscript apache2, action "start" failed.
>
> The error is pointing to this line in the httpd.conf;
>
> LoadModule php5_module modules/libphp5.so
>
> But this directory or file don't exist in the /etc/apache2 directory.
>


Look at the top of httpd.conf for a line with "ServerRoot". That should
point to where your modules reside. If that's correct and points to the
proper modules dir with a bunch *.so files then the problem is that the
libphp5 module is MIA. If you comment out that line ("LoadModule
php5_module ...") does the server daemon start up ok?

You might try searching for libphp5.so on your machine.

I'm not familiar with installing httpd with aptitude. Is it possible
that you need to incude httpd-devel (apache2-devel?) in your install
arguments? You need that for apxs but i don't know if aptitude takes
care of that.

You could try:
aptitude purge libapache2-mod-php5
aptitude install libapache2-mod-php5

or:

apt-get remove --purge apache2 php5 libapache2-mod-php5

brian
  Réponse avec citation
Vieux 08/09/2007, 18h20   #3
Børge Holen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] LAMP Server setup

On Saturday 08 September 2007 10:07, Randy Patterson wrote:
> Hey,
>
> I have setup a test system on my home network in the past to develop & test
> PHP apps by installing an ISAPI PHP dll in IIS. It worked great but now I
> trying to setup a LAMP server on Debian/Lenny. I ran the following command;
>
> aptitude install apache2 php5 libapache2-mod-php5
>
> But got the following error message;
>
> Setting up apache2-mpm-prefork (2.2.4-3) ...
> Starting web server: apache2apache2: Syntax error on line 187
> of /etc/apache2/apache2.conf: Syntax error on line 3
> of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so
> into server: /etc/apache2/modules/libphp5.so: cannot open shared object
> file: No such file or directory
> failed!
> invoke-rc.d: initscript apache2, action "start" failed.
>
> The error is pointing to this line in the httpd.conf;
>
> LoadModule php5_module modules/libphp5.so
>
> But this directory or file don't exist in the /etc/apache2 directory.
>
> Not sure how to fix this. I'm a newbie when it comes to the LAMP server
> apps. Any would be appreciated.


Seems very much like some missinformation of some kind.
Apache2 should not use any modules/ directory.

Apache2 uses symlinks to enable modules, check if symlink exists.
In the directory mods-enabled there should reside syms like this:
php5.conf -> ../mods-available/php5.conf
php5.load -> ../mods-available/php5.load

Any other php relations within both httpd and apache2 conf is to be removed.
It does not complain over missing php libs, it complains about syntax error.

>
> Thanks,
> Randy

  Réponse avec citation
Vieux 08/09/2007, 18h54   #4
Randy Patterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] LAMP Server setup

On Saturday 08 September 2007 12:20, Børge Holen wrote:
> On Saturday 08 September 2007 10:07, Randy Patterson wrote:
> > Hey,
> >
> > I have setup a test system on my home network in the past to develop &
> > test PHP apps by installing an ISAPI PHP dll in IIS. It worked great but
> > now I trying to setup a LAMP server on Debian/Lenny. I ran the following
> > command;
> >
> > aptitude install apache2 php5 libapache2-mod-php5
> >
> > But got the following error message;
> >
> > Setting up apache2-mpm-prefork (2.2.4-3) ...
> > Starting web server: apache2apache2: Syntax error on line 187
> > of /etc/apache2/apache2.conf: Syntax error on line 3
> > of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so
> > into server: /etc/apache2/modules/libphp5.so: cannot open shared object
> > file: No such file or directory
> > failed!
> > invoke-rc.d: initscript apache2, action "start" failed.
> >
> > The error is pointing to this line in the httpd.conf;
> >
> > LoadModule php5_module modules/libphp5.so
> >
> > But this directory or file don't exist in the /etc/apache2 directory.
> >
> > Not sure how to fix this. I'm a newbie when it comes to the LAMP server
> > apps. Any would be appreciated.

>
> Seems very much like some missinformation of some kind.
> Apache2 should not use any modules/ directory.
>
> Apache2 uses symlinks to enable modules, check if symlink exists.
> In the directory mods-enabled there should reside syms like this:
> php5.conf -> ../mods-available/php5.conf
> php5.load -> ../mods-available/php5.load
>
> Any other php relations within both httpd and apache2 conf is to be
> removed. It does not complain over missing php libs, it complains about
> syntax error.


I think you have put your finger on the problem, those links are not there. I
read this article on the subject;

http://www.debian-administration.org/articles/207

Which referred to these programs; a2ensite, a2dissite, a2enmod and a2dismod.

Although I have apache2 installed, these programs are not present. Are they
part of another package? Not sure that I would get the links correct if I did
it manually.

Thanks
  Réponse avec citation
Vieux 08/09/2007, 19h04   #5
Børge Holen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] LAMP Server setup

On Saturday 08 September 2007 12:54, Randy Patterson wrote:
> On Saturday 08 September 2007 12:20, Børge Holen wrote:
> > On Saturday 08 September 2007 10:07, Randy Patterson wrote:
> > > Hey,
> > >
> > > I have setup a test system on my home network in the past to develop &
> > > test PHP apps by installing an ISAPI PHP dll in IIS. It worked great
> > > but now I trying to setup a LAMP server on Debian/Lenny. I ran the
> > > following command;
> > >
> > > aptitude install apache2 php5 libapache2-mod-php5
> > >
> > > But got the following error message;
> > >
> > > Setting up apache2-mpm-prefork (2.2.4-3) ...
> > > Starting web server: apache2apache2: Syntax error on line 187
> > > of /etc/apache2/apache2.conf: Syntax error on line 3
> > > of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so
> > > into server: /etc/apache2/modules/libphp5.so: cannot open shared object
> > > file: No such file or directory
> > > failed!
> > > invoke-rc.d: initscript apache2, action "start" failed.
> > >
> > > The error is pointing to this line in the httpd.conf;
> > >
> > > LoadModule php5_module modules/libphp5.so
> > >
> > > But this directory or file don't exist in the /etc/apache2 directory.
> > >
> > > Not sure how to fix this. I'm a newbie when it comes to the LAMP server
> > > apps. Any would be appreciated.

> >
> > Seems very much like some missinformation of some kind.
> > Apache2 should not use any modules/ directory.
> >
> > Apache2 uses symlinks to enable modules, check if symlink exists.
> > In the directory mods-enabled there should reside syms like this:
> > php5.conf -> ../mods-available/php5.conf
> > php5.load -> ../mods-available/php5.load
> >
> > Any other php relations within both httpd and apache2 conf is to be
> > removed. It does not complain over missing php libs, it complains about
> > syntax error.

>
> I think you have put your finger on the problem, those links are not
> there. I read this article on the subject;
>
> http://www.debian-administration.org/articles/207
>
> Which referred to these programs; a2ensite, a2dissite, a2enmod and
> a2dismod.
>
> Although I have apache2 installed, these programs are not present. Are they
> part of another package? Not sure that I would get the links correct if I
> did it manually.
>
> Thanks

  Réponse avec citation
Vieux 08/09/2007, 19h09   #6
Børge Holen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] LAMP Server setup

On Saturday 08 September 2007 12:54, Randy Patterson wrote:
> On Saturday 08 September 2007 12:20, Børge Holen wrote:
> > On Saturday 08 September 2007 10:07, Randy Patterson wrote:
> > > Hey,
> > >
> > > I have setup a test system on my home network in the past to develop &
> > > test PHP apps by installing an ISAPI PHP dll in IIS. It worked great
> > > but now I trying to setup a LAMP server on Debian/Lenny. I ran the
> > > following command;
> > >
> > > aptitude install apache2 php5 libapache2-mod-php5
> > >
> > > But got the following error message;
> > >
> > > Setting up apache2-mpm-prefork (2.2.4-3) ...
> > > Starting web server: apache2apache2: Syntax error on line 187
> > > of /etc/apache2/apache2.conf: Syntax error on line 3
> > > of /etc/apache2/httpd.conf: Cannot load /etc/apache2/modules/libphp5.so
> > > into server: /etc/apache2/modules/libphp5.so: cannot open shared object
> > > file: No such file or directory
> > > failed!
> > > invoke-rc.d: initscript apache2, action "start" failed.
> > >
> > > The error is pointing to this line in the httpd.conf;
> > >
> > > LoadModule php5_module modules/libphp5.so
> > >
> > > But this directory or file don't exist in the /etc/apache2 directory.
> > >
> > > Not sure how to fix this. I'm a newbie when it comes to the LAMP server
> > > apps. Any would be appreciated.

> >
> > Seems very much like some missinformation of some kind.
> > Apache2 should not use any modules/ directory.
> >
> > Apache2 uses symlinks to enable modules, check if symlink exists.
> > In the directory mods-enabled there should reside syms like this:
> > php5.conf -> ../mods-available/php5.conf
> > php5.load -> ../mods-available/php5.load
> >
> > Any other php relations within both httpd and apache2 conf is to be
> > removed. It does not complain over missing php libs, it complains about
> > syntax error.

>
> I think you have put your finger on the problem, those links are not
> there. I read this article on the subject;
>
> http://www.debian-administration.org/articles/207
>
> Which referred to these programs; a2ensite, a2dissite, a2enmod and
> a2dismod.
>
> Although I have apache2 installed, these programs are not present. Are they
> part of another package? Not sure that I would get the links correct if I
> did it manually.


is the files php5.conf and load inside the mods-available package?
Come to think of it, it sounds like a mixup of apache2 and
libapache-php-mod... nah whatever.

if the files are there, its easy.
Enter the dir
ln -s php5.conf ../mods-enabled/
ln -s php5.conf ../mods-enabled/

if not, print back the results for:
dpkg -l|grep apache
dpkg -l|grep php

>
> Thanks

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 06h51.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,14937 seconds with 14 queries