how to install mysql drivers for php7 on windows system - php

How to install MySQL drivers for php 7 on windows system?
Error: - Installation request for pear-pear.php.net/mdb2_driver_mysql 1.4.1 -> satisfiable by pear-pear.php.net/MDB2_Driver_mysql[1.4.1].
- pear-pear.php.net/MDB2_Driver_mysql 1.4.1 requires ext-mysql *
-> the requested PHP extension mysql is missing from your system.
Problem 2 - Installation request for pear-pear.php.net/validate_au 0.1.4 -> satisfiable by pear-pear.php.net/Validate_AU[0.1.4].
- pear-pear.php.net/Validate_AU 0.1.4 requires php >=4.2.0.0,<=6.0.0.0 -> your PHP version (7.1.4) does not satisfy that requirement

I guess you haven't enabled mysql in your XAMPP server yet. To do that:
At first close all running services of xampp. Now, go to your xampp folder. Then go to php folder and open the file named php.ini with any text editor. Now search for mysql in that file. You will find a line stating ;extension=php_mysqli.dll. The ; symbol describes it as a comment that means it is not enabled yet. Simply cut out that ; sign in front of that line which will now look like extension=php_mysqli.dll. Finally save the file and restart xampp.

PHP7 does not have the mysql_ database extension any more. Its dead Jim

Related

Google Cloud App Engine Standard deployment with PHP 7.4 / 8.1 mongodb extension not working

I have already successfully deployed the app in php standard 7.4 environment and its running, today i wanted to update it and when i do gcloud app deploy i get:
Problem 1
- Root composer.json requires PHP extension ext-mongodb * but it is missing from your system. Install or enable PHP's mongodb extension.
Problem 2
- mongodb/mongodb is locked to version 1.4.0 and an update of this package was not requested.
- mongodb/mongodb 1.4.0 requires ext-mongodb ^1.5.0 -> it is missing from your system. Install or enable PHP's mongodb extension.
So i checked the php.ini file for the deployment, its in the root folder (same level as the yaml file) and contains:
extension=mongodb.so
extension=redis.so
extension=igbinary.so
Did i missed any google cloud update? I am wondering cause it does not complain about the version of the mongodb php extension and just says there is no extension?
I also tried to switch to PHP 8.1 runtime but i got the same error.
"provide" : {
"ext-mongo": "*"
},
i was able to fix it by adding this to my composer.json .. somehow i never needed it until today.
Worked for me adding to composer.json, so ext-mongodb instead of ext-mongo (I cannot comment on the answer of user1334817 )
"provide" : {
"ext-mongodb": "*"
}

codeigniter 4, installation with composer problem

