This is my configuration for pear and I will get this error while I'm executing php doc command. Im on Mac OS Sierra and my php -v is PHP 5.6.30 (cli) (built: Feb 7 2017 16:18:37)
phpdoc --filename first-doc.php -t docs
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /usr/local/bin/phpdoc on line 40
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:') in /usr/local/bin/phpdoc on line 40
Please help
At a minimum, your PHP configuration's include_path does not contain the main PEAR php_dir location.
Note the error message shows (include_path='.:'), meaning it only contains your current directory you're in right now in the shell.
Your PEAR config shows that php_dir is set to /usr/lib/php, so that needs to be added to the include_path setting in your php.ini file.
I'm actually surprised that PEAR would install anything successfully without the include_path set correctly, as the PEAR program itself should be having trouble running itself. Perhaps the include_path was misconfigured after things were installed.
Related
I have a problem with pthreads in PHP.
When I start apache I see error like this:
php.exe - Entry point not found
The procedure entry point was not found _zend_hash_update##12 in library D:\xampp\php\ext\php_pthreads.dll
When I execute script in CMD I have a warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: D:\xampp\php\ext\php_pthreads.dll
I copied pthreadVC2.dll to:
C:/windows/system32
D:/xampp/php
D:/xampp/apache/bin
And I copied last file php_pthreads.dll to:
D:/xampp/ext
I added to php.ini line with:
extension=php_pthreads.dll
My config:
XAMPP on Windows 10
PHP Version 7.3.0
Compiler: MSVC15 (Visual C++ 2017)
Architecture: x86
Thread Safety is enabled
Thread API is Windows Threads
php_threads 3.1.6 x86 downloaded from https://windows.php.net/downloads/pecl/releases/pthreads/3.1.6/
I tried in php 7.2.x and i had the same problem but other apache startup error message.
Maybe someone can help me.
My problem was solved!
My advices:
Downgrade to 7.2.x version PHP on xampp (because pthreads 3.2.0 is compltible with php 7.2)
Download and install php_pthreads-3.2.0 (which is compiled MSVC 15 the same as
PHP. Link: https://github.com/krakjoe/pthreads/releases)
Delete pthreadVC2.dll from apache/bin (because it isn't needed)
Make copy php.ini and save copy as php-cli.ini
From php.ini remove line with extension=php_pthreads.dll (this line must be exist in php-cli.ini)
Try in CMD command: php --ini and check Loaded Configuration File. That must be set as php-cli.ini. And also try command: php -i and find pthreads in result.
Today I have installed php7, but when I restart the apache, it couldn't start. again despite I edited the httpd-xampp.conf file to config php7.
anyway I went to C:/xampp and run the apache_start.bat, then I saw the following error
Apache 2 is starting ...
httpd.exe: Syntax error on line 456 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 17 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load C:/xampp/php/php7ts.dll into server: The specified module could not be found.
after that I checked those file and saw they're exist.
what can I do now?
thanks in advance...
You need to have all the components installed in the same x64/x86 version :
Apache (httpd.exe -v to find out which one is installed)
PHP 7 (php.exe -v to find out which one is installed)
Visual C++ Redistributable for Visual Studio 2015 (check the list of your installed softwares on Windows)
If one of the above component is not in the same version than the others, you could get the module could not be found error.
I am attempting to add the ZeroMQ extension's PHP functionality to my local server. I have successfully installed it however binding it to the PHP of my system has been a challenge.
I've attempted both the PEAR/PECL and Github building methods however they all come down to this CLI Error:
In file included from /private/tmp/pear/install/zmq/zmq.c:31:
/private/tmp/pear/install/zmq/php_zmq.h:45:10: fatal error: 'php.h' file not found
#include "php.h"
^~~~~~~
1 error generated.
make: *** [zmq.lo] Error 1
ERROR: `make' failed
where can I generate and include this php.h file?
php-v shows: PHP 7.1.7 (cli) (built: Jul 15 2017 18:08:09) ( NTS )
phpize -v shows: grep: /usr/include/php/main/php.h: No such file or directory
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory
Configuring for:
PHP Api Version:
Zend Module Api No:
Zend Extension Api No:
I ran into this when installing zmq on MacOS 10.14.3 Mojave. I'd done the followings and it's fixed.
install the command line tools if you haven't done so.
xcode-select --install
install the header files
cd /Library/Developer/CommandLineTools/Packages/
open macOS_SDK_headers_for_macOS_10.14.pkg
Credit to #Steven Installing xdebug on MacOs Mojave - 'php.h' file not found
I am trying to install ZMQ on XAMPP based Apache server. (working on windows 10)
Following is the list I have already done in order to install ZMQ
Copied libzmq.dell into xampp/php
Copied php_zmq.dll into xampp/php/ext
Included both xampp/php and xampp/php/ext in environment variable
But keeps on getting the following error.
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_zmq.dll' - The specified module could not be found. in Unknown on line 0
What could be the possible reason. According to warning, it says it did not found php_zmq.dll but is there.
what could be the possible reason
I am using Wamp, but the suggestion in comment from mitchken worked for me.
Did you include php into your system it's path variables? Something like C:\xampp\bin\php\php5.6.15 – mitchken Mar 10 at 11:52
I am on OS X 10.9.5.
I installed Php 5.5 via homebrew and also the PHP 5.5 mcrypt extension, php55 and php55-mcrypt in homebrew. In order to enable php5 in apache, I added this to /etc/apache2/httpd.conf
LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so
I'm using Laravel and need the Mcrypt extension, so I added this to /usr/local/php/5.5/php.ini
extension=mcrypt.so
In order to force the terminal to use the proper PHP version, 5.5, rather than the 5.4 the computer shipped with, I renamed /usr/bin/php to /usr/bin/php-old, and now the terminal falls back to /usr/local/bin/php, which is the version 5.5 that I'd like to use. Now, I am getting the following error in the terminal whenever I do anything in php from terminal.
[Sat Sep 20 16:32:12 2014] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php55/5.5.17/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so' - dlopen(/usr/local/Cellar/php55/5.5.17/lib/php/extensions/no-debug-non-zts-20121212/mcrypt.so, 9): image not found in Unknown on line 0
Any ideas on how this happened or where I went wrong? I'm getting discouraged by this OSX development server setup and considering just giving in and installing a dual-booted Ubuntu Partition. I was hoping to leverage OSX's unix base, but it has been a nightmare to setup the dev server so far.
You seem to have messed with homebrew since your PHP is looking for files in Cellar. Run "which php" and check which PHP is actually running and run "php --ini" to make sure you edited the right PHP configuration.
The easiest way to get a proper running PHP is to install it from Homebrew and add that to your PATH.