I've been trying to get DocBlox working on windows. I'm running wamp server with PHP version 5.3.9. I've enabled XSL and its showing in phpinfo as well as if I run a test script, XSLTProcessor is available.
I installed DocBlox from PEAR. It runs, however I get the error that the XSL writer was unable to find your XSLTprocessor.
Any ideas? Thank you!
The error that you are receiving means that php does not recognize the xsl extension. Php has got a separate ini file for CLI and web; and I presume that you have enabled the xsl extension for apache only.
You can verify this by executing php -i in your command prompt and check if the xsl extension is enabled there. If not then add your dll to the right config for your WAMP.
Related
I am using MAMP Pro to manage my development environments, the PHP is version 7.0.12 and is running in module mode.
I have added the pcntl module for PHP and have compiled it following the directions from this answer.
The pcntl.so file is in my /Applications/MAMP/bin/php/php7.0.12/lib/php/extensions/no-debug-non-zts-20151012 folder. Also, on my vhost I can output phpinfo() and verify that the extension is installed and additionally checked it by function_exists('pcntl_signal') which returns true.
However, I can't get it to work when running PHP from the terminal. I am using the one that MAMP installs and am invoking it through /Applications/MAMP/bin/php/php7.0.12/bin/php. However, I get the error that the function pcntl_signal does not exist.
Also running /Applications/MAMP/bin/php/php7.0.12/bin/php -i | grep pcntl doesn't output anything.
Is there a way to make the pcntl module available to PHP through the command line in addition to the one apache is using?
There are two separate ini files that MAMP uses for PHP.
One is editable through the GUI, the other needs to be manually edited. For this PHP version the extension must be added in /Applications/MAMP/bin/php/php7.0.12/conf/php.ini
After adding extension=pcntl.so into the above ini file, running php -i | grep pcntl will output
pcntl
pcntl support => enabled
I am using WAMP 2.4.9 on Windows 7. PHP version is 5.5.12. I downloaded the latest available version of PHP-FF-MPEG. I added the extension files as directed, but when I try to start the WAMP with instruction to load extension php-ffmpeg.dll in php.in, an error message shows up saying:
PHPStartup: ffmpeg: Unable to initialize module Module compiled with
module API=20100525 PHP compile with module API=20121212 The options
need to match.
I searched the error and found that I must compile both the PHP and the extension causing such error from source code. I found an example for compiling php with php-profiler extension from source code. But it was a PECL extension. The directory structure and files are different in PHP-FFMPEG than that of PHP Profiler.
Please help me how can I compile PHP and PHP-FFMPEG? Note that I have successfully compiled PHP with PHP-UProfiler.
The way you are trying to install ffmpeg will create compatibility problems. So i would suggest you to install ffmpeg windows build as standalone. After installing create Environment variable for ffmpeg.
Then you can execute ffmpeg from php exec() method :
<?php exec("ffmpeg -i input.mp4 output.avi") ?>
If you deploy your code in production environment on Linux then you can also install ffmpeg on linux as well. check ubuntu installation for ffmpeg here
When running a php command in terminal I keep getting "Mcrypt PHP extension required." I have installed Mcrypt using the instructions here and phpinfo does show that it is enabled (Version: 2.5.8, Api No: 20021217). How can I get this to work to stop PHP from erroring?
Judging by the linked instructions, you've probably enabled the extension only for the SAPI used by Apache.
There's usually a separate config file (/etc/php-cli.ini or something like that), which also has to be modified for CLI to load the extension.
I am using wamp server that installs php version 5.4.3 and I enabled curl extension, edited php.ini files to uncomment curl extensions lines but the problem is that when I try installing composer using console, it gives me a message that says "PHP Startup: unable to load dynamic library 'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll", here is a screenshot of it
I followed instruction from different posts, downloaded curl versions from anindya but with no hope..
Thanks in advance for your time
Make sure your dll is compiled for the version of PHP you're using. So one compiled for 5.5 won't work on 5.4, etc. There's a link in this question that's relevant
PHP cURL not working - WAMP on Windows 7 64 bit
It sounds like you are running a 32bit PHP and have downloaded a 64bit version of PHP_CURL. That wont work
This dll should come as standard with WAMP's PHP's.
Are you sure your problem was not that you forgot that when running PHP in CLI mode you have to configure it using the 'php.ini' file that lives in the c:\wamp\bin\php\php5.4.3\php.ini
So if you uncomment the php_curl extension line in that file it should have worked, until you downloaded the wrong curl dll.
So get a 32bit curl dll for the correct version of php and try again.
I need the MongoDB PHP driver on my CentOS 5.4 machine. My PHP version is 5.1.6. I downloaded the RPM and installed it. That created several files in /usr/bin directory. I copied
/usr/bin/mongo
to
/usr/lib/php/modules
which was what extension_dir showed on doing phpinfo();.
I also added
extension=mongo.so
in /etc/php.ini.
However on executing my PHP script, i still get
Mongo class not found.
What's going wrong here ?
Also, my phpinfo() shows PHP version 5.1.6 whereas running PHP from command line shows 5.3.3. Could anything be wrong with that ?
Thanks in advance.
You're saying your webserver and command line PHP report different versions. These are going to be installed in different locations, and their extensions are API incompatible with each other.
When you installed the php_mongo extension, it may have used the command line php to determine the directory to install the extension to.
Make sure you have the correct php_mongo for the php version of your webserver, and it is in the correct extensions directory. (get the directory from the php.ini returned by phpinfo())
I hope you realise PHP 5.1 is also many years out of date. Unless you have a specific reason to use a version that old, you should also look at upgrading to a more recent version.
Edit:
Just read your comment "I must also mention that /usr/bin/mongo is a binary executable file but its not having a .so extension. Im copying it as is to /usr/lib/php/modules"
No no no! :)
This is the mongo command line client. This is not the PHP extension!
You can run a find /* -name "mongo.so" to see where the installer put the file, this will probably also give you an indication of which version of PHP it was installed for.
It looks as though you are confusing the RPM-packages for the MongoDB server with the requirements to install the MongoDB PHP driver. The PHP driver provides access to the server from your PHP applications, and does not install any command line tools.
restart httpd !
yum service httpd restart