newhck / php-form-builder-class

Automatically exported from code.google.com/p/php-form-builder-class
GNU General Public License v3.0
0 stars 0 forks source link

session_name invalidates session checker for class #37

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. declare a session_name("MYSESSION") prior to session start

What is the expected output? What do you see instead?
Session continues on as expected and the php-form-builder-class works
without errors.  Instead the following error is displayed: 
"A session is required to generate this form's necessary javascript and
stylesheet information.  To correct, simply add session_start(); before any
output in your script."

What version of the product are you using? On what operating system?
1.04

Please provide any additional information below.
The following breaks the class when anything besides the default PHPSESSID
is declared.
session_name("MYSESSIONNAME");
session_start();

Original issue reported on code.google.com by wing...@gmail.com on 5 May 2010 at 9:43

GoogleCodeExporter commented 8 years ago
There are two files within the php-form-builder-class/includes directory - 
js.php and css.php - where 
session_start() is invoked.  I'm assuming you will have to edit these two files 
to include the same session_name() 
function you're using in the script where your form is being generated.

Please give this a try and let me know if it remedies the problem.

- Andrew

Original comment by ajporterfield@gmail.com on 6 May 2010 at 12:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
On second try, after clearing session cookies and cache, that does appear to 
have
worked.  Thanks for the suggestion!  However, I am required to hard code the 
session
name in the css.php and js.php because my local variable which controls the 
session
name is not available inside those two scripts, is their a way to pass that in 
as an
additional parameter?

Original comment by wing...@gmail.com on 6 May 2010 at 1:30

GoogleCodeExporter commented 8 years ago
Glad to hear that worked.  I believe I have made a few modifications to how the 
js.php and css.php script are 
called which will correct your issue.  Currently, these changes only exist in 
my Subversion working copy; 
however, you can download this version by running...

svn export http://php-form-builder-class.googlecode.com/svn/trunk/ 
php-form-builder-class

The new session name should be automatically detected, so you will not have to 
pass anything into the form 
class.  Please give this a try and let me know if your issue still persists.

Thanks,
Andrew

Original comment by ajporterfield@gmail.com on 6 May 2010 at 3:31

GoogleCodeExporter commented 8 years ago

Original comment by ajporterfield@gmail.com on 6 May 2010 at 3:31

GoogleCodeExporter commented 8 years ago
Worked perfectly, thank you!

Original comment by wing...@gmail.com on 6 May 2010 at 5:28

GoogleCodeExporter commented 8 years ago
Sweet.  This update will be included in the next version release.  Good luck 
with your development!

- Andrew

Original comment by ajporterfield@gmail.com on 6 May 2010 at 6:07