PHP returns source file instead of processing it
PHP returns source file instead of processing it
am 28.01.2007 16:45:14 von Reinhard Mayr aka Czerwinski
Hello,
I am completely new to PHP, so maybe this is just a beginner's mistake,
but anyway, I would appreciate any advice to cope with the situation.
I installed the windows binaries (5.2.0 installer from
http://www.php.net/downloads.php) on my XP box. To test the installation
of PHP, I use a minimal test script "phpinfo.php":
phpinfo() ?>
When I call "php phpinfo.php", all I get is a dump of the source file but
not the info I should recieve. It seems as if PHP does not process the
file but just prints it.
I tried the same file on my openSUSE Linux system: all fine.
Can somebody please provide a pointer into the right direction to get PHP
running?
Thanks in advance!
Cz.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP returns source file instead of processing it
am 28.01.2007 18:33:45 von Stut
Reinhard Mayr aka Czerwinski wrote:
> I installed the windows binaries (5.2.0 installer from
> http://www.php.net/downloads.php) on my XP box. To test the installation
> of PHP, I use a minimal test script "phpinfo.php":
>
> phpinfo() ?>
>
> When I call "php phpinfo.php", all I get is a dump of the source file
> but not the info I should recieve. It seems as if PHP does not process
> the file but just prints it.
You are using short tags which are disabled by default in that version
of PHP. That is why it's not interpreting the code.
Change to
-Stut
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP returns source file instead of processing it
am 28.01.2007 19:35:50 von Reinhard Mayr aka Czerwinski
Ah, I see...
I found a way to set this globally: =
http://www.thescripts.com/forum/thread3754.html
In a nutshell: php.ini/short_open_tag =3D on
The php.ini file should be located to be found as explained in =
http://at.php.net/manual/en/configuration.php
Thanks for your help!
On Sun, 28 Jan 2007 18:33:45 +0100, Stut wrote:
> Reinhard Mayr aka Czerwinski wrote:
>> I installed the windows binaries (5.2.0 installer from =
>> http://www.php.net/downloads.php) on my XP box. To test the =
>> installation of PHP, I use a minimal test script "phpinfo.php":
>> phpinfo() ?>
>> When I call "php phpinfo.php", all I get is a dump of the source fil=
e =
>> but not the info I should recieve. It seems as if PHP does not proces=
s =
>> the file but just prints it.
>
> You are using short tags which are disabled by default in that version=
=
> of PHP. That is why it's not interpreting the code.
>
> Change to
>
> -Stut
>
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP returns source file instead of processing it
am 28.01.2007 19:39:49 von Stut
Reinhard Mayr aka Czerwinski wrote:
> Ah, I see...
>
> I found a way to set this globally:
> http://www.thescripts.com/forum/thread3754.html
>
> In a nutshell: php.ini/short_open_tag = on
> The php.ini file should be located to be found as explained in
> http://at.php.net/manual/en/configuration.php
Except if/when you move your site to another server you're betting on
them having short tags enabled. Best to type 3 extra characters for each
opening tag now, than having to change them all later. Where software
development is concerned shortcuts are very very rarely worth taking.
-Stut
> Thanks for your help!
>
> On Sun, 28 Jan 2007 18:33:45 +0100, Stut wrote:
>
>> Reinhard Mayr aka Czerwinski wrote:
>>> I installed the windows binaries (5.2.0 installer from
>>> http://www.php.net/downloads.php) on my XP box. To test the
>>> installation of PHP, I use a minimal test script "phpinfo.php":
>>> phpinfo() ?>
>>> When I call "php phpinfo.php", all I get is a dump of the source
>>> file but not the info I should recieve. It seems as if PHP does not
>>> process the file but just prints it.
>>
>> You are using short tags which are disabled by default in that version
>> of PHP. That is why it's not interpreting the code.
>>
>> Change to
>>
>> -Stut
>>
>
>
>
> --Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: PHP returns source file instead of processing it
am 28.01.2007 19:49:38 von Reinhard Mayr aka Czerwinski
I read the cited thread on short tags and I see your point. But I deal =
with a Mantis installation, and it seems as if the scripts were deployed=
=
with short tags...
For those of you who are interested in following these Mantis issues:
http://mantis.phplist.com/view.php?id=3D1175
http://mantis.phplist.com/view.php?id=3D6419
http://mantis.phplist.com/bug_view_advanced_page.php?bug_id= 3D6682
Cheers,
Cz.
On Sun, 28 Jan 2007 19:39:49 +0100, Stut wrote:
> Reinhard Mayr aka Czerwinski wrote:
>> Ah, I see...
>> I found a way to set this globally: =
>> http://www.thescripts.com/forum/thread3754.html
>> In a nutshell: php.ini/short_open_tag =3D on
>> The php.ini file should be located to be found as explained in =
>> http://at.php.net/manual/en/configuration.php
>
> Except if/when you move your site to another server you're betting on =
=
> them having short tags enabled. Best to type 3 extra characters for ea=
ch =
> opening tag now, than having to change them all later. Where software =
=
> development is concerned shortcuts are very very rarely worth taking.
>
> -Stut
>
>> Thanks for your help!
>> On Sun, 28 Jan 2007 18:33:45 +0100, Stut wrote:
>>
>>> Reinhard Mayr aka Czerwinski wrote:
>>>> I installed the windows binaries (5.2.0 installer from =
>>>> http://www.php.net/downloads.php) on my XP box. To test the =
>>>> installation of PHP, I use a minimal test script "phpinfo.php":
>>>> phpinfo() ?>
>>>> When I call "php phpinfo.php", all I get is a dump of the source =
>>>> file but not the info I should recieve. It seems as if PHP does not=
=
>>>> process the file but just prints it.
>>>
>>> You are using short tags which are disabled by default in that versi=
on =
>>> of PHP. That is why it's not interpreting the code.
>>>
>>> Change to
>>>
>>> -Stut
>>>
>> --Using Opera's revolutionary e-mail client: =
>> http://www.opera.com/mail/
>> -- PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
-- =
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php