LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2008, 05:22 AM   #1
TottiGol
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
php default interpretation


Hi everybody, i have one problem :
slackware 12/apache 2/php 5


well how to let apache/php recognize automatically some code to be interpretated after the charachers "<?" ?

i will explain better with a simple example...let's have this :

file1.php

<?
echo "ciao";
?>


and this :

file2.php
<?php
echo "ciao";
?>


Well , my problem is the file2.php called from a browser works well printing "ciao".....while file1.php leaves a white page....

The problem is due to the fact that apache/php do not recognize "<?" as a php start characher sequence, isn't it ? what to set to have file1.php working as file2.php ??

Thanks for giving some help.
 
Old 09-04-2008, 06:08 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You should edit the following in php.ini:
Code:
short_open_tag = On
and restart apache.
Mind that according to php documentation:
Quote:
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.
it's not advisable to do so.

Regards
 
Old 09-04-2008, 11:11 AM   #3
TottiGol
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
You should edit the following in php.ini:
Code:
short_open_tag = On
and restart apache.
Mind that according to php documentation:
it's not advisable to do so.

Regards
Well thanks for the answer...

you know what....i've need this change to let PhpOpenChat (a free ...PORTABLE chat) work under my box......
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
netstat interpretation twlilinux Linux - Server 6 06-17-2008 04:59 PM
c: output interpretation kpachopoulos Programming 3 08-17-2006 09:34 AM
tcpdump interpretation unixbrain Linux - Networking 7 04-28-2004 04:37 AM
sendmail logwatch interpretation jimi_j Red Hat 2 03-07-2004 07:19 PM
2.4.18 Crash interpretation: Known problem? svar Linux - General 2 09-17-2003 12:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration