Questions tagged [php]

PHP is a server-side scripting language used to build dynamic web pages.

Filter by
Sorted by
Tagged with
0
votes
1answer
63 views

Upgrade PHP, not install additional PHP

My new work has just given me a MacBook Pro running macOS Sierra 10.12.6 to use as a development machine. It has PHP 5.6 installed and when I ran curl -s http://php-osx.liip.ch/install.sh | bash -s 7....
2
votes
1answer
38 views

PHP won't include files properly since updating to Mojave

On our office Mac, we have a local Apache server running through the software AMPPS. Prior to updating to Mojave, everything was working correctly. Now, after updating, there is an issue with using ...
0
votes
1answer
116 views

Stuck in upgrading PHP version on localhost Mojave

I'm trying to get PHP7.2 working on localhost, but phpinfo() keeps saying 7.1.19 is in place while ~php -v tells me PHP7.2.18 is in place. I run ~php -v it says: PHP 7.2.18 (cli) (built: May 2 ...
0
votes
0answers
676 views

Mcrypt Extension for Mojave's PHP 7.1 not using brew

I'm using macOS Mojave (10.14.3) and it already has apache2 and php 7.1 which are setup. I want mcrypt installed but all the info on the internet including this uses brew. I didn't install php using ...
6
votes
3answers
15k views

PHP not working after upgrading to OS Mojave

When i try to open localhost it gives me 403 error message like this "You don't have permission to access / on this server." I have tried changing the permission but nothing happens. It worked fine ...
1
vote
1answer
74 views

Tracing PHP process killed on Mac does not work

I'm running a simple PHP process that uses a tiny bit of memory and CPU. The max memory limit is 2G and the script is run from console. The memory used never exceeds 200 MB. CPU use fluctuates ...
10
votes
1answer
17k views

How can I determine the compile-time options of PHP?

I'm trying to customize my php install, but I'm not that familiar with compiling programs from scratch. How can I tell determine what compile-time options were used for php? Specifically, I'm trying ...
0
votes
0answers
582 views

PHP and Apache not working after upgrading to Mojave

I have a very similar question as this PHP not working after upgrading to OS Mojave so it's not a duplicate as I get a different error I had Apache and PHP working absolutely fine running on High ...
1
vote
1answer
64 views

launchd is not passing arguments to my PHP script

I'm having a weird problem. I use launchd to run a bunch of shell scripts that update content on my site. It was working fine when it was just calling scripts normally. But now I made the script a ...
1
vote
1answer
628 views

Issues installing Mcrypt PHP module

I am trying to install Mcrypt PHP module but encountering some issues: Version of PHP installed: 7.1.16 macOS version: macOS High Sierra 10.13.6 Is the following command that I am running correct? ...
0
votes
3answers
212 views

Give local PHP Full Disk Access in Mojave

