PDA

View Full Version : Headers already sent error


xsitedesign388292
09-02-2009, 11:56 AM
After searching posts, I still haven't an inkling what's going on.
First:
Errors on this form
http://franklinpierce.edu/admissions/jvc/apps/app6.php

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent in /usr/www/users/fpuadmin/beta/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/www/users/fpuadmin/beta/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php:3) in /usr/www/users/fpuadmin/beta/WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php on line 3

****
I have checked for inadvertent spaces/lines in PHP and have BOM unchecked in DW. Validation Toolkit files are on production server (why is it using those?).
****
Second:
The form is an old one I modified using CSS Form Builder and all the field names showed up as labels. Any way to get the original labels back other than manually? If not, no problem - probably just bad old code.

Thanks for your help,
Jim

Jason Byrnes
09-02-2009, 04:36 PM
Can you post back a copy of the app6.php and WAVT_ValidatedForm_PHP.php files in a zip archive so Ican investigate the code.


By In the Wizard you can specify the labels that should be used, if you do not specify a label it will default to the form element name.

xsitedesign388292
09-03-2009, 04:45 AM
Attached is the requested .zip file. Thanks for the clue on the label function. JVC

Jason Byrnes
09-03-2009, 11:45 AM
The problem is caused by using virtual() to attach php files.


Dreamweaver will use the virtual function if you set the "Create links Relative To:" Option on the local info tab of your site definition to "Site", change that to "Document" so that Dreamweaver will use the require_once() function instead.

xsitedesign388292
09-04-2009, 05:27 PM
Thanks Jason. Must be my (lack of) syntax skills, but it caused a fatal error on my first try. I will look up the correct syntax and try it again tonight and let you know how it goes. I can't really change the DW site defs - it's a 5000+ page site - so I'm assuming I can manually edit this one form. Thanks again. JVC

Jason Byrnes
09-04-2009, 05:47 PM
the correct synatx would be:
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>


You can change the setting before applying validation toolkit, then change it back afterwords.

xsitedesign388292
09-06-2009, 08:51 PM
Thank you Jason. I got rid of the errors by adding the appropriate document relative code:
<?php require_once("../../../WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("../../../WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>

Now looking at the published form I notice that the error messages are visible in each field. Any ideas what's going on?
Latest revision: http://franklinpierce.now/admissions/jvc/apps/app6b.php
JVC

Jason Byrnes
09-08-2009, 03:24 PM
Your page is missing the code to include the Spry javascript Files and initialize the spry elements.

Try changing the Create links Relative to settings, using Form Builder to create the form, then change it back.