Posts

Showing posts with the label apache

Migrate to php7 in Mac os Sierra with Apache Configurations

Image
Mac os Sierra defult comes with Apache as well as php 5.. Fi you want to start apache with defult settings The following articles gives short as well as comprehesive guideline. https://jason.pureconcepts.net/2016/09/install-apache-php-mysql-mac-os-x-sierra/ https://medium.com/@JohnFoderaro/how-to-set-up-apache-in-macos-sierra-10-12-bca5a5dfffba However , I wanted to setup firebase integration with laravel and it requires php 7. ( kreait/firebase-php ^ 4.0 ) You can eassy install php 7 using homebrew. brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew unlink php56 brew install php70 Thin you can check the version as follows . $ php --version But if you have enabled defult php in Mac Os , you will see  it will return 5.6 In order to chanage this you have to edit the httpd.conf file of apache.  Stop apache -    sudo apachectl stop move to etc/ apache2. -    cd /etc/apache2 backup httpd.conf.   - sudo cp httpd.conf httpd.conf.er

Apache enable MOD_REWRITE for PHP Rest API

Image
Hi Im woarking with follwing expample which illustrate how to create REST Api form genic PHP http://www.tutorialsface.com/2016/02/simple-php-mysql-rest-api-sample-example-tutorial/ However I  need to set MOD_REWRITE for the API folder in Wamp and Follwing steps need to follow to achive it . 1.Go to apache  http.conf in WAMP apache folder ,and open it 2. Make a backup of http.conf   3.  Find the line #LoadModule rewrite_module modules/mod_rewrite.so and uncomment it by removing hash. 4.ADD the rule as below for the APi folder . in my case its MI_API (there will be block like below mapped to WAP ,www folder ,you can edit it as nesosary) <directory C:/wamp/www> Options All   AllowOverride All </directory> Thanks  for : https://webdevdoor.com/php/mod_rewrite-windows-apache-url-rewriting