PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > getting PHP5 to work with apache v1.3 in Etch
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

getting PHP5 to work with apache v1.3 in Etch

Réponse
 
LinkBack Outils de la discussion
Vieux 22/01/2007, 03h40   #1
Marc Shapiro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut getting PHP5 to work with apache v1.3 in Etch

Back when I was running Sarge I had apache v1.3 and php5 working just
fine. I did a clean install when I switched to Etch, instead of using
'dist-upgrade.' When I did the install I installed apache2, instead of
apache v1.3.

I just tried to access the local copy of my site and I get a 404 Error
from apache2. I couldn't figure out why it did not find the site.
Figuring that it was probably a configuration problem, I looked in
/etc/apache2/apache2.conf. That didn't . So I installed
apache2-doc, but could not view the docs properly. Firefox just
displayed the contents of the files, instead of rendering them. I
decided to give up on apache2, so I purged all of the apache2 packages
and installed apache, apache-doc, and php, along with their
dependencies. This got apache running again, and it will find and
correctly find and render my site (and its own docs), but when I try to
access the lone .php file on my site I get a prompt saying:

You have chosen to open

gallery.php

which is a: PHP File
from http://xander

What should Firefox do with this file?

Then it gives me the option to select a program to open it with, or save
to disk. Obviously, neither of these options is correct. If I save the
file, however, and then look at it, I see that apache has NOT
preprocessed the file, but has served it up as is. Apparently, apache
does not think that php is installed and so is not processing the file.
Then Firefox receives it and it should display it as html. Of course,
since it hasn't been preprocessed by apache Firefox will barf on the php
code embedded in the file, but it should still try to render it,
shouldn't it?

Can anyone me in getting this to work? It all worked fine under
Sarge, but not now, under Etch.

The applicable entries from dpkg -l are:

