Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default function.preg-match error with additional_images.php

    PHP Warning: preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Compilation failed: unmatched parentheses at offset 31 in [PATH]/additional_images.php on line 54

    What could cause that?

    This is line 54

    if(preg_match("/" . $products_image_base . "/i", $file) == 1) {



    v1.3.8a

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: function.preg-match error with additional_images.php

    unmatched parentheses at offset 31

    This would be in the $products_image_base content. Could there be any parentheses in the filename? Or could the code that derives $products_image_base have gotten corrupted?

  3. #3
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: function.preg-match error with additional_images.php

    Would an image with a ( in the file name cause that error?

  4. #4
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default Re: function.preg-match error with additional_images.php

    It's more likely that you've got excessive "." symbols in the name, perhaps in a foldername of the path to the file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: function.preg-match error with additional_images.php

    the folder names are letters

    the files have some

    -

    in them

  6. #6
    Join Date
    Nov 2006
    Posts
    296
    Plugin Contributions
    2

    Default Re: function.preg-match error with additional_images.php

    Quote Originally Posted by DigitalShadow View Post
    Would an image with a ( in the file name cause that error?
    I had the exact same error referring to the preg-match in additional_images.php, after searching the apache logs at that time i found there is a product with an image named: sigi_paraplu)rocky.jpg
    eliminating the ) from the filename solves the error

 

 

Similar Threads

  1. v154 Additional_Images.php File Help
    By MCS_Computers in forum General Questions
    Replies: 19
    Last Post: 16 Jul 2015, 03:33 PM
  2. Issue with search function "exact match" not working 1.3.8
    By shortisgroup in forum General Questions
    Replies: 1
    Last Post: 2 Sep 2011, 04:28 PM
  3. Replies: 22
    Last Post: 11 Nov 2009, 04:48 AM
  4. additional_images.php
    By greenlight in forum General Questions
    Replies: 1
    Last Post: 27 Sep 2008, 04:35 PM
  5. Additional_Images.php Line 16-display link if no large
    By Donn in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 18 Oct 2007, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg