[PHP] ODBC under linux + PHP + Apache problem.

2002-08-02 Thread Jose Morales

I write a few days ago to the list with a problem trying to find my ODBC DSN under 
linux debian. Well, i solve the problem, now i can find my dsn from PHP code, but its 
seems like it crash when i do a odbc_connect(...)

I know that unixodbc works becouse i test it with isql.

I have no warnings trying to find DSN, but now nothing happens. I suppose that it 
finds dsn but there is another error somewhere. But there is no logs, there is no 
output in the browser...  i dont know what to do, i have no information to try to 
resolve the error.

somebody can help me?

this is the reply from the browser;
The following error was encountered: 
Zero Sized Reply 
Squid did not receive any data for this request. 


this is my code:
html^M
titleREGISTRO DE LLAMADAS/title^M
body ^M
?php
putenv(ODBCINSTINI=/etc/odbcinst.ini);
putenv(ODBCINI=/etc/odbc.ini);
if(!extension_loaded('odbc'))
{
if(!dl(odbc.so)){
exit;
}
}
echo dl odbc loaded okbr;
$cx=odbc_pconnect(cdr2,mylogin,mypasswd,);
echo connected;
?
/body
/html




thanks in advance!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP + Apache + ODBC on linux

2002-07-31 Thread Jose Morales

Hi to all!!

I have a problem and i think maby somebody can help me.

I have an MS Sql server on a Windows 2000.
I have a PHP web in a linux debian. Im trying to access to the MS SQL server through 
unixodbc.
Unixodbc  works well becouse y test it under linux , with isql and sqsh, and i know 
that it works.
in my PHP code I load the odbc module with dl('odbc'), and it works, but 
the problem is that when i do odbc_pconnect(mydsn,myuser,mypasswd); y have an 
error like this:

Warning: SQL error: [unixODBC] Could not find DSN in odbc.ini, SQL state 08001 in 
SQLConnect in /path/to/my/page.php on line XX 
Warning: Supplied argument is not a valid ODBC-Link resource in /path/to/my/page.php 
on line XX 

When i test the odbc with isql under linux, i think that isql find an .odbc.ini under 
$HOME
the file is like this:
[ODBC Data Sources]
cdr2 = FreeTDS

[cdr2]
Servername = 192.168.129.6
TraceFile = /tmp/odbc.log
Driver = /usr/lib/odbc/libtdsodbc.so
Description = logs del call manager.
DSN = cdr2
DB = CDR
User = myuser
Password = mypasswd
Port = 1433

[Default]
Driver = /usr/lib/odbc/libtdsodbc.so


and i think that the problem is that apache user dont find this file. My apache user 
is www-data, and i try to copy an .odbc.ini file to this user $HOME, but dont works...

the conclusions are: 
1º ODBC works 
2º I have PHP compiled with ODBC support.
3º other users with an .odbc.ini file under $HOME can access to ODBC.

but the problem is still there :(  
so my question is: how can i access from PHP on debian to a well configured ODBC ?



thanks in advance!!



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] draw statistics

2002-07-18 Thread Jose Morales

Hi!

Im looking for some class that alow me to draw an histogram, or a piechar, for display 
statistics. 

thx!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php