PrestaShop module TECHNICAL ERROR

On a PrestaShop 1.3.2.3 installation I purchased the One Page Checkout 1.2.2 and installed it. After that I got the following error message when trying to add a product to the basket in the shop front end: TECHNICAL ERROR: unable to add the product.

Details:
Error thrown: [object XMLHttpRequest]
Text status: parserror

Solution: The reason is the web server is running in SAFE MODE and the user owning all the PrestaShop files is the FTP user I use to upload the shop. When installing the One Page Checkout module it will be owned by the user running the web server process (in my case www-data:www-data). In SAFE MODE a php script is not allowed to execute a script owned by another user. The solution is to set the owner of all the order-files in the PrestaShop directory to my FTP-user (including the files installed by the OPC module). In a shell this is simply done by the chmod command: cd prestashop-installation-dir chown -R my-user:my-group order* (Replace prestashop-installation-dir with the real path where PrestaShop is installed and my-user:my-group to the userid:grouid owning the rest of the files in the Prestashop installation.)

3 replies
  1. Hamm
    Hamm says:

    Hello,

    Thanks for post. I’m really encountering that same problem here. But my question is that what does userid:grouid mean? Thanks

  2. Stefan Helander
    Stefan Helander says:

    In Linux/UNIX systems it is the name (or numerical representation) of the user and group owning a file. If my username is “stefan” and my group is “users” it would be “stefan:users”. The web server process (Apache) is normally run by another user and group, such as “www-data:www-data” or “nobody:nobody”.

    The above solution requires you have shell access or can change ownership of files through your FTP client.

  3. Peter
    Peter says:

    Despite the mbstring extension being enabled, the problem for me is still a call to undefined function mb_split() (found by enabling error messages as suggested by tomerg).

    I have found a comment in the php manual (http://php.net/manua…nstallation.php) which states

    The mb_split() function requires PHP to be compiled with –enable-mbregex (as of PHP 5.3.0).

    From other sources I understand that mbregex is enabled by default (for php5) when mbstring is enabled but my php has mbregex specifically disabled.

    While I try to sort this out with my web host I have modified the only occurrence of mb_split() (in \tools\smarty\plugins\shared.mb_str_replace.php) to use split() instead. I probably won’t be encountering multi-byte strings so this should be a good workaround. The problem will be when I next update prestashop as I will need to remember this change.

    I regard this ‘problem’ as solved as far as prestashop is concerned – I just need to get my web host to tweak my php installation.

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

2 + 15 =