Hello, I've been receiving errors in a PHP script since my webhosts did an upgrade of PHP to 4.4.2. Here's an excerpt of the script and the errors I receive:
/* require_once ("includes/config.inc"); $page_title = 'Urban Decay Music - Register'; if (isset($HTTP_POST_VARS[Submit])) { $email = trim($HTTP_POST_VARS[email]); $first_name = trim($HTTP_POST_VARS[first_name]); $last_name = trim($HTTP_POST_VARS[last_name]); $address1 = trim($HTTP_POST_VARS[address1]); $address2 = trim($HTTP_POST_VARS[address2]); $city = trim($HTTP_POST_VARS[city]); $stt_cnty = trim($HTTP_POST_VARS[stt_cnty]); $zp_pstcd = trim($HTTP_POST_VARS[zp_pstcd]); $phone = trim($HTTP_POST_VARS[phone]); if (eregi ("^([[:alnum:]]|_|.|-)+@([[:alnum:]]|.|-)+(.)([a-z]{2,4}) $",$email)){ $a = TRUE; } else { $a = FALSE; $message[] = "Please enter a valid email address."; } if (eregi ("^[[:alnum:]]{6,16}$", $HTTP_POST_VARS[pass1])) { $b = TRUE; } else { $b = FALSE; $message[] = "Please enter a password that consists of only letters and numbers, between 6 and 16 characters long."; } if ($HTTP_POST_VARS[pass1] == $HTTP_POST_VARS[pass2]) { $c = TRUE; $password = crypt ($HTTP_POST_VARS[pass1]); } else { $c = FALSE; $message[] = "The password you entered did not match the confirmed password."; } if (eregi ("^([[:alpha:]]|-|')+$", $first_name)) { $d = TRUE; } else { $d = FALSE; $message[] = "Please enter a valid first name."; } if (eregi ("^([[:alpha:]]|-|'|)+([[:alpha:]]|[[:space:]]|_|.|-|'|.) +$", $last_name)) { $e = TRUE; } else { $e = FALSE; $message[] = "Please enter a valid surname."; } if (eregi ("^([[:alnum:]]|-|'|)+([[:alnum:]]|[[:space:]]|_|.|-|'|.) +$", $address1)) { $f = TRUE; } else { $f = FALSE; $message[] = "Please enter a valid address."; } if (eregi ("^$|^([[:alnum:]]|-|'|)+([[:alnum:]]|[[:space:]]|_|.|-|'|.) +$", $address2)) { $g = TRUE; } else { $g = FALSE; $message[] = "Please enter a valid address."; } if (eregi ("^([[:alnum:]]|-|'|)+([[:alnum:]]|[[:space:]])+$", $city)) { $h = TRUE; } else { $h = FALSE; $message[] = "Please enter a valid city."; } if (eregi ("^$|^([[:alnum:]]|-|'|)+([[:alnum:]]|[[:space:]])+$", $stt_cnty)) { $i = TRUE; } else { $i = FALSE; $message[] = "Please enter a valid state/county."; } if (eregi ("^([[:alnum:]]|-|')+([[:alnum:]]|[[:space:]])+$", $zp_pstcd)) { $j = TRUE; } else { $j = FALSE; $message[] = "Please enter a valid zip/area/post code."; } if (eregi ("^$|^([[:digit:]])+([[:digit:]]|[^[:space:]])+$", $phone)) { $k = TRUE; } else { $k = FALSE; $message[] = "Please enter a valid telephone number."; } */ The errors brought up are: Warning: eregi(): REG_EMPTY in /var/www/html/register.php on line 49 Warning: eregi(): REG_EMPTY in /var/www/html/register.php on line 56 Warning: eregi(): REG_EMPTY in /var/www/html/register.php on line 63 Warning: eregi(): REG_EMPTY in /var/www/html/register.php on line 70 Warning: eregi(): REG_EMPTY in /var/www/html/register.php on line 77 There are also error messages generated by the script itself: Please enter a valid surname. Please enter a valid address. Please enter a valid address. Please enter a valid city. Please enter a valid state/county. Someone has suggested that the errors might be caused by the use of |'s in the regular expressions. However, this doesn't seem to cause a problem with the checking of the email address (also utilises | ). This script has run ok for the past 2 years, so I think it must have something to do with the server updates. Any help would be greatly appreciated. Regards, Nick ------------------------ Yahoo! Groups Sponsor --------------------~--> Home is just a click away. Make Yahoo! your home page now. http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/HKFolB/TM --------------------------------------------------------------------~-> Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/