Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Oct 2010 07:18:58 +1030
From:      Indexer <indexer@internode.on.net>
To:        Gary Kline <kline@thought.org>
Cc:        Brad Mettee <bmettee@pchotshots.com>, FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: need help with php.
Message-ID:  <BB403FAC-4E36-4677-AD4E-E61A1EA9E1CA@internode.on.net>
In-Reply-To: <20101020203333.GG25310@thought.org>
References:  <20101019033104.GA19320@thought.org> <AANLkTi=_DomZQW4mp4CXqzkA6HmAmT45iDmfVgdGLM5K@mail.gmail.com> <AANLkTinZ-Jf585KeiWy=acEeRuKd3ohJpXygW3gOOg-q@mail.gmail.com> <20101020174953.GE25310@thought.org> <E5173775-2F69-4B83-9A39-6929BBCF7C12@cwis.biz> <20101020200201.GF25310@thought.org> <4CBF4E36.5050905@pchotshots.com> <20101020203333.GG25310@thought.org>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>> Try using "<?php" as your beginning tag.
>=20
> root@ethic:/usr/local/www/apache22/data# php ./test.php
> <? phpinfo(); ?>
> root@ethic:/usr/local/www/apache22/data#=20
>=20
>=20
> 	Hm.  php aimed at "./test.php" just catenates the file.  Does
> 	that tell you anything?
>=20


Yes, it tells me that you cant read properly.

you need to make test.php=20

<?php phpinfo(); ?>=20

THEN you do your php ./test.php command

here ill make it easy for you

echo "<?php phpinfo(); ?>" > test.php ; php test.php

forexample

[williambrown@Mai ~]$ echo "<?php phpinfo(); ?>" > test.php ; php =
test.php
phpinfo()
PHP Version =3D> 5.3.2
.............


most likely the default php config has short tags OFF and it has been =
this way for some time now. It is a good thing because it forces you NOT =
to be lazy, and it avoids issues with other languages that do use <? as =
their only syntax for embedding code (I think asp.net does it)

William Brown

pgp.mit.edu



-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

iQIcBAEBAgAGBQJMv1W9AAoJEHF16AnLoz6Jlh0P/R71ueWi6ah6dD5lzuB8QX+x
97mHleEojPkFElrsYpH+FF6yAngPFa7AkxV3N7sVUS+o7CiQ+ER9m8KuyVPwaTKR
wsaT64pIyW/85221TFVTCryyU4MhQ1kfDc2Q2MF5gEXDfOe14NPnXT+O+gEBUz/g
WWlUr2m54YiQ3G2FaA0e9gyfaHaGLgda4IOC9zsVqGkuJPzDsKi7EiL9aBGDayE5
GHg+TxbUBvmkp6HrT0Amz0xjX7M8PBXi4kB9Jj1PmNQaHnjmStYMK8FPTeZ+R+RP
7Lp9iutqpI5gVfda8msCqFIvzEt7vJOlep0/ucFENoA6Se+mJNkAh8J+OCFXW7bJ
gpmEmVt5MhoEFevvS54GYaBPEUmK//1Oud36sqSLTAYKeLbLCzwJaMaoJQ/afGvM
gAFInwHWlqjbKfYMEJC0mf9+B2Au7zPiuh12dNiyJfxcqG+w5AfYsf3tqBiUBo+t
p8SmH1SFJnCPykF+QFVi9XnLlN6c+iiF3sP9jbBACGU+yny4VyPGtvpU56m7KJTo
WkKHrBMQH8FeuV2BONFxoz+AGzV0I2qOJ7CigJ9Q/1GI175J6KLx1tou9BF2vrsD
exdyUMJJrxUwZKnUSkpW/pAEQ6Pj5q6RkNKgiB2YzgZ6bpDU8fWrNn8ikh0QitD+
+DtSANLQxce32KZUf+9z
=3D0oHb
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BB403FAC-4E36-4677-AD4E-E61A1EA9E1CA>