I'm new to Codeigniter and i want to ask why when i want to install CI 4 with composer it resulted
Problem 1
- codeigniter4/framework v4.0.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework v4.0.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- codeigniter4/framework 4.0.0 requires ext-intl * -> the requested PHP extension intl is missing from your system.
- Installation request for codeigniter4/framework ^4 -> satisfiable by codeigniter4/framework[4.0.0, v4.0.1, v4.0.2].
But i already uncommend the intl extension on php.ini (I'm using XAMPP)
I already tried to find answers but i can't find it. if you guys have opinion on what's going on please let me know. Thank youu
If you are using php version 5.6 or below
;extension=php_intl.dll Remove semicolon from the line in php.ini file
If php 7 or above
Remove semicolon from the line ;extension=intl in php.ini
Once you updated php.ini restart XAMPP/WAMP
CodeIgniter 4 requires PHP >= 7.2.
The composer.json file of CodeIgniter 4 contains a php>=7.2 require; so you should see the requirements are not satisfy as first problem. But the strange thing is you have extension=php_intl.dll; into your PHP configuration file: from PHP version 7.2 you should have extension=intl. So, please check your PHP version you have into your XAMPP.
Then check that you have C:\xampp\php into your Windows PATH (or the right php directory path in your system).
Try to launch your composer install; if it give the same error, try to create a file test.php into your webroot, containings
<?php phpinfo(); ?>
Open the test.php page on your local web server with the browser and search for Internationalization support. If you do not find this information, it means that extension is not active.
In this case, give a look if you have edit the right PHP.INI. See this question for the right setting of extension with XAMPP.
You could try to run composer with the flag --ignore-platform-reqs to force the instalation, but be aware to solve dependency to run your project.
(I use this flag to install when the server runs on docker with different specifications than host)

Laravel OCI8 not installing

Summary of problem
I have oci8 installed for php 7.1.19
Running on Laravel Framework 5.6.3
//error i get when trying to install Yajra oci8 github for laravel
Your requirements could not be resolved to an installable set of packages.
Problem 1
yajra/laravel-oci8 v5.6.0 requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
yajra/laravel-oci8 5.6.x-dev requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
yajra/laravel-oci8 5.6.x-dev requires ext-oci8 >=2.0.0 -> the requested PHP extension oci8 is missing from your system.
Installation request for yajra/laravel-oci8 5.6.* -> satisfiable by yajra/laravel-oci8[5.6.x-dev, v5.6.0].
To enable extensions, verify that they are enabled in your .ini files:
C:\wamp\bin\php\php7.1.9\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.
//
When i make a test.php in WAMP it works and no errors, but now i want it to work for laravel as well.
Code snippet
$conn = oci_connect('Name', 'Password', 'Localhost');
if ($conn) {
echo "connect succesfull";
}
\\
The command i run to install it in laravel is:
'composer require yajra/laravel-oci8:"5.6.*"'
I understand that this might not be the right command, soo i tried this:
'composer require yajra/laravel-oci8:"7.1.19"'
But that one doesnt exists
I am kinda stuck now. Anyone can help me?
# How to install OCI8 in windows
## Instantclient Version 12.2.0.1.0
##### Xampp
##### php 7.2.4
##### Windows 10
### Step 1
Download OCI8 2.1.8 - 7.2 Thread Safe (TS) x86
### Step 2
Extract the file to xampp\ext
### Step 3
Add code to file xampp\php.ini
extension=php_oci8.dll
### Step 4
Download the "Instant Client Package - Basic" for Windows from the OTN Instant Client page.
http://www.oracle.com/technetwork/topics/winsoft-085727.html
Because PHP is 32 bit, use the 32 bit version of Instant Client.
(http://www.oracle.com/technetwork/articles/technote-php-instant-084410.html)
Instant Client Package - Basic Version 12.2.0.1.0
### Step 5
Extract the Instant Client folder to C:\instantclient_12_2
### Step 6
Edit the Windows PATH environment setting and add this path
C:\instantclient_12_2
### Step 7
Restart

How to install extensions not included on PHP 5.6? GDlib, DOM, MCrypt

I've recently installed PHP, Apache and MySQL on a windows server 2012. I have everything working and I already have a website up and running on the server.
In the next few weeks I will be transferring a new site on this server however this new sites requires extensions not currently installed on PHP 5.6, they are as follows:
GDlib
DOM
MCrypt
How do I go about installing these extensions on PHP?
This was my first time installing a WAMP server, still trying to figure things out
Thanks in advanced
I am not sure what version of PHP you are moving from but if you check the changelogs for PHP I think you will find that mcrypt and DOM are part of the PHP Core now and GD1 has been replaced wih GD2 which should also be active by default in WAMPServer
If it is not then it can be turned on using the wampmanager menus
wampmanager -> PHP -> Extensions -> php_gd2
Most of the extensions will be available with the WAMP server
To enable an extension click on the wamp tray icon on the task bar goto PHP->PHP extensions-> Click on the extension you want to enable.
If you don't find the extension you are looking for then you may have to install it manually.Download the extension dll file and place it inside PHP extension folder(wamp\bin\php\php5.*\ext) and include the dll name in php.ini and restart.

Intervention/Image requires FileInfo

Im having trouble with Intervention/image, Laravel #composer install
- intervention/image 2.1.1 requires ext-fileinfo * -> the requested PHP
extension fileinfo is missing from your system.
I understand that it is trying to retrieve the extension fileinfo however I am having 0 luck with getting the extension to load.
I believe that as of PHP 5.4 the extension fileinfo is automatically enabled, however it isnt showing up in #php -m modules.
#pecl install fileinfo doesnt work either because my php version doesnt suit any versions of fileinfo.
My PHP version is:
PHP 5.4.37 (cli)
Operating System:
Linux
CentOS 6.5 cPanel 11.46 / Softaculous x64
Ive tried adding
extension = "fileinfo.so"
to the php.ini however to no luck, it does nothing.
NOTE: I managed to get the extension for windows version of php 5.4 working... Its just when I have uploaded my website to my server, I have been unable to get it to load, well get that library (Intervention/Image) to load.
Other details:
Server is a VPS with access to WHM and cPanel
Website works. Everything except the Intervention/Image
go to 'Select PHP version ' under Software section in your cPanel. Then check fileinfo checkbox. Then save. That's it.
To fix this issue, you just have to enable your fileinfo from your php configuration.
To do so :
Go to php.ini in your php install folder ( for me since I used bitnami on windows, it is located at C:\Bitnami\wappstack-5.6.31-0\php )
Uncomment the line ;extension=php_fileinfo.dll by removing the semicolon. ( on linux you should have extension=php_fileinfo.so )
Restart php ( use the command line on unix, or on windows through the manager of the soft you use, for instance if you have bitnami it's in C:\Bitnami\wappstack-5.6.31-0 and the exe you have to use is manager-windows.exe then click on php and restart ).
This is it.

Categories