Configuring ‘Path to PHP-CLI’ on XAMPP (and/or MAMP) in Windows

I have Omeka Classic (Omeka 2.7.1) installed on XAMPP localhost, with PHP 7.4.1 . Its working in the sense I can add collections, items and files. UniversalViewer plugin installed and configured ok and it works on the site.

The problems begin (I think) when I use a plugin that needs to run a php script, like CSVImport or PDFText. These produced ‘Omeka has encountered an error’; ‘RuntimeException. The configured PHP path (…) is invalid.’ A MAMP install encounters the same problem.

The ‘…’ is the path I put in the Background Scripts part of the Site configuration file: In XAMPP the file is located: ‘C:\xampp\htdocs\omeka-2.7.1\application\config\config.ini’

The php directory in the XAMP installation is ‘C:\xampp\php’ . I have tried variations of this in the config file but no luck so far. When left blank Omeka doesn’t autodetect the path, and I get the same error message as above.

The posts below are on similar/same problems. (One is about Omeka-S… I have tried Omeka-S with same result – it installs fine, items can be added, but plugins crash and give the PHP path error).

I understand support is focused on the Linux platform but this issue seems like Windows syntax issue that might have quick solution??

Invalid-php-path: Invalid PHP path on XAMPP
CSV Import problem: CSV Import problem

You need to give the full path to the PHP binary, so if C:\xampp\php is a folder, then that’s not going to be the correct path.

1 Like

This topic was automatically closed after 250 days. New replies are no longer allowed.