Forums

Error reported On Submit code

akvasshe 10 Apr, 2010
Hi,

Before my submit text I get this message:

Deprecated: Function ereg() is deprecated in /home/63/w128447/www/components/com_chronocontact/libraries/mails.php on line 117

Alf Kvassheim,
Norway
GreyHead 10 Apr, 2010
Hi Alf,

Oh, I see that this is a change in PHP 5.3. I guess Max will fix this in a future release.

Meanwhile, I think that setting Error Reporting to 'System Default' in the Site Global Configuration will probably hide the message.

Or you can update the code to use preg_match using the notes here

Bob
akvasshe 10 Apr, 2010
Thanks for very quick response. I have tried both "None" and "System default", but the error message still displays. I go for the preg_match option. Thanks.

Alf
snoopy 04 Jul, 2010
Hi, I had exactly the same problem. But how did u fix it?
I changed "ereg" by preg_match" on line 117 and now I have this following message by sending post :
"Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in C:\wamp\www\joomlasite\components\com_chronocontact\libraries\mails.php on line 117"
please help.
snoopy 08 Jul, 2010
I need help.
GreyHead 08 Jul, 2010
Hi snoopy,

I think you need to change the delimiters around the regexp. Try
if(!preg_match('/\{IPADDRESS\}/', $email_body)){


Bob
snoopy 09 Jul, 2010
Thanks for answer.
No it doesen't work with and the same message appears.

I have an other message in the administration page in the form manager :
"Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\joomlasite\administrator\components\com_chronocontact\admin.chronocontact.php on line 1589".

and this one :
Your Chronoforms install at localhost is NOT Validated, No limited features but for a small fee you get link free forms and help us continue the development and support

I can't figure out what I make wrong.
GreyHead 09 Jul, 2010
Hi snoopy,

Not sure I believe that the changed code didn't fix the ereg error. Please post the code you used here.

The Deprecation is just a notice. Set Site Error reporting to System Default and it will disappear.

The NOT validated message is probably because your ChronoForms installation isn't validated. That isn't a problem.

Bob
snoopy 09 Jul, 2010
Hi GreyHead,

ok, "if(!preg_match('/\{IPADDRESS\}/', $email_body)){" works well sry, I forgot a "\". So thanks for that, very good support.

And for the other error, how do I can set site error reporting to system default? Do you have a link?
Thanks in advance.
GreyHead 10 Jul, 2010
Hi snoopy,

It's a setting in the Site Admin | Global Configuration.

Bob
snoopy 10 Jul, 2010
Hi GreyHead,

On site -> configuration générale -> serveur, "rapport d'erreurs" is already set on default.
And the message : "Deprecated: Assigning the return value of new by reference is deprecated in C:\wamp\www\joomlasite\administrator\components\com_chronocontact\admin.chronocontact.php on line 1589" is still here.
But you said it is just a notice, so I guess it dosent matter, all right?

Thanks, and this is the last question😉.
GreyHead 10 Jul, 2010
Hi snoopy,

Yes, it's an annoyance rather than anything fundamentally wrong. Just warns you that the code needs fixing before some future release of PHP.

If you want to fix the error change the line to
$xls = new Spreadsheet_Excel_Writer();


Bob
snoopy 10 Jul, 2010
It's working now. Thanks a lot.🙂
This topic is locked and no more replies can be posted.