How can I enable PHP's mysqli extension in a Nitrous.io box? - nitrousio

I cannot manage to install/enable the mysqli extension in my PHP-Nitrous.io-box. Reading the phpinfo() output, I see that mysql and PDO are available, but not mysqli.
Help will be greatly appreciated.
Thanks!
PHPInfo() raw output

Looks like the solution is to uninstall the current version and install again from source. It may take some time, around 15 - 20 minutes.
parts uninstall php5
parts install php5 --source
wait for it...
parts stop apache2
parts start apache2
check with your phpinfo()
PS: this is a temporary solution. mysqli extension may have been already implemented globally.

Related

How do I enable the intl extension in CakePHP?

I am using CakePHP 3 and MAMP Pro server for my project. When I am trying to bake the cake, this error shows up:
Fatal error: You must enable the intl extension to use CakePHP.
I have even included intl.so and extension=php_intl.dll in my php.ini file but couldn't figure out solution for this error.
this issue was happening to me some days ago. I had installed Ubuntu 18.04 and php 7.1.
I was trying to run the comman php cake.php bake in orden to use cakephp's console but I was getting the following error message:
You must enable the intl extension to use CakePHP.
This extension (intl) was installed for php 7.1 (php7.1-intl) but this message was appearing every time I used php cake.php bake
After some google searches, I saw that I have to install the extension but with the following command:
sudo apt-get install php-intl
The same issue happened with mbstring extension, I used the command:
sudo apt-get install php-mbstring
then I restarted the apache server with:
sudo service apache2 restart
It's difficult to pinpoint exactly what's wrong without seeing your system setup. However based on what was said in the question, you may be setting up the intl extension incorrectly.
First off, if your OS is Linux/macOS and the PHP extension is a shared library (i.e. has a .so extension) then the php.ini entry should be extension=intl.so not extension=php_intl.dll. Also make sure the intl.so file is in the directory configured under the ini entry extension_dir. Otherwise make sure the extension ini entry is fully qualified (e.g. extension=/path/to/extension/dir/intl.so).
If you are using a Linux OS that has a package manager such as Debian/Ubuntu, you may be able to more easily install the extension for the PHP packaged for that distro. For example, in Ubuntu/Debian the package php5-intl provides the intl extension for PHP5 (I assume it's something similar for PHP7 if you've enabled those repos).
If you build PHP from source, you can try bundling the extension into your PHP. See the instructions from the manual.
I faced the same issue.
I added extension="php_intl.dll" in php.ini and restarted the Apache server.
Now it is working.
I had the same issue. After starting from scratch, I did :
$ brew install php
$ composer install && composer update && composer dump-autoload --optimize
$ composer self-update && composer create-project --prefer-dist cakephp/app:^3.8 cms
$ cd cms
$ bin/cake server
And it was working !

Error with MySQL Instalattion in Centos 6.4

I'm trying to install MySQL in my CentOS 6.4 (X86_64) with the command:
"yum install mysql mysql-server"
And I'm having problems with the installation, the error presented is the following:
Check the error log in the following link http://pastie.org/10022423
Any Idea why this error ? thanks for you helps!
The problem is you already have a version of some MySQL packages installed that are from a different distribution/vendor than CentOS.
Since different people created the packages using different names and standards, yum does not know how to fix this situation.
You have libmysqlclient16-5.1.69-1.w6.x86_64 installed already providing the client libraries, but the CentOS package is mysql-libs. This package appears to be provided by "webtatic":
https://webtatic.com/packages/mysql55/
http://rpm.pbone.net/index.php3/stat/4/idpl/21966562/dir//com/libmysqlclient16-5.1.69-1.w6.x86_64.rpm.html
Likely you need to consider removing the libmysqlclient package and installing mysql-libs in it's place. That will probably remove some items because of dependencies, you might be able to get away with manually removing it with the rpm --nodeps -e, but it may also be the packages cannot have their dependency satisfied by mysql-libs so slightly risk move if you don't fully check everything first. This often works, though.
As an alternative looks like you can install the mysql server package from webtatic as well, based on their instructions here, that might be a less complex alternative if you are happy to continue relying on their repository:
https://webtatic.com/packages/mysql55/
As far that I know, that error will shows up when you attempt to install packages that already have been installed before. So, you probably should reinstall your mysql.
Source : https://www.centos.org/docs/5/html/5.1/Deployment_Guide/s3-rpm-conflicting-files.html

