Error when uploading: function.preg-match-all: Compilation failed
This is an open discussion with 6 replies, filed under Troubleshooting.
Search
Maybe this comment on php.net could help?
Right you are alpacaaa, it’s basically due to an older PHP version (which I cannot change, grr).
Since that piece of code already has a fall-back on the following line, I can simply suppress warnings from the preg_match_all
function like so:
$count = @preg_match_all('/[\p{L}\w:;.,+=~]+/u', $string, $matches);
It works, but since this is modification to the core, I have to remember to re-apply it when I update Symphony (not ideal). Also I don’t know what will happen if trying to upload a file with Unicode chars in its filename…
Should this be filed a bug/possible improvement?
If your PHP version is pre 5.2, it is not a bug. Symphony’s officially requires PHP 5.2+.
Actually the PHP version on my server (where I encountered the problem) is 5.2.5, but the version of the PCRE library is listed as 4.5 01-December-2003 (as opposed to 8.00 2009-10-19 on my development machine, where everything worked fine)…
Sounds rather strange. PHP 5.2.0 should include PCRE 6.7 (see change log).
Yes, strange indeed, but that’s what phpinfo()
reports.
Update: I asked my sysadmin about why we were using such an old version, and his reply was:
it’s very stable and supported by the RedHat security team
Well there’s nothing else I can do personally, but maybe we could add something about the PCRE version to Symphony’s list of requirements.
Create an account or sign in to comment.
I moved to a new server, and now I am getting this error when trying to create an entry by uploading a file using a Unique Upload Field (although I’m not sure it’s an error with that extension as such):
Seems like a difference in the PHP setup to me, what could I check?