Troubleshooting PrestaShop authorization error PHP as CGI
You will learn
Learn how to solve the authorization issue “It appears you are running PHP as a CGI” when configuring the Klaviyo module in PrestaShop. Solving this issue involves changing a setting in PrestaShop, then regenerating your .htaccess file. Follow the steps in this article to finish integrating with PrestaShop properly.

Before you begin
If Klaviyo could not retrieve your shops, first check the Shop URL and Webservice key in your PrestaShop integration settings. Use the steps below if your server runs PHP as CGI.
If you have made any manual code changes to your .htaccess file, please note that the following steps will force PrestaShop to regenerate the file and erase them. Back up the file before continuing.
Steps to resolve
- In PrestaShop, navigate to Advanced Parameters > Webservice.
- Toggle on Enable CGI mode for PHP, then click Save.

- To regenerate the .htaccess file, navigate to Shop Parameters > Traffic & SEO.

- Click Save (you do not need to make any changes). Clicking Save here forces PrestaShop to regenerate the .htaccess file which, with the CGI toggle on, will solve the authorization issue.
If you saw the error in the Klaviyo module in PrestaShop, return to its settings page and continue configuring the module.
If you saw the error in Klaviyo, return to the PrestaShop integration settings and click Retrieve list of shops again. Once your shops appear, select the shops you want to integrate and follow Getting started with PrestaShop to complete setup.
Additional resources
- Getting started with PrestaShop
Learn how to integrate your PrestaShop store with Klaviyo. Klaviyo is PrestaShop’s preferred marketing automation partner. This process involves 2 steps: installing a free module (PrestaShop Automation with Klaviyo) in PrestaShop and enabling the integration within Klaviyo. This article also provides information about monitoring your data sync, setting up transactional emails, and updating your module so that you can grow with Klaviyo.
- PrestaShop data reference
Learn about the metrics and customer data synced from PrestaShop to Klaviyo. 3 types of events sync from PrestaShop to Klaviyo:
- Klaviyo Community