Jump to content

Running Prestashop with php-cli


Recommended Posts

Hello,

I need to run a CLI (command line interface) script using some of the PrestaShop features. More specifically, I need to run some Admin Controllers.

 

In order to do so I'm requiring PrestaShop configuration file but it fails loading configuration because during script execution Admin SuperAdministrator is obviously not logged in.

 

My questions are:

- Which is the best way to run PrestaShop from the command line?

- How can I make PrestaShop think that a user is logged in inside my cli script?

 

The main problem is here:

PHP Fatal error: Call to a member function isLoggedBack() on a non-object in /var/{apachevirtualhostpath}/public/www/classes/controller/AdminController.php on line 1805

I'm running PS 1.5.4.1.

 

I've had other issues mainly because of the domain (which is not applicable on cli), but I already solved them.

 

 

Thank you,

best regards.

Edited by BluedaySrl (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...