close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Changed Servers and Getting Error

Thread began 6/12/2009 11:16 am by cal114936 | Last modified 6/17/2009 2:24 pm by cal114936 | 3135 views | 14 replies |

cal114936Beta Tester

Changed Servers and Getting Error

The forms and validation were working fine. Uploaded to clients new server and now getting these errors.

Warning: eregi() [function.eregi]: REG_BADRPT in /home/phase1/public_html/WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 547

Warning: Cannot modify header information - headers already sent by (output started at /home/phase1/public_html/WA_ValidationToolkit/WAVT_Scripts_PHP.php:547) in /home/phase1/public_html/WA_ValidationToolkit/WAVT_Scripts_PHP.php on line 71

Any ideas?

Jack

Sign in to reply to this post

Ray BorduinWebAssist

What version of php is installed on that new server?

The first error is the only significant one... the second is caused by the first.

You need to look at: WAVT_Scripts_PHP.php on line 547

Then do some debugging around it. It appears it doesn't like the regular expression you are using or the extension is using.

Sign in to reply to this post

cal114936Beta Tester

It appears that it was caused by a regular expression used to validate the password. But why would it work on one server and not the other? It's using PHP Version 5.2.9

Sign in to reply to this post

Ray BorduinWebAssist

I'm not sure. Somehow the regular expression engine must be different on the two servers.

Sign in to reply to this post

cal114936Beta Tester

Ray,

Tech Support from the server changed a line in a function in WAVT_Scripts_PHP.php to escape the ? from the regular expression. Does this make sense to you?

function WAValidateRX($value,$regExStr,$required,$number) {
$value = $value;
$WAFV_ErrorMessage = "";
$isValid = true;
$regExStr = str_replace(""", '"', $regExStr);
$extraArgs = substr($regExStr,strrpos($regExStr,"/")+1);
$regExStrStripped = substr($regExStr,strpos($regExStr,"/")+1,strrpos($regExStr,"/")-strpos($regExStr,"/")-1);
if (!(!$required && $value=="")) {
if (strpos($extraArgs,"i") >= 0) {
$regExStrStripped=str_replace('?','\?',$regExStrStripped); // FIX FOR BROKEN REGEX - Hostgator
$theMatch = eregi($regExStrStripped, $value);
}
else {
$theMatch = ereg($regExStrStripped, $value);
}
if (!$theMatch) {
$theMatch = preg_match($regExStr, $value);
if (!$theMatch) {
$isValid = false;
}
}
}
if (!$isValid) {
$WAFV_ErrorMessage .= ",".$number;
}
return $WAFV_ErrorMessage;
}

Thanks,

Jack

Sign in to reply to this post

Ray BorduinWebAssist

You don't need to update our function... you just need to add a slash to your regular expression. What regular expression were you using?

This solution won't work if you meant to have a ? identifier as an optional character, which is what a ? means in a regular expression.

Sign in to reply to this post

cal114936Beta Tester

It seemed odd. The Reg Expression is /^\w*(?=\w*\d)(?=\w*[a-z])\w*$/ I needed it to validate the password for at least 1 number. It worked fine on the other testing servers.

Sign in to reply to this post

Ray BorduinWebAssist

Does the fix they recommend work? Or does it break the regular expression? It would appear to me that it actually wouldn't work properly... but I want to verify because I might be missing something.

Sign in to reply to this post

cal114936Beta Tester

Yes, it does work, but I would prefer to have the regex work without altering Webassists function.

Sign in to reply to this post

Ray BorduinWebAssist

All their code appears to do is add a slash in front of the ?... does it work if you don't update the code and use:

/^\w*(\?=\w*\d)(\?=\w*[a-z])\w*$/

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...