infekt Posted March 1, 2009 Share Posted March 1, 2009 I have successfully installed Prestashop multiple times on my server. Though continually I am faced with the following glitch:Upon new account registration and submission I get the following error:There are 3 errors : 1. lastname is invalid 2. firstname is invalid 3. city is invalidAnd yes, these fields have been filled out correctly. Please see the page:My registration formThank you. Link to comment Share on other sites More sharing options...
infekt Posted March 1, 2009 Author Share Posted March 1, 2009 OK, well i found what's happening....In Validate.php /** * Check for name validity * * @param string $name Name to validate * @return boolean Validity is ok or not */ static public function isName($name) { return preg_match('/^[^0-9!<>,;?=+()@#"¨É{}_$%:]*$/u', stripslashes($name)); } The characters: ¨É are not UTF-8. Link to comment Share on other sites More sharing options...
infekt Posted March 1, 2009 Author Share Posted March 1, 2009 This line in Validate.php, isName: preg_match('/^[^0-9!<>,;?=+()@#"¨É{}_$%:]*$/u', stripslashes($name)); Causes this warning:Warning: preg_match() [function.preg-match]: Compilation failed: invalid UTF-8 string at offset 19 in...Anyone able to shed some light on why this errors would affect only some installations? Possibly php version? Link to comment Share on other sites More sharing options...
infekt Posted March 3, 2009 Author Share Posted March 3, 2009 Nobody know or nobody care? Link to comment Share on other sites More sharing options...
infekt Posted March 6, 2009 Author Share Posted March 6, 2009 After an additional separate installation, on the same server, this time uploading the files with a different ftp tool, I had no errors. My first attempts that continually displayed the errors above, all uploads were done with Fetch 4.0.3 FTP.This last installation with no errors, I used FireFTP, the Firefox extention.What would be happening with Fetch that would cause a "Warning: preg_match() [function.preg-match]: Compilation failed: invalid UTF-8 string at offset 19 in…" ???? Link to comment Share on other sites More sharing options...
John Moore Posted February 3, 2010 Share Posted February 3, 2010 I have encountered an number of the same issues (and spent many hours finding a solution). Your post was helpful in that it pointed me in the right direction. Though I also use Fetch I notice that there are several "Validate" regex that are choking. static public function isName($name) { return preg_match('/^[^0-9!<>,;?=+()@#"°{}_$%:]*$/ui', stripslashes($name)); } ..if changed to : static public function isName($name) { return preg_match('/^[^0-9!<>,;?=+()@#{}_$%:]*$/ui', stripslashes($name)); } then works fine..There are several others that have the ["°] combination and those need to be cleaned up as well.. I did find that tripping over this issue is specific to certain PHP configurations. I have yet to determine exactly what that configuration difference is..Hope this helps someone else... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now