Questions tagged [php]

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

Filter by
Sorted by
Tagged with
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
118 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 ...
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 ...
0
votes
0answers
678 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 ...
0
votes
0answers
584 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
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
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 \"...
0
votes
1answer
361 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....
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
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 ...
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....
1
vote
1answer
631 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
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
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 -...
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: ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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/...
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 ...
1
vote
1answer
486 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
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-...
1
vote
1answer
41 views

Extention enable PHP

In my PHP.ini, the extensions are not uncommented. ;extension=php_curl.so But in phpinfo(), I can see that curl (by example) is enable and in my code I can use it. But I can't understand why curl ...
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 ...
3
votes
1answer
3k views

Uninstall default PHP on El Capitan

My Mac has the default installation of PHP 5.5 at /usr/bin/php and I want to remove it the right way because I want to have PHP 7 instead of this. So far no luck on how to uninstall the right way. I ...
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 ...
4
votes
1answer
2k views

Can I delete Xcode?

I'm a php developer, usually with the laravel framework. I want to get rid of Xcode because I'm tired of dedicating 9 gigabytes of storage to an application that I don't use at all. I seem to ...
0
votes
1answer
68 views

Need some basic enlightenment about using PHP

Actually I have been programming in PHP for a while, but my experiences about PHP is through VPS or some local environment like XAMPP. I was trying to install xDebug/homebrew when I come across this ...
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, ...
0
votes
1answer
95 views

Know installation source of PHP

I'm finding myself in an awkward situation. I need to install PHP and Nginx for development but I do not want to mess up my Mac with multiple installations. I have found that PHP and PHP-fpm are ...
0
votes
1answer
80 views

How can I hook up a PHP server?

I have a php page I want to test on a server. Is there a server that runs through Terminal.app that supports PHP? I read this tutorial, but either I did it wrong or it didn't work. How can I start up ...
1
vote
1answer
226 views

Port 9000 apache returns access forbidden

I am using native PHP and native Apache. PHP version is 5.5. userdir module in Apache is enabled, and I have my PHP codes under ~/Sites. Localhost URL is localhost/~username. I have installed XDebug ...
0
votes
2answers
657 views

MAMP PRO uninstalled but Terminal commands still exist. How to remove them as well?

Source: To "uninstall" MAMP, you only have to delete the MAMP directory and everything returns to the original state I uninstalled MAMP using the Uninstaller from Applications/MAMP PRO. I checked ...
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: ...
2
votes
1answer
249 views

How to update internal PHP

How do I update the internal PHP on OS X 10.7.1? I've loaded a current version but since I don't have a simple plan how to update it, I won't do it. I guess it's just easy replacing of files in etc/...