---
title: "Troubleshooting PrestaShop authorization error PHP as CGI"
description: "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."
canonical_url: "https://help.klaviyo.com/hc/en-us/articles/15311862315803"
markdown_url: "https://help.klaviyo.com/hc/en-us/articles/15311862315803.md"
locale: "en-us"
category: "Integrations"
section: "PrestaShop"
updated: "2026-11-03"
---

# 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. 


![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/7dcfc4e3e13953d7b36c59ac42405c82470e99eb-1848x402.png?auto=format)

## 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.

**📝 Note:** 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

1. In PrestaShop, navigate to **Advanced Parameters > Webservice**.

2. Toggle on **Enable CGI mode for PHP**, then click **Save**.




![A settings page in PrestaShop showing Enable CGI mode for PHP toggled on](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/de7ca2d2117852b7454897085590386e3bfad86d-1730x478.jpg?auto=format)

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




![Image](https://cdn.sanity.io/images/6ct6b26e/help-center-prod/332c1d52a97231b017015cbf1f89f2534fa28737-1718x950.png?auto=format)

4. 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](https://help.klaviyo.com/hc/en-us/articles/360054551492.md) to complete setup.

## Additional resources

- [Getting started with PrestaShop](https://help.klaviyo.com/hc/en-us/articles/360054551492.md)
  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](https://help.klaviyo.com/hc/en-us/articles/360055123191.md)
  Learn about the metrics and customer data synced from PrestaShop to Klaviyo. 3 types of events sync from PrestaShop to Klaviyo: 
- [Klaviyo Community](https://community.klaviyo.com/)
