From: e-letter on
On 18/08/2010, Bob McConnell <rvm(a)cbord.com> wrote:
> From: e-letter
>
>> On 18/08/2010, chris h <chris404(a)gmail.com> wrote:
>>> On Wed, Aug 18, 2010 at 7:10 AM, e-letter <inpost(a)gmail.com> wrote:
>>>
>>>> On 18/08/2010, chris h <chris404(a)gmail.com> wrote:
>>>> > What are the actual file permissions when you run ls -o?
>>>> >
>>>> root
>>>>
>>>
>>> What's the entire output of ls -o?
>>>
>> [root(a)localhost html]# ls -o *
>> -rwxr-xr-x 1 root 182 2010-08-18 11:33 test.php*
>>
>> addon-modules:
>> total 4
>> lrwxrwxrwx 1 root 51 2010-01-11 22:03 apache-mod_svn_view-0.1.0 ->
>> ../../../../usr/share/doc/apache-mod_svn_view-0.1.0
>> lrwxrwxrwx 1 root 52 2010-01-11 22:03 apache-mod_transform-0.6.0 ->
>> ../../../../usr/share/doc/apache-mod_transform-0.6.0
>> -rw-r--r-- 1 root 115 2007-09-07 21:47 HOWTO_get_modules.html
>>
>>>
>>>> >
>>>> > Do you know if PHP is installed as an apache mod or cgi? Also you
> might
>>>> > check what user apache is running as.
>>>> >
>>>> No. How to verify?
>>>>
>>>> > possibly...
>>>> > $ vi /etc/apache2/envvars
>>>> >
>>>> No apache2 on my computer, only '/usr/lib/apache' which contains
> only .so
>>>> files.
>>>>
>>>
>>> there's no /etc/apache either?
>>>
>> No
>
> Some distributions have really screwed up the locations of various
> applications. This is compounded by the decision to rename the Apache 2
> directories to httpd. Look for /etc/httpd, /home/httpd or
> /usr/lib/httpd. If worse comes to worst, try
>
In '/etc/httpd/conf' there is an empty directory 'addon-modules'. In
/usr/lib/apache-extramodules there is 'mod_php5.so'.
From: e-letter on
On 19/08/2010, David McGlone <david(a)dmcentral.net> wrote:

> Yes it is. But your computer needs the correct software to view that php
> file in a web browser as if it was a web page. If you do not have this
> software installed, then the web browser will ask you if you want to
> download the file instead.
>
The web browser views the php file as described previously; there is
no prompt to download the file.
From: "Bob McConnell" on
From: e-letter

> On 19/08/2010, David McGlone <david(a)dmcentral.net> wrote:
>
>> Yes it is. But your computer needs the correct software to view that
php
>> file in a web browser as if it was a web page. If you do not have
this
>> software installed, then the web browser will ask you if you want to
>> download the file instead.
>>
> The web browser views the php file as described previously; there is
> no prompt to download the file.

David,

If the server is set up correctly, it interprets the PHP code and only
sends an HTML stream to the browser. The only way the browser would see
PHP is if the server is misconfigured. The browser will simply display
it as it would HTML. It doesn't know PHP from plain text. Actually, the
browser could not process PHP, since most of the resources needed are
still on the server.

Bob McConnell
From: e-letter on
On 19/08/2010, David McGlone <david(a)dmcentral.net> wrote:
> On Wed, 2010-08-18 at 23:08 +0100, e-letter wrote:
>> On 18/08/2010, David McGlone <david(a)dmcentral.net> wrote:
>> > On Wed, 2010-08-18 at 21:54 +0100, e-letter wrote:
>> >> On 18/08/2010, David McGlone <david(a)dmcentral.net> wrote:
>> >> >
>> >> > Do you have php5 installed?
>> >> >
>> >> Yes, but don't know how to confirm; I used urpmi to install.
>> >
>> > Use the command in a terminal: rpm -q php5
>> >
>> No package by this name in the repository; have libphp5_common5 installed.
>
> Ok let me ask you this, When you try to view a php file on your server
> does it ask you if you would like to download it?

I don't understand: isn't the example I provided a php file?
From: Colin Guthrie on
'Twas brillig, and e-letter at 19/08/10 13:35 did gyre and gimble:
> On 19/08/2010, David McGlone <david(a)dmcentral.net> wrote:
>
>> Yes it is. But your computer needs the correct software to view that php
>> file in a web browser as if it was a web page. If you do not have this
>> software installed, then the web browser will ask you if you want to
>> download the file instead.
>>
> The web browser views the php file as described previously; there is
> no prompt to download the file.
>

You are apparently using Mandriva as you mentioned urpmi in your
original email.

I strongly suggest you do: "urpmi task-lamp" as this will install all
the revenant packages.

I strongly suspect you have not installed the apache-mod_php package.


I should stress that you should *not* have to edit *any* files to get
your system up and running. If you do edit files (especially your apache
configuration) then you really do need to sit down and learn how
everything works and how things fit together.

As you're presumably just starting out, I'd recommend sticking to the
basics, install task-lamp and then go from there.


HTHs

Col




--

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mandriva Linux Contributor [http://www.mandriva.com/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]