mns@xander:~$ dpkg -l | grep apache
ii apache 1.3.34-4
versatile, high-performance HTTP server
ii apache-common 1.3.34-4
support files for all Apache webservers
ii apache-doc 1.3.34-4
documentation for the Apache webserver
ii apache2-utils 2.2.3-3.2
utility programs for webservers
ii libapache-mod-php5 5.2.0-8
server-side, HTML-embedded scripting language (apache 1.3 module

--
Marc Shapiro
mshapiro_42@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 22/01/2007, 04h00   #2
Roberto C. Sanchez
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: getting PHP5 to work with apache v1.3 in Etch

On Sun, Jan 21, 2007 at 07:36:17PM -0800, Marc Shapiro wrote:
> Back when I was running Sarge I had apache v1.3 and php5 working just
> fine. I did a clean install when I switched to Etch, instead of using
> 'dist-upgrade.' When I did the install I installed apache2, instead of
> apache v1.3.
>

First, why did you clean install? The dist-upgrade process works
extremely well except in a very small number of corner cases.

> I just tried to access the local copy of my site and I get a 404 Error
> from apache2. I couldn't figure out why it did not find the site.


Second, whenever diagnosing an apache problem, your first stop should be
the error log (either /var/log/apache/error.log or
/var/log/apache2/error.log, depending on which version of apache you are
using).

Regards,

-Roberto

--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFtDYI1snWssAFC08RAvESAKCXiFtmDCSGuJYwd9hhjI jYlomAUgCfYo5u
eAAt5qHVVfZfycAwkED29Yc=
=GC7c
-----END PGP SIGNATURE-----

  Réponse avec citation
Vieux 22/01/2007, 04h00   #3
Marc Shapiro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: getting PHP5 to work with apache v1.3 in Etch (SOLVED)

Marc Shapiro wrote:
> Back when I was running Sarge I had apache v1.3 and php5 working just
> fine. I did a clean install when I switched to Etch, instead of using
> 'dist-upgrade.' When I did the install I installed apache2, instead
> of apache v1.3.
>
> I just tried to access the local copy of my site and I get a 404 Error
> from apache2. I couldn't figure out why it did not find the site.
> Figuring that it was probably a configuration problem, I looked in
> /etc/apache2/apache2.conf. That didn't . So I installed
> apache2-doc, but could not view the docs properly. Firefox just
> displayed the contents of the files, instead of rendering them. I
> decided to give up on apache2, so I purged all of the apache2 packages
> and installed apache, apache-doc, and php, along with their
> dependencies. This got apache running again, and it will find and
> correctly find and render my site (and its own docs), but when I try
> to access the lone .php file on my site I get a prompt saying:
>
> You have chosen to open
>
> gallery.php
>
> which is a: PHP File
> from http://xander
>
> What should Firefox do with this file?
>
> Then it gives me the option to select a program to open it with, or
> save to disk. Obviously, neither of these options is correct. If I
> save the file, however, and then look at it, I see that apache has NOT
> preprocessed the file, but has served it up as is. Apparently, apache
> does not think that php is installed and so is not processing the
> file. Then Firefox receives it and it should display it as html. Of
> course, since it hasn't been preprocessed by apache Firefox will barf
> on the php code embedded in the file, but it should still try to
> render it, shouldn't it?
>
> Can anyone me in getting this to work? It all worked fine under
> Sarge, but not now, under Etch.
>
> The applicable entries from dpkg -l are:
>
> mns@xander:~$ dpkg -l | grep apache
> ii apache 1.3.34-4
> versatile, high-performance HTTP server
> ii apache-common 1.3.34-4
> support files for all Apache webservers
> ii apache-doc 1.3.34-4
> documentation for the Apache webserver
> ii apache2-utils 2.2.3-3.2
> utility programs for webservers
> ii libapache-mod-php5 5.2.0-8
> server-side, HTML-embedded scripting language (apache 1.3 module
>

Sorry for the bandwidth usage. I cleared my chache in Firefox and that
seems to have been all that was needed. The page is now displaying.

--
Marc Shapiro
mshapiro_42@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 22/01/2007, 07h20   #4
Marc Shapiro
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: getting PHP5 to work with apache v1.3 in Etch

Roberto C. Sanchez wrote:
> On Sun, Jan 21, 2007 at 07:36:17PM -0800, Marc Shapiro wrote:
>
>> Back when I was running Sarge I had apache v1.3 and php5 working just
>> fine. I did a clean install when I switched to Etch, instead of using
>> 'dist-upgrade.' When I did the install I installed apache2, instead of
>> apache v1.3.
>>
>>

> First, why did you clean install? The dist-upgrade process works
> extremely well except in a very small number of corner cases.
>

I did a clean install for several reasons. Primarily, I did it do get
rid of all the cruft which had accumulated from many years of installing
and uninstalling packages. I have either moved the hard drive from one
machine to another, or copied the installation from one disk to another
and then moved the new disk, since, IIRC, Bo. I have used dist-upgrades
all along the way and it has, indeed, worked flawlessly. But, there is
a limit to what deborphan can do in keeping a system clean. It can
reliably find libraries that are no longer needed, but non-library
packages installed as dependencies is another problem. That is why I
did a clean install that I could run side-by-side with my old Sarge
install for a few months.

Now, on the Etch install, I switched from using apt-get to using
aptitude right from the start. Since aptitude keeps track of packages
installed only as dependencies it should prevent the future accumulation
of such cruft.

From what I have heard on this list, it may have been a good thing to
do the clean install at this time for other reason, as well. Several
people have reported problems with this particular upgrade. These
problems have mainly been due to the switch from XFree86 to Xorg and the
switch to using udev. By doing a clean install, I didn't have to worry
about these conversions, as the clean install through chroot and
debootstrap simply created an install with the new systems already in place.

As I stated in an earlier followup to my original post, the solution to
my problem was simply clearing the cache in Firefox. Apparently, there
was still a copy of the unprocessed file, from before I got php to
actually work, still in the cache. That was preventing firefox from
properly handling it. It thought that it already had the file, but it
did not know what to do with it. Once the cache was purged, firefox got
a new copy of the file and it was perfectly happy to display this one,
since it was properly preprocessed by apache and php.

--
Marc Shapiro
mshapiro_42@yahoo.com



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  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 16h45.


É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,15410 seconds with 12 queries