PHP 4 and "<?php" 
Author Message
 PHP 4 and "<?php"

Hi all,

I have installed PHP 4.2.3 along with Apache 2.0.43 on my Linux box.
The problem I'm running into, is that apparently, the good old "<?php"
tag isn't recognized anymore: only "<?" alone works.

That may be kind of a FAQ, but that's really annoying. It breaks a lot
of older PHP scripts. In particular, I'm using a forum-thing (phpBB2)
which doesn't work anymore because of that, and replacing every instance
of "<?php" with "<?" is a hassle.

Is there a simple way of solving this issue? (I mean besides going back
to an older PHP version)

Thanks,



Mon, 30 May 2005 07:28:10 GMT  
 PHP 4 and "<?php"

Quote:

>I have installed PHP 4.2.3 along with Apache 2.0.43 on my Linux box.
>The problem I'm running into, is that apparently, the good old "<?php"
>tag isn't recognized anymore: only "<?" alone works.

>That may be kind of a FAQ, but that's really annoying. It breaks a lot
>of older PHP scripts. In particular, I'm using a forum-thing (phpBB2)
>which doesn't work anymore because of that, and replacing every instance
>of "<?php" with "<?" is a hassle.

>Is there a simple way of solving this issue? (I mean besides going back
>to an older PHP version)

Could it be that the tag wasn't capitalized?  It shouldn't be case sensitive,
but one never knows (until one actually traces the source code, of course).

Many people who write their own web pages directly will capitalize HTML tags and
such - as a style preference - to make it easier to distinguish directives from
displayable text.

What I really hate is those who hand out pages with just "<?" in them, assuming
that everyone else has the opening tag abbreviation option enabled.  That's just
sloppy coding.



Mon, 30 May 2005 08:12:09 GMT  
 PHP 4 and "<?php"
Hi

I'm new to PHP and Apache and, although my machine is down ay the moment so
I can't check, I assume I've still got the latest versions of both. I
definately have a flavour of PHP 4. which is strange since I've had no
problem with

<?php
?>

The only obvious difference is that I'm running under Windows ME but I'd be
suprised if that's the isue.

So the good news is you can use <?php, the bad news is you have to figure
out why your configuration doesn't like it and I'm to inexperienced to help
there I'm afraid.

Good Luck

Andy

Quote:
> Hi all,

> I have installed PHP 4.2.3 along with Apache 2.0.43 on my Linux box.
> The problem I'm running into, is that apparently, the good old "<?php"
> tag isn't recognized anymore: only "<?" alone works.

> That may be kind of a FAQ, but that's really annoying. It breaks a lot
> of older PHP scripts. In particular, I'm using a forum-thing (phpBB2)
> which doesn't work anymore because of that, and replacing every instance
> of "<?php" with "<?" is a hassle.

> Is there a simple way of solving this issue? (I mean besides going back
> to an older PHP version)

> Thanks,



Mon, 30 May 2005 17:11:11 GMT  
 PHP 4 and "<?php"

internet.fr:

Quote:
> Hi all,

> I have installed PHP 4.2.3 along with Apache 2.0.43 on my Linux box.
> The problem I'm running into, is that apparently, the good old "<?php"
> tag isn't recognized anymore: only "<?" alone works.

> That may be kind of a FAQ, but that's really annoying. It breaks a lot
> of older PHP scripts. In particular, I'm using a forum-thing (phpBB2)
> which doesn't work anymore because of that, and replacing every instance
> of "<?php" with "<?" is a hassle.

> Is there a simple way of solving this issue? (I mean besides going back
> to an older PHP version)

What a strange problem. I think it must be the combination of your version
and Apache 2, because the PHP tags still are the same. Perhaps more info on
your PHP/Apache config would help? And check the PHP buglist.

KAH



Mon, 30 May 2005 22:06:50 GMT  
 PHP 4 and "<?php"
I know that the acceptance of "<?" is determined by a php.ini switch, but I
was under the impression that "<?php" was always accepted.  In fact,
because XML abuses the same "<?" token, I always use "<?php" and have done
so with no problems for years.
Quote:

> Hi

> I'm new to PHP and Apache and, although my machine is down ay the moment
> so I can't check, I assume I've still got the latest versions of both. I
> definately have a flavour of PHP 4. which is strange since I've had no
> problem with

> <?php
> ?>

> The only obvious difference is that I'm running under Windows ME but I'd
> be suprised if that's the isue.

> So the good news is you can use <?php, the bad news is you have to figure
> out why your configuration doesn't like it and I'm to inexperienced to
> help there I'm afraid.

> Good Luck



Mon, 30 May 2005 23:42:31 GMT  
 PHP 4 and "<?php"

Quote:


>internet.fr:

>> I have installed PHP 4.2.3 along with Apache 2.0.43 on my Linux box.
>> The problem I'm running into, is that apparently, the good old "<?php"
>> tag isn't recognized anymore: only "<?" alone works.

>> That may be kind of a FAQ, but that's really annoying. It breaks a lot
>> of older PHP scripts. In particular, I'm using a forum-thing (phpBB2)
>> which doesn't work anymore because of that, and replacing every instance
>> of "<?php" with "<?" is a hassle.

>> Is there a simple way of solving this issue? (I mean besides going back
>> to an older PHP version)

>What a strange problem. I think it must be the combination of your version
>and Apache 2, because the PHP tags still are the same. Perhaps more info on
>your PHP/Apache config would help? And check the PHP buglist.

Could it be that something is wrong with the PHP interfaces into your apache
configuration file  (e.g. addhandler and file "extensions")?


Tue, 31 May 2005 08:18:08 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. gtcatalog (was: "Re: Simple, customizable PHP shopping cart?", but google made me change it)

2. form posting to php "problem"

3. Wrox Press publishes "PHP String Handbook"

4. php equv of "pwd"

5. PHP is "one screen behind"

6. header("Location: hello.php?a=b")

7. TCL equivalent of PHP "phpinfo()"?

8. "<<" operators

9. exec, "<<" and binary data

10. Weird "<<" vs "<"

11. php function "addslashes" / "removeslashes" in python

12. How to do PHP "require()" or TCL "source" in bash script

 

 
Powered by phpBB® Forum Software