We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 54240
    • 1 Posts
    I am on modx revo 2.6.3, with the latest minishop2 / xpdotools.

    all installs OK, I have added a category CDs and then added a product cd1 to that category.

    however when I try to upload an image cd1.png from my windows 10 machine to the server using the Gallery tab for the product I get a pop up message

    "cd1.png: Could not read file"

    and I find the following in the modx error log :

    [2018-05-05 10:57:42] (ERROR @ /home/e-smith/files/ibays/minishop/html/core/components/minishop2/processors/mgr/gallery/upload.class.php : 187) PHP warning: strpos() expects parameter 1 to be string, array given
    [2018-05-05 10:57:42] (ERROR @ /home/e-smith/files/ibays/minishop/html/core/components/minishop2/processors/mgr/gallery/upload.class.php : 188) PHP warning: explode() expects parameter 2 to be string, array given
    [2018-05-05 10:57:42] (ERROR @ /home/e-smith/files/ibays/minishop/html/core/components/minishop2/processors/mgr/gallery/upload.class.php : 189) PHP warning: end() expects parameter 1 to be array, null given
    [2018-05-05 10:57:42] (ERROR @ /home/e-smith/files/ibays/minishop/html/core/components/minishop2/processors/mgr/gallery/upload.class.php : 190) PHP warning: fopen() expects parameter 1 to be string, array given

    What am I doing wrong ?

    [SOLVED]

    this error was due to the way that my server (SME Server) implements the open-basedir php directive:

    making the correction to the configuration makes the problem disappear.

    Voila ! [ed. note: nowhinjing2 last edited this post 5 years, 11 months ago.]