[Help] Trying to Connect SQL with my Web

01/17/2016 02:38 Quesito#1
Hey Guys, last night i was trying to make a Web Registration using "Abrasive Secure PHP Web Registration Script" ([Only registered and activated users can see links. Click Here To Register...])

I created a new Folder in Public_Html ([Only registered and activated users can see links. Click Here To Register...]) ([Only registered and activated users can see links. Click Here To Register...]) (Register and Ranking) i already edited it with my Host IP- DB User and DB Password but im still having this error.

Register ([Only registered and activated users can see links. Click Here To Register...])
Ranking ([Only registered and activated users can see links. Click Here To Register...])

( i was trying with Xampp and Everything is working fine but i need it in my web )

Help me guys! thx.:rtfm:
01/17/2016 15:44 SkuulCandy#2
  • The data source you are attempting to connect to does not exist on your machine.
  • You do not have permission to access the location where the data source is stored.
  • On Linux and UNIX, your SYSTEM data sources and / or drivers are defined in non-standard files or locations and you have not set the relevant environment variable to tell unixODBC where to find them.
  • The ODBC driver that the Driver attribute points to is not installed on your machine.
    On Linux and UNIX, to display a list of installed drivers, type odbcinst -q -d.

Regards,
01/17/2016 18:43 treica#3
Make sure the SQL Browser is running on your Server machine and your SQL port is open on your firewall (recommended to allow just your UNIX machine's IP to connect to SQL port).

For your registration script seem like you don't have unixODBC driver installed, you may contact the company you bought the hosting from to install it for you if you don't have root permissions.

With this PHP snippet you can check if you are able to connect from your UNIX server to your database port.

Code:
<?php
$fp = fsockopen('DATABASE_IP', 1433, $errno, $errstr, 5);
if (!$fp) {
    print "FAIL!!!";
} else {
    print "Able to connect!";
    fclose($fp);
}
?>
01/17/2016 21:16 Quesito#4
Anyone Knows how can i dowload UnixODBC Drivers?
01/17/2016 21:52 treica#5
Quote:
Originally Posted by Quesito View Post
Anyone Knows how can i dowload UnixODBC Drivers?
[Only registered and activated users can see links. Click Here To Register...] you go.
01/17/2016 22:07 Quesito#6
Quote:
Originally Posted by treica View Post
[Only registered and activated users can see links. Click Here To Register...] you go.

Thank you! now i Dowloaded it ( [Only registered and activated users can see links. Click Here To Register...] )
Thats it right?
01/17/2016 23:20 ShaiyaOld#7
Quesito , what Treica said its true.
Sql broswer runnig , 1433 , installiing native driver .
Follow Castor turorial . Do step by step as him and will work .

Credits to treica
01/18/2016 00:13 Quesito#8
I did it Exactly like him, step by Step :c

Quote:
Originally Posted by ShaiyaOld View Post
Quesito , what Treica said its true.
Sql broswer runnig , 1433 , installiing native driver .
Follow Castor turorial . Do step by step as him and will work .

Credits to treica
I did it exactly like him :c
01/18/2016 09:19 treica#9
Quote:
Originally Posted by Quesito
Huy buddy what im suppose to do with the UnixODBC Drivers Folder? can u give me a hand with that? thx.
You need to download the unixODBC-2.3.4.tar.gz file anywhere on the Linux machine you are trying to run the scripts from using SSH (root permissions required).

You can follow this steps (enter them one by one in the terminal).
Code:
cd /usr/local/lib/

sudo mkdir unixODBC

cd unixODBC

you must have wget installed
wget ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.4.tar.gz

gunzip unixODBC-2.3.4.tar.gz

tar xvf unixODBC-2.3.4.tar

cd unixODBC-2.3.4

./configure --disable-gui --disable-drivers --enable-iconv --with-iconv-char-enc=UTF8 --with-iconv-ucode-enc=UTF16LE

make

sudo make install
Make sure your system can find the unixODBC library you just installed to /usr/local/lib by editing the file /etc/ld.so.conf.d/x86_64-linux-gnu.conf to append the path /usr/local/lib/

Then run

Code:
sudo ldconfig
And you done.
But if you don't have root access you have to request this driver from your hosting company administrator (ex: you run on a shared hosting).