I would like to use this plugin because can cache the query results. But even reading the docs at
http://dev.mysql.com/doc/refman/5.5/en/apis-php-mysqlnd-qc.setup.html
http://www.php.net/manual/en/mysqlnd-qc.setup.php
still confused. Does it mean it comes with PHP 5.4 by default? If not, how I can I check if it's installed from CentOS using a command line? Also, how can I check if it's installed on my local PC running XAMPP with PHP 5.4?
Thank you.
As far as I know, none of the mysqlnd plugins are installed by default.
I've tried installing one of the mysqlnd plugins (in my case it was mysqlnd_ms), but I've had limited success. I concluded that I needed to build both the mysqlnd plugin and PHP itself from source to get it to work.
At that point I lost interest, because none of my clients are willing to build PHP from source for their environments. They want to use binary installs, preferably from a yum package repo.
I don't think these plugins will catch on as viable tools until they are installable in a more convenient way, for example through PECL or Composer.
Okay, based on this doc, PHP 5.4 has installed MySQLnd by default
http://dev.mysql.com/downloads/connector/php-mysqlnd/
and to test it using this answer
How to know if MySQLnd is the active driver?
Related
I just got handed a big project running Symfony 3.4, and PHP 5.6, that I'm trying to get working on my "new" Mac Catalina (just purchased and installed, not upgraded from a previous macOS version), and I've gotten things working up to a certain point:
our-symfony-3-project $ bin/console server:start
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.64.dylib
Referenced from: /usr/local/opt/php#5.6/bin/php
Reason: image not found
zsh: abort bin/console server:start
I was able to fix a previous similar error with needing openssl 1.0.0 (I had to compile it from source using Homebrew then link it), and I think the solution is the same here, but it appears that I need to find the library or repo or download for icu4c version 64 (not sure I'm reading this right) to get brew extract to install it (it won't any other way), or figure out how to compile it and manually get it working for PHP 5.6, and I'm not finding the library I need apparently.
I've gone through pages and pages and probably a hundred command attempts trying to fix this error... and so far the recommendations have either been outdated (due to macOS/brew changes), or just didn't work.
I'd like to know where I can find the appropriate file/download/repo to just be able to install or compile this through brew or otherwise. PS: I know we shouldn't be using old versions but I just got this job and the company will not upgrade for a while.
I'm answering this by saying that I got the repo to work on a PHP 5.6 host using MAMP Pro (and Apache, not that that's relevant)... which already had the required libraries in question.
I went through the docs on the trial version (version 6.3.2):
https://documentation.mamp.info/en/MAMP-PRO-Mac/Settings/Hosts/General/
However, unlike Homebrew, switching PHP versions across hosts in MAMP Pro doesn't overwrite PHP symlinks like brew unlink and brew link does, I have to still edit my .zshrc file aliases and my PATH to have things like php (or pecl or pear etc) point to the MAMP Pro PHP version folders to get them to work correctly with the repos, as well as with composer (which runs the php command). Even MAMP's documentation says to modify the files yourself...
I can't tell yet if this difficulty is just natural to having multiple hosts with different PHP versions configured, as I could see how multiple variations running at the same time could conflict if they're using the same system files (like /usr/local files)... which sound like system software dependencies, and I don't know that these dependencies could be relegated to their own host folders (like /Applications/MAMP/bin/php/php5.6.40 folders), or maybe I just missed something somewhere. I'll update this answer if I learn better what to do here, or will add another answer if I find a way to do them using Homebrew better.
I have searched everywhere it seems. I am trying to install it from the terminal.
PHP is throwing an error stating SphinxClient() object cannot be found. So, I know it does not come built-in with PHP.
Just add sphinxapi.php to your project and include it like this:
include('sphinxapi.php');
or this:
require('sphinxapi.php')
You can find the source code here https://github.com/sphinxsearch/sphinx/blob/master/api/sphinxapi.php
Alternatively if you have installed Sphinx (or Manticoresearch) from a package the library can be found here /usr/share/sphinx/api/sphinxapi.php
If you want a PECL module, not the source code, you can install it from here https://pecl.php.net/package/sphinx , but be aware that atm (Feb 2018) that pecl module is very outdated and may not work well with newer Sphinx/Manticoresearch binaries. Most likely it won't.
P.S. I'd recommend to use SphinxQL instead which doesn't require SphinxClient() and has wider range of functionality.
I am trying to use the PayPal PHP SDK to make an online store, however the documentation tells me I need composer. When I try to install composer I get this error. I have no idea what this means, or how to fix it. What can I do to fix this? I
P.S. There are quite a few questions about this on SO, however, all of them that I have seen ask about using WAMP or something similar. I have no intention of using WAMP, or anything like that. The only thing I am trying to do is install composer properly.
EDIT: I am just using the Composer installer for Windows.
You need PHP installed whether you have a full test environment running or not. If you can't run PHP from the command line Composer stuff doesn't work. With a basic install of PHP the openssl extension is included so that error would go away.
You can install PHP manually on its own, or you could just install WAMP or any of the many others. I use Zend Server myself. It just installs everything for you so that it works without needing to mess with manual installation.
Once PHP in general is installed, though, that should get rid of this error.
Laravel works fine local, but on the server I get the following:
Laravel requires the Mcrypt PHP extension.
However I can't install mcrypt on my server because i have no admin rights. The process for installing the module at the server in my corporation would be to painful, it would be better to just go with another framework instead. But Laravel seems so modern and beautiful that I can't let it go without asking this question: Is it somehow possible to run Laravel without php-mcrypt?
No, Laravel really requires the MCrypt Extension.
You could, however, ask your hosting provider to install the MCrypt extension.
If you decide not to use Laravel, instead take a look at Symfony.
Symfony is another very powerful framework and Laravel makes use of quite some of Symfony's features.
Link: http://symfony.com/
Symfony doesn't require this plugin to be installed, however it requires the following plugins (but I assume those are installed at every hosting provider):
PHP >= 5.3.3
JSON enabled
ctype needs to be installed
The php.ini needs the date.timezone setting
I hope I helped you further :)
EDIT: Newer versions of Laravel don't need to have Mcrypt!
Yes, the Laravel composer.json file states that your application requires ext-mcrypt which can be faked by installing another package which states that it provides ext-mcrypt.
One you've gotten past the composer install, by default Laravel will still try to call mcrypt functions for encryption. But this can be prevented by creating your own encryption service provider that not require crypt.
I've created the package https://github.com/thomaswelton/laravel-mcrypt-faker.
You can use this to disable encryption for Laravel, or by using openssl encryption that you may already have available.
Note that disabling encryption is not at all advised for production applications. But the package may be useful when you just want to play around with Laravel without installing the mcrypt extension, or where you have the openssl extension available.
Installing dependencies on the wrong environment is now possible
The new --ignore-platform-reqs flag for the install and update commands lets you install dependencies even if you have the wrong php version or are missing one of the required php extensions. It's not really recommended but it can be useful sometimes if you want to run composer outside a VM for example and you only have the right extensions installed in the VM where you run the code.
This is one of the errors that I get when I launch php command in my Windows prompt.
I've installed the environment through EasyPHP 12.1 installer. This is a minor problem, since i can use without any problem the full LAMP stack.
I noticed the problem just because ApiGen needs mbstring to create documentation (picture above actually is related to bz2 library, but nothing changes for other missing library). Last path in the warning sounds strange since don't exist nothing PHP related in my LaTex distribution. Any suggest about the problem???
Time ago I have same problem. This work for me.
http://czetsuya-tech.blogspot.cz/2011/02/solving-php-startup-unable-to-load.html