Change PHP working directory, PostgreSQL not working on Windows - php

I don't use the Microsoft dump-everything-folder because I like to keep my stuff organized. My PHP and corresponding php.ini file are located here...
C:\MEDIA\INTERNET\WAPP\PHP 5.6.2 x64\php.ini
PHP does not see PostgreSQL which I've verified via phpinfo. The Apache error log showed the following error...
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\php\\php_pgsql.dll'
- The specified module could not be found.\r\n in Unknown on line 0
So my question is where is the setting to change the default PHP directory? This should get PostgreSQL to work with PHP.

You have to change the default php extension directory by editing the php.ini:
extension_dir="FULL_MODIFIED_EXTENSTION_PATH"
Something like:
extension_dir="C:\MEDIA\INTERNET\WAPP\PHP 5.6.2 x64\ext"
Source

Related

php_pdo_oci.dll is not found on PHP 7 although commented on PHP.ini

I have error on my codeigniter application on upgrading from PHP 5.6 to PHP 7.0 .
My codeigniter is using MYSQL database and IIS web server.
I noted that php_pdo_oci.dll extension has deprecated on PHP 7.0 .
I learn that this extension is for Oracle.
Since the app does not even use Oracle , why is this extension library required to be loaded? Has Anyone ever experienced this? How do we turn off the file load, php_pdo_oci.dll ?
Thanks.
A PHP Error was encountered
Severity: Core Warning
Message: PHP Startup: Unable to load dynamic library 'C:\Program Files
\php70\ext\php_pdo_oci.dll' - The specified module could not be
found.
Filename: Unknown
Line Number: 0
It is a part of Oracle C Interface you can disable the extension in your php.ini by commenting that line will do the trick or if you want to install that extension try this
refer : PHP unable to load dynamic library "php_pdo_oci.dll"
I had the same problem first go to you php.ini and comment out the pdo_oci
and after that open xampp and you will find 4 options in the xampp horizontal to apache start/stop admin config go to config and php.ini and comment the php_pdo_oci there also and you are done

PHP SQL connectivity

I have manually installed Apache and PHP on my server and it has to connect to the sql server 2012 for DB. My configurations are as below:
Apache 2.4.23 VC11 x64 installed on E:\
PHP 7.0.12 VC14 x64 installed on e:\
I have installed the srv dlls from the microsoft website.( SQLSRV40.exe). Also I have installed the msodbcsql dll and the sql native client (both 64bit) , but while I run these two .exe it gets installed on to the default path which is c:\
I have enabled the php_errors and I could see that php is working fine with the phpinfo() but on the phpinfo() i dont see the sql.dll files being picked up. More over the php_error file throws the error:
"[01-Nov-2016 12:14:58 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0
[01-Nov-2016 12:14:59 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0"
Am not able to figure out what went wrong, Could some one help me out, please
You can simply move the .dll files from C:\ to E:\php\ext\ (copy & paste).
Alternatively you can alter the path in the php.ini file which should also be in E:\php.
It might be helpful if you search for all files containing the text php_sqlsrv_7_ts_x64 then you know where they are actually loaded.

Xampp - MS SQL - PHP 5.5

I'm trying to get the PDO SQL driver to work with my Xampp and PHP 5.5 installation. I have followed the directions found below as Microsoft has yet to make a PHP 5.5 SQL driver:
As you can see by the images I have downloaded the file, placed it into my C:\xampp\php\ext folder and added it to php.ini and restarted apache.
But still when running phpinfo(); it shows it as not loaded. What did I do wrong?
EDIT:
Error log for PHP shows this:
[25-Sep-2014 14:22:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_sqlsrv_55_ts.dll' - The specified module could not be found.
in Unknown on line 0
[25-Sep-2014 14:22:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pdo_sqlsrv_55_ts.dll' - The specified module could not be found.
in Unknown on line 0
It seems by using Dependency Walker (http://www.dependencywalker.com) I found out that the modules couldn't find php5ts.dll file, even though it was directory up.
So I edited the Windows 2008 R2 Environment Variables and added C:\xampp\php to the Path variable and it worked like a charm.
I used the instructions here on how to edit the variables in Windows:
http://thommck.wordpress.com/2010/12/06/how-to-add-a-path-to-the-system-variables-in-windows-2008-r2/

php file not running on browser after configuring it with apache 2.2.22 and php 5.2.13

I want to call php file form android app to fetch the data from the server so configure the apache 2.2.22 with php 5.2.13 and then i run the index page it run correctly and when try to run the project page it say server not found and in the error log file of the apache it show the following warnings:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php/ext\\php_pdo_mssql.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php/ext\\php_pdo_oci.dll' - The specified module could not be found.\r\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/php/ext\\php_pdo_oci8.dll' - The specified module could not be found.\r\n in Unknown on line 0
can anyone tell whats the issue.
Thanks in advance.
Do you have that .dll installed? If not then PHP will throw an error because it cannot load the proper libraries to use things like mysql_connect, etc.
try downloading the .dll again and seeing if it solves the problem.
What does your php.ini look like?
Try uncommenting this line:
;extension=php_mysql.dll
Save the ini and then restart Apache.
Try to put the libmysql.dll in c:/windows/system32 and then restart apache...

Can someone help me with the GD library in windows?

I cannot get this to work on Wondows. There is a dll file bundled in the gdwin.zip file that I downloaded called "bgd.dll". I read that this file needs to go into the ext directory and then simply add / uncomment the library in the ini file. I've done that but I cannot get this working. Can someone please help? I'm on 5.2
This is the error message I'm getting. I have restarted the server.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_gd2.dll' - The specified module could not be found.\r\n in Unknown on line 0
I renamed the dll back to its original name and now I am getting this error after I restart the server:
PHP Startup: Invalid library (maybe not a PHP library) 'bgd.dll' in Unknown on line 0
i just downloaded the php 5.2.11 zip from php.net and it has the php_gd1.dll in the ext folder already .. so u should just uncomment the line from the php.ini and that should be it. u dont need to get the gd lib seperatly.

Categories