Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

apache PDO module İnstall ?

0

How would I check to see if it was installed?

0

I ran if

(!defined('PDO::ATTR_DRIVER_NAME')) { echo 'PDO unavailable'; }

and it came up unavailable

0

Hey even i am facing problem can you please let me know how did you fix this issue ?? Please

0

also facing this Fatal error: Call to undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding() in /home/my_user/public_html/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 43

0

Same here.. When I run print_r(PDO::getAvailableDrivers()); it outputs ['0'=>'sqlite','1'=>'mysql']. Here is the output of my php -i | grep pdo:

'./configure'  '--disable-fileinfo' '--disable-opcache' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-icu-dir=/usr' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mm=/opt/mm/' '--with-mysql' '--with-mysqli' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-snmp' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr' 'LDFLAGS= '-L/usr/X11R6/lib64''

Still php artisan throws Fatal error: Class 'PDO' not found in /home/erturanc/Code/test/config/database.php on line 16.

0

I figured out the problem. Yes, I have successful installation of PDO, I can use it everywhere.. But somehow it is not enabled on php-cli. I am using Centos with PHP5.6, cPanel & WHM. Still trying to figure out how to enable it for cli.

0

I solved the issue.

I run php-cli --ini and it points to /usr/local/bin/php.ini. I edit an add the followings:

extension=pdo.so
extension=pdo_sqlite.so
extension=pdo_mysql.so

A bit insensible because it was working through browser calls anyway. However, now it works.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

smlynn smlynn Joined 27 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.