Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 14th, 2008, 11:46 AM
marivoul marivoul is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 2 marivoul User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 45 sec
Reputation Power: 0
Apache recognizes <?php but not <?

Hi,

I just installed Apache 2.0 with PHP 5 and MySQL. If I use the <? tag in my php scripts everything seems to work. However, when I just use the <? tag it seems to not be recognized.

For example, I have the following test file:

<?php echo "Hello"; ?>
<? echo "Hello"; ?>

The html source that is generated is:

Hello
<? echo "Hello"; ?>

Any ideas?

Reply With Quote
  #2  
Old January 15th, 2008, 10:24 AM
gumbert gumbert is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 1 gumbert User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 27 sec
Reputation Power: 0
Quote:
Originally Posted by marivoul
Hi,
Any ideas?

You should edit your php.ini file in this way:

Code:
short_open_tag = On


and then don't forget to restart your Apache server. Enjoy

Reply With Quote
  #3  
Old January 15th, 2008, 01:22 PM
marivoul marivoul is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2008
Posts: 2 marivoul User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 45 sec
Reputation Power: 0
Thanks. I knew it was something simple like that.

Reply With Quote
  #4  
Old March 2nd, 2008, 01:41 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Quote:
Originally Posted by marivoul
Thanks. I knew it was something simple like that.


also you may need to know this about webhosts, most will have the short tags disabled. so, you may start coding the long way, instead of using the short tags.
__________________
Apache Expert

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Server Configuration > Apache recognizes <?php but not <?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT