Forums

Image verification -> blank page on submit

sinemac 03 Feb, 2008
Using Joomla! 1.5 with the latest ChronoForms

If I enable the image verification, when I submit a form it goes to a blank page after clicking the submit button, and the form input is not saved or emailed.

I turned on error reporting in php.ini and this is what I got:

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: ) in /home/scott/public_html/research/components/com_chronocontact/chronocontact.php on line 199
sinemac 04 Feb, 2008
Ah, thanks. Yes, that did fix it... but what are the broader implications of having the session handling off?
GreyHead 04 Feb, 2008
Hi sinemac,

I don't know much about sessions and session handling but as I understand it this option sets where the session data is saved. Sessions are still established for each user. So I guess the downside is that you can't check the session history from the database table.

Bob

Max: See here - looks like there may be a bug in 1.5 database session handling.
sinemac 04 Feb, 2008

Max: See here - looks like there may be a bug in 1.5 database session handling.



Looks like that was supposedly fixed on Jan. 16 - so it already made it into Joomla! 1.5 Stable (which is what I'm using). That's not to say there aren't possibly other problems with sessions.

I assume that some components & modules need to be able to access session data, don't they? Is there any (easy) way to know what might break if I set the Session Handler to "none"?
GreyHead 04 Feb, 2008
Hi sinemac,

AFAIK nothing will break. At least nothing that uses the Joomla core code to access the session data. Maybe some special components that try to directly access the database tables, but I can't think why they would do that.

Bob
Minnie Mouse 15 Feb, 2008
actually here is an example... i am using sobi2 and there is a module called sobi2_by_field.

sobi uses sessions to do extended search with. the mod access this searching and doesnt work properly with sessions turned off.

i need the forms with image verification and the search of the sobi2 database... now what??
sinemac 15 Feb, 2008
We hope (and beg?) that there will be a new version for Joomla! 1.5 available soon that addresses this... and the issue of conflicts with mootools that keeps validation from working when using RocketTheme templates.😟
Minnie Mouse 15 Feb, 2008
Max or Bob, if you're listening here is the session error you get when you run image verification with database session handling:

Fatal error: session_start() [<a href='function.session-start'>function.session-start</a>]: Failed to initialize storage module: user (path: /tmp) in /home/dog10000/public_html/chc/components/com_chronocontact/chronocontact.php on line 199

you would make my millenium if you could fix this or tell me what to do to fix it besides turning the session handler to none. :-)
thanks!
MM
Minnie Mouse 16 Feb, 2008
hi bob thanks! that worked. I put this line in before the session_start() call

ini_set("session.save_handler", "files");

no more error.
YAY
Minnie Mouse 16 Feb, 2008
okay, so here's the last problem.
i am using the foreach to retrieve the array off the select file. when someone enters the wrong image verification code it loses the array and returns an error. sigh.

maybe i will just switch it to check boxes.

any thoughts?
MM
Max_admin 20 Feb, 2008
Hi MM,

I can't understand your last question, could you give more info for me please ?

Cheers,
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
sinemac 20 Feb, 2008

hi bob thanks! that worked. I put this line in before the session_start() call

ini_set("session.save_handler", "files");

no more error.
YAY


Hi MM - what file do you add that to?

Thanks,
Scott
Max_admin 20 Feb, 2008
Hi Scott,

There are 2 files with this line : chrono_verification.php and chronocontact.php so you can check both ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
revtrev 08 Mar, 2008

hi bob thanks! that worked. I put this line in before the session_start() call

ini_set("session.save_handler", "files");

no more error.
YAY



Can you let me know where to insert this? I tried where I thought it should go...
//echo $_SESSION['chrono_verification'].'<br>';
ini_set("session.save_handler", "files");
		session_start();
		//echo 
$_SESSION['chrono_verification'].session_name();
		$chrono_verification = strtolower($_POST['chrono_verification']);
		if ( md5($chrono_verification ) != $_SESSION['chrono_verification'] ) {
			showErrorMessage('Sorry, You have entered a wrong verification code');
			showform($_POST);
			return;
        }else{
			unset($_SESSION['chrono_verification']);
		}

But it caused some very nasty errors. Any help is appreciated.

Post edited by: revtrev, at: 2008/03/08 01:16<br><br>Post edited by: revtrev, at: 2008/03/08 01:18
Minnie Mouse 08 Mar, 2008
revtrev i only needed it chronocontact.php around line 196
	session_name(md5('chrono'));
//echo $_SESSION['chrono_verification'].'<br>';
// lpw added the below line to fix session bug.
ini_set("session.save_handler", "files");
session_start();


it looks like you have a carriage return on the next line so that the echo is commented out but not the line. it should look like this:
//echo $_SESSION['chrono_verification'].session_name();
revtrev 08 Mar, 2008
Thanks MM, but it seems to be creating the same issues. It's no longer a blank page on submit, the email gets sent and the template comes up alright, but here's the message to the user:

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 3

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 4

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 5

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 6

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 7

Warning: implode() [function.implode]: Bad arguments. in /home/content/i/m/a/imaginepublish/html/components/com_chronocontact/chronocontact.php(537) : eval()'d code on line 8



I'm kinda past my limits for PHP, so if anyone can see what I've messed up, I'd appreciate it. I'm going to try another form, just to make sure that's not the issue.<br><br>Post edited by: GreyHead, at: 2008/03/15 15:57
Max_admin 08 Mar, 2008
Hi revtrev,

my advice is to get a fresh copy of that file then the only change you do is to insert this line :
ini_set("session.save_handler", "files");

before this line:
session_start();


assure no lines get broken with any new lines!

cheers,

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Max_admin 15 Mar, 2008
Hi All, the problem has been solved permanently, you can now use both session handlers types in the joomla global config, overwrite the attached files or wait for the new release!

Cheers,

Max [file name=com_chronocontact.zip size=6935]http://www.chronoengine.com/components/com_fireboard/uploaded/files/com_chronocontact.zip[/file]
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jxl 26 Mar, 2008
You are a hero! It worked great!

EDIT: I just noticed that everything is working except the cc. email. BCC works fine as does the main email htat the form is sent to.
CC was working before I uploaded the patch, however I also made some other changes:

1. Uploaded the patch.
2. Turned on image verification (truetype)
3. Changed session handler back to database
4. Added javascript to show/hide the various sections of my form (see my Multi-page Forms post for that code - I don't think there is anything in there that should interfere with the email but this is all new to me http://www.chronoengine.com/component/option,com_fireboard/Itemid,37/func,view/id,6940/catid,4/)<br><br>Post edited by: jxl, at: 2008/03/26 00:05
Max_admin 27 Mar, 2008
Hi Jxl,

I suggest you create another testing form with only one test text field and image verification and see if CC will work and at which cases so you know where the problem is exactly!

Let us know!

Cheers

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.