Page 1 of 1

Changed TZone -auction in progress- resulted in error

PostPosted: Thu Nov 15, 2007 7:59 am
by shuraa
Steve,

Great job on both dataface and webauction!!!

Webauction has helped me big time, as I work for a non-profit. I am completely new to working in php and any kind of code. Your tutorial and forums have taken me from lost to actually hosting an auction.

However, I missed the Time Zone issue and had a few people frustrated, but understanding that I am new to this and trying.

My issue arose that I changed the time zone while I have a current auction in progress. I have two different ending dates for items depepending on when added. When I changed the TZ, I now get this message at the top of my page.

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/phila5/public_html/webauction/index.php:1) in /home/phila5/public_html/dataface/Dataface/Application.php on line 559


When I try to log in, I get the following:

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/phila5/public_html/webauction/index.php:1) in /home/phila5/public_html/dataface/Dataface/Application.php on line 559

Warning: Cannot modify header information - headers already sent by (output started at /home/phila5/public_html/webauction/index.php:1) in /home/phila5/public_html/dataface/Dataface/AuthenticationTool.php on line 281

Warning: Cannot modify header information - headers already sent by (output started at /home/phila5/public_html/webauction/index.php:1) in /home/phila5/public_html/dataface/Dataface/AuthenticationTool.php on line 284



After getting these errors, I restored my original file and the errors disappreared.

Do I need to wait until my auction ends to fix the TZ problem?

Thanks.

PostPosted: Thu Nov 15, 2007 9:12 am
by shannah
These errors are the result of unintended output to the browser. Likely you have introduced an extra carriage return after the closing ?> tag in the file that you edited.

You can fix this by:
1. Using a different text editor that doesn't add extra whitespace at the end of the file.
2. Removing the closing ?> tag at the end of the file that you edited.

-Steve

PostPosted: Sat Nov 17, 2007 9:48 am
by jimbusman
Steve,

I added it to the code to change the time to the beginning of the index.php file rather than the end. I also had added When I move the code to the end of the file and removed the unnecessary characters, It worked fine.

Thank you!

Jim

PostPosted: Sat Nov 17, 2007 9:50 am
by jimbusman
Just noticed that my signin on the first post is shurra; do not have any idea why. It should be jimbusman.

PostPosted: Sun Nov 18, 2007 11:10 am
by jimbusman
Steve,

I just put a test item up on the auction with a short duration. When I entered the new Time as the opening and closing time it showed that the auction was closed. When I changed to PST, the item was open for auction and I could bid. So, the time on the opening page is set to East Coast time, but the auction times are still working on Pacific time.

Is there a place to fix this so that all my auction times are set to Eastern Time?

Jim

PostPosted: Mon Nov 19, 2007 1:55 pm
by shannah
I'm not too sure why this is happening. Another user was trying to do a similar thing and ran into similar problems (if you check the forum you can find his posts). I'm not sure if he ever managed to solve the problem.

I'll give it some thought when I get a moment... check back in a week if I haven't posted on it to remind me...

-Steve

PostPosted: Mon Nov 19, 2007 5:24 pm
by shannah
Ok...

The reason for this problem is that you are setting the PHP timezone but not the MySQL timezone. You need to set them both.

http://dev.mysql.com/doc/refman/5.0/en/time-zone-support.html

I.e. you need to call the following somewhere after the database connection is made.
Code: Select all
mysql_query('SET time_zone = your_timezone');

(where 'your_timezone' should be a valid mysql timezone name).

A good place to add this might be to your Application Delegate's getPreferences() method:
Code: Select all
function getPreferences(){
    mysql_query('SET time_zone = your_timezone');
 
    ...

}



Hope this helps.

-Steve