Install MSSQL Using Composer - php

I am migrating a Drupal site to another server and keep getting HTTP 500 error in the browser. When I investigate the PHP error log, I see that there is
PHP Fatal error: Call to undefined function sqlsrv_connect()
in one of the files. I am on a Linux environment and have Composer installed. Is there a way to install the mssql extension using the Composer? Alternatively, what is an efficient way to install MSSQL extension?

the SQLSRV functions are only available on Windows machines.
you can try using the ODBC functions, after installing the drivers but you will have to rewrite your code to use them.
if you happen to be running Ubuntu, here's a script for installation.

Related

Linux server on HostGator says Class 'HTTPRequest' not found

i am hosting a website on hostGator with Linux cpanel.
i am using httpRequest and Curl functions in my php script. But when i put the script on Live Server it says,
Fatal error: Class 'HTTPRequest' not found in home/directory/file.php on line42
Any way to set up the server as i,ve update the php version to 5.5 on server from Cpanel.
How to configure these settings i have no idea.
Don't Link to these Questions not Helping in my case:
PHP Fatal error: Class 'HttpRequest' not found
HttpRequest not found in php
You can try this Alternative, as if you are on shared hosting you might not able to get the desired modules:
instead of httprequest use CURL which is built in php module, and easily enabled on linux hosting servers as well.
Check this out might be helpful.
Alternative for HTTPRequest in php
This is a pecl module that is apparently not installed on your server. You can either install via cPanel -> PECL or using the pecl cli pecl install
http://www.php.net/manual/en/install.pecl.php
Looks like I was wrong there does not appear to be a pecl manager in cPanel just pear.
So you need to ssh to the server and use the pecl command else write support#hostgator.com and request they install the extension for you

Can't install PHP extension with pecl because of perl "symbol lookup error"

I am trying to install the mongodb driver for PHP on my Amazon Linux server. I am currently running php 5.4 and have installed php54-devel. When I try to run "sudo pecl install mongo", I get the error:
/usr/bin/perl: symbol lookup error: /usr/local/lib64/perl5/auto/Data/Dumper/Dumper.so: undefined symbol: Perl_Istack_sp_ptr
I get the same error when I just run "cpan" so I think it's deeper than just the PHP extension.
I fixed the problem by deleting /usr/local/lib64/perl5/auto and running cpan again. I don't know much about perl, but from my research it seems that there must have been an incompatibility due to a previous upgrade.

Configuring PHP for MySQL after installing Apache & PHP from source in Ubuntu

I have already installed Apache 2.4.4 & PHP 5.4 from source in my Ubuntu 10.04 machine. I also installed MySQL 5.6 from source and SQL commands are running from shell.
When I use an SQL function to connect to database, it throws a fatal error that this function is not defined.
I know I can configure PHP for MySQL by providing the directory of MySQL while installing PHP, but now I have already installed & configured Apache & PHP and they are working, so please tell me how to configure PHP for MySQL support.
Thanks.
Recompile php with --with-mysql OR --with-mysqli directive. This way you can add required extensions to php. See php-mysql OR php-mysqli

Apache, PHP and Percona Database

I have just upgraded MySQL 5.0 to Percona XtraDB 5.1. I had to yum remove all the mysql stuff first. Everything was working fine, until I restarted Apache and now I get:
Fatal error: Call to undefined function mysql_connect()
Any ideas? I have a feeling I removed some sort of mysql plugin for apache at the same time.
You need to install the php-mysql library. Depending on your distribution, this may have a slightly different name. Also, I was just experimenting with this on Ubuntu 11.04. Ended up going back to MySQL because PHP-MySQL wouldn't install without libmysqlcient16 which wouldn't install because it conflicted with percona. Hopefully, you don't run into the same problems that I did.
I use the following functional configuration with PHP and Percona on at least 150 servers:
Percona-Server-shared-55-5.5.30-rel30.2.509.rhel6.x86_64
Percona-Server-client-55-5.5.30-rel30.2.509.rhel6.x86_64
Percona-Server-server-55-5.5.30-rel30.2.509.rhel6.x86_64
Percona-Server-devel-55-5.5.30-rel30.2.509.rhel6.x86_64
Percona-Server-shared-compat-5.5.30-rel30.2.509.rhel6.x86_64
php-5.3.3-22.el6.x86_64
php-xml-5.3.3-22.el6.x86_64
php-cli-5.3.3-22.el6.x86_64
php-pdo-5.3.3-22.el6.x86_64
php-mcrypt-5.3.3-1.el6.x86_64
php-xmlrpc-5.3.3-22.el6.x86_64
php-common-5.3.3-22.el6.x86_64
php-mysql-5.3.3-22.el6.x86_64
As for the error libmysqlcient16.so is, resolvable by installing Percona-Server-shared-compat-[version].rpm.

Differences between PHP 5.2.x and 5.3.x with respect to the SOAP library

I have developed a PHP site using PHP 5.3.4 and deployed it to a server that has PHP 5.2.6 installed. I am not doing anything fancy; in fact, the only major library I am using is PHP's native SOAP library.
However, when I test my deployed site, I get the error:
Fatal error: Class 'SoapClient' not found in (path) on line 20
Are there any major differences between PHP 5.2.x and 5.3.x with respect to the SOAP library? I have already changed the configuration files. (Well, actually I told the sysadmin to do it, because I don't have permission to do so.) And I get the same error. Any ideas?
EDIT: More information...
I'm deploying my site to a Windows server.
The server has AppServ installed.
For some reason I don't understand, PHP's configuration file is C:\Windows\php.ini instead of PHP_DIR\php.ini.
I dont think soap is installed on the server try
sudo aptitude install php-soap
change the following line in php.ini:
;extension=php_soap.dll // before
extension=php_soap.dll // after
this enables the soap extension since PHP 5.0

Categories