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 > Can't execute PHP script
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Can't execute PHP script

Réponse
 
LinkBack Outils de la discussion
Vieux 08/09/2007, 20h55   #1
Randy Patterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can't execute PHP script

Hey,

[Note:] This is a different problem from the one I posted earlier today.

I can't get my LAMP server setup to run PHP script.

As returned by apache2ctl, I am running;

Apache/2.2.4 (Debian) PHP/5.2.3-1+b1

I point my browser to;

http://localhost/apache2-default/test.php

The file test.php contains this code;

<html><body>
<h1>PHP Test</h1>
<br />
<?php print "Hello World!"; ?>
</body></html>

The browser outputs only;

PHP Test

But the script doesn't get executed. I posted this problem on debian-users,
[because I installed apache2/php5 via debian packages], without any results.
Thought I would try here before finding an apache list. Although I have
programed in PHP off and on for a while I am a newbie to the setup side of
things. Hopefully someone could point me in the right direction to trouble
shoot this.

Thanks,
Randy
  Réponse avec citation
Vieux 08/09/2007, 22h15   #2
Børge Holen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Can't execute PHP script

as previously stated...

give us the printout of:
dpkg -l|grep apache
dpkg -l|grep php



On Saturday 08 September 2007 14:55, Randy Patterson wrote:
> Hey,
>
> [Note:] This is a different problem from the one I posted earlier today.
>
> I can't get my LAMP server setup to run PHP script.
>
> As returned by apache2ctl, I am running;
>
> Apache/2.2.4 (Debian) PHP/5.2.3-1+b1
>
> I point my browser to;
>
> http://localhost/apache2-default/test.php
>
> The file test.php contains this code;
>
> <html><body>
> <h1>PHP Test</h1>
> <br />
> <?php print "Hello World!"; ?>
> </body></html>
>
> The browser outputs only;
>
> PHP Test
>
> But the script doesn't get executed. I posted this problem on debian-users,
> [because I installed apache2/php5 via debian packages], without any
> results. Thought I would try here before finding an apache list. Although I
> have programed in PHP off and on for a while I am a newbie to the setup
> side of things. Hopefully someone could point me in the right direction to
> trouble shoot this.
>
> Thanks,
> Randy

  Réponse avec citation
Vieux 08/09/2007, 23h21   #3
brian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Can't execute PHP script

Randy Patterson wrote:
> Hey,
>
> [Note:] This is a different problem from the one I posted earlier today.
>
> I can't get my LAMP server setup to run PHP script.
>
> As returned by apache2ctl, I am running;
>
> Apache/2.2.4 (Debian) PHP/5.2.3-1+b1
>
> I point my browser to;
>
> http://localhost/apache2-default/test.php
>
> The file test.php contains this code;
>
> <html><body>
> <h1>PHP Test</h1>
> <br />
> <?php print "Hello World!"; ?>
> </body></html>
>
> The browser outputs only;
>
> PHP Test
>


Check in your httpd.conf that you have all of the following:

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php
AddType text/html php

Make sure they're in there and uncommented. And that you restart httpd.

brian
  Réponse avec citation
Vieux 09/09/2007, 09h27   #4
Børge Holen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Can't execute PHP script

On Saturday 08 September 2007 17:21, brian wrote:
> Randy Patterson wrote:
> > Hey,
> >
> > [Note:] This is a different problem from the one I posted earlier today.
> >
> > I can't get my LAMP server setup to run PHP script.
> >
> > As returned by apache2ctl, I am running;
> >
> > Apache/2.2.4 (Debian) PHP/5.2.3-1+b1
> >
> > I point my browser to;
> >
> > http://localhost/apache2-default/test.php
> >
> > The file test.php contains this code;
> >
> > <html><body>
> > <h1>PHP Test</h1>
> > <br />
> > <?php print "Hello World!"; ?>
> > </body></html>
> >
> > The browser outputs only;
> >
> > PHP Test

>
> Check in your httpd.conf that you have all of the following:
>
> LoadModule php5_module modules/libphp5.so
> AddHandler php5-script php
> AddType text/html php
>
> Make sure they're in there and uncommented. And that you restart httpd.


