This question already has answers here:
PHP Fatal error: Call to undefined function mssql_connect()
(3 answers)
Closed 3 years ago.
I'm running Windows Server, MS Sql and IIS6. I am trying to connect php to ms sql database, and I keep getting the following error from the script
Fatal error: Call to undefined function mssql_connect() in .... on line x
I have install zend studio in C:\Program Files\Zend\ZendStudio-5.5.0 directory. Configure IIS server and set the path variable to ;C:\Program Files\Zend\ZendStudio-5.5.0\bin\php5 also.
The zend studio folder contains php4 and php5 inside the bin dir. I have added extension=php_mssql.dll in the php.ini file which is inside the C:\Program Files\Zend\ZendStudio-5.5.0\bin\php5 folder. And added php_mssql.dll in the ext dir. php.ini file is placed in windows path C:\WINDOWS also.
To get changes made to php.ini to take effect, you must stop and start the IIS web service.
Also, mssql requires: ntwdblib.dll to be available on the Windows PATH. It is better to add the php folder to the Windows PATH instead of moving any files around. Re-logon or reboot your computer to get any changes made to the Windows PATH statement to take effect.
mssql_* API are no longer available on recent version of PHP
This extension is not available anymore on Windows with PHP 5.3 or later
you may need fix and compile yourself as it does not included in the open-source package.
Related
This question already has answers here:
How can I enable the MySQLi extension in PHP 7?
(8 answers)
Closed 6 years ago.
I get an error when trying to connect to my database with mysqli on PHP 7.0 and PHP 7.1
PHP Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /home/mywebsite/public_html/connection.php:7
$conn = mysqli_connect($DBhost,$DBuser,$DBpass,$DBname);
First check, if mysqli is enabled: phpinfo()
The mysqli PHP extension is not installed on your server. Contact to your server administrator.
OR
If you host the server yourself, in the php.ini file remove the semicolon in front of the extension extension=php_mysqli.dll.
Hope, this helps you
I would recommend using PHP PDO for database connection. Its got better performance and I think the code looks better.
But to speak on your error, it looks like php doesnt have a reference to mysqli library. Did you explicitly install the php-mysql package? Its also possible that the environment variable path is not pointing to the right location on the filesystem.
Your php not instaled mysql connector ,
for install linux :
sudo install php-mysqli
Happens when php extensions are not being used by default.
In your php.ini file, change
;extension=php_mysql.dll
to
extension=php_mysql.dll.
The mysqli PHP extension is not installed on your new server.
Contact to your server administrator.
If you host the server yourself, in the php.ini file remove the semicolon in front of the extension extension=php_mysqli.dll
my PHP Version is 5.6 and I ve already downloaded the driver for the sqlsrv extension and placed it in the ext/ directory, as well as modified the php.ini with the new extensions.
I still get the following error when trying to connect to my database
Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\db.php on line 12
Is there anything that i've missed?
Did you change Edit System Variable and Windows extensions ?
You can find here : http://www.iis.net/learn/application-frameworks/install-and-configure-php-on-iis/install-and-configure-php
Good luck..
Hi friends i am using Apache 2.4.4 (Win64), PHP 5.4.12. I need to install a new extension in it. I have a dll file of that extension i.e. pspell.dll. How should i make it work in my Apache? I have copied this dll to apache/Apache2.4.4/bin/. And enabled extension=php_pspell.dll in apache/Apache2.4.4/bin/php.ini. Restarted my apache but still getting no sign of this extension in phpinfo();. Please tell me what should i do?
Also getting this error:
Fatal error: Call to undefined function pspell_new()
Check server logs to see where is the problem.
Usually it's because file can't be found on disk or DLL file is not compatible with PHP - both PHP and DLL have to be compiled for same architecture, with same compiler and thread safety options.
This question already has answers here:
How do I get the SQLSRV extension to work with PHP, since MSSQL is deprecated?
(3 answers)
Closed 3 years ago.
I'm trying to run mssql driver for PHP, but something goes wrong.
I managed to get the right drivers for mssql, then added the extensions in php.ini, but PHP is still running "--without-mssql" "--without-pdo-mssql".
I'm running PHP 5.4 under Apache 2.2 on Windows XP SP3.
How to start the mssql drivers?
I've just had the same problem, for me I needed to use a different version of the driver.
I was using:
extension=php_sqlsrv_53_ts.dll
Which gave me the following error in PHP:
[28-Nov-2013 10:58:47 UTC] PHP Warning: PHP Startup: sqlsrv: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API
The solution:
extension=php_sqlsrv_54_ts.dll
Download from: http://www.microsoft.com/en-us/download/details.aspx?id=20098
See this answer: https://stackoverflow.com/a/25199324/1847383. If you use PHP as an Apache module, use the thread safe version.
I have found a great tutorial and explanation on this website:
http://bendustries.co/wp/setting-up-xampp-to-work-with-mssql/
All you need to do is download from here :
https://www.microsoft.com/en-us/download/details.aspx?id=20098
two files called:
php_pdo_sqlsrv.dll
php_pdo_sqlsrv.dll
And place then inside the php\ext folder.
Then you need to add those two lines under "Dynamic Extensions"
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
Save your php.ini file and restart apache, This process worked for me on win7 after I tried several other methods !
I have a problem to install ffmpeg, I tried several tutorials but did not.
I tried using the dll and executables but could not get the result is always.
"Fatal error: Call to undefined function dl ()"
I went on the official website and downloaded the dlls did the procedure in playing in system32 and php / ex and declared the extension in php.ini but does not work.
I am using the version of php 5.3.13.
I was thinking it was the version of php what do you think? I'm using WampServer observation
I used the ffmpeg-20130318-git-519ebb5-win64-static.7z from http://partisans9.alamaree.com/chan-5973786/all_p2.html
It is working, though I used it through command line for file format conversion only.