well. i am back to where i started, only this time i have a better understanding of what odbc is exactly... Still no ODBC support in PHP4 though.
Ok, here's what I did. I uninstalled all php and apache packages from my debian server. I figured it would be best to do it all at once to get a brand new system up and going.
Ok. So then I start installing things. I got a fresh new 'virgin' copy of apache2 up with the default config files. I installed the php4 packages, including the php4-odbc package. I installed unixODBC. I downloaded MyODBC from dev.mysql.com/downloads like mentioned before.
Ok, so I have all my tools on the machine ( i think ). I start to google up answers and read doc files on my machine about how to configure unixODBC. I then read up and installed the MyODBC from mysql.com... I then did the tests i saw from multiple sites doing:
# isql -v MySQL-test
This failed probably at least a hundred times until i finally got it to work correctly and display a workable error. I then played with it more and figured out i had to feed it a user/pass in the CLI.
# isql -v MySQL-test root password
Brilliant. It displayed the data correctly. This means ODBC is now setup and works on my server. Sweet. Time to move on to php4 and apache2...
Ok, so I get this sumple script from the net and place it on my server (i edited some of the stuff and built the test table and placed data in it for this test purpose):
Code:
<?
// make your connection below
$Connection = odbc_connect("MySQL-test","root","password");
$Result = odbc_exec($Connection, "select * from test");
$NewID = odbc_result($Result, 1);
odbc_free_result($Result);
// make here all what you want with the NewID
odbc_close($Connection);
?>
Well... Thats when I realized my php4 is not recognizing ODBC commands...
Code:
Fatal error: Call to undefined function: odbc_connect() in /var/www/test.php on line 3
Ok, so i try checking google and php.net for how to enable this odbc support that i thought i installed when i installed php4-odbc from apt-get.
But thats where i think my problems are cooming from... I am installing from apt-get without giving any arguments at all. I do not like to compile my own stuff because i like what apt-get has to offer. Thats the whole reason why i use Debian, is for apt-get.
Ok, so i figured installing all this stuff with no arguments i think the default settings for all the packages are working together correctly or something.
Does anyone know what I can/should do now?
Detailed responses will probably be the only things i will understand seeing how i am new to odbc, and i am not good with compiling programs.
Thanks again!