no he should not. this resides within the php5.load file.
He must symlink his files.
Debian does not utilize httpd.conf for any specific reason since apache2, it's
just there for compability reasons

>
> brian

  Réponse avec citation
Vieux 09/09/2007, 15h32   #5
brian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Can't execute PHP script

Børge Holen wrote:
> On Saturday 08 September 2007 17:21, brian wrote:
>
>>Randy Patterson wrote:
>>
>>>Hey,
>>>
>>>[Note:] This is a different problem from the one I posted earlier today.
>>>
>>>I can't get my LAMP server setup to run PHP script.
>>>
>>>As returned by apache2ctl, I am running;
>>>
>>>Apache/2.2.4 (Debian) PHP/5.2.3-1+b1
>>>
>>>I point my browser to;
>>>
>>>http://localhost/apache2-default/test.php
>>>
>>>The file test.php contains this code;
>>>
>>><html><body>
>>><h1>PHP Test</h1>
>>><br />
>>><?php print "Hello World!"; ?>
>>></body></html>
>>>
>>>The browser outputs only;
>>>
>>>PHP Test

>>
>>Check in your httpd.conf that you have all of the following:
>>
>>LoadModule php5_module modules/libphp5.so
>>AddHandler php5-script php
>>AddType text/html php
>>
>>Make sure they're in there and uncommented. And that you restart httpd.

>
>
> no he should not. this resides within the php5.load file.
> He must symlink his files.
> Debian does not utilize httpd.conf for any specific reason since apache2, it's
> just there for compability reasons
>
>
>>brian

>
>


Oh, right--Debian. My bad.
  Réponse avec citation
Vieux 10/09/2007, 02h47   #6
Randy Patterson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [PHP] Can't execute PHP script

On Saturday 08 September 2007 16:15, Børge Holen wrote:
> as previously stated...
>
> give us the printout of:
> dpkg -l|grep apache
> dpkg -l|grep php
>
> On Saturday 08 September 2007 14:55, Randy Patterson wrote:
> > Hey,
> >
> > [Note:] This is a different problem from the one I posted earlier today.
> >
> > I can't get my LAMP server setup to run PHP script.
> >
> > As returned by apache2ctl, I am running;
> >
> > Apache/2.2.4 (Debian) PHP/5.2.3-1+b1
> >
> > I point my browser to;
> >
> > http://localhost/apache2-default/test.php
> >
> > The file test.php contains this code;
> >
> > <html><body>
> > <h1>PHP Test</h1>
> > <br />
> > <?php print "Hello World!"; ?>
> > </body></html>
> >
> > The browser outputs only;
> >
> > PHP Test
> >
> > But the script doesn't get executed. I posted this problem on
> > debian-users, [because I installed apache2/php5 via debian packages],
> > without any results. Thought I would try here before finding an apache
> > list. Although I have programed in PHP off and on for a while I am a
> > newbie to the setup side of things. Hopefully someone could point me in
> > the right direction to trouble shoot this.
> >
> > Thanks,
> > Randy


Here they are;

dpkg -l|grep apache
ii apache2 2.2.4-3 Next
generation, scalable, extendable web se
ii apache2-doc 2.2.4-3 documentation
for apache2
ii apache2-mpm-prefork 2.2.4-3 Traditional
model for Apache HTTPD
ii apache2-utils 2.2.4-3 utility
programs for webservers
ii apache2.2-common 2.2.4-3 Next
generation , scalable, extendable web se
ii libapache2-mod-php5 5.2.3-1+b1 server-side,
HT ML-embedded scripting languag

dpkg -l|grep php
ii libapache2-mod-php5 5.2.3-1+b1 server-side,
HTML-embedded scripting languag
ii php5 5.2.3-1 server-side,
HTML-embedded scripting languag
ii php5-common 5.2.3-1+b1 Common files
for packages built from the php
ii php5-mysql 5.2.3-1+b1 MySQL module
for php5

Thanks,
Randy
  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 12h18.


Édité par : vBulletin® version 3.7.2
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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13817 seconds with 14 queries