Am trying to install oci8 on mac os Monterey but i keep getting the following error. I have already set php path on the .zshrc and am able to see the correct php version when i run php -v and also the correct path when i run which php
Am running php 7.4.20
I have Xcode installed
checking for Oracle Database OCI8 support... yes, shared
checking PHP version... Unknown option: n
Usage: head [-options] <url>...
-m <method> use method for the request (default is 'HEAD')
-f make request even if head believes method is illegal
-b <base> Use the specified URL as base
-t <timeout> Set timeout value
-i <time> Set the If-Modified-Since header on the request
-c <conttype> use this content-type for POST, PUT, CHECKIN
-a Use text mode for content I/O
-p <proxyurl> use this as a proxy
-P don't load proxy settings from environment
-H <header> send this HTTP header (you can specify several)
-u Display method and URL before any response
-U Display request headers (implies -u)
-s Display response status code
-S Display response status chain
-e Display response headers
-d Do not display content
-o <format> Process HTML content in various ways
-v Show program version
-h Print this message
-x Extra debugging output
configure: error: failed to detect PHP version, please report
ERROR: `/private/tmp/pear/install/oci8/configure --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config --with-oci8=instantclient,/Applications/XAMPP/xamppfiles/lib/oracle/instantclient_19_8/' failed
Related
I install lets encrypt certificates through acme.sh snap package
https://github.com/acmesh-official/acme.sh
I am wondering if there is any way to automate certificate installation via PHP default shell_exec() command.
This shell command used to get certificates works just fine when logged in via SSH
acme.sh --issue --dns dns_gd -d example.com -d *.example.com
However, if I call the same command via PHP shell_exec, it always throws an error
$domainName = 'example.com';
$initCommand = "acme.sh --issue --dns dns_gd -d $domainName -d *.$domainName";
$output = shell_exec("$initCommand 2>&1 | tee -a /var/www/html/sshout.txt 2>/dev/null >/dev/null &");
sshout.txt - The output I am getting on sshout is as following
ssh: 1: /home/ubuntu/.acme.sh: Permission denied
sudo: no tty present and no askpass program specified
Is it possible to get certificates this way?
Or any other way to automate it via PHP? by setting cron, or creating a bash script and calling it from PHP?
I am running PHP 7.2 on ubuntu 18 on an apache server.
You should have permission and the right path to run the bash script. I guess this topic is what you need PHP script can't run bash script. sh: Permission denied
the other way is using acmephp
I'm trying to install an app called CollectiveAccess on a subdomain, and when I enter the website it pops an error.
Your installation is missing required vendor libraries
It has an option to auto install them or change them, but when I click to change them, it pops another error:
Automatic installation of the required vendor libraries failed: Composer installation failed: Error in argument 1, char 2: option not found r; Usage: php-cgi [-q] [-h] [-s] [-v] [-i] [-f ]; php-cgi [args...]; -a Run interactively; -b | Bind Path for external FASTCGI Server mode; -C Do not chdir to the script's directory; -c | Look for php.ini file in this directory; -n No php.ini file will be used; -d foo[=bar] Define INI entry foo with value 'bar'; -e Generate extended information for debugger/profiler; -f Parse . Implies `-q'; -h This help; -i PHP information; -l Syntax check only (lint); -m Show compiled in modules; -q Quiet-mode. Suppress HTTP Header output.; -s Display colour syntax highlighted source.; -v Version number; -w Display source with stripped comments and whitespace.; -z Load Zend extension .; -T Measure execution time of script repeated times.; Error in argument 1, char 2: option not found r; ERROR: Invalid installer signature
Help!! There's no info anywhere else.
Composer’s hash changes periodically. You likely have a hard coded hash the installer script is checking against, which does not match the one given. Try reading the docs on how to install programmatically here: https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
I try to use exec function in PHP to compile a source file with gcc with the following code.
<?php
exec("gcc -o hello hello.c 2>&1", $output, $return_value);
echo $output[0];
I got the following output when calling via web browser (I use nginx as a web server).
gcc: error trying to exec 'cc1': execvp: No such file or directory
However, if I run gcc -o hello hello.c on the command shell directly or call with php my_file.php on the shell directly, both ways compile successfully.
If I append the absolute path to gcc in my PHP code like this:
<?php
exec("/usr/bin/gcc -o hello hello.c 2>&1", $output, $return_value);
echo $output[0];
I got the following output.
collect2: fatal error: cannot find 'ld'
So, I think the problem is my webserver (nginx) doesn't know the system path environment variable to find /usr/bin which gcc and other gcc-dependencies resides in.
How can I let PHP exec function recognize system environment variables on nginx?
OS: Ubuntu 14.04
nginx: 1.6.2
PHP 5.5.9
I'm stuck on the same problem (exactly the same...) using nginx 1.10 and PHP 5.6 on Arch Linux.
The same PHP code was working on Apache/Debian.
When trying the Arch/Nginx server, I had the cc1 error... I replaced gcc by /usr/bin/gcc.... and I am now stuck on "collect2: fatal error: cannot find 'ld'"
The same compilation works with a shell... and ld is in /usr/bin. It just does not work when using "exec" in PHP.
Not satisfying (but working...) solution
By running gcc -v .....(just add -v to your compilation line) I could see :
...
COLLECT_GCC_OPTIONS='-v' '-D' 'exit=noexit' '-D' '_exit=noexit' ...
/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/collect2 -plugin ... (<= very long line)
collect2: fatal error: cannot find 'ld'
Then I did :
cd /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/ # <- path to collect2 (see above)
ln -s /usr/bin/ld ld
Now ld prog is available in the same dir as collect2.
And it works.
I am now looking for a better solution... :)
Set the PATH variable for PHP, as it may rely on its own environment variables and ignore the system's PATH variable.
For example, I have the following line at the bottom of my .env file:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
With this, executing gcc (without giving the full path /usr/bin/gcc) works correctly.
Duplicate of How compile GCC from php. Thought I'd post the answer here as well, since this question received a lot more attention than the other one.
I'm compiling PHP-CPP source but i getting error in Windows 7.But, in Linux (for .so extension) it works fine. The error given by the compiler is:
collect2.exe [Error] ld returned 1 exit status
Note: I'm using PHP-CPP not PHP source code directly...
Error: mkdir -p shared/common The syntax of the command is incorrect.
Makefile:190: recipe for target 'shared_directories' failed
mingw32-make: *** [shared_directories] Error 1
PHP-CPP (i'm using)
Error Image
So, you are using MinGW (mingw32-make) in a cmd.exe hosted environment; cmd.exe's mkdir (md) command doesn't offer a -p option, AFAIK. Your makefile appears to expect a POSIX shell hosted environment, so you may have better luck with such, (e.g. the bash shell furnished by MinGW.org's MSYS, or by Cygwin).
You have to download the newest release of phpcpp - then make a build with cmake (just use the cmake gui for windows) - here it's important to set the follwoing entries for build:
PHPCPP_ARCH with "x86_64" and
PHPCPP_PHP_PATH to the path where your root dir of the php source is ...
if you want to build for static libs - set this:
PHPCPP_MSVCRT_STATIC
if you want to have a dynamic build just don't set this Entry ...
Now just click on "Configure" - when its completed just hit "Generate" ..
if all works fine you can now click on "Open Project" and usualy now Visual Studio will load the data needed for compiling ...
Now just compile and now you can use .lib / .dll for further implementations ...
I am trying to install bigbluebutton in ubuntu 11.10 system when i use the command
wget http://ubuntu.bigbluebutton.org/bigbluebutton.asc -O- | sudo apt-key add -
i am getting the error as
--2012-03-07 10:10:42-- (try:19) http://ubuntu.bigbluebutton.org/bigbluebutton.asc
Connecting to ubuntu.bigbluebutton.org|134.117.48.101|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.
Atlast am getting the error as gpg no valid openpgp data found.
will bigbluebutton work on ubuntu 11.10?
can anyone suggest me the answer for this
Retrieve the file separately. Once you have a good copy of it, from the directory that contains it, just do: sudo apt-key add bigbluebutton.asc.
Try to set up a gpg key then you try the previous step after this
It will not work on Ubuntu 11.10.
We have an updated installation of BigBlueButton 0.9.0 for Ubuntu 14.04 64-bit.