Re: [ubuntu-uk] 6.10 Apache2/PHP problem: You have chosen to open [blank] which is a: PHTML file

2007-02-07 Thread Pat

On 07/02/07, David M <[EMAIL PROTECTED]> wrote:


When I try to open a PHP URL, I get the following error (in Firefox):

eg, for http://localhost/, where the implied index URL is served via
PHP:

You have to chosen to open
[blank line]
which is a: PHTML file



I would check that you have mod-php installed for the right version of
Apache & the right version of PHP (so probably libapache2-mod-php5 or
somesuch.)

Also check that in /etc/apache2/mods-enabled/ you have php5.load &
php5.confconfigured correctly.

If everything looks OK, (which it probably will, because of the magic of
apt-get) try clearing the cache of the browser - this one had me stumped for
ages.


Whenever I try to restart Apache2 (using apache2ctl), I also get the

following error:

apache2: Could not determine the server's fully qualified domain name,
using 127.0.0.1 for ServerName

I've read the Apache docs about 'ServerName' but I'm not sure where this
directive should actually *go* (or what form, exactly, it should take
for this installation).



I don't know if it's the "right" place, but I put a line:-

ServerName localhost

on the first line of /etc/apache2/sites-enabled/000-default

It gets rid of the irritating message, anyway!
-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/


Re: [ubuntu-uk] 6.10 Apache2/PHP problem: You have chosen to open [blank] which is a: PHTML file

2007-02-07 Thread James Tuthill
Hi David,

Although someone might be able to help you here, I would highly 
recommend using an apache / php specific help forum or chatroom.

#apache on the freenode irc network is brilliant  for debugging and 
decoding error messages.

or a forum for bigger questions is here:

http://www.phpfreaks.com/forums/

Hope that help,
Thanks,

James







David M wrote:
> [Apologies if this is a double-post, gmane seemed to hiccup when first 
> trying to post..]
>
>
> I've just installed Apache 2 and PHP (using the Ubuntu 6.10 packages) on 
> my computer to test websites locally.
>
> Apache seems to work fine, but PHP doesn't. It doesn't seem to make any 
> difference whether I install PHP4 (preferred, matches my ISP) or PHP5.
>
> When I try to open a PHP URL, I get the following error (in Firefox):
>
> eg, for http://localhost/, where the implied index URL is served via 
> PHP:
>
> You have to chosen to open
> [blank line]
> which is a: PHTML file
>
>
> If I explicitly supply the name (index.php) or try to open any other 
> named PHP URL, the error is similar, except the blank line is replaced 
> by the 'filename', and the final line is:
> "which is a: PHP script" (ie, slightly different)
>
>
> Whenever I try to restart Apache2 (using apache2ctl), I also get the 
> following error:
>
> apache2: Could not determine the server's fully qualified domain name, 
> using 127.0.0.1 for ServerName
>
> I've read the Apache docs about 'ServerName' but I'm not sure where this 
> directive should actually *go* (or what form, exactly, it should take 
> for this installation). 
>
> So far, I've configured (minimally) my webserver by hacking the 
> sites-available/default configuration, which starts with the following:
>
> NameVirtualHost *
> 
>
> These obviously don't explicitly state the name of the computer, so I'm 
> wondering what changes I need to make, if any, and whether this affects 
> the PHP problem.
>
>
> I did a web search, and this seems to be a problem experienced by 
> various other people, but unfortunately there don't seem to be any 
> responses stating how to resolve it... :-(
>
>
> Thanks for any advice,
>
>
> David.
>
>   


-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/


[ubuntu-uk] 6.10 Apache2/PHP problem: You have chosen to open [blank] which is a: PHTML file

2007-02-07 Thread David M

[Apologies if this is a double-post, gmane seemed to hiccup when first 
trying to post..]


I've just installed Apache 2 and PHP (using the Ubuntu 6.10 packages) on 
my computer to test websites locally.

Apache seems to work fine, but PHP doesn't. It doesn't seem to make any 
difference whether I install PHP4 (preferred, matches my ISP) or PHP5.

When I try to open a PHP URL, I get the following error (in Firefox):

eg, for http://localhost/, where the implied index URL is served via 
PHP:

You have to chosen to open
[blank line]
which is a: PHTML file


If I explicitly supply the name (index.php) or try to open any other 
named PHP URL, the error is similar, except the blank line is replaced 
by the 'filename', and the final line is:
"which is a: PHP script" (ie, slightly different)


Whenever I try to restart Apache2 (using apache2ctl), I also get the 
following error:

apache2: Could not determine the server's fully qualified domain name, 
using 127.0.0.1 for ServerName

I've read the Apache docs about 'ServerName' but I'm not sure where this 
directive should actually *go* (or what form, exactly, it should take 
for this installation). 

So far, I've configured (minimally) my webserver by hacking the 
sites-available/default configuration, which starts with the following:

NameVirtualHost *


These obviously don't explicitly state the name of the computer, so I'm 
wondering what changes I need to make, if any, and whether this affects 
the PHP problem.


I did a web search, and this seems to be a problem experienced by 
various other people, but unfortunately there don't seem to be any 
responses stating how to resolve it... :-(


Thanks for any advice,


David.

-- 
David M. -- Edinburgh, Scotland. -- [en,fr,(de) <-- corrections welcome]
*Please trim quotes not needed for context,  and interleave reply text.*
*On-list replies preferred.  Please don't also cc: list messages to me!*
*Filter triggers: No-context, excess-quoting, slug-trails, zero-content*

-- 
ubuntu-uk@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-uk
https://wiki.kubuntu.org/UKTeam/