473,799 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

'<?' versus '<?php'

Hi folks,

I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!

The sysadmins could not say why this was but suggested it was a PHP5
thing.

So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.

Thanks for any advice,

JG
Oct 23 '08
14 1570
jerrygarciuh wrote:
On Oct 23, 3:42 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
>jerrygarciuh wrote:
>>Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.

Off is recommended because the short tag can cause problems with xml,
which uses the same tags.

It also means you can't use the <?= syntax.

On Apache, you can override this in your .htaccess file, if the host
allows it.

--
============== ====
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attg lobal.net
============== ====

Thanks Jerry! You are always the man with the answers in clphp! If
you find yourself in New Orleans I owe you some beers!

JG
Ah, yes, New Orleans. One of my favorite cities. Is Pat O'Brians back
in business after Katrina? :-)

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attgl obal.net
=============== ===

Oct 24 '08 #11
On Oct 23, 6:49 pm, FutureShock <futuresho...@a tt.netwrote:
Jerry Stuckle wrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.

I think what is really disturbing is he stated that his sysadmins did
not know what the problem was.

I guess one could argue that this is a programming question, not a
sysadmin question. Though that is not a sysadmin I'd want on any of my
projects.

Oct 24 '08 #12
On Oct 23, 8:48 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
jerrygarciuh wrote:
On Oct 23, 3:42 pm, Jerry Stuckle <jstuck...@attg lobal.netwrote:
jerrygarciuh wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
Thanks Jerry! You are always the man with the answers in clphp! If
you find yourself in New Orleans I owe you some beers!
JG

Ah, yes, New Orleans. One of my favorite cities. Is Pat O'Brians back
in business after Katrina? :-)

--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@attgl obal.net
=============== ===
I don't think Pat O's was ever out of business! ;-)
Oct 24 '08 #13
lawrence k wrote:
On Oct 23, 6:49 pm, FutureShock <futuresho...@a tt.netwrote:
>Jerry Stuckle wrote:
>>jerrygarciu h wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
I think what is really disturbing is he stated that his sysadmins did
not know what the problem was.


I guess one could argue that this is a programming question, not a
sysadmin question. Though that is not a sysadmin I'd want on any of my
projects.
Thats what I was thinking. But I suppose it happens.
Oct 25 '08 #14
lawrence k wrote:
On Oct 23, 6:49 pm, FutureShock <futuresho...@a tt.netwrote:
>Jerry Stuckle wrote:
>>jerrygarciu h wrote:
Hi folks,
I recently ran into a PHP5 install that rejects the idiom, <? // code ?
and in fact renders that in the output that is sent to the browser.
Yikes!
The sysadmins could not say why this was but suggested it was a PHP5
thing.
So my question to you: is <?php going to become required? And if it
is will we not be allowed to echo by the shorthand <?php=$foo? as we
used to <?=$bar?? As that was broken too.
Thanks for any advice,
JG
This is PHP short_open_tag setting in your php.ini file. In PHP5 it is
set to off.
Off is recommended because the short tag can cause problems with xml,
which uses the same tags.
It also means you can't use the <?= syntax.
On Apache, you can override this in your .htaccess file, if the host
allows it.
I think what is really disturbing is he stated that his sysadmins did
not know what the problem was.


I guess one could argue that this is a programming question, not a
sysadmin question. Though that is not a sysadmin I'd want on any of my
projects.
Although I have no sys admin experience, I would think any decent sys
admin should understand how to appropriately configure software on the
server(s) for which they are responsible. The apparent lack of
adeptness of the OP's sys admins does not bode well for future problems.

Also, it seems as if at least some minimal programming experience
overlaps, in that they should probably know how to write shell/batch
scripts. Perl is also popular among sys admins, from what I've read...
--
Curtis
Oct 25 '08 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2381
by: Jonny T | last post by:
hi, i want to echo the string '<?php' in a php script like : echo "<?php"; but when i try nothing gets displayed ... if I use echo "<\?php";
4
2432
by: Preslopsky | last post by:
I am currently evaluating what language I should use to create a web interface to some of our databases. I am purely in the fact finding stage at this point, having no website nor database set up yet. This is sort of a new area for me, so I am looking for some advice. Part of our organization has Cold Fusion running on its web server. It would really be no problem for me to build an application there for some of the "public" verisions...
6
8712
by: Kevin | last post by:
Hi! I recently completed a graduate level Java class at a local university. For our class project my group built a web-based application. Basically, the application would let a manufacturing company sell any 'extra' inventory to any authorized user via the internet. The users could log in, view the inventory available, and make a bid on any of the inventory available. At the end of the day, the highest bidder 'wins' that inventory and...
15
122167
by: Gérard Talbot | last post by:
Hello all, I'd like to know and understand the difference between, say, <img src="/ImageFilename.png" width="123" height="456" alt=""> and <img src="/ImageFilename.png" style="width: 123px; height: 456px;" alt="">
1
4282
by: jason | last post by:
Pardon the newbie question... What's the difference between (asp.net)VB code inside one versus the other. And why have both?
14
3163
by: Michael | last post by:
Since the include function is called from within a PHP script, why does the included file have to identify itself as a PHP again by enclosing its code in <?php... <?> One would assume that the PHP interpreter works like any other, that is, it first expands all the include files, and then parses the resulting text. Can anyone help with an explanation? Thanks, M. McDonnell
3
1586
by: news.microsoft.com | last post by:
PHP versus Microsoft ASP.net - A Straightforward Comparison "I do ask that you read this article with an open mind, and consider that it is quite possible that PHP is no better or worse than ASP.net. I have become weary of the whole PHP is superior to ASP.net debate. I believe after reading you may find that ASP.net has a lot to offer you as a developer, maybe more so than PHP. We as business persons evaluate technology based on...
8
1729
by: news.microsoft.com | last post by:
PHP versus Microsoft ASP.net - A Straightforward Comparison "I do ask that you read this article with an open mind, and consider that it is quite possible that PHP is no better or worse than ASP.net. I have become weary of the whole PHP is superior to ASP.net debate. I believe after reading you may find that ASP.net has a lot to offer you as a developer, maybe more so than PHP. We as business persons evaluate technology based...
6
3379
by: Gert Kok | last post by:
When fgets() reads a string that ands with <<<EOT, the string is truncated after << and a lot of following input is discarded. When <<<EOT is changed to <<< EOT, behaviour is as I expect it. Can it be explained why the content of a file is interfering with the behaviour of fgets()?
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10249
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10219
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7563
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6804
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5584
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3755
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.