Go Back   Web Hosting UK Forums | Linux Windows Dedicated Server and cPanel VPS Hosting Forum > Web Hosting and Domains > VPS & Dedicated Hosting

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-02-2008, 06:03 AM
System Administrator
 
Join Date: Nov 2008
Posts: 10
Default PHP Not Accepting <? Tag; Only Accepting <?php and <script> Tag

Question: I'm using PHP along with latest version of Apache. Only tags are recognized.
Many of my scripts are broken. How do I allow the other tag also?


Answer: You need to allow that tag by editing php.ini file. Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.

Open php.ini ( /etc/php.ini or /usr/local/etc/php.ini), enter:
Quote:
# vi php.ini
Set short_open_tag to On:
Quote:
short_open_tag = On
Save and close the file. Restart webserver:
Quote:
# service httpd restart
__________________
Best Regards,
Scott
System Administrator

Last edited by webscott; 11-02-2008 at 06:09 AM.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:55 AM.
Copyright 2002-2007 WebHosting.uk.com. All rights reserved.
Web Hosting UK Forum