I have a PHP webpage running on the local apache installation. The page uses shell_exec to access the messages/chat.db via sqlite3. shell_exec("sudo -u ben sqlite3 ~/Library/messages/chat.db \"...
1
vote
0answers
160 views

Installing and using CodeIgniter on macOS?

I followed this tutorial online and I'm currently running macOS High Sierra. I tried a simple rest API using PHP and now I'm trying to implement it using CodeIgniter3.x framework. The one I created ...
0
votes
1answer
2k views

localhost/phpmyadmin - 404 error on macOS High Sierra

I'm setting up a PHP project on my machine's loalhost. This part is working fine, and it's loading the index.php correctly when visiting http://localhost. However, visiting http://localhost/phpmyadmin ...
0
votes
1answer
359 views

PHP incredibly slow since upgrading macOS to 10.14 Mojave?

Since I upgraded my Mac to Mojave 10.14, I noticed PHP is incredibly slow. When I do this from the terminal: php -v It takes about 4-5 seconds before showing the version number, which is: PHP 7.1....
4
votes
5answers
5k views

XAMPP VM and text editors

I recently installed XAMPP for OS X (XAMPP VM PHP 7.2.1) which now virtualizes the entire box for obvious benefits of higher security. Although I admire the new concept and see its benefits, I cannot ...
12
votes
2answers
15k views

How to install composer via homebrew

I'm really new to MacOS so maybe this is simple question. I'm using High Sierra with default PHP 7.1 installed, I've also installed PHP 7.2 running: curl -s http://php-osx.liip.ch/install.sh | bash -...
1
vote
0answers
74 views

How to set PHP alias for all users

This is probably easy, but I don't know how to set it for all users. So, when I run: which php it shows /usr/local/php5-7.2.0-20171215-181251/bin/php However I've just installed PHP using brew on ...
1
vote
1answer
411 views

System Integrity Protection (SIP) creating problem for oci_connect(): OCIEnvNlsCreate()

After I upgraded my OS to El Capitan (which comes with SIP), I am getting error in oci_connect() Warning: oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please ...
4
votes
1answer
22k views

How to properly and for once reinstall PHP/Apache

So I'm struggeling with this since a long time and I'd like to find a proper solution. I have php5.4.. install and I want to upgrade to Php 7. No matter how hard I'm trying to do it I can't seems to ...
1
vote
1answer
4k views

OpenSSL 0.9.8zg used by PHP does not support TLSv1.2 or TLSv1.1

As part of the installation a PHP 5.4 cartridge from openshift.com on my Mac with OS X 10.10.5 in the Terminal I noticed a message about it loading OpenSSL 0.9.8 for compatibilty with PHP. Later, ...
9
votes
3answers
43k views

How to remove preinstalled Apache and PHP from Mac OS Sierra

I have been trying to figure out how to completely remove preinstalled Apache and PHP from my macbook pro ... The reason is that I am using the homebrew version of both Apache and PHP. The current ...
12
votes
7answers
36k views

How can I increase command line memory_limit for PHP with MAMP PRO?

I've edited every single php.ini on my Mac (at least all the ones found by "locate") and still can't seem to increase the memory_limit directive for PHP. I'm using MAMP PRO and running PHP scripts in ...
0
votes
2answers
2k views

Can't install php56-mcrypt with homebrew

I use Homebrew on my testing server on OS X. I have php56, autoconf, and mcrypt installed through homebrew. I was successful doing this on a different Mac but I am not having any luck this time. ...
1
vote
1answer
464 views

Current PHP version is 7.2.2 but localhost is running php56

I recently upgraded PHP through Homebrew. When using terminal command PHP -i I'm getting PHP Version => 7.2.2 as expected. However, when running phpinfo(); on localhost I get PHP Version 5.6.30 ...
0
votes
1answer
854 views

OSX 10.9.5 upgrade causes apache/php downgrade

Today I installed the OSX 10.9.5 upgrade and it appears to have downgraded my Apache and PHP version. Is there an easy way to reverse this unwanted downgrade? Or do I have to reinstall apache via ...
0
votes
2answers
253 views

iTerm2: Notice about PHP7.1

Every time I open a new iTerm2 window is shown the following warning: Warning: Use php@7.1 instead of deprecated homebrew/php/php71 Anyone can help me out please? I've uninstalled PHP, and ...
0
votes
1answer
1k views

403 forbidden on Apache vHost

I'm using Mac OS X 10.6.8 and I'm trying to configure a vHost. I configured it and it gave me a 403 Forbidden, and I'm having trouble giving _www permission to read/write in ~/Document/workspace/dev ...
1
vote
1answer
3k views

brew changes from php71 to php@7.1 on installation

I am trying to install php71 with the command brew install php71 but instead php@7.1 is installed. When trying to install redis with brew install php71-redis it's installing but not working with that ...
0
votes
1answer
59 views

Built-in Apache and Php is viable?

Does anybody has experience with using built-in Apache/PHP in a High Sierra? Does it have any drawbacks if compare to homebrew apache/php? I plan to use it with Laravel or GravCMS. Any thoughts?
0
votes
1answer
2k views

PHP not locating mcrypt while using MAMP

I'm using MAMP on a MAC. And in the php info page on MAMP, it says that mcrypt is enabled. However, when I run "php -m" on the terminal, I can't find mcrypt between the php modules. Any advice??
0
votes
1answer
820 views

Solve /Users/myusername/Sites/foo ~/bar localhost/~myusername High Sierra Apache server connection Internal Server Error

Battle of VirtualHost /Users/myusername/Sites/foo ~/bar Internal Server Error goin on for days now tryin to attach localhost/~myusername to Apache/2.4.28 http server on macOS 10.13.3 High Sierra ...
2
votes
0answers
50 views

PHP mail not sending (possible macOS Server or Firewall issue?)

This is a relatively complex problem and LONG description, so bear with me. Please ask questions in the comments if you think I can clarify something. I am hosting multiple websites on a single ...
0
votes
1answer
57 views

Use screencapture with PHP exec

I can't get screencapture to work work when triggered with exec() command. $output = exec("/usr/sbin/screencapture -R 0,0,450,150 hehe.png"." 2>&1"); echo $output; // in /System/Library/...
2
votes
1answer
209 views

Terminal could not find command “$ php -v”

I recently try to install ionCube loader and when I tried to check my PHP version via Terminal, it gave me an -bash: $: command not found. How can I fixed that?
3
votes
1answer
7k views

After MacOS High Sierra install, localhost fails and apache has syntax errors

After upgrading to MacOS High Sierra, I haven't been able to access my localhost. I tried restarting Apache, but it still didn't work. So I did apachectl configtest and got this error message: ...
6
votes
2answers
50k views

How can I uninstall PHP 5.4 and 5.5?

I'm new to PHP and Apache and I think I've messed some things up that I don't know how to fix. After following a tutorial I managed to update to PHP 5.5, and then started having problems. I went to ...
1
vote
2answers
1k views

Homebrew + Imagemagick + php54-imagick not working

Based on this post here, I am having a versioning issue with Imagemagick. php54-imagick version => 3.4.3_2 imagemagick => 7.0.5-3 I understand that I need to downgrade my imagemagick to 6.9.* My ...
2
votes
1answer
322 views

How to reinstall php70-xdebug with the debug symbols?

I'd like to reinstall php70-xdebug package with debug symbols like: $ brew reinstall php70-xdebug --with-debug ==> Reinstalling homebrew/php/php70-xdebug Warning: homebrew/php/php70-xdebug: this ...
2
votes
1answer
8k views

Uninstall/ disable php 5.6.9 osx Yosemite

I´m running osx yosemite with homebrew, apache, php5.6.9 and have installed php 5.3. I need php 5.3 to run a certain api which known to have complications with ph5.6.9. But how can I disable php 5.6.9 ...
3
votes
1answer
629 views

Post data to url using AppleScript

I am trying to take user input and send the data to a url on my site to do some checks against my database. In my php script I cant display any of the POST variables. it seems like the data is not ...
2
votes
1answer
896 views

How to activate built-in PHP in macOS Server 5?

On our macOS Server 5.2, I want to run a PHP site. So my idea was to use the built-in PHP in OS X Server by simply ticking the checkbox "Enable PHP" in the Server app at the Websites general ...
1
vote
1answer
485 views

PHP MAMP user not finding /usr/local/bin

I have a website in a shared Linux hosting that uses Ghostscript. I use by php exec function that executes command line functions, gs commands to render PDF files, by simple gs commands. gs -h (will ...
0
votes
1answer
2k views

How to complete remove all links to default PHP version?

Running macOS Sierra. How can I complete remove all links to the default installed PHP version? I have installed PHP 7 through homebrew but when I run scripts that call external CLI applications ...
1
vote
1answer
3k views

chmod 760 or 777, could this be a security problem?

I'm trying to build a local PHP server using XAMPP. When I'm trying to run one of the PHP files, I get an error about the fopen command in the file. From a quick search in the web, I've seen that in ...
2
votes
2answers
284 views

Make TextMate run php from a different binary, not the original php

I work with php and postgre, and since the stock php doesn't come with postgre I had to install a different php version. So I installed php5 from this website: http://php-osx.liip.ch It's a quick ...
1
vote
1answer
67 views

PHP will not run from command line

When trying to run a PHP script from inside Terminal, the script is just echoed to stdout. This happens if the script is executed directly (first line #!/usr/bin/php) called as an argument (/usr/bin/...
9
votes
1answer
12k views

Can't write to /usr even with sudo

Here's my problem: sudo php -d detect_unicode=0 go-pear.phar ...should let me run as root and modify /usr & /usr/share directories, but I get this: Below is a suggested file layout for your ...
1
vote
0answers
802 views

Unable to connect to localhost on my development machine

I'm configuring a new Web development machine using the very complete and well-written guide published by Echo Software but I cannot connect to localhost after following/checking every step. My only ...
0
votes
2answers
2k views

Installation failure - the mongodb driver for PHP on El Capitan

I tried to install the mongodb driver for PHP on El Capitan. While running sudo pecl install mongo, I get the error message: sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo fatal error: ...
0
votes
1answer
1k views

How to find the process listening to the localhost on OSX?

In my Mac(10.11.5), I find a strange php server is listening to my localhost: $ curl -i localhost HTTP/1.1 200 OK Date: Mon, 11 Jul 2016 10:05:11 GMT Server: Apache/2.4.18 (Unix) PHP/5.6.23 Content-...