[freetds] Using PHP with FreeTDS
Brian Paquin
brian.paquin at yale.edu
Thu May 31 14:13:16 EDT 2007
The timeouts are browser generated.
But when I run the script from the command line I get:
intranet:/Library/WebServer/Documents user$ php dem.php
php(24248) malloc: *** vm_allocate(size=1069056) failed (error code=3)
php(24248) malloc: *** error: can't allocate region
php(24248) malloc: *** set a breakpoint in szone_error to debug
FATAL: emalloc(): Unable to allocate 9 bytes
Memory issue? Server currently has 2GB RAM (400MB used),
but there are quite a few pageins and pageouts...
Both old and new servers have the following resource limits in php.ini:
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
Brian :)
On May 29, 2007, at 11:29 PM, Daniel Fazekas wrote:
>
> On May 30, 2007, at 04:19, Brian Paquin wrote:
>
>> Apache and PHP are working (I can generate a phpinfo() page).
>> But when I use a fairly simple PHP page to connect to the database,
>> I get a timeout.
>
> Timeout as in PHP generates some kind of timeout message?
> Or is it your browser timing out waiting for a reply from the web
> server?
>
>> The same simple PHP page executes correctly (so I know the PHP page
>> code works, the database is up, and I have the right setup.
>
> Can you also reproduce the problem executing your php script from the
> command line?
> eg, logged into the new server, in Terminal, try:
> php script.php
>
> If it still fails, then you can experiment here a bit easier than
> going through Apache.
>
> For example, you can just dump the debug output to the terminal:
> TDSDUMP=stdout php script.php
>
>> Of note, the older server has Sybase installed; the new server
>> doesn't.
>
> That shouldn't make a difference unless you actually are using, or
> trying to use, Sybase's libraries rather than FreeTDS on one of the
> servers.
>
>> Is a local Sybase install required??
>
> Definitely not.
>
>> Will enabling Dump in freetds.conf provide help with this issue?
>
> Yes. If you can only reproduce the problem through Apache, that will
> be your best option.
>
> --
> fds
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>
_________________________________________
Brian T. Paquin, ACSA, ACHDS, ACTC, ACDT, ACPT
Yale University
Department of Pathology
brian.paquin at yale.edu
(203) 785-3691
More information about the FreeTDS
mailing list