How to update MySqli to php5-mysqlnd - php

I recently started coding with Codeigniter, so fairly new, even to php.
I built my first app, installed it on server after Xampp. I got this error
Message: mysqli::real_connect(): Headers and client library minor version mismatch. Headers:50542 Library:50626
After searching online I found that I need php5-mysqlnd. I found this nice article but don't know where all these processes are happening.
Is there a tool in Cpanel where all these codes for updating php5-mysqlnd are taking place?
All I know I have Linux hosting version 5.4.45 with Hostgator.

it looks like I found another way to do it (not like the way that link said).
I was going through my CPanel and found an option to change my PHP version. I clicked and on next page it asked what all components I want to include, I couldn't believe "Mysqlnd" was one of them.
I changed it to 5.6 from 5.4.45. That's all it took.
Thanks a lot.

Related

PHP Install on IIS 7, no test results

I am trying to install PHP on my IIS web server running version 7.0. I downloaded the php-7.1.8 Non Thread Safe for Windows 64. I then procceded to follow the steps found here: https://www.howtogeek.com/50432/how-to-install-php-on-iis-7-for-windows-server-2008/.
I had no issues with the install but when it came to the last step of creating the test PHP page and launching, instead of getting the results, i'm being asked to Open or save the file??
I've also tried putting this into a live website and accessing it outside the web server. When I try this I receive a 500 - Internal Server Error.
I had tried this about a year or two ago and got frustrated, so I gave up and have retried today but experiencing about the same result. Don't know what other information would help, but i'm willing to provide what's necessary. Thank you for any help.
After continuing research I ended up using the Windows Installer version (https://www.microsoft.com/web/platform/phponwindows.aspx) and then went back through the configuration steps of the php.ini file.

Pear DB Error: extension not found

I am still new to php and linux but i try to give you all information I know.
We got a PHP web application using pear and smarty. It's runing on PHP 4 on a Linux system and with XAMP and PHP5 on my PC. I am trying to move the application on a new server with PHP7 and updated PEAR and all extensions (it's the same version as on XAMP), but all I get is: DB Error: extension not found.
I tried to find a solution but wasn't able to find anything which could help me.
The database we are using is a normal mysql database.
I'm not sure if there is still a path missing or what went wrong.
Maybe someone of you got a clue what the problem could be.
It sounds like your very old PHP4 code is using the mysql_ database extension?
If so that extension has been deprecated for years and was completely removed from PHP7. You wont be able to move that code to any version of PHP higher than PHP5.6 and even trying to do that you will almost definitely come across lots of other incompatibilities
I suggest you read http://php.net/manual/en/migration70.php in the menu on this page there is a section on migrating from all sorts of versions of PHP.
You will have to work out how far up the migration levels your code will actually move without major amendments. I would guess, not very far!

NewRelic install on centos and cpanel

I'm trying to install NewRelic on my website, I use PHP, cPanel(VPS/dedicated) and Centos (64bit) for my server, I've installed the server monitoring part right on my server but when I try to install the 'app' part on my server I can't get that to install, I followed the instruction links http://newrelic.com/docs/php/new-relic-for-php
but to no success, has anyone got any ideas as to why this maybe? I have restared httpd and appache multiple times and given it some time to propogate etc..
The problem of this is having WHM installed and many PHP services installed, you should try this guide I found:
New Relic for PHP w/cPanel
We have few dedicated servers on HostGator. Few months back we had installed "NewRelic" on our server for monitoring, later we started having issues and here is what HostGator Tech Team said
"While it's possible to configure a cPanel server to use a non-cPanel
PHP version, it's complicated to configure and we will not support it
or set it up. PHP gets compiled from source by cPanel normally and it
should be left this way, as it interacts with a number of other
components on the server in complicated ways, as you found out today.
We recommend completely removing the custom "Newrelic" repository as
well as the packages it installed in order to avoid further
compatibility problems."
and here is what "NewRelic" team said
"I wasn't trying to suggest that Hostgator's assertion was wrong. I
was just trying to figure out which instructions to go over with you."
Make sure to check compatibility before installing it. Installation instruction can be found at http://www.networkredux.com/answers/view/Hosting/Control_Panels/WHM/cPanel/162
New Relic Needs to document this cpanel compatibility better, I know it's my fault for not researching but while using a hostgator dedicated server with cpanel/whm I got new relic up and running. . then my server became a huge mess if improperly configured files and a few days of reading and learning to get it straightened out - I understand my fault entirely but a big ass CPANEL/WHM <- CAREFULL sign might have helped :P

Ubuntu server 11.10 and PHP 5.2 for use with Drupal 6

