[SOLVED] Sybase killing me once again
Posted: Mon Dec 03, 2007 6:29 pm
So I am trying to roll out a new server. Two actually, and our enterprise server is Sybase. I have had all sorts of weird problems hitting Sybase in the past, and each time I was able to overcome my problems with the help of this community, Google and a lot of chocolate.
Here is my latest issue.
I have compiled a modified Sybase CT extension that allows for multiple result set handling. This same extensions has been compiled on our other servers with some headache, but ultimately, successfully.
This time around the extension compiled with not a single problem. Three minutes and done, and I have a sybase_ct extension. My problem is that from a web server, the sybase_connect() function fails immediately. It doesn't return an error, it just prompts you to download the test file. But from the CLI, the sybase_connect function works without a hitch.
When run from the web, I get the following error message:
However, when I do this at the CLI:
I get this:
Does anyone have any idea why it would work at the CLI and not as an Apache module? I have checked and rechecked permissions, file placement, environment vars, paths... everything. I have googled the hell out of this error message and tried some of the stuff some people have mentioned. Still, it is a no go through the web.
FYI, I am using PHP 5.1.6 (also on the machines that this is working on), Apache 2.0.59 (again, same as the machines it is working on) and Sybase client 12.5 (same as the others). Any help in connecting to my database server would be much appreciated.
Here is my latest issue.
I have compiled a modified Sybase CT extension that allows for multiple result set handling. This same extensions has been compiled on our other servers with some headache, but ultimately, successfully.
This time around the extension compiled with not a single problem. Three minutes and done, and I have a sybase_ct extension. My problem is that from a web server, the sybase_connect() function fails immediately. It doesn't return an error, it just prompts you to download the test file. But from the CLI, the sybase_connect function works without a hitch.
When run from the web, I get the following error message:
Line 24 (and the next few lines) looks like this:PHP Warning: sybase_connect() [<a href='function.sybase-connect'>function.sybase-connect</a>]: Sybase: Unable to allocate connection record in /path/to/sybase/test.php on line 24
Code: Select all
<?php
if (!$con = sybase_connect('SERVER', 'USER', 'PASSWORD'))
{
die('Could not contact the DB server: ' . sybase_get_last_message());
}
?>Code: Select all
[root@server /]# php -r 'sybase_min_server_severity(16); $con = sybase_connect("SERVER", "USER", "PASSWORD"); var_dump($con); var_dump(sybase_query("sp_who"));'Code: Select all
resource(4) of type (sybase-ct link)
resource(5) of type (sybase-ct results)FYI, I am using PHP 5.1.6 (also on the machines that this is working on), Apache 2.0.59 (again, same as the machines it is working on) and Sybase client 12.5 (same as the others). Any help in connecting to my database server would be much appreciated.