• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

FreeTDS with Plesk8

T

taftech

Guest
I had FreeTds (for connecting to mssql databases) working with plesk7. I Installed it, recompiled php to work with it, and it worked. Pretty simple.

However, now I have Plesk 8 and PHP was upgraded to 5, It doesn't seem so simple. I have Installed FreeTDS and downloaded/compiled php5 to work with it. However, the old version of php5 is still being used. PHP doesn't seem to be loaded by apache as a module anymore. How can I load the new php5?

Thank You
 
Did you have any luck? I'm also looking for a quick and easy way to connect to a Microsoft SQL Server 200x data source using Plesk 8 for Linux.
 
Ive built the php-mssql module in my PHP 5.2.5 rpms. I've successfully used it against mssql and sybase servers. I don't recall having to do anything special to get it to work. The freetds dependencies are also available in the archive. To set it up run:

wget -q -O - http://www.atomicorp.com/installers/atomic |sh

and then install the mssql module:
yum install php-mssql
 
Hello atomicturtle,

I am trying to install FreeTDS on my Linux REL (Plesk 8.3) to get php to connect to remote MSSQL server 5.

Can you please help me?

My system details:
Linux 2.6.18-53.1.13.el5 x86_64

I have run the command you gave above but

after I ran the yum install php-mssql, it seems to go fine but then I check the phpinfo page and no mssql support is displayed..

What am I missing??

Thanks
 
Thank you atomicturtle,

stupid me, I hadn't restarted the httpd service...

After I did it, I checked the phpinfo page and mssql support showed up.

Now I just need to test the connection to thee microsoft sql server 5, I'm not sure how because it is the first time I configure freetds.
 
atomicturtle,

Hi,
Thank you very much for your reply.

I have managed to get the db connection test to work using tsql command, using the dsn from /etc/freetds.conf.
However when I try to access it using a php script, it yells an error related to module php_ioncube_loader_lin_5.1_x86_64.so

Here are the details of my freetds settings, the php script I try to run and the error. I am researching for the cause of that error but haven't been able to find anything yet.

Is the below configuration of tds coming from your repo?

================================================
# rpm -qa | grep tds
docbook-dtds-1.0-30.1
xhtml1-dtds-1.0-7.1.1
freetds-0.64-1.el5.art
================================================
# tsql -C
Compile-time settings (established with the "configure" script):
Version: freetds v0.64
MS db-lib source compatibility: yes
Sybase binary compatibility: unknown
Thread safety: yes
iconv library: yes
TDS version: 4.2
iODBC: no
unixodbc: yes

================================================
The php script I am running to test
# more /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php
<?php
$user="sa";
$dsn="DBTEST";
$password="mypassword";
$dbh = odbc_connect($dsn, $user, $password);

$result = odbc_tables($dbh);

$tables = array();
while (odbc_fetch_row($result)){
if (odbc_result($result,"TABLE_TYPE")=="TABLE")
echo"
".odbc_result($result,"TABLE_NAME");
}
?>
================================================
And here the error message
# php /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php
Failed loading /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: /usr/lib64/php/modules//php_ioncube_loader_lin_5.1_x86_64.so: undefined symbol: zend_unmangle_property_name_ex
PHP Warning: odbc_connect(): SQL error: [unixODBC][FreeTDS][SQL Server]Unable to connect to data source, SQL state S1000 in SQLConnect in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 5
PHP Warning: odbc_tables(): supplied argument is not a valid ODBC-Link resource in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 7
PHP Warning: odbc_fetch_row(): supplied argument is not a valid ODBC result resource in /var/www/vhosts/mydomain.com/httpdocs/dbsetsu.php on line 10

================================================

It's it strange, could it be that some php dependencies are failing?

Thank you,
 
Back
Top