473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Undeifined varables give errors on win32 web server but work on linux

I have 2 parallel systems for php development
Debian linux with apache and PHP4
and Windows XP professional with apache & PHP4

I have been in the habit of debugging on the xp machine before I
upload to the debian server

If I run this example , it works fine on the linux web server
_________________________________

problem.html

<HTML><BODY>
<FORM METHOD=POST ACTION="problem.php">
show your email address to others ?
<INPUT NAME="showmail" TYPE="Checkbox">
<BR><BR>
<INPUT TYPE=SUBMIT>
</FORM></BODY></HTML>

===================================

problem.php

<HTML><BODY>
<?php
echo $showmail;
?>
</BODY></HTML>

_________________________________

On XP it runs fine but only if the checkbox is selected. If I do not
select the checkbox & hit submit I get this error. (it fails because
$showmail is not defined)

Notice: Undefined variable: Choice in c:\program files\apache
group\apache\htdocs\begphp\ch03\problem.php on line 3

I have compared the php.ini files of the 2 systems and cannot see any
significant differences. I have had one or 2 other anomalies between
the 2 systems, but this is fundamentally the most difficult to
diagnose

Thanks in advance for any assistance

Synergz
Jul 16 '05 #1
4 1857
Hi synergz!
On 20 Jul 2003 16:36:59 -0700, sy*****@yahoo.com (synergz) wrote:
I have 2 parallel systems for php development
Debian linux with apache and PHP4
and Windows XP professional with apache & PHP4

I have been in the habit of debugging on the xp machine before I
upload to the debian server

Compare php.ini on the systems. One has error_reporting = E_ALL, the
other has probably something different.

HTH, Jochen
--
Jochen Daum - CANS Ltd.
PHP DB Edit Toolkit -- PHP scripts for building
database editing interfaces.
http://sourceforge.net/projects/phpdbedittk/
Jul 16 '05 #2
Jochen Daum wrote:
Hi synergz!
On 20 Jul 2003 16:36:59 -0700, sy*****@yahoo.com (synergz) wrote:
I have 2 parallel systems for php development
Debian linux with apache and PHP4
and Windows XP professional with apache & PHP4

I have been in the habit of debugging on the xp machine before I
upload to the debian server

Compare php.ini on the systems. One has error_reporting = E_ALL, the
other has probably something different.

HTH, Jochen


Jochen,

reading this reply of yours tells me know why the heck my code today started
messing up.
Guess I changed my default error_reporting to only E_ALL ... away from the
default which I can't recall .... darn.
You shouldn't have it right around there somewhere so I can restore here?
Would make me a happy man.

/Andreas

--
Registeret Linux user #292411
Jul 16 '05 #3
synergz wrote:
I have 2 parallel systems for php development
Debian linux with apache and PHP4
and Windows XP professional with apache & PHP4

I have been in the habit of debugging on the xp machine before I
upload to the debian server

If I run this example , it works fine on the linux web server


www.php.net/error_reporting

--
----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.

Jul 16 '05 #4
Thankyou all that solved it I missed it on the original compare
error_reporting = E_ALL & ~E_NOTICE was the linux setting and has
repaired the problem

Jim
sy*****@yahoo.com
Jochen Daum <jo*********@cans.co.nz> wrote in message news:<u4********************************@4ax.com>. ..
Hi Andreas!
On Mon, 21 Jul 2003 01:51:36 +0200, Andreas Paasch
<An*****@Paasch.Net> wrote:
Jochen Daum wrote:
Hi synergz!
On 20 Jul 2003 16:36:59 -0700, sy*****@yahoo.com (synergz) wrote:

I have 2 parallel systems for php development
Debian linux with apache and PHP4
and Windows XP professional with apache & PHP4

I have been in the habit of debugging on the xp machine before I
upload to the debian server

Compare php.ini on the systems. One has error_reporting = E_ALL, the
other has probably something different.

HTH, Jochen


Jochen,

reading this reply of yours tells me know why the heck my code today started
messing up.
Guess I changed my default error_reporting to only E_ALL ... away from the
default which I can't recall .... darn.
You shouldn't have it right around there somewhere so I can restore here?
Would make me a happy man.

I have

error_reporting = E_ALL & ~E_NOTICE

but its my server as well, so I might have changed it. I would rather
put

error_reporting (your errorreporting)

in all your pages, as you might move servers and then you the problem
again.

HTH,

jochen
/Andreas

Jul 16 '05 #5

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

Similar topics

1
by: Tom Jones | last post by:
I need to access databases on both win2k and Linux systems but I have to set up the DSNs under program control ... no uses using GUIs ... Has anyone done this? if so can we discuss it either in...
4
by: Jhuola Hoptire | last post by:
Just installed J2RE 1.4.2 on a Linux server. I am very knew to the POSIX world. I couldn't dig-up much in the docs or via google about the following: 1 - Is there a standard way to make sure...
5
by: silviu | last post by:
Hi All, I have to write C++ code (server code) that will compile/run on both Windwos and Linux OS's. Could someone give me some pointers to info on this matter. Thanks in advance for your...
5
by: news | last post by:
I've a site: http://gto.ie-studios.net/products.php that looks perfectly fine in Windows whether with IE or Firefox 1.0. But when viewed in the Linux version of Firefox 1.0, images get misaligned...
4
by: Bonj | last post by:
Hi What is a good C/C++ compiler for a 64-bit linux system? I'm thinking of building a new PC and want to put an AMD64 in it. Since I've already got one windows PC, windows isn't free, and isn't...
9
by: eeh | last post by:
Hi, I am extremely new to write C programs by GCC. I need to port a C program from GCC(Linux) to GCC(Win32). However, the following errors during compilation: powerSwitch.c `random'...
2
by: rsd | last post by:
Hi, I'm trying get Samsung YH-920 mp3 player to work with Debian GNU/Linux. To do that I need to run http://www.paul.sladen.org/toys/samsung-yh-925/yh-925-db-0.1.py script, the idea behind the...
6
by: aman | last post by:
What is the Location of C header files in a linux system??? Also, how do I add conio.h.. C in linux doesnt support it by default
7
by: r0g | last post by:
I'd like PHP to send mail to a local mailserver running at localhost:25 like I used to on windows. This mailserver is a dummy server which just writes the mail to disk for unit testing and works...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.