0 users online. Create an account or sign in to join them.Users

Search

I can’t upload files on my Symphony backend. I get this error whenever I save a section with a file upload field filled in:

Symphony Warning pregmatch() [function.preg-match]: Delimiter must not be alphanumeric or backslash /home/sgnitro/publichtml/toa/backend/symphony/lib/toolkit/class.general.php line 52

47          if(!is_array($rule)) $rule = array($rule);
48          if(!is_array($string)) $string = array($string);
49                      
50          foreach($rule as $r){
51              foreach($string as $s){
52                  if(!preg_match($r, $s)) return false;
53              }
54          }
55          return true;
56      }

After many hours, I’ve found out it is caused by placing a validation of ‘image’ in the ‘Validation Rule’ field for the file upload.

Anyone know why the validation isn’t working?

Odd. What version of PHP are you running?

I’m getting the above error every time I enter a validation rule anywhere in Symphony.

My version is 2.0.7

@charrison1988 - You might consider updating yourself to v. 2.0.8RC1. Even though it’s a release candidate, I’ve found it to be much more stable than that of 2.0.7. Unfortunately, 2.0.7 has been fairly buggy.

@bzerangue Thanks, I’ll try it.

I have installed 2.0.8RC1 and I get the same problem.

I have installed a completely fresh install of 2.0.8RC1 in a new unrelated folder and I created a section with a field that included a validation rule. When I go to save a record in that section I get the same problem.

If anyone wants to take a look: http://sg.nitrodesigns.com/toa/rc1/symphony/ u: admin p: 1234

You might be looking for this:

Closed Ticket: Uploading file from a frontend seems to be broken

(I have seen that Rowan’s commit has been pulled to the integration branch of Symphony.)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.2 or above
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.0 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details