I want to install php5 on my mac using macports. It throws the following error on terminal:
Attempting to fetch php5-5.3.12_0+apache2.darwin_11.x86_64.tbz2.rmd160 from http://packages.macports.org/php5
Error: org.macports.archivefetch for port php5 returned: Failed to verify signature for archive!
Please see the log file for port php5 for details:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_php5/php5/main.log
To report a bug, follow the instructions in the guide:
http://guide.macports.org/#project.tickets
Error: Processing of port php5 failed
What should I do?
Related
I follow the solution of PHP Fatal error: Class 'OAuth', but still get the same error.
installation
$ sudo pecl install oauth
then add the following line to the end of /etc/php/7.0/cli/php.ini
extension=/usr/lib/php/20151012/oauth.so
Both "php -m" and "php --re oauth" return something. But "php -z" does not work and no OAuth from phpinfo() either.
$ php -z oauth /var/www/html/oauth.php
Failed loading oauth: oauth: cannot open shared object file: No such file or directory
PHP Notice: Undefined index: HTTP_HOST in /var/www/html/oauth.php
One thing to note, I am running PHP on apache2 as docker container behind nginx proxy. Would that be a problem? I verify PHP via phpinfo(), which is working fine.
The system is Ubuntu 16.04, also.
$ pecl list
Installed packages, channel pecl.php.net:
=========================================
Package Version State
oauth 2.0.2 stable
Thanks for the help.
The $_SERVER['HTTP_HOST'] only exists when run php as web server or cgi mode. So if you run in cli mode, the $_SERVER does not contain HTTP_HOST index. Try to access a not exiting index will throw a notice.
Otherwise, if a request is over ip rather than host, this index would not exist.
I use ubuntu server and installed default LAMP package
I run ldap query with php however I get following error message ;
Fatal error: Uncaught Error: Call to undefined function ldap_connect()
in
I insert extension=php_ldap.so and extension=ldap.so paramater in php.ini file
however, I want to install php ldap package i get following error message;
php7.0-ldap : Depends: php7.0-common (= 7.0.4-7ubuntu1) but
7.0.4-7ubuntu2 is to be installed
so, I can't install this package
How can I enable ldap package for php7.0?
How can I enable ldap extension for php7.0?
I solved this issue, download files php7.0-ldap_7.0.4-7ubuntu2_amd64.deb from https://mirror.umd.edu/ubuntu/pool/main/p/php7.0/ and install manuel via dpkg
I want to use PHP's ftp_ssl_connect() on my Mac, but I'm getting an error message that the function is not available:
PHP Fatal error: Call to undefined function ftp_ssl_connect()
I've installed Apache and PHP through MacPorts. I'm using PHP version 5.5.23. I've added FTP and OpenSSL support by running:
port install php55-ftp php55-openssl
I've already tried restarting Apache. In PHPInfo() it does say my install supports both FTP and OpenSSL, but still I'm getting the error message above when trying to use ftp_ssl_connect().
How can I enable this function on my machine?
I'm pretty noob in terminal, so I wanted to start learning PHP and Laravel 4, and I have set up Apache server and installed Homebrew to install all other packages of PHP and composted and so on, but when I'm trying to install PHP on Homebrew, I always get an error:
This is the command I tried to install with:
brew install php53
I'm getting the following error message:
make: *** [sapi/cli/php] Error 1
make: *** Waiting for unfinished jobs....
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libs/libphp5.bundle] Error 1
READ THIS: https://github.com/Homebrew/homebrew/wiki/troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/josegonzalez/homebrew-php/issues
/usr/local/Library/Homebrew/utils.rb:319:in `rescue in open': uninitialized constant
GitHub::OpenSSL (NameError)
from /usr/local/Library/Homebrew/utils.rb:304:in `open'
from /usr/local/Library/Homebrew/utils.rb:345:in `issues_matching'
from /usr/local/Library/Homebrew/utils.rb:373:in `issues_for_formula'
from /usr/local/Library/Homebrew/exceptions.rb:171:in `fetch_issues'
from /usr/local/Library/Homebrew/exceptions.rb:167:in `issues'
from /usr/local/Library/Homebrew/exceptions.rb:208:in `dump'
from /usr/local/Library/brew.rb:133:in `rescue in <main>'
from /usr/local/Library/brew.rb:72:in `<main>'
I always run brew doctor:
brew doctor
Which produces the following warning:
Warning: You have an outdated version of /usr/bin/install_name_tool
installed. This will cause binary package installations to fail. This
can happen if you install osx-gcc-installer or RailsInstaller. To
restore it, you must reinstall OS X or restore the binary from the OS
packages.
What am I doing wrong? How can I fix this problem?
It seems like others have had this issue. One suggestion was to use
xcode-select --install
I found that here: https://github.com/Homebrew/homebrew-php/issues/1172
If you've only just installed xcode tools, you might also be getting an earlier error stating that you haven't accepted xcode's license requirements. Try entering the command:
xcodebuild -license
and follow the instructions to accept the xcode T&C.
I am developing an application that requires integration with Google APIs Client Library for PHP. I am running on LAMP stack on Ubuntu. I have the application up and running on my local host. When I integrate the code from Google API PHP client I get the following error:
PHP Fatal error: Uncaught exception 'Exception' with message 'Google CurlIO client requires the CURL PHP extension
I am unable to find help in any other forum. Can someone please point me to a solution to this. I suspect this could be somehow related to me developing and running the application in my local folder instead of var/www. I have added a file called mysite and pointing Apache to run from a local folder though.
CURL PHP extension is not installed on your PHP module of Apache server. You have to install it using terminal
Open Terminal (CTRL + ALT + T) and do the following command :
sudo apt-get install php5-curl
php5-curl will be automatically downloaded and installed. After Installation, Reload Apache2 Server :
sudo service apache2 reload
Just for clarification if you are using PHP7/Any PHP version you can simply execute
sudo apt-get install php-curl
this will download the appropriate extensions for your installed PHP,
In My case it downloaded php7.2 curl