Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jan 2001 23:01:25 -0400
From:      "Sheridan Martin" <sjm05@nycap.rr.com>
To:        <freebsd-database@FreeBSD.ORG>
Subject:   Sybase, PHP, Apache, Win2000
Message-ID:  <008901c0828d$47422250$273f1d18@newdev>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0086_01C0826B.BF66C9B0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I work for NYS Department of Health. We have a large Public Health =
Network which operates on SUN boxes with Sybase ASE SQL. Most of the =
applications are written in a combination of Perl, Java, HTML, =
Javascript.=20

My group is responcible for a major application that was developed to =
collect Labs information. This application is written largely in =
PowerDynamo, HTML, JavaScript, and Perl using an abundant amount of =
stored procedures.=20

PowerDynamo is similar to Cold Fusion melding HTML and JavaScript to =
provide connectivity to Sybase SQL Servrers.=20

I am investigating the possibility of replacing the PowerDynamo with =
PHP. On the surface it appears that we would not be facing a major =
rewrite as we would if we were to employ JSP as an alternative. =
PowerDynamo is a dead product in the eyes of Sybase as well as most of =
the Sybase Developer community.=20

I first became interested in PHP when we attempted to move the existing =
application to Laptop computers for purpose of taking to presentations.=20

I found that the combination of the MS Personal Web Server and =
PowerDynamo was very unstable. I began looking for a better Web Server =
for the Laptop computers which lead me to Apache. To date I have never =
been able to get PowerDynamo to work with the Apache Web Server.=20

In learning about the Apache Web Server I began to seeing the PHP =
product being discussed as a SQL Server interface. So I began =
investigating PHP at that point.=20

So for I have PHP, MySQL, and Apache functioning properly in Win2000. =
Sybase is functioning properly as well in the ODBC interface to =
SQLAdvantage, Access, PowerBuilder, etc. When I attempt to connect the =
PHP code to the Sybase server it fails giving the following error =
message:=20


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

