473,795 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<? is not recognized as php only <?php is on my apache 1.3 server!!

Hi all

Ive just installed php 5 on my Apache server and its not recognizing my
code when its written between <? ?only <?php ?will work. How can i
edit the httpd.conf file to allow this?

Kind regards

Marc

Dec 18 '06 #1
11 2726
monomaniac21 wrote:
Hi all

Ive just installed php 5 on my Apache server and its not recognizing my
code when its written between <? ?only <?php ?will work. How can i
edit the httpd.conf file to allow this?

Kind regards

Marc
Hi

short_open_tags is disabled in your php.ini.
Enable it. :-)

Regards,
Erwin Moller
Dec 18 '06 #2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erwin Moller wrote:
short_open_tags is disabled in your php.ini.
Enable it. :-)
Better replace all ocurrences of "<?" to "<?php" - the short tag is
problematic if you start using doctypes.

- --
- ----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

A la larga el buen manjar, cansa al fin el paladar.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFhoP2R56 dWuhgxGgRAu8tAJ 9lB6yVWhHo/nCqc/aRRSodhODhvACeO HSm
KOgETtWO/6aPUBE+buwhqEc=
=A5RS
-----END PGP SIGNATURE-----
Dec 18 '06 #3
In my php.ini.default file it says:

short_open_tag = On
Erwin Moller wrote:
short_open_tags is disabled in your php.ini.
Enable it. :-)
Dec 18 '06 #4
monomaniac21 wrote:
In my php.ini.default file it says:

short_open_tag = On
.....
That doesn't make sense. Should work.
Please doublecheck.
Are you are editting the right php.ini (the one phpinfo() says it is using)?
Be sure to restart apache.
What does phpinfo() say about short open tags?

Regards,
Erwin Moller
>

>Erwin Moller wrote:
short_open_tags is disabled in your php.ini.
Enable it. :-)
Dec 18 '06 #5
Thanks Erwin

Terminal was finding the wrong file! I should of checked phpinfo
Erwin Moller wrote:
monomaniac21 wrote:
In my php.ini.default file it says:

short_open_tag = On

....
That doesn't make sense. Should work.
Please doublecheck.
Are you are editting the right php.ini (the one phpinfo() says it is using)?
Be sure to restart apache.
What does phpinfo() say about short open tags?

Regards,
Erwin Moller


Erwin Moller wrote:

short_open_tags is disabled in your php.ini.
Enable it. :-)
Dec 18 '06 #6
monomaniac21 wrote:
Thanks Erwin

Terminal was finding the wrong file! I should of checked phpinfo
Good.

You are not the first, nor the last, that is editting the wrong php.ini
file.
Speaking from broad personal experience. ;-)
I even deleted/renamed all php.ini's on my systems so I have ONLY 1 left.

Regards,
Erwin Moller
>

Erwin Moller wrote:
>monomaniac21 wrote:
In my php.ini.default file it says:

short_open_tag = On

....
That doesn't make sense. Should work.
Please doublecheck.
Are you are editting the right php.ini (the one phpinfo() says it is
using)? Be sure to restart apache.
What does phpinfo() say about short open tags?

Regards,
Erwin Moller
>
Erwin Moller wrote:

short_open_tags is disabled in your php.ini.
Enable it. :-)
Dec 18 '06 #7
If you plan to share your code you should use <?php ?instead of just
short tags, you can't expect it to be the case on every server.

Dec 18 '06 #8
On Dec 18, 6:11 am, Erwin Moller
<since_humans_r ead_this_I_am_s pammed_too_m... @spamyourself.c omwrote:
monomaniac21 wrote:
Thanks Erwin
Terminal was finding the wrong file! I should of checked phpinfoGood.

You are not the first, nor the last, that is editting the wrong php.ini
file.
Speaking from broad personal experience. ;-)
I even deleted/renamed all php.ini's on my systems so I have ONLY 1 left.
A major problem I have is remembering to reload apache. I'll make a
whole mess of changes and then wonder why it isn't working, then I'll
reload apache and then I'll feel stupid.

This need to restart apache (sudo /etc/init.d/[apache|httpd] restart)
is something you need to do on Linux. I'm not sure about other
non-UNIX platforms.

Dec 18 '06 #9
Iván Sánchez Ortega wrote:
Better replace all ocurrences of "<?" to "<?php" - the short tag is
problematic if you start using doctypes.
You mean XML prologues, not Doctypes, surely?!

And the fix isn't very hard:

<?= '<?xml version="1.0"?> ' ?>

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Dec 18 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5143
by: Steven | last post by:
I actually have two questions: 1. I try to get current time, but the time I got is 1 hour different from my local time. I assume it is caused by Time Zone. So is there any easy way to fix this? I assume that I can first get the Time Zone of the server by using the T option in date, and then using my local Time Zone to calculate the difference. But I am wondering if there is some buil-in function to do it. 2. I found out this also today...
7
9371
by: kecebong | last post by:
I installed php-4.3.3, mysql and apache server 2.0.47. but I can not connect to my apache server from my other computer, i use static ip for my server, set ip address for server name on httpd.conf, setup sua server on router. do i miss something here? anyone can help me to figure it out? thanks.
1
4375
by: Kim Gijung | last post by:
Hi all, I'm wondering how the apache server and php interepreter handles request. If one request comes to apache server what is next procedure? if apache server passes the request to php interepreter and php interepreter handles? what if 10 requests comes at same time? apache server forks 10 php interepreter? or php interepreter makes 10 threads for each request?
1
3518
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming message, and to also compress the response (GZIP). The mod_deflate filter requires the 'Content-Length' header contained within the incoming request to specify the number of UNCOMPRESSED bytes being sent and not the actual bytes of the body of the...
5
3236
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming message, and to also compress the response (GZIP). The mod_deflate filter requires the 'Content-Length' header contained within the incoming request to specify the number of UNCOMPRESSED bytes being sent and not the actual bytes of the body of the...
14
2784
by: Jim Carlock | last post by:
I have a couple easy questions possibly. 1) Is there a default.php page? The webserver seems to support default.htm, default.html, index.htm and index.html. It's an Apache server, I'd like to know if a default.php exists, or how to set it. 2) I'm getting some some strange results... My doctype.php file contains:
6
11336
by: kalyan.muppala | last post by:
Hi all, Presently I have Windows XP Home edition and there's no IIS in it...Should I install XP Professional to get the IIS or is it fine if I proceed with Apache..?? Will .NET run on Apache server..?? If Yes, please tell me the steps.. Thanks.
1
2452
dmjpro
by: dmjpro | last post by:
i am new to apache server ...... how this is configured .... and how does it work when an web-application is deployed ...... one more thing .... seperate me application server and web server. can application server can serve as web-server....... what apache is ... web-server or application server plz send me a better link ... so that i can firgure out easily the sever side magic scenes .......
2
2564
by: dineshshank | last post by:
Hello , I have installed Apache Server 2.2.4 as instructed by Bugzilla .Why Apache Server is preferable .And why not Internet Explorer. And which way Apache can be configured for Bugzilla and how it can be used effectively.Can anybody help me .
5
2388
by: senadslipac | last post by:
How to Q: Uncompressing ~400K files on Apache Server Hello All, I have ~400K html files on my local XP machine and I’d like to compress the files, upload them onto my host (apache - pair.com) and uncompress them there. I’ve done this with less files (~10K) before – using ssh, putty and unzip command. I seem not to be able to use the same method as ZIP
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10216
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.