Support the ongoing development of Laravel.io →
Installation Configuration

Hello,

This is my first project on laravel and I am trying to up load it to laravel. I am trying to add this to a site that is already there. It is going to be inside regular php site. This what I have done so far.

I moved my public folder that was inside my laravel inside of home/public_html/public and renamed it to public_html/NEW_NAME. Inside of index I pointed to the new location of app and autoload.

Next home/laravel/NEW_NAME

Inside of the ssh access I ran php composer.phar install to install composer.

Once I do that, i get:Fatal error: Class 'PDO' not found inconfig/database.php on line 16

Line 16:'fetch' => PDO::FETCH_CLASS

I decided to replace: 'fetch' => PDO::FETCH_CLASS, with 'fetch' => 8, to see what that would do and I got this

Fatal error: Call to undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding() in /home/dorism120021/laravel/NEW_NAME/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadConfiguration.php on line 43

Line 43: mb_internal_encoding('UTF-8');

Also, on my godaddy account it says that PDO is select. I am using a sqlite database. PHP 5.5. That is also selected too.

I am not sure what I am missing or what I am doing wrong. If anyone could point me in the right direction that would be greatly appreciated.

Last updated 3 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.

© 2025 Laravel.io - All rights reserved.