Solved

How to make PHP default scripting

Posted on 2003-10-22
1
165 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
ID: 9606317
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Upload using Uploadify 4 108
LAMP problem identifier tool ? 9 123
How can I write .htaccess code to redirect 301 pages? 1 126
Stream live video from Raspberry Pi camera 22 193
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

837 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