Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't connect with php

36 views
Skip to first unread message

Martin Ramirez

unread,
Jan 9, 2012, 12:15:28 PM1/9/12
to
hi

I'm new using sqlanywhere since last week i'm trying to install
sqlanywhere module and all is ok til i try to use with php like the
manual says:

From the command line on non-Windows platforms:
/opt/sqlanywhere12/bin32s/dbinit hits.db
/opt/sqlanywhere12/bin32s/dbsrv12 hits.db

and using the php code

<html>
<body>
<p>Record page hits</p>
<?php
$conn = sasql_connect("uid=dba;pwd=sql");
sasql_query($conn,
"CREATE TABLE IF NOT EXISTS hits (hit TIMESTAMP)");
sasql_query($conn,
"INSERT INTO hits VALUES(now(*))");
$result = sasql_query($conn,
"SELECT TOP 10 hit FROM hits ORDER BY hit DESC");
if ($result) {
echo "<table border='1'>\n";
while ($obj = sasql_fetch_object($result)) {
echo "<tr>\n";
echo "<td>$obj->hit</td>\n";
echo "</tr>\n";
}
sasql_free_result($result);
echo "</table>\n";
}
sasql_close($conn);
?>
</body></html>

but just show me record page hits



in localhost/info.php show me this

SQLAnywhere support enabled
Allow Persistent Connections Yes
Persistent Connections 0/unlimited
Total Connections 0/unlimited
PHP SQLAnywhere driver version 2.0.10.0
SQLAnywhere client version 12.0.1.3152

Directive Local Value Master Value
sqlanywhere.allow_persistent On On
sqlanywhere.auto_commit On On
sqlanywhere.max_connections Unlimited Unlimited
sqlanywhere.max_persistent_connections Unlimited Unlimited
sqlanywhere.verbose_errors On On


Can somebody help me?

Thanks

chris....@gmail.com

unread,
Feb 10, 2013, 3:59:31 AM2/10/13
to
hi there, i have the same problem, did you find a solution?

im also not able to get the sqlanywhere result in the info.php, i followed all the instructions but seems like im doing something wrong...

do i need to add this line into the envvars file with textedit?


LD_LIBRARY_PATH=”/opt/sqlanywhere11/lib32:$LD_LIBRARY_PATH”
export LD_LIBRARY_PATH

thanks for your help
0 new messages