Hi I have followed https://www.sylvaindurand.org/setting-up-a-nginx-web-server-on-macos/ to install nginx and php. I am using OSX El-capitan, php-fpm and nginx versions are nginx 1.12.1 and php7 My server is working as I am able to open html file stored at document root in browser but when I try to open php file stored at same location it gets downloaded instead of executing
Tag: macos
Problems with installing composer
I am currently trying to install composer in order to install laravel. Following their website instructions, I am entering the following code into my terminal: But without success, I get the following error: This gives me the notion that I do not have permission to do this, is this the reason and why is it occurring? Answer While I was
How to change PHP version on MAMP 4.1
I downloaded MAMP 4.1 on my Mac; by default, the only PHP versions I can use are 7.0.15 and 7.1.1 How can I use PHP 5.6? I tried the solution here Which says I should rename the versions I don’t …
How can I easily switch between PHP versions on Mac OSX?
I would like to test my application on PHP 5.3 up to PHP 7.0. Where and how can I install the versions and how can I switch them by running a small script? Answer If you have both versions of PHP installed, you can switch between versions using the link and unlink brew commands. For example, to switch between PHP
Can’t move composer
When I install composer on my mac with: curl -sS https://getcomposer.org/installer | php And then try to move it like this: sudo mv php composer.phar /usr/local/bin/composer it’s telling me: …
Mysql password expired. Can’t connect
I just wiped my Mac and did a fresh install of El Capitan. I’m struggling to connect to Mysql now. Having gone through a web server setup process, I’ve created a simple PHP test file: <?php $…
pecl install memcache fails on OS X Yosemite with “memcache support requires ZLIB”
I’m trying to perform a pecl install memcache with XAMPP on OS X Yosemite, but it fails to find zlib, producing this error: checking for the location of ZLIB… no checking for the location of zlib… configure: error: memcache support requires ZLIB. Use –with-zlib-dir= to specify prefix where ZLIB include and library are located ERROR: `/private/tmp/pear/temp/memcache/configure –enable-memcache-session=yes’ failed How to
Run test in phpunit with specific php version
I have installed multiple PHP versions on my Mac and want to run unit-tests against a specific PHP version (or against multipls versions) Here’s the php versions I have: My test case looks like this: When I run the test I get this response: How can I run the tests with the php version 5.2.17? Update: I discover that PHPUnit
HTML form with windows cyrillic button’s names doesn’t work on OSX
I installed a site locally on OSX. The site was developed under windows and have cyrillic (Windows) encoding for some string values. I noted that some buttons with cyrillic values wouldn’t work until …
How can I access Unique ID in apache?
How can I access the unique_id that apache tracks for each request? I’d like to track it in any php scripts it calls as well as have it logged for each request. I remove comment on the following line from http.conf file: and I am trying to reference the ID in this simple php script: Yet this script returns only