I have been trying to install opencart 2.1.0.2 on WAMP 3.0.0 but I keep getting the error message "Warning: CURL extension needs to be loaded for OpenCart to work! ", When I navigate to C:\wamp64\bin\php I notice there are two php folders here php5.6.16 and php7.0.0, although on my localhost page it says that the current php setting is php5.6.16. I did a CURL search inside my php.ini file (in the php5.6.16 folder) and I found the following string of codes
; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
;
extension=php_bz2.dll
extension=php_curl.dll
I need some help here, how do I turn on / load CURL?
Sometimes there are several php.ini files. You need to find the one that is loaded at run time.
Create a new PHP file and echo your loaded PHP configuration: echo phpinfo();
Search if you can find a section dedicated for CURL.
If not, find the section Loaded Configuration Fileto see which php.ini file is being loaded.
Add extension=php_curl.dllto the loaded php.ini file.
Restart Apache.
Using the WAMPServer menus is the easiest way and ensured that you amend the correct php.ini file as there are 2 versions, one for Apache/PHP and one for PHP CLI. It will also make sure you amend the correct php.ini file for the version of PHP that is actually active when you make the amendment, remember WAMPServer can have multiple versions of Apache & PHP and MYSQL sitting on the system, but only one of each active.
(left click) wampmanager -> PHP -> PHP Extensions -> php_curl
Also if you are using a https address in your curl you will likely need to also include php_openssl
(left click) wampmanager -> PHP -> PHP Extensions -> php_openssl
If these items have a TICK beside them then they are already activated, if no tick then click the menu item, the php.ini file will automatically be amended and Apache restarted. You will see the wampmanager icon go Orange and then Green again when the amendment is complete and Apache restarted.
Related
So I have been searching high and low an answer to my problem. Anytime I go here
http://localhost:8888/phpMyAdmin/, I get this error
So I created a php file with phpinfo() and get this
info.php
So then I go to my file explorer and follow the directory
C:\MAMP\conf\php7.1.7
Loaded Configuration File C:\MAMP\conf\php7.1.7\php.ini
Next I opened the php.ini file in sublime to make some changes (C:\MAMP\conf\php7.1.7\php.ini). I believe all the extensions are located at this directory
C:\MAMP\bin\php\php7.1.7\ext
where I think the php extensions are located at
So these are the changes I make to my php.ini file (removing the ; from the front)
1) ;Directory in which the loadable extensions (modules) reside.
extension_dir = "C:\MAMP\bin\php\php7.1.7\ext\"
2) ; Dynamic Extensions.
extension=php_mysqli.dll
I restart my MAMP server every time I make a change and reset my browser as well. And I still get the same "mysqli extension" missing error
I have even tried adding some environment variable paths.....
added two different environment variables
C:\MAMP\conf\php7.1.7
and
C:\MAMP\conf\php7.1.7\php.ini
Also here is my new_connection.php file and code to connect to MySql
new_connection.php
This is what I get when I run the code (showing that both If statements are failing)
mysqli_init function does not exist,
mysqli extension is not loaded
I found this
https://secure.php.net/manual/en/mysqli.installation.php
which states....
PHP 5.3.0 and newer
On Windows, for PHP versions 5.3 and newer, the mysqli extension is enabled and uses the MySQL Native Driver by default. This means you don't need to worry about configuring access to libmysql.dll.
Which confuses me, because the mysqli extension did have a ';' in front when I opened the php.ini file
I used MAMP with PHP version 8.0.1 and the phpMyAdmin-Page always said that it needs mysqli to work. I searched every folder, commented a lot, always refreshed the server and so on but nothing worked...
... until I changed the PHP version to version 8.1.0 in the MAMP-settings and the extension_dir in the php.ini (path should be something like \MAMP\conf\php8.0.1) (the "extension_dir" should be in line 544).
I am trying to use sql-server with php .
I downloaded 64 bit php_pdo_sqlsrv_56_ts.dll and php_sqlsrv_56_ts.dll from this unofficial site. I extracted the dll files to D:\wamp64\bin\php\php5.6.31\ext.
In php.ini I have added the following lines and restarted the WAMP:
[PHP_SQLSRV]
extension=php_sqlsrv_56_ts.dll
[PHP_PDO_SQLSRV]
extension=php_pdo_sqlsrv_56_ts.dll
in WAMP>php>extensions , it shows me this:
on clicking those extensions, php console shows the error The 'php_sqlsrv_56_ts.dll' extension file exists but there is no 'extension=php_sqlsrv_56_ts.dll' line in php.ini. .
I have no idea where the problem is, i found out same question here but that was version (32/64) issue which is also not my case as i have downloaded 64 bit extensions already.
Any suggestions would be extremely helpful.
Apparently, there are two php.ini files, one in wamp>bin>PHP folder and the other is in Apache folder which is also available from in wamp tray icon. I updated the file in php folder, and on checking ,the php.ini in wamp (tray icon) wasn't updated. On updation of that file, the issue was resolved.
I am trying to activate curl on my Apache Server. So far it does not load.
I edited the php.ini file to allow the extension:
And I made sure using phpinfo() that I was editing the proper configuration file.
I restarted the server twice and made sure in php.ini that the extension folder (C:\php7\ext) was loaded correctly but curl still does not show on my phpinfo() page.
Why is this?
I use EnterpriseDB ApachePHP on Windows XP (32 bit). I tried to enable some extensions in php.ini in the directory with ApachePHP, but nothing changed. Then I found that phpinfo() not just doesn't show the extensions I uncommented in php.ini, but it also shows others that I didn't uncomment. I have several other php.ini files on my computer, but phpinfo() shows the correct path to the php.ini file as "Loaded Configuration File" (D:\Programy\EDB_Apache\php\php.ini - that the path to the php.ini file I use; plus it shows its copy in C:\WINDOWS in "Configuration File (php.ini) Path").
The configuration must be overriden by something in ApachePHP - pgsql and pdo_pgsql are among the commented but shown libraries, while all my other php.ini instances have only MySQL and SQLite enabled. On the other hand, even the extensions contained in D:\Programy\EDB_Apache\php\Sdk\include\ext (D:\Programy\EDB_Apache is ApachePHP root) don't match those shown in phpinfo(), so it might be even more difficult.
So how to find and edit the configuration that is shown in my phpinfo(), or how to solve the bug causing it not to correspond to the loaded php.ini file? Please don't tell me to restart Apache or my computer (I configure localhost), I did this many times, even just before asking this question.
EDIT: Once again, I'm absolutely sure the path shown in phpinfo() as "Loaded Configuration File" matches to the path of the php.ini file I use. Even if the path shown there was not correct (which would be a matter of a question - how is it possible, and how to correct it?), no one of php.ini files on my computer matches the configuration shown by phpinfo. I have searched for any instance of php.ini, so I'm sure I didn't miss any of them, even if it was a hidden/system file.
EDIT2: reinstall of EDB ApachePHP didn't help. I changed the paths slightly during the reinstall, so I updated paths here. "Loaded Configuration File" path still matches the right configuration file, and I keep restarting Apache after every change.
I looked closer to phpinfo(), especially to "Configure Command":
cscript /nologo configure.js "--enable-cli" "--enable-cgi"
"--with-openssl" "--enable-pdo"
"--with-extra-includes=C:\pgBuild32\include;D:\pginstaller_2.auto-repo\output\include;D:\pginstaller_2.auto-repo\apache.staging\include"
"--with-extra-libs=C:\pgBuild32\lib;D:\pginstaller_2.auto-repo\output\lib;D:\pginstaller_2.auto-repo\apache.staging\lib" "--enable-apache2filter" "--enable-apache2-2filter"
"--enable-apache2handler" "--enable-apache2-4handler"
"--with-apache-hooks" "--with-pgsql" "--with-pdo-pgsql"
"--with-prefix=D:\pginstaller_2.auto-repo\php.staging"
"--enable-one-shot" "--enable-cli-win32" "--enable-embed"
"--enable-isapi" "--enable-ftp" "--without-mysqlnd"
"--with-xsl=SHARED" "--enable-mbstring" "--enable-mbregex"
"--enable-shmop" "--enable-exif" "--enable-soap" "--enable-sockets"
"--with-gd=SHARED" "--without-mysql" "--without-mysqli"
"--without-sqlite3" "--without-pdo-mysql" "--without-pdo-sqlite"
Paths listed there (C:\\pgBuild32\include, D:\\pginstaller_2.auto-repo\output\lib etc.) don't exist on my computer. Their existence seems to confirm my assumption that parts of the setting are overwritten by some EnterpriseDB default (or that configuration in php.ini somehow doesn't work, so the defaults are applied). I don't know where are these settings saved - that's the point of this question, if I knew, I would change them and celebrate.
There is another possible cause of the problem: lack of dll's. Most php distributions have them in ./ext. In EnterpriseDB "php" directory has only one subdirectory, and it is named "Sdk"; the extensions are (or should be; there are no dll files in that dir) in D:\Programy\EDB_Apache\php\Sdk\include\ext directory. This directory contains only .h files (in directories named after the extensions), no dll. If this is not the ordinary architecture for EnterpriseDB bundle, please tell me; I might have a bad installer file.
So I first copied the dll's from another php installation (I didn't manage to get exactly those for PHP 5.4.23, but they are 5.4 too) into the extension folder, but nothing changed. Then I even copied whole ext folder to php directory in the ApachePHP bundle location and changed the extension path to it - again, no change.
For testing reasons, I tried to run php.exe. It returned a warning:
PHP Warning: PHP Startup: gd: Unable to initialize module
Module compiled with build ID=API2010025,TS,VC9
PHP compiled with build ID=API2010025,TS,VC10
These options need to match
in Unknown on line 0
So if I want to substitute dll's, I need to find either VC9 ApachePHP (will it still support PostgreSQL 9.3? My main reason for all this is to be able to created forms for my database), or VC10 PHP 5.4. I didn't find any .msi installer for PHP 5.4 (even less VC10 one) and after some bad experiences with software installation through command line on Windows I don't want to try non-msi version without being sure that this is the only choice.
Any advice now?
Recently I have purchased a VPS and I have the root access. I need to enable the extension=php_mysqli.dll in php.ini. But I could not find the php.ini file. Actually I am a Windows User and I do not know how to use Linux or SSH Commands. I want to find php.ini file and open it manually and make my desired changes. Can Any one help me?
Edit, on a cPanel server you should not be editing the PHP.ini file to enable extensions like that.
Within WHM, locate EasyApache and go through the guided setup for Apache and PHP. In the 'Exhaustive Options' screen, you'll find a checkbox to enable the mysqli extension.
Enable all the extensions you need, then hit 'Save and Build'. This will rebuild Apache and PHP using the configuration you just selected.