I'm trying to enable PDO for SQLite3 on php 5.4.19. Following this--> http://www.php.net/manual/en/pdo.installation.php
uncommented the line in the php.ini file that says:
extension=php_pdo_sqlite.dll
;added next line
extension=pdo.so
However, the phpinfo() still says:
PDO
PDO drivers no value
I would think it would like the SQLite driver would be listed.
Trying to troubleshoot so I also tried adding this to the php.ini file.
extension=php_pdo.dll
However, there is no such file in the /ext folder and it says this is no longer needed in this version of php.
What step am I missing?
Edit-->
Ok figured this out and it wasn't obvious to any research I did.
First, absolute paths were required which isn't documented anywhere that I could find. Final settings are:
extension=C:\php\ext\pdo.so
extension=C:\php\ext\php_pdo_sqlite.dll
extension=C:\php\ext\php_sqlite3.dll
[sqlite3]
sqlite3.extension_dir = C:\sqlite
Uncommenting extension_dir = "ext" in php.ini worked for me:
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
; On windows:
extension_dir = "ext"
'phpinfo()no longer showsPDO drivers : none enabled' and shows PDO drivers : sqlite instead.
It also now shows sections for SQLite3 and pdo_sqlite.
First, try restarting your web server. If that doesn't work, check if extension_dir is set properly in php.ini. If that still doesn't work, check if the proper php.ini is being read in the phpinfo() output.
Related
So, I'm trying to use a table in a php program and I got a fatal error (class mysqli not found) which after researching on stackoverflow means I don't have extension=php_mysqli.dll enabled (here's the php-website which talks about enabling it: http://php.net/manual/en/install.windows.extensions.php.)
But I looked in my php.ini file and the sort of ";extension=..." lines that it talks about commenting aren't there (I did ctrl + f to search through as well as manually searching through). I tried just adding the "extension=php_mysqli.dll" line but it still didn't work.
Someone else also said you need to uncomment the extension_dir line in php.ini and specify my location but that line only appears in an if loop in php.ini and it's not commented out. (from this stackoverflow question: Fatal error: Class 'MySQLi' not found).
How do I add "extension=php_mysqli.dll" to my php.ini file so my php program can create a mysqli table?
If you don't have mysqli extension in you php version you should download another version of PHP.
http://windows.php.net/download/
Get PHP 7 OR PHP 5.6 last version (thread safe recommended).
After, following the instructions on this page http://php.net/manual/en/install.windows.extensions.php to activate mysqli extension.
;extension=php_exif.dll
extension=php_mysqli.dll // Uncomment this line
;extension=php_oci8_12c.dll
You can define the path of your php extensions folder if you have problems.
To do this, uncomment line extension_dir.
extension_dir = "C:\php\ext" // Your ext folder path
Restart your apache / nginx and try to use mysqli functions.
Hope this will can help you.
In my case, I had the extension=mysqli set in my php.ini and the php_mysqli.dll file in the php/ext folder, I just had to uncomment (remove the ;) the extension_dir line in php.ini:
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
;extension_dir = "./"
; On windows:
extension_dir = "ext"
Save php.ini and restart php and the webserver.
I think this has been solved many times here but i have not found proper answer.
I installed apache 2.4.9 x64 VC11, PHP5.5 x64 thread-safe VC11. Then I tried to install phpmyadmin but I got error.
mbstring library is not enabled
So i uncommented it in php.ini file. My php.ini file is located in c:/php/. I added this line to my
httpd.conf file:
#configure the path to php.ini
PHPIniDir "c:/php/"
to set php.ini file path.
phpinfo()
says it loaded the file from c:/php. But the library mbstring is still not loaded so I can't use phpmyadmin it's not just about phpmyadmin its about I can't use any libraries that are not default installed.
And yes I tried to restart apache...and not just once :p. it still doesn't work I'm hopeless. Please help me solve this.
Ok, so after another while of hard brainstorming i figured it out. I have never had to set this but now.
Everything you have to do(check) is set the path to extension dir in your php.ini
look for line:
; On windows:
extension_dir = "c:\php\ext"
just change the path where are your extension located. If is this line commented with ; just uncomment it restart apache and you are good to go. Hope this help someone else too.
I have PHP in an Apache2.
When I do a modification in my php.ini, like uncomment a module to active it, it doesn't work.
In my phpinfo(), the Loaded Configuration File is on C:\php\php.ini, which is the right place.
I restart my Apache after every edition on the php.ini.
PHP run well on the Apache.
So why I can't active my module ? (Actually I'm trying to active the PDO driver for MySQL)
Uncomment this line to consider extensions :
; extension_dir = "ext"
extension_dir is the problem - make sure you have that pointing to the directory, where your DLL is.
I'm running Apache 2.4.7 with PHP 5.5.9 on Windows 8. I installed PHPUnit and this warning image "warning" started to pop up.
Yes I enabled extension loading in php.ini as well as "extension_dir" to correct folder and there is file named "php_pdo_oci.dll" in that folder.
I tried to use different apache and php releases, but it didn't help.
Any suggestions how to fix this?
The ..._oci.dll is part of the Oracle C Interface. Unless you need to use Oracle, I suggest you go to the relevant line inside the php.ini file and uncomment the loading of this extension. However, if you need to use this extension, you’ll need to install the free Oracle Client libraries and add them to the path.
Oracle has a page where you can download the libraries needed for your setup work as expected and you can see here:
Oracle Instant Client Downloads
Note: After you choose your operational system (Windows as in your answer) in download section you will see the installation guide in foot notes of the next page. For others OSs this process will work the same way.
I currently have PHP version 7.1.9 and encountered this problem and resolved the issue. Just ensure these lines in your php.ini file are uncommented like so:
extension=php_fileinfo.dll
extension=php_ftp.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_gmp.dll
extension=php_intl.dll
extension=php_imap.dll
extension=php_interbase.dll
extension=php_ldap.dll
extension=php_mbstring.dll
extension=php_exif.dll ; Must be after mbstring as it depends on it
extension=php_mysqli.dll
extension=php_oci8_12c.dll ; Use with Oracle Database 12c Instant Client
extension=php_openssl.dll
extension=php_pdo_firebird.dll
extension=php_pdo_mysql.dll
extension=php_pdo_oci.dll
extension=php_pdo_odbc.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pgsql.dll
extension=php_shmop.dll
Please restart your server application (IIS, Apache e.t.c.) after any changes to your php.ini file.
Please add below line in php.ini file
extension=pdo.so
extension=php_pdo.dll
extension=php_pdo_oci.dll
extension=php_pdo_oci8.dll
and restart apache server and check.
I installed apache2 and php 5.4.5.
When you start apache this error:
PHP Warning: PHP Startup: in Unknown on line 0
The extension does not work:
; extension = php_intl.dll
; extension = php_ldap.dll
; extension = php_oci8.dll
; extension = php_oci8_11g.dll
; extension = php_pdo_firebird.dll
; extension = php_pdo_oci.dll
; extension = php_pdo_pgsql.dll
; extension = php_pgsql.dll
; extension = php_pspell.dll
; extension = php_shmop.dll
And maybe more.
Extensin dir: extension_dir = "C :/ dev/prog/php5/ext /"
Path: C: \ dev \ prog \ php5
php.ini is copied to C: \ WINDOWS \
ssleay32.dll php5ts.dll and is copied to C: \ WINDOWS \ system32 \
Please simple instructions.
upgrade those modules using pecl command
Also, Check extension_dir directive in php.ini
I had the same problem. The issue is, that these lines are by default in php.ini
; On windows:
; extension_dir = "ext"
I assumed, that only an uncomment of the second line and Apache restart solves this problem. But it isn't!
I had to type a full path to the ext folder, such as below:
extension_dir = "d:\php-5.4.32\ext"
After this action, and restart of the Apache web server, the problem was solved.
You should check you php.ini file to make sure the extension_dir is exactly set.
I had the same problem when i enable these five extensions:
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_curl.dll
The number of warnings is the same as the extensions that enabled.
So i guess may be there is sth. wrong with the extension setting.
When i change the extension_dir directive to the right dir, the problem resolved.
I found this answer in this post on the wampserver forums, and it worked for me:
Click on the Apache version that you use in the WAMPServer menu, e.g.
wampmanager -> Apache -> Version -> 2.4.9 ( just click on the version number on this menu item )
this will rebuild the SYMLINKS for the extensions that are causing the "in Unknown on line 0" error.
The answer was given by RiggsFolly in this thread: http://forum.wampserver.com/read.php?2,128734
I had the same problem when I enabled extensions (see Error when enabling PHP extensions).
I resolved it adding the PHP folder to the path and restarting the computer.
You need to download and install Aspell for Windows “GNU Aspell-0.50.3 (win32)”.
http://aspell.net/win32/
http://ftp.gnu.org/gnu/aspell/w32/Aspel ... -Setup.exe
Your Dictionaries are also here. Aspell needs at least one Dictionary to operate.
or
ftp://ftp.gnu.org/gnu/aspell/w32/
ftp://ftp.gnu.org/gnu/aspell/w32/Aspell ... -Setup.exe
ftp://ftp.gnu.org/gnu/aspell/w32/aspell-w32-0.50.3.zip
Aspell should copy the “aspell-15.dll” to the “Windows/System32” directory which the php entension php_pspell.dll requires and looks for to execute.
If not then locate aspell-15.dll in C:/Program Files/Aspell/bin/aspell-15.dll and copy it to C:/Windows/System 32/aspell-15.dll
You only need now to uncomment this line in:
xampp/apache/bin/php.ini
;extension=php_pspell.dll
to this:
extension=php_pspell.dll
Restart Apache.
(If Apache won't start paste the error message here).
Check the pspell module is in place and enabled by lookin at your phpinfo() file from the menu within the XAMPP Welcome Page. http://localhost/index.php
For more info visit https://community.apachefriends.org/f/viewtopic.php?p=83942
The problem is not coming from there, the problem is from the path (I mean %PATH% for Windows users, because of %PATH% is a variable that contains many paths separated by ;). So to figure out the problem you have to:
1-make configuration in the httpd.conf file:
PHPIniDir "${path}/conf_files"
2-make configuration in your php.ini file (it must be in the same location with the httpd.conf file):
change this:
extension_dir = "${path}\php\ext\"
To
extension_dir = "D:\EasyPHP5.3.0\php\ext\"
(in my case the php is installed in D:\EasyPHP5.3.0)
Optional:
if you need to execute PHP from the CLI (Command Prompt)
you have to make copy of the php.ini file to the folder when the PHP is installed (in my case D:\EasyPHP5.3.0\php)
Restart/Start your web Server and enjoy!
I had similar problem. cURL required SSL layer. Problem was in installation of php_curl library, see http://php.net/manual/en/curl.installation.php. The firs problem: libeay32.dll and ssleay32.dll are required on PATH. I put them in apache/bin directory. The second problem is that php.ini required php_openssl loaded before php_curl so I modified ini file.
extension=php_openssl.dll
extension=php_curl.dll
I solved the problem on my windows 7 with two steps:
set extension_dir as absolute path in php.ini
extension_dir = "d:\php-5.4.32\ext"
comment the php_curl.dll module in php.ini
;extension=php_curl.dll
Same problem was solved by changing to full path:
PHPIniDir in httpd.conf and extension_dir in php.ini.