Jump to content

Archived

This topic is now archived and is closed to further replies.

jjf

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

Recommended Posts

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:
[code]/* 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[/code]

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

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

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.

Share this post


Link to post
Share on other sites
It seems other pages also screw up right around this tag:

[code]<?=[/code]

Is there an extention I need to load?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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. 

Share this post


Link to post
Share on other sites
[quote author=jjf link=topic=103035.msg409886#msg409886 date=1154731785]
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. 
[/quote]

OK, then you owe me a beer :)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.