I'm trying to figure something out:
I am using Ubuntu server 11.10 virtualized on Win7 (I don't think that matters but more info is better than less) to work on a Drupal 6 website I inherited and need to make significant changes to.
I want to set up a development copy of this Drupal website on my Ubuntu server so I can work without worrying about torching the production website.
I successfully got the production files downloaded and onto my machine, I got the production MySQL database exported and imported into the dev MySQL server, and I set up a symbolic link from the directory /home/myname/thewebsite.com to /var/www/thewebsite.com so I can easily access it.
When I got the website they didn't know the admin password so I dug around online and reset it in the dev db using phpmyadmin and finally log in.
When logging in and poking around the site there are lots of errors, which when googled lead me to believe that PHP 5.3 is causing them and that there are some modules in use that only work with PHP 5.2
After looking around a lot online and on stackoverflow there seems to be no easy way to install PHP 5.2 on Ubuntu Server 11.10. With no packages for 5.2 available through apt-get or aptitude what should/can I do?
1) Install 5.2 from source - how do I get it to interface with MySQL and Apache2? Also, I've never installed anything significant from source. Is there a walkthrough?
2) Replace the repositories with old ones? Will this work on 11.10? The newest instructions I found were for 10.04
3) Use already built PHP 5.2 packages for Ubuntu? Couldn't find these
4) Pay someone who knows more to do it for me? (Just kidding, this isn't really an option...)
Cheers and thanks for your help!
PHP dropped support for 5.2 in August 2011; operating system providers such as Ubuntu will not supply a version that is out of support, so you absolutely won't get an official copy of PHP 5.2 on the current version of Ubuntu (or any other OS).
If you're running an older version of Ubuntu (eg 10.04), you might be able to do it; it would still be a downgrade, because PHP 5.3 has been the default version for quite a long time now.
If you're on a newer version of Ubuntu, ie 11.10 as you state, it is going to be a problem for you.
The Drupal developers dropped the ball badly on this one. I guess it was because Drupal 7 tool so long to finish; they were expecting D7 to be out much sooner, and so they never bothered fixing up D6 to work with PHP5.3. As it turned out, this was a big mistake, because in fact D7 still wasn't officially released when PHP dropped support for 5.2.
But even so, they should have fixed it, because they're still officially supporting Drupal 6, so they need it to work with the current version of PHP. This is definitely Drupal's problem, not PHP's, Ubuntu's or yours.
But you still need to deal with it.
I found this question over on AskUbuntu.com, which gives an answer applicable to 11.04. It isn't quite 11.10 you were asking for, but it it a lot more recent than the best you'd found, so it might be helpful.
Alternatively, you could research exactly what it is about Drupal6 and your specific modules that doesn't work in PHP5.3. The language differences between 5.2 and 5.3 that can break things are not big, so I would expect any code changes required to be fairly small. You might find you can fix the code yourself. And maybe even submit the changes to the community -- Drupal is open source, after all.
Another tack you could take is to consider whether this saga represents an opportunity for you to move the site to Drupal 7?
This may or may not be feasible, depending on the modules you're using, etc, but if it is possible, it will solve the problem, because D7 is of course fully compatible with PHP5.3.
And just to cheer you up, I'll close by mentioning that PHP are on the verge of releasing PHP 5.4. Hopefully the Drupal devs will be more on the ball this time.

PHP has encountered an Access Violation at 77FCAFF8

I am running a PHP site that uses Ajax and jQuery as well. The site will run fine for quite some time, and suddently my pages (and ajax-retrieved sub-pages) comes back with the message
PHP has encountered an Access Violation at 77FCAFF8
It seems that rebooting the server corrects the issue. Running PHP Version 5.1.6 (Windows NT 5.0 build 2195). I did a some searching on here and some other sites, and there seems to be no fix..
URL REMOVED
UPDATE:
I think I'm on to something.. will get back to you.
UPDATE
After reviewing the IIS setup, i noticed there was no Handler Mapping setup for the website. This, of course begs the question - how did it ever work in the first place, when it was originally setup this way!? I added the handler mapping and it seems to be Okay so far.
UPDATE
The problem popped its heads out again this morning after 36 hours without encounering it. Back to the drawing board.
UPDATE
We ended up just moving the site to a secondary web server where we were able to upgrade PHP without an issue.
This is a PHP issue somewhere. You could spend some time narrowing down which function you're using that is causing the problem. I would instead upgrade to a newer version of PHP. If still no luck, try a slightly older version. There have been significant changes with version 5.3.2.
After some research I think this may be the solution (Taken from http://bugs.php.net/bug.php?id=28929 ):
[2010-06-11 15:12 UTC] in2ishun at yahoo dot com
***************** SOLUTION!!!!
I realize this issue is AGES old, but it still manages to be the top hit on Google searches as of now (6/2010).
I fixed my own instance of seeing this error. W2k3, IIS6, PHP 5.2.6, MySQL 5.1.
The problem is in the pathing. When I used the MSI installer for MySQL without doing an "advanced" installation (where I could manage the install details), it added a path to the system environment that contained spaces. Even after changing the path environment to use the Windows short-name location of the mysql bin directory, it still didn't work.
The solution was for me to reinstall mysql and set the default installation path to just off the root (e.g. C:\mysql). Once I did that the error went away and my app started working.
There are a number of sites with a variety of potential solutions to this issue and several of them mentioned paths and the "libmysql.dll" file (in the "bin" directory of your mysql installation).
If this helps you solve your problem, consider leaving a comment here so others can see that it works.

Categories