Re: Could not display PHP file
| From: | Joseph Lee | Date: | Fri, 08 Jul 2005 19:16:18 +0000 |
| Subject: | Re: Could not display PHP file | ||
| References: | 1 | Groups: | php.install |
| Request: | Send a blank email to php-install+get-16466@lists.php.net to get a copy of this message | ||
Hi,
I found out that I needed to add the following 2 lines
to httpd.conf:
LoadModule php5_module modules/libphp5.so
AddType application/x-httpd-php .php
Now it's working fine. Thank you all for your help.
Joe
--- Joseph Lee <joe_sun_lee@yahoo.com> wrote:
> I added
> AddType application/x-httpd-php .php
> to httpd.conf, and did
> # /usr/local/apache2/bin/httpd -k stop
> # /usr/local/apache2/bin/httpd -k graceful
> to restart httpd, but it asked me what application
> do
> I want use, or save the file to disk.
>
> I also changed
> <?php echo "hello PHP" ?>
> to
> <?php echo "hello PHP"; ?>
> but it did hot help.
>
> I also tried to use
> AddType text/x-httpd-php .php
> AddOutputFilter INCLUDES .php
> in httpd.conf, but it did not help, either.
>
> Any more help?
>
> Thanks,
> Joe
>
> --- Brad Kowalczyk <brad@ibiscode.com> wrote:
>
> > Joseph Lee wrote:
> > > Hello,
> > >
> > > I installed PHP5 and MySQL on my Linux machine
> > running
> > > Apache web server. I could access this server
> from
> > > another computer by http://(hostname)/index.html
> > >
> > > Then I created a simple hello.php file:
> > > <html>
> > > ....
> > > <?php echo "hello" ?>
> > > ....
> > > </html>
> > >
> > > But when I tried http://(hostname)/hello.php
> from
> > > another computer, it just displayed this
> original
> > text
> > > file, not "hello" in a browser.
> > >
> > > Is it an installation problem? How can I check
> it?
> > >
> > > Thanks,
> > > Joe
> > >
> >
> > Hi Joe,
> >
> > you need to make sure the following line is in
> > httpd.conf:
> > AddType application/x-httpd-php .php
> >
> >
> > --
> > Brad Kowalczyk
> > Web Developer
> > www.ibiscode.com
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com