ankit
ankit

Reputation: 295

how to deploy phar file on a webserver like xampp

I am using maven with php and packaging my code to phar archive and deploy it on xampp. In java we copy war files for webapp folder of application server like tomcat. How do I do that in php? do i just go and put the .phar in xampp/htdocs folder ?

Thanks

Upvotes: 3

Views: 3273

Answers (1)

cweiske
cweiske

Reputation: 31078

You need to tell Apache that it should run .phar files with PHP:

cat /etc/apache2/mods-enabled/php5.conf |head -n3
<IfModule mod_php5.c>
    <FilesMatch "\.ph(ar|p3?|tml)$">
      SetHandler application/x-httpd-php

See http://cweiske.de/tagebuch/phar-webserver.htm for more details.

Upvotes: 1

Related Questions