473,789 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PHP parser error only on production box

Hi

Here is my code snippet:

<?php
error_reporting (E_ERROR | E_PARSE);
?>
<html>
<body>
<form action = "<?php$_SER VER['php_self']?>" method = "GET" >
<?php
echo "adasd";
?>
</form>
</body>
</html>
if you see form action of the above lines, semicolon wont be there and
also the word 'echo'. If i execute this, it supposed to throw an
parser error and script should get terminated at that point.

It is happening in my production/staging environment but it not the
case in development server.

So I compared the error_reporting , display_html_er rors, etc values of
both the environments and it is same interms of error level mechanism.
Is there any constants in php.ini which tells php interpreter not able
to produce parse error in my development server?

Thx in advance

Jun 20 '07 #1
4 1925
Mani wrote:
<form action = "<?php$_SER VER['php_self']?>" method = "GET" >
This will just throw a notice because the $_SERVER array doesn't contain a
php_self key (only a PHP_SELF key). The semicolon is not mandatory in this
case, because of the closing tag and the absence of trailing code. Not using
echo or print, won't trigger alarms either...
JW
Jun 20 '07 #2
On Jun 21, 1:57 am, "Janwillem Borleffs" <j...@jwscripts .comwrote:
Mani wrote:
<form action = "<?php$_SER VER['php_self']?>" method = "GET" >

This will just throw a notice because the $_SERVER array doesn't contain a
php_self key (only a PHP_SELF key). The semicolon is not mandatory in this
case, because of the closing tag and the absence of trailing code. Not using
echo or print, won't trigger alarms either...

JW

I changed the key from php_self to PHP_SELF and executed the script in
both environments. Like earlier, production box is throwing

PHP Parse error: syntax error, unexpected T_VARIABLE in SCRIPTPATH on
line 6

and script execution is getting terminated whereas in local
development environment, it is not throwing any error and notices.

Following are the details of both environments.
Local environment:

1. SUSE LINUX 10.0 (i586)
2. PHP 5.2.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 4 2007
07:31:59)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

php.ini error constants:

error_reporting = E_ALL
display_errors = Off
;html_errors = Off

Production environment:

1. SUSE LINUX 10.0 (i586)
2. PHP 5.2.1 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 4 2007
07:31:59)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
with Suhosin v0.9.18, Copyright (c) 2002-2006, by Hardened-PHP
Project

php.ini error constants:

error_reporting = E_ALL
display_errors = Off
;html_errors = Off

I compared the both php.ini's and found no difference interms of error
reporting perspective.

I am just thinking, Is there any problem in php module ?

Thanks


Jun 21 '07 #3
Mani wrote:
Following are the details of both environments.
Compare outputs of php_info() function in both environments. php.ini is
one of many places where PHP settings can hide.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 10:28.]

dict, thes & ency
http://tobyinkster.co.uk/blog/2007/0...ict-thes-ency/
Jun 21 '07 #4
I got the reason behind this strange behaviour. The short_open_tag
value is "Off" in my production box, whereas it is "On" in development
environment.

Jun 26 '07 #5

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

Similar topics

13
2298
by: Paulo Pinto | last post by:
Hi, does anyone know of a Python package that is able to load XML like the XML::Simple Perl package does? For those that don't know it, this package maps the XML file to a dictionary.
2
1561
by: Michael D Murphy | last post by:
Hi, I am getting the following error when I strart debugging, regardless of the project or solution I am working on. Any help would certainly be appreciated. Michael Server Error in '/LeagueHelper' Application. ---------------------------------------------------------------------------- ----
2
412
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root of the web app 3)restarting IIS 4)recreating the virtual dir in IIS 5)playing with any and all settings I could find for the web app in IIS, including changing permissions 6)recopying the machineconfig file from my asp v1.4... onto my local server
1
1062
by: Kenneth | last post by:
Hi, I have an asp.net app (testShow.aspx) with a code behind file (testShow.aspx.vb) I run on my .NET 2002 dev machine and it works alright on the localhost, but when I copy the testShow.aspx and the compiled \bin\ directory to the production server I get an error message which I don't understand. *************************************
0
1248
by: PeterB | last post by:
I get error 'Parser Error Message: Access is denied ...' in my webapplication 1. indexing service on server and dev. PC is off 2. error appearing randomly 3. error appearing both in development and production What is your attitude to this? Details:
6
3889
by: ST | last post by:
Hi, I keep getting the parser error, and I have no idea why. I've tried a number of things including: 1)building/rebuilding about 100x 2)making sure all dll's are in the bin folder in the root of the web app 3)restarting IIS 4)recreating the virtual dir in IIS 5)playing with any and all settings I could find for the web app in IIS, including changing permissions 6)recopying the machineconfig file from my asp v1.4... onto my local server
4
3231
by: ChrisFrohlich | last post by:
I am trying to deploy two copies of an application to a single website using two virtual directories: "2007" (Production) and "Demo". Each of these applications should point at a different DB, so my thought was to leave everything the same, make two copies of the application files, and just edit the Web.Config file in each copy of the application appropriately. When I try to bring up the Demo site however, I get the following error. ...
28
3595
by: Neo Geshel | last post by:
NOTE: PAST EXPERIENCE HAS SHOWN ME THAT MANY ON USENET FAIL TO READ ARTICLES PROPERLY PRIOR TO ANSWERING. I AM LOOKING FOR VERY SPECIFIC INFORMATION, THEREFORE PLEASE READ AND UNDERSTAND THOROUGHLY BEFORE RESPONDING; OR ASK QUESTIONS TO CLARIFY. I *WILL* APPRECIATE ANY CONSTRUCTIVE REPLY. Greetings! I am in the process of creating a template for a site. The site will be *true* XHTML 1.1. That is, it will validate as XHTML 1.1 on...
6
5365
by: Bobby Edward | last post by:
Using ASP.NET 3.5 and MySQL (thru DevArt MyDirect.NET)... On the production server I get a "Parser Error" for every XSD dataset. It works perfect on my dev machine. But, on the production server I get the error. To troubleshoot the issue I went back to my dev machine and changed all the connectionstrings from localhost to the remote/production server db and made sure everything works fine. I then uploaded all the files to the...
0
9665
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
9511
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
10199
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...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
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
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3697
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
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.