Stuff not included in RailsReady?

I tried to install RoR on Ubuntu 12.0.4 using RailsReady(https://github.com/joshfng/railsready). Afterwards I restarted my computer and while typing ruby -v works, typing rails -v returns unrecognized, as does mysql in the terminal. What do I have to do to be able to launch rails and mysql? Do I have to install them individually using sudo even though I've already installed RailsReady? Thanks.
A quick glance at the README and the script itself shows that it gets you ready to install Rails by installing typical packages needed in order to create a Rails-based development environment, and then attempts to install it.
Per #madth3's comment below, lines 176 to 182 of railsready.sh does attempt to install Rails, so look for any error messages when you run that script.
MySQL appears to require separate installation using standard methods appropriate for your system.

CPAN error. How can I fix this?

This is driving me crazy- if you can be of assistance, I'd be much obliged. I am running Cygwin on Windows 7.
I have been attempting to write a Perl script to obtain and work with some JSON information. However, my cpan will not install some packages properly. If I try to execute
install CPAN
or
install JSON
It seems to be going well for a while, but then I get an error message over and over again:
0 [main] perl 3288 child_copy: loaded dll data write copy failed, 0x740D1000..0x740D27F0, done 0, windows pid 6600, Win32 error 487
Some people suggested executing ash from the DOS command prompt, and using rebaseall. I tried this, and dash, to no avail. The install still hangs, and when I start up cpan it displays
There seems to be running another CPAN process (pid 3764). Contacting...
Other job not responding. Shall I overwrite the lockfile '/home/me/.cpan/.lock'? (Y/n) [y] y
I have gcc and as many other possible dependencies installed as many online have suggested in my search for help. If you have any leads, I'd be most obliged. Thank you.
i had issues installing pretty much any cpan module - same 'cant move' error!!
just disabled McAfee and all resolved.
Check and disable your AV.
Re-run the cygwin installer to add the needed packages.

How Do I Correct mysql.rb Drivers?

For the last several days, I've been struggling to get ruby on rails to work on my mac. The main culprit is MySQL. Every time I fix one thing, another error shows up. I upgraded/downgraded MySQL to play nice with ruby, rail and gems, but nothing. My latest error is:
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.
/!\ FAILSAFE /!\ Wed Aug 05 21:09:23 -0700 2009
Status: 500 Internal Server Error
dlopen(/usr/local/lib/ruby/site_ruby/1.8/i686-darwin9.7.0/mysql.bundle, 9): Library not loaded: /usr/local/mysql/lib/libmysqlclient.16.dylib...
I don't have libmysqlclient.16.dylib; just *.15.dylib. Tried all the techniques, even installed or tried to install ruby-mysql-0.2.6 posted at tmtm.org
FYI: Last error prior to the one stated above had to do with authentication.
Appreciate any help.
Well, this question is a bit old already, but since I got here after getting the same error (but on LINUX), I would like to post my solution for future reference.
I simply had to install ruby-mysql.i686
yum install ruby-mysql.i686
Hope it helps somebody else in the future... tnx
Have you installed Xcode Developer tools? You can download it for free at http://developer.apple.com/.
Whenever I have issues with Ruby and MySQL, I never had Xcode installed. Could be wrong.
Answering my own question.
I don't know why and I don't know how, but took #Garrett's advice and re-installed Xcode. That didn't do anything. Went ahead and upgraded MySQL after that, which I had done before, and voilá! it worked. I'm guessing both re-installations finally got it working somehow. Weird!
Try using the below command . Provide the location of the mysql directory in your Mac .
sudo gem install mysql -- --with-mysql-dir= /usr/local/mysql
It looks like you haven't specified the location of mysql directory .
Good luck !