I put together a short piece of code based on a the Sybase sample that =
is posted on Thickbook.com site =
(http://www.thickbook.com/extra/php_sybase.phtml) just to check the =
ability to connect the Apache Web Server through PHP to a Sybase ASE SQL =
Server in a Windows 2000 OS environment.=20

I ran into problems the working the PHP4 build, Apache, and Sybase ASE.=20

I had downloaded PHP4 from several InterNet locations and none have =
worked properly when connecting to Sybase ASE through an Apache Web =
Server in a Win2000 OS.=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

<?php=20
// create connection=20
$connection =3D sybase_connect("NEWDEV","sa","smile10")=20
or die("Couldn't make connection.");=20

// select database=20
$db =3D sybase_select_db("psdemodb", $connection)=20
or die("Couldn't select database.");=20

// free resources and close connection=20
sybase_free_result($sql_result);=20
sybase_close($connection);=20
?>=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

Apache, PHP4, MySQL, and IE5 work well in Win2000.=20

Sybase ASE is working and can be connected to by SQL Advantage, Access =
and other tools using ODBC.=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

On my home computer I get the following error message from Apache/PHP.=20

The instruction at "0x00a555b1" referenced memory at "0xa5ed7940".=20
The memory could not be "written".=20

Click on OK to terminate the program=20

Apache/1.3.14 Server at 127.0.0.1 Port 80=20

This has happened several times with several builds of the Apache, PHP, =
and reloading fresh installs of the Win 2000 OS just to be sure.=20

PHP Version 4.0.5-dev=20
Windows NT 5.0 build 2195 / Jan 12 2001=20

Sybase 11.9.2 ASE for Windows NT=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

At work it sometimes writes the following error to the Apache error.log: =


[Thu Jan 18 21:39:32 2001] [error] [client 127.0.0.1] Premature end of =
script headers: c:/php4/php.exe=20

As soon as I comment out the sybase_connect() line the rest of the =
script executes properly although the other sybase calls generate error =
messages due to the fact that a connection does not exist. So the =
scripting is not the problem.=20


Bottom Line =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20

Is there some place where I could receive assistance in PHP, APACHE, =
SYBASE to work together in a Win2000 OS environment.=20
I would be willing to purchase a version of PHP that support Sybase in =
the above configuration. sjm05@health.state.ny.us=20

I have details of the error message and supportive set-up information, =
but this format does not support the presentation of such materials.=20



------=_NextPart_000_0086_01C0826B.BF66C9B0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I work for NYS Department of Health. We =
have a=20
large Public Health Network which operates on SUN boxes with Sybase ASE =
SQL.=20
Most of the applications are written in a combination of Perl, Java, =
HTML,=20
Javascript. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My group is responcible for a major =
application=20
that was developed to collect Labs information. This application is =
written=20
largely in PowerDynamo, HTML, JavaScript, and Perl using an abundant =
amount of=20
stored procedures. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PowerDynamo is similar to Cold Fusion =
melding HTML=20
and JavaScript to provide connectivity to Sybase SQL Servrers. =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I am investigating the possibility of =
replacing the=20
PowerDynamo with PHP. On the surface it appears that we would not be =
facing a=20
major rewrite as we would if we were to employ JSP as an alternative.=20
PowerDynamo is a dead product in the eyes of Sybase as well as most of =
the=20
Sybase Developer community. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I first became interested in PHP when =
we attempted=20
to move the existing application to Laptop computers for purpose of =
taking to=20
presentations. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I found that the combination of the MS =
Personal Web=20
Server and PowerDynamo was very unstable. I began looking for a better =
Web=20
Server for the Laptop computers which lead me to Apache. To date I have =
never=20
been able to get PowerDynamo to work with the Apache Web Server. =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In learning about the Apache Web Server =
I began to=20
seeing the PHP product being discussed as a SQL Server interface. So I =
began=20
investigating PHP at that point. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So for I have PHP, MySQL, and Apache =
functioning=20
properly in Win2000. Sybase is functioning properly as well in the ODBC=20
interface to SQLAdvantage, Access, PowerBuilder, etc. When I attempt to =
connect=20
the PHP code to the Sybase server it fails giving the following error =
message:=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2><BR>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I put together a short piece of code =
based on a the=20
Sybase sample that is posted on Thickbook.com site (<A=20
href=3D"http://www.thickbook.com/extra/php_sybase.phtml">http://www.thick=
book.com/extra/php_sybase.phtml</A>)=20
just to check the ability to connect the Apache Web Server through PHP =
to a=20
Sybase ASE SQL Server in a Windows 2000 OS environment. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I ran into problems the working the =
PHP4 build,=20
Apache, and Sybase ASE. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I had downloaded PHP4 from several =
InterNet=20
locations and none have worked properly when connecting to Sybase ASE =
through an=20
Apache Web Server in a Win2000 OS. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&lt;?php <BR>// create connection =
<BR>$connection =3D=20
sybase_connect("NEWDEV","sa","smile10") <BR>or die("Couldn't make =
connection.");=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>// select database <BR>$db =3D=20
sybase_select_db("psdemodb", $connection) <BR>or die("Couldn't select=20
database."); </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>// free resources and close connection=20
<BR>sybase_free_result($sql_result); <BR>sybase_close($connection); =
<BR>?&gt;=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Apache, PHP4, MySQL, and IE5 work well =
in Win2000.=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Sybase ASE is working and can be =
connected to by=20
SQL Advantage, Access and other tools using ODBC. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>On my home computer I get the following =
error=20
message from Apache/PHP. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The instruction at "0x00a555b1" =
referenced memory=20
at "0xa5ed7940". <BR>The memory could not be "written". </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Click on OK to terminate the program =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Apache/1.3.14 Server at 127.0.0.1 Port =
80=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This has happened several times with =
several builds=20
of the Apache, PHP, and reloading fresh installs of the Win 2000 OS just =
to be=20
sure. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PHP Version 4.0.5-dev <BR>Windows NT =
5.0 build 2195=20
/ Jan 12 2001 </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Sybase 11.9.2 ASE for Windows NT =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial =
size=3D2>=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>At work it sometimes writes the =
following error to=20
the Apache error.log: </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>[Thu Jan 18 21:39:32 2001] [error] =
[client=20
127.0.0.1] Premature end of script headers: c:/php4/php.exe =
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>As soon as I comment out the =
sybase_connect() line=20
the rest of the script executes properly although the other sybase calls =

generate error messages due to the fact that a connection does not =
exist. So the=20
scripting is not the problem. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><BR>Bottom Line=20
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there some place where I could =
receive=20
assistance in PHP, APACHE, SYBASE to work together in a Win2000 OS =
environment.=20
<BR>I would be willing to purchase a version of PHP that support Sybase =
in the=20
above configuration. <A=20
href=3D"mailto:sjm05@health.state.ny.us">sjm05@health.state.ny.us</A>=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have details of the error message and =
supportive=20
set-up information, but this format does not support the presentation of =
such=20
materials. </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0086_01C0826B.BF66C9B0--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-database" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?008901c0828d$47422250$273f1d18>