Jump to content


Photo

bgcolor wrong when ported to windows server, right on linux server


  • Please log in to reply
4 replies to this topic

#1 jjf

jjf
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 04 August 2006 - 10:21 PM

Hi, all.  I'm new to PHP and could use a little help here.  I tried googling this problem, but (for the first time so far in my forays with PHP) couldn't find any help.

I dloaded and modified an open source online timecard program.  It was originally written in Linux, I modified it in Linux, then ported it to my Windows partition (because it will eventually end up on a Windows SBS).  The pages looked fine in Linux, but in Windows the background color is all wrong.

The program has a file called defaults.php, which includes these lines:
/* Colors */
$default->dark_bg_color		= '#085d8b';	// Dark background color
$default->light_bg_color	= '#ffffff';	// Light background color
$default->item_bg_color		= '#cddeee';	// Light background color for input items 
$default->light_text_color	= '#ffffff';	// Light text color
$default->dark_text_color	= '#000000';	// Dark text color
...etc

But my Windows config doesn't seem to follow the calls to $default->whatever_color.  Here's an example:

<table border="0" cellpadding="2" cellspacing="2" bgcolor="<?= $default->light_bg_color ?>"
 text="<?= $default->dark_text_color ?>" align="center" valign="top">

Under Linux, this worked fine.  Under Windows, it doesn't.  The table's background color reverts to dark blue in Firefox and bright red in IE.  In fact all the colors are strange: the text colors (blue in Firefox, green in IE), the body bgcolor (same dark blue in Firefox, same bright red in IE). 

Any help?  Thanks.


#2 jjf

jjf
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 04 August 2006 - 10:24 PM

It seems other pages also screw up right around this tag:

<?=

Is there an extention I need to load?


#3 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 August 2006 - 10:25 PM

http://ca3.php.net/ini.core

check that 'short' tags are allowed in the Windows php version. If not, change your code or change the ini file
Legend has it that reading the manual never killed anyone.
My site

#4 jjf

jjf
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 04 August 2006 - 10:49 PM

THANK YOU!

I'm so glad it was something quick and painless.  I was having horrific visions of racing against the deadline in 60 hour work weeks as I rewrote pages of code. 

#5 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 August 2006 - 11:07 PM

THANK YOU!

I'm so glad it was something quick and painless.  I was having horrific visions of racing against the deadline in 60 hour work weeks as I rewrote pages of code. 


OK, then you owe me a beer :)
Legend has it that reading the manual never killed anyone.
My site




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users