My page hangs when I try to load the php_com_dotnet.dll. I verified that that extension directory is set correctly via phpinfo() and the .dll is in the directory. I get no error on my page or in my php error log it just hangs seemingly forever and I finally get this error
Failed to load resource: net::ERR_FAILED
In the console which doesn't seem very helpful. I used the IIS web installer to install PHP so I would assume it would have the correct version of .dlls in the ext directory that matches my php version, and by default several other extensions are loaded and they work fine. Please any help would be greatly appreciated.
Here is a snippet from my php.ini, it work fine until I add the bottom line...
extension_dir="C:\Program Files (x86)\PHP\v5.6\ext"
[ExtensionList]
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_mbstring.dll
extension=php_gd2.dll
extension=php_gettext.dll
extension=php_curl.dll
extension=php_exif.dll
extension=php_xmlrpc.dll
extension=php_openssl.dll
extension=php_soap.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll
extension=php_imap.dll
extension=php_tidy.dll
[COM_DOT_NET]
extension=php_com_dotnet.dll
My problem here was the arguments I was passing after the cmd.exe. I was trying to display an application using a service that did not have the ability to interact with the desktop. I did not need to interact with the desktop was only doing so for debugging purposed, removing this and adding the script I wanted shell to run worked fine.
Related
I'm attempting to install Drupal on an Windows / Apache / PHP box. When running the install script 'install.php' I'm told that the extension gd is not installed.
My PHP ini file has it enabled:
...
;extension=php_curl.dll
;extension=php_fileinfo.dll
extension=php_gd2.dll
;extension=php_gettext.dll
;extension=php_gmp.dll
...
I have restarted the server.
Looking inside the install script I can see it is using if(extension_loaded ('gd')) to discover the extension, which returns false. phpinfo(); only mentions it within the 'PHP Credits' section at the bottom.
I've followed all the instructions I can find, all of which boil down to uncommenting it in the php.ini file.
Could someone point me in the right direction?
Turned out to be a 'read the manual' moment.
I hadn't set the default extension directory via:
extension_dir = C:\php\ext
as I assumed it would be relative within the downloaded installation. I eventually discovered this by reading the apache logs.
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 have followed this tutorial for installation of php, mysql, apache and phpmyadmin :http://www.youtube.com/watch?v=kZ2zbO6PABk
and towards the end when he tried to access phpmyadmin he got the following error but resolved it :
Fatal error: Call to undefined function mb_detect_encoding() in
C:\Apache24\htdocs\phpMyAdmin\libraries\php-gettext\gettext.inc on
line 177
I am now still having issue. Like this question:
Fatal error: Call to undefined function mb_detect_encoding()
I have also made sure ive uncommented out and unblocked the following extensions:
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
What else am I missing?
added PHPINIDir "C:\php" in http.conf and it now works
I faced this problem too. The problem is that settings in PHP.INI is no incorrect. Mysql is not longer enabled by default. you got to enable the dll in the PHP.INI among other dlls.
http://www.hirokoymj.com/Install_phpMyAdmin.php
These are some of the dlls that you have to uncomment in php.ini
curl, gd2, mysql, mqsqli, mbstring, pdo_mysql, phar, soap, zip
It works like a charm after having changed the settings!
On my install I found that the 4 instructions lines above the 'extension_dir="C:/..." entry in the php.ini file were not properly commented out. So nothing after that in the config file seemed to work. Including the set path to the extension_dir. So the mbstring.dll wasn't loading. I added semi-colons to comment them out, restarted Apache, and Viola! The hirokoymj.com page listed above was a big help!
I wanted to install Zend Framework 2. So I downloaded the skeleton application. As mentioned in the ZF2 manual, we have to issue the command
php composer.phar install
Inside the skeleton.
But I'm getting an error
You must enable the openssl extension to download files via https
Then I enabled the ssl_module in my wamp, I checked the php_ini file and I can see the following line
extension=php_openssl.dll
Still I'm getting the same error. Anybody having any clue what I missed out?
PHP CLI SAPI is using different php.ini than CGI or Apache module.
Find line ;extension=php_openssl.dll in wamp/bin/php/php#.#.##/php.ini
and uncomment it by removing the semicolon (;) from the beginning of the line.
Verify you are editing the correct php.ini file.
Reference:
https://github.com/composer/composer/issues/1440
"WAMP uses different php.ini files in the CLI and for Apache. when you enable php_openssl through the WAMP UI, you enable it for Apache, not for the CLI.
You need to modify C:\wamp\bin\php\php-X.Y.Z\php.ini to enable it for the CLI."
make sure you have correct path to extension folder
extension_dir = "ext"
by default it is commented with ; character
I also had the same issue while playing around Zend Framework 2 and composer. I'm using PHP 5.4 (installed via macports) and my solution was to install openssl for PHP 5.4 via macports as well.
sudo port install php54-openssl
I have faced this problem, but configuging openssl (also for cli) did not help.
I have updated composer and this sloved my problem.
Just type:
$ php composer.phar self-update
or
$ composer selfupdate
Good luck!
I use XAMPP. In C:\xampp\php\php.ini, the entry for openssl did not exist, so I added "extension=php_openssl.dll" on line 989, and composer worked.
You need to enable "extension=php_openssl.dll" in both files (php and apache). my pc files path are these :
C:\wamp\bin\php\php5.3.13\php.ini
C:\wamp\bin\apache\apache2.2.22\bin\php.ini
Uttam, if your issue is not solved then try the follwoing 3 step approach. It worked for me as I had exactly same issue.
step1: click on wamp tray icon.
step2: goto menu apache->apache modules
step3: click on menu item "ssl_module"
it will automatically restart wamp. if wamp not restarted automatically then restart it through wamp tray menu-> Restart All services. After restart confirm that "ssl_module" coming as ticked under menu apache->apache modules
after that just attempt the php composer.phar install
from going through the response shared by you, php.ini file contains extension=php_openssl.dll and the php/ext directory also have file "php_openssl.dll"
good luck
The Valery's answer helped me:
https://stackoverflow.com/a/14265815/492457
WAMP uses different php.ini files in the CLI and for Apache. when you
enable php_openssl through the WAMP UI, you enable it for Apache, not
for the CLI. You need to modify C:\wamp\bin\php\php-5.4.3\php.ini to
enable it for the CLI.
Make sure that you update your php.ini for CLI. For my case this was C:\wamp\bin\php\php5.4.3\php.ini and uncomment extension=php_openssl.dll line.
Late answer but adding so other can learn the reason.
You also need to edit the php.ini file in the "wamp\bin\php\php-X.Y.Z" location.
I had to uncomment extension=openssl in php.ini file for everything to work!
Becareful if you are using wamp don't use the wamp ui to enable the extension=php_openssl.dll
just go to your php directory , for example : C:\wamp\bin\php\php5.4.12 and edit the php.ini and uncomment the extension=php_openssl.dll.
it should work.
Was facing this error
"You must enable the openssl extension in your php.ini to load
information from.."
I solved by finding and uncommenting the following lines on php.ini file
;extension=php_openssl
;extension_dir = "/c:\wamp64\bin\php\php 8.0.25\ext\/"
;extension=bz2
;extension=curl
;extension=fileinfo
;extension=gd
;extension=gettext
;extension=gmp
;extension=intl
;extension=imap
;extension=ldap
;extension=mbstring
;extension=exif
;extension=pdo_sqlite
;extension=shmop
in
Wamp/bin/php/php 8.0.25/php.ini
Uncomment both by removing the semicolon (;) from the beginning of each line.
If you have the latest PHP v^8 or above, likely you won't see php.ini file. So what you do is to make a copy of php.ini-development which you will see there and then rename the copy you just made to php.ini and then do the same uncommenting of the two lines then save.
I'm trying to get a PHP script to run every 30 minutes on my server (Win XP SP3, xampp 1.7.3).
To do so I'm running the following script (update.cmd) using the MS task scheduler
SET PATH="C:\xampp\PHP"
start php.exe \htdocs\update_dashboard.php
I am using the oci8 php extension on my webserver, but when I run that script it gives me errors that php.exe can't find the necessary dll for the oci8 extension. I get the following errors:
This application has failed to start because OCI.dll was not found. Re-installing the application may fix this problem.
PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_oci8.dll' - The specified module count not be found.
I know that the file is there and I don't get those errors when the php is run through apache, am I running the wrong copy of php.exe? Any ideas why not? Does my PATH have to be set differently? My Windows PATH includes:
C:\instantclient_11_2;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\Program Files\ActiveState Komodo Edit 5\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Altiris\Software Virtualization Agent\
Thanks for your help.
I found this problem when I switch from php 5.3 non thread safe to php 5.3 thread safe on windows 7, and I ticked install everything
I fixed the issue by commenting out extension=php_oci8.dll, extension=php_oci8_11g.dll, extension=php_pdo_oci.dll in the php.ini
I also had issues with the sybase extension wanting a libcs.dll, which I solved by removing "extension=php_sybase_ct.dll"
eg
; at bottom of php.ini -->>
[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_ENCHANT]
extension=php_enchant.dll
[PHP_FILEINFO]
extension=php_fileinfo.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_GMP]
extension=php_gmp.dll
[PHP_IMAP]
extension=php_imap.dll
[PHP_INTL]
extension=php_intl.dll
[PHP_LDAP]
extension=php_ldap.dll
[PHP_MBSTRING]
extension=php_mbstring.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
;[PHP_OCI8]
;extension=php_oci8.dll
;[PHP_OCI8_11G]
;extension=php_oci8_11g.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll
;[PHP_PDO_OCI]
;extension=php_pdo_oci.dll
[PHP_PDO_ODBC]
extension=php_pdo_odbc.dll
[PHP_PDO_PGSQL]
extension=php_pdo_pgsql.dll
[PHP_PDO_SQLITE]
extension=php_pdo_sqlite.dll
[PHP_PGSQL]
extension=php_pgsql.dll
[PHP_SHMOP]
extension=php_shmop.dll
[PHP_SNMP]
extension=php_snmp.dll
[PHP_SOAP]
extension=php_soap.dll
[PHP_SOCKETS]
extension=php_sockets.dll
[PHP_SQLITE]
extension=php_sqlite.dll
[PHP_SQLITE3]
extension=php_sqlite3.dll
;[PHP_SYBASE_CT]
;extension=php_sybase_ct.dll
[PHP_TIDY]
extension=php_tidy.dll
[PHP_XMLRPC]
extension=php_xmlrpc.dll
[PHP_XSL]
extension=php_xsl.dll
[PHP_EXIF]
extension=php_exif.dll
Guessing if you need sybase and oracle database connections the standard clients install oci.dll and libcs.dll in the appropriate places, for everyone else who doesn't need to use these dbs just disable the php extensions, and it should run fine :)
Ant
I've solved the problem in a way by changing the script. It's now:
C:\xampp\PHP\php.exe -f C:\xampp\htdocs\php_scripts\utils\update_dashboard.php
Thanks for the help.
Check the php.ini file that php is using by running a phpinfo() from the command line, and look to see what extensions are enabled in that file. It's quite commopn for php to be set to use a different php.ini file when running from the command line; and xampp certainly uses a different php.ini file by default. You can also tell it what php.ini file to use with the -c switch
I ran the php -m command. Turned out that my system's OCI.dll went either corrupt or missing. I recovered it by running sfc /scannow in the run box, rebooted, system reinstalled it, and it was up and running with my extensions now all working.
Am I correct that both C:\instantclient_11_2 and C:\oracle\ora92\bin contain a OCI.DLL? Because of the order of the path you might load the wrong dll. When I read Which OCI8 DLL to use in PHP 5.3 you need a different line in the php.ini depending on the version of the oracle client. I currently have no access to a pc with oracle, so I cannot verify this.