Solved

How to make PHP default scripting

Posted on 2003-10-22
1
162 Views
Last Modified: 2010-03-04
I have apache webserver on linux. And php installed.
Php scripts work. Now i want to make the php script as default script. Lemme tell you how it is not default scripting. If i write <?php echo "php works"; ?>
it displays. if i write <? echo "php is default"; ?>  it gives error. So how do i make it default so that second script will also get processed by php.

Thanks in advance
0
Comment
Question by:sanjaykattimani
1 Comment
 
LVL 17

Accepted Solution

by:
dorward earned 100 total points
Comment Utility
It sounds like short tags have been disabled (this is generally a good thing, especially if you are working with XML [including XHTML]).

However:

Edit your php.ini file, and change "short_open_tag" to "On"

Like this:

; Allow the <? tag.  Otherwise, only <?php and <script> tags are recognized.  
; NOTE: 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.
short_open_tag = On
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now