php version

I am on a Mac powerpc running Tiger 10.4.10.

When I run php -v at a command line I get a response that indicates
that I am running php 4.4.4.

However, when I run <?php phpinfo() ?> on localhost on my machine from
within a php file, I am told I am running version 5.0.4.

Anyone know why the discrepancy? I was under the impression that I
had installed php 5.

--Kenoli
kenoli [ So, 24 Juni 2007 15:31 ] [ ID #1747362 ]

Re: php version

kenoli wrote:
> I am on a Mac powerpc running Tiger 10.4.10.
>
> When I run php -v at a command line I get a response that indicates
> that I am running php 4.4.4.
>
> However, when I run <?php phpinfo() ?> on localhost on my machine from
> within a php file, I am told I am running version 5.0.4.
>
> Anyone know why the discrepancy? I was under the impression that I
> had installed php 5.

You have both installed, the php binary you have (I assume that could be in
/usr/bin/), is the php4, while the module you have for apache (assuming it's
in /etc/apache2/) is from php5.


--

//Aho
Shion [ So, 24 Juni 2007 15:41 ] [ ID #1747363 ]

Re: php version

On Jun 24, 6:41 am, "J.O. Aho" <u... [at] example.net> wrote:
> kenoli wrote:
> > I am on a Mac powerpc running Tiger 10.4.10.
>
> > When I run php -v at a command line I get a response that indicates
> > that I am running php 4.4.4.
>
> > However, when I run <?php phpinfo() ?> on localhost on my machine from
> > within a php file, I am told I am running version 5.0.4.
>
> > Anyone know why the discrepancy? I was under the impression that I
> > had installed php 5.
>
> You have both installed, the php binary you have (I assume that could be in
> /usr/bin/), is the php4, while the module you have for apache (assuming it's
> in /etc/apache2/) is from php5.
>
> --
>
> //Aho

Thanks. I finally figured this out, too. If I change my environment
variable for my shell so it points to my php5 version, am I doing
anything that will interfere with system level stuff like sendmail
that may still be associated with the version in /usr/bin/ ?

What brought all of this up is an interest in checking out Symfony,
which is based on php5.

--Kenoli
kenoli [ So, 24 Juni 2007 18:50 ] [ ID #1747364 ]

Re: php version

kenoli wrote:

> Thanks. I finally figured this out, too. If I change my environment
> variable for my shell so it points to my php5 version, am I doing
> anything that will interfere with system level stuff like sendmail
> that may still be associated with the version in /usr/bin/ ?

You can always make a symlink, after you removed the old php

ln -s /where/your/current/php /usr/bin/php

As long as you don't use anything that uses nusope, you don't need the php4,
if you happen to have something using nusope, then you need to rename a few of
the classes/functions, as the one in php5 has same names.


--

//Aho
Shion [ So, 24 Juni 2007 19:02 ] [ ID #1747366 ]
PHP » alt.php » php version

Vorheriges Thema: Date functions Months / Years Months between two dates.
Nächstes Thema: Parsing a php include (which also contains php code) - or "Reparsing" the php file