I retreated to 5.2.6 where everything worked for months...HELP!
I retreated to 5.2.6 where everything worked for months...HELP! am 02.09.2009 04:59:11 von Fred Silsbee
I tried 5.3 and found out it had no php_mssql.=0AThen I retreated to 5.2.10=
..
Trying to get back to where I had everything worked, I downloaded 5.=
2.6:=0A(1) I uninstalled cgi 1.5=0A(2) php.ini =A0has:
extension_=
dir =3D "C:\PHP\ext"=0A; doc_root =3D "C:\inetpub\wwwroot"=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 commented out=0Adoc_root =
=0AALL extensions are uncommente=
d
I only need: =0Aextension=3Dphp_mssql.dll
; **You CAN safely tu=
rn this off for IIS, in fact, you MUST.**=0A cgi.force_redirect =3D 0
=
ntwdblib and php.ini moved to =0AC:\WINDOWS=0AC:\WINDOWS\system=0AC:\WINDOW=
S\system32
IIS: properties->home directory->configuration =A0C:\P=
HP\php5isapi.dll=0Awith GET,HOST,POST,DEBUG
I also tried:=0Aphp5ts.dll=
=0Aphpnsapi.dll=0Aonly php5isapi.dll seemed to work!=0Aadded to XP Prof SP3=
path: ;C:\PHP;C:\PHP\ext
also created (just in case) PHPRC environmen=
t variable (alongside path)=0Acontaining C:\PHP;C:\PHP\ext
I gave IUSR=
_LANDON all powers
________________________________________results= 0At=
his works:http://207.254.225.224:8080/phpinfo.php
http://20 7.254.225.2=
24:8080/new_black_scholes.php=0Ainitial display works until I select "DEMO"=
....then:
The page cannot be displayed =0AThere is a problem with a pro=
gram on the page you are trying to reach, and the page cannot be displayed.=
Here is new_black_scholes.php=0A
ne( "EPS",3.0e-7);
=A0 // If the submit button has been pressed
=
$StockPrice =3D $ExercisePrice =3D $RiskFreeRateInterest =3D $Instan=
taneousVarianceRateStocksReturn =3D "";
$TimetoExpirationOption=
=3D $ValueCallOption =3D $ValuePutOption =3D $DeltaCalls=A0 =3D $DeltaPuts=
=A0 =3D "";
=A0 =A0 if (isset($_POST['reset']))
=A0 {
=A0=
$m_s =3D 100.;
$m_e =3D 100.;
$m_rf =3D .12;=
$m_sigma =3D .1;
$m_time =3D 365.;
Bla=
ck_Scholes_Main($m_s, $m_e, $m_rf, $m_sigma,$m_time, $m_c, $m_p, $m_deltaca=
lls, $m_deltaputs);
$StockPrice =3D $m_s;
$Exercise=
Price =3D $m_e;
$RiskFreeRateInterest =3D $m_rf;
$I=
nstantaneousVarianceRateStocksReturn =3D $m_sigma;
$TimetoExpir=
ationOption =3D $m_time;
$ValueCallOption =3D $m_c;
=
$ValuePutOption =3D $m_p;
$DeltaCalls =3D $m_deltacalls;
=
$DeltaPuts =3D $m_deltaputs;
=A0 }
=A0 elseif (isset($_P=
OST['submit']))
=A0 {
$m_s =3D $_POST['StockPrice'];=0A=
=A0 $m_e =3D $_POST['ExercisePrice'];
$m_rf =3D $_POST['R=
iskFreeRateInterest'];
$m_sigma =3D $_POST['InstantaneousVarian=
ceRateStocksReturn'];
$m_time =3D $_POST['TimetoExpirationOptio=
n'];
Black_Scholes_Main($m_s, $m_e, $m_rf, $m_sigma,$m_time, $m=
_c, $m_p, $m_deltacalls, $m_deltaputs);
$StockPrice =3D $m_s;=
$ExercisePrice =3D $m_e;
$RiskFreeRateInterest =3D=
$m_rf;
$InstantaneousVarianceRateStocksReturn =3D $m_sigma;=0A=
=A0 $TimetoExpirationOption =3D $m_time;
$ValueCallOption=
=3D $m_c;
$ValuePutOption =3D $m_p;
$DeltaCalls =
=3D $m_deltacalls;
$DeltaPuts =3D $m_deltaputs;
=A0 }=0Af=
unction Black_Scholes_Main($m_s, $m_e, $m_rf, $m_sigma, $m_time, &$m_c, &$m=
_p, &$m_deltacalls, &$m_deltaputs) {
=A0 =A0 =A0 $m_c =3D black_schol=
es($m_s,=A0 $m_e,=A0 $m_rf,=A0 $m_sigma,=A0 $m_time/365., $nd1, $nd2);=0A=
=A0 =A0 =A0 =A0 $m_p =3D $m_e / pow(1.+$m_rf, $m_time/365.) - $m_s + $m_c;=
=A0 =A0 =A0 $m_deltacalls =3D $nd1;
=A0 =A0 =A0 $m_deltaputs =
=3D $nd1 - 1.;=0A}=0Afunction black_scholes( $s,=A0 $e,=A0 $rf,=A0 $sigma,=
=A0 $time, &$nd1, &$nd2) {
=A0 =A0 =A0 $num =3D log($s/$e)+$time*($rf=
+.5*$sigma*$sigma);
=A0 =A0 =A0 $d1 =3D $num/($sigma*sqrt($time));=0A=
=A0 =A0 =A0 =A0 $d2 =3D $d1 - $sigma*sqrt($time);
=A0 =A0 =A0 $c =3D =
$s*myerf($d1) - $e * myerf($d2) * exp(-$rf*$time);
=A0 =A0 =A0 $nd1 =
=3D myerf($d1);
=A0 =A0 =A0 $nd2 =3D myerf($d2);
=A0 =A0 =A0 =A0=
return $c;=0A}=0Afunction gammln($xx)=0A{
=A0 =A0 =A0 $cof=3Darray(7=
6.18009173,-86.50532033,24.01409822,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 -1.2=
31739516,0.120858003e-2,-0.536382e-5);
=A0 =A0 =A0 =A0 $x=3D$xx-1.0;=
=A0 =A0 =A0 $tmp=3D$x+5.5;
=A0 =A0 =A0 $tmp -=3D ($x+0.5)*log(=
$tmp);
=A0 =A0 =A0 $ser=3D1.0;
=A0 =A0 =A0 for ($j=3D0;$j<=3D5;=
$j++) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $x +=3D 1.0;
=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $ser +=3D $cof[$j]/$x;
=A0 =A0 =A0 }
=A0 =A0 =
=A0 return -$tmp+log(2.50662827465*$ser);=0A}
function gser(=A0 &$gams=
er,=A0 $a,=A0 $x, &$gln)=0A{
=A0 =A0 =A0 =A0 $gln=3Dgammln($a);
=
=A0 =A0 =A0 if ($x <=3D 0.0) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 if ($x < 0=
..0) echo "x less than 0 in routine GSER";
=A0 =A0 =A0 =A0 =A0 =A0 =A0=
$gamser=3D0.0;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
=A0 =A0 =A0=
} else {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap=3D$a;
=A0 =A0 =A0 =A0=
=A0 =A0 =A0 $sum=3D1.0/$a;
=A0 $del=3D$sum;
=A0 =
=A0 =A0 =A0 =A0 =A0 =A0 for ($n=3D1;$n<=3DITMAX;$n++) {
=A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap +=3D 1.0;
=A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 $del *=3D $x/$ap;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $sum +=3D $del;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 if (abs($del) < abs($sum)*EPS) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $gamser=3D$sum*exp(-$x+$a*log($x)-($gln));=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 }
=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "a=3D$a too large, ITM=
AX =3D $itmax too small in routine GSER=0A";
=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 return;
=A0 =A0 =A0 }=0A}
=0Afunction gcf( &$gammcf,$a,$x,&$=
gln)=0A{
=A0 =A0 =A0 $gold=3D0.0;
=A0 =A0 =A0 $fac=3D1.0;
=
=A0 =A0 =A0 $b1=3D1.0;
=A0 =A0 =A0 $b0=3D0.0;
=A0 =A0 =A0 $a0=
=3D1.0;
=A0 =A0 =A0 =A0 $gln=3Dgammln($a);
=A0 =A0 =A0 $a1=3D$x;=
=A0 =A0 =A0 for ($n=3D1;$n<=3DITMAX;$n++) {
=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 $an=3D(double) $n;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $ana=3D$an=
-$a;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $a0=3D($a1+$a0*$ana)*$fac;
=A0=
=A0 =A0 =A0 =A0 =A0 =A0 $b0=3D($b1+$b0*$ana)*$fac;
=A0 =A0 =A0 =A0 =
=A0 =A0 =A0 $anf=3D$an*$fac;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $a1=3D$x*$a0=
+$anf*$a1;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $b1=3D$x*$b0+$anf*$b1;
=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 if ($a1) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $fac=3D1.0/$a1;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 $g=3D$b1*$fac;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if=
(abs(($g-$gold)/$g) < EPS) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 $gammcf=3Dexp(-$x+$a*log($x)-($gln))*$g;
=A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;
=A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 $gold=3D$g;
=A0 =A0 =A0 =A0 =A0 =A0 =A0 }
=A0 =A0 =
=A0 }
=A0 =A0 =A0 echo "a too large, ITMAX too small in routine GCF=
=0A";=0A}=0Afunction gammp($a,$x)=0A{
=A0 =A0 =A0 =A0 if ($x < 0.0 || =
$a <=3D 0.0) {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "Invalid arguments in=
routine GAMMP=0A";
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0.;
=A0 =
=A0 =A0 }
=A0 =A0 =A0 if ($x < ($a+1.0)) {
=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 gser($gamser,$a,$x,$gln);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return =
$gamser;
=A0 =A0 =A0 } else {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf($=
gammcf,$a,$x,$gln);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1.0-$gammcf;=
=A0 =A0 =A0 }=0A}
function gammq($a,$x)=0A{
=A0 =A0 =A0 =
=A0 if ($x < 0.0 || $a <=3D 0.0) echo "Invalid arguments in routine GAMMQ=
=0A";
=A0 =A0 =A0 if ($x < ($a+1.0)) {
=A0 =A0 =A0 =A0 =A0 =A0 =
=A0 gser($gamser,$a,$x,$gln);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1.0-=
$gamser;
=A0 =A0 =A0 } else {
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf($=
gammcf,$a,$x,$gln);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return $gammcf;
=
=A0 =A0 =A0 }=0A}=0Afunction erfc($x)=0A{
=A0 =A0 =A0 =A0 return $x <=
0.0 ? 1.0+gammp(0.5,$x*$x) : gammq(0.5,$x*$x);=0A}=0Afunction erf($x)=0A{=
=A0 =A0 =A0 =A0 return $x < 0.0 ? -gammp(0.5,$x*$x) : gammp(0.5,$x*$x=
);=0A}=0Afunction myerf($argin) {
=A0 =A0return .5*(1.+erf($arg=
in/sqrt(2.0)));=0A}
?>
hod=3D"post">
=A0
=A0 =A0 =A0 Black Scholes Option Price Ca=
lculator:
=A0 =A0 =A0 =A0 =A0 temp website under Redhat Fedora 9=
Linux:
=A0 =A0 =A0 =A0 =A0 the first 5 boxes require input(try =
100. 100. .12 .1 365.):
=A0 =A0
=A0
=A0 =A0 =A0 S=
tockPrice (required):
=A0 =A0 =A0 =A0
maxlength=3D"40" name=3D"StockPrice"
=A0 value=3D"
echo $StockPrice; =A0 ?>" />
=A0
=A0
=A0 =
=A0 =A0 ExercisePrice (required):
=A0 =A0 =A0 =A0
size=3D"20" maxlength=3D"40" name=3D"ExercisePrice"
=A0 =
value=3D"" />=0A
=A0
=A0 =
=A0 =A0 Risk Free Rate of Interest(required):
=A0 =A0 =A0 =A0
ype=3D"text" size=3D"20" maxlength=3D"40" name=3D"RiskFreeRateInterest"=0A=
=A0 =A0 value=3D"" />
=
=A0
=A0
=A0 =A0 =A0 Instantaneous Variance Rate of St=
ock's Return (required):
=A0 =A0 =A0 =A0
20" maxlength=3D"40" name=3D"InstantaneousVarianceRateStocksReturn"
=
=A0 value=3D"
; ?>" />=0A
=A0
=A0 =A0 =A0 Time to Expiration of the O=
ption(days) (required):
=A0 =A0 =A0 =A0
0" maxlength=3D"40" name=3D"TimetoExpirationOption"
=A0 v=
alue=3D"" />=0A
=A0 =0A=
=A0 =A0 =A0 =A0 Values of the Call Option :
=A0 =A0 =A0 =A0
e=3D"text" size=3D"20" maxlength=3D"40"=A0 name=3D"ValueCallOption"
=
=A0 =A0 VALUE=3D"" />=0A<=
/p>=0A
=A0
=A0 =A0 =A0 Values of the Put option :
=
=A0 =A0 =A0 =A0
=3D"ValuePutOption"
=A0 =A0 VALUE=3D"
luePutOption; ?>" />=0A
=A0
=A0 =A0 =A0 Delta(calls):=
=A0 =A0 =A0 =A0
name=3D"DeltaCalls"
=A0 =A0 VALUE=3D"
ltaCalls; ?>" />=0A
=A0
=A0 =A0 =A0 Delta(puts):
=
=A0 =A0 =A0 =A0
=3D"DeltaPuts"
=A0 =A0 VALUE=3D"
ts; ?>" />=0A
=A0
=3D"Calculate!"
style=3D"color:maroon font:18pt Courier; font-=
weight:bold ">Calculate
=A0
=A0
t" name =3D "reset" value=3D"Demo!"
style=3D"color:red font:18p=
t Courier; font-weight:bold ">Demo
=A0 =0A
_____=
____________________________________________________results= 0A=0APlease try=
the following:
Open the 207.254.225.224:8080 home page, and then look=
for links to the information you want. =0AClick the Refresh button, or try=
again later.
HTTP 403.1 Forbidden: Execute Access Forbidden=0AInterne=
t Information Services
---------------------------------------------- -=
---------------------------------
Technical Information (for support p=
ersonnel)
=0ABackground:=0AYou have attempted to execute a CGI, ISAPI,=
or other executable program from a directory that does not allow programs =
to be executed.
=0AMore information:=0AMicrosoft Support =0A__________=
__________________________________=0Ahttp://207.254.225.224: 8080/handle_log=
_book_mssql.php=0Ayields:
Warning: mssql_connect() [function.mssql-con=
nect]: Unable to connect to server: LANDON\SQLEXPRESSLMKIII in C:\Inetpub\w=
wwroot\handle_log_book_mssql.php on line 8 (mssql_connect(...)=0ASomething =
went wrong while connecting to MSSQL (my message)=0A_______________________=
________________________________=0Aall these worked before trying 5.3=0A =
=0A
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: I retreated to 5.2.6 where everything worked for months...HELP! am 03.09.2009 06:13:23 von Fred Silsbee
=0Anew_black_scholes.php is now working but I found a bug in IE8
I del=
eted all history but had to reboot to completely clear all files hidden in =
history temp files
first I had to : (not sure if this did it!=0AIIS: p=
roperties->home directory->configuration C:\PHP\php5isapi.dll=0Awith GET,=
HOST,POST,DEBUG
changed to:=0AIIS: properties->home directory->configu=
ration C:\PHP\php5isapi.dll=0Awith ALL
--- On Wed, 9/2/09, Fred Sils=
bee wrote:
> From: Fred Silsbee
ahoo.com>=0A> Subject: I retreated to 5.2.6 where everything worked for mon=
ths...HELP!=0A> To: php-windows@lists.php.net=0A> Date: Wednesday, Septembe=
r 2, 2009, 2:59 AM=0A> I tried 5.3 and found out it had no=0A> php_mssql.=
=0A> Then I retreated to 5.2.10.=0A> =0A> Trying to get back to where I had=
everything worked, I=0A> downloaded 5.2.6:=0A> (1) I uninstalled cgi 1.5=
=0A> (2) php.ini =A0has:=0A> =0A> extension_dir =3D "C:\PHP\ext"=0A> ;=
doc_root =3D "C:\inetpub\wwwroot"=A0 =A0 =A0 =A0 =A0 =A0
> commented=
out=0A> doc_root =
> =0A> ALL extensions are uncommented=0A> =0A> I on=
ly need: =0A> extension=3Dphp_mssql.dll=0A> =0A> ; **You CAN safely turn th=
is off for IIS, in fact, you=0A> MUST.**=0A> cgi.force_redirect =3D 0=0A> =
=0A> ntwdblib and php.ini moved to =0A> C:\WINDOWS=0A> C:\WINDOWS\system=0A=
> C:\WINDOWS\system32=0A> =0A> IIS: properties->home=0A> directory->configu=
ration =A0C:\PHP\php5isapi.dll=0A> with GET,HOST,POST,DEBUG=0A> =0A> I=
also tried:=0A> php5ts.dll=0A> phpnsapi.dll=0A> only php5isapi.dll seemed =
to work!=0A> added to XP Prof SP3 path: ;C:\PHP;C:\PHP\ext=0A> =0A> also cr=
eated (just in case) PHPRC environment variable=0A> (alongside path)=0A> co=
ntaining C:\PHP;C:\PHP\ext=0A> =0A> I gave IUSR_LANDON all powers=0A> =0A> =
________________________________________results=0A> this works:http://207.2=
54.225.224:8080/phpinfo.php=0A> =0A> http://207.254.225.224:8080/new_black_=
scholes.php=0A> initial display works until I select "DEMO"...then:=0A> =0A=
> The page cannot be displayed =0A> There is a problem with a program on th=
e page you are=0A> trying to reach, and the page cannot be displayed. =0A> =
=0A> Here is new_black_scholes.php=0A> define( "ITMAX",100);=0A> =
define( "EPS",3.0e-7);=0A> =A0 =A0 // If the submit button has been pressed=
=0A> =A0 $StockPrice =3D $ExercisePrice =3D $RiskFreeRateInterest=0A>=
=3D $InstantaneousVarianceRateStocksReturn =3D "";=0A> =A0 $TimetoEx=
pirationOption =3D $ValueCallOption =
> $ValuePutOption =3D $DeltaCalls=
=A0 =3D $DeltaPuts=A0 =3D "";=0A> =0A> =A0 =A0 if (isset($_POST['reset']))=
=0A> =A0 =A0 {=0A> =0A> =A0 $m_s =3D 100.;=0A> =A0 $m_e =3D 100=
..;=0A> =A0 $m_rf =3D .12;=0A> =A0 $m_sigma =3D .1;=0A> =
=A0 $m_time =3D 365.;=0A> =A0 Black_Scholes_Main($m_s, $m_e, $m_rf,=
=0A> $m_sigma,$m_time, $m_c, $m_p, $m_deltacalls, $m_deltaputs);=0A> =
=A0 $StockPrice =3D $m_s;=0A> =A0 $ExercisePrice =3D $m_e;=0A> =
=A0 $RiskFreeRateInterest =3D $m_rf;=0A> =A0 $InstantaneousVarianceRa=
teStocksReturn =3D $m_sigma;=0A> =A0 $TimetoExpirationOption =3D $m_t=
ime;=0A> =A0 $ValueCallOption =3D $m_c;=0A> =A0 $ValuePutOption=
=3D $m_p;=0A> =A0 $DeltaCalls =3D $m_deltacalls;=0A> =A0 $Delt=
aPuts =3D $m_deltaputs;=0A> =A0 =A0 }=0A> =A0 =A0 elseif (isset($_POST['sub=
mit']))=0A> =A0 =A0 {=0A> =A0 $m_s =3D $_POST['StockPrice'];=0A> =A0=
$m_e =3D $_POST['ExercisePrice'];=0A> =A0 $m_rf =3D $_POST['Ri=
skFreeRateInterest'];=0A> =A0 $m_sigma =
> $_POST['InstantaneousV=
arianceRateStocksReturn'];=0A> =A0 $m_time =3D $_POST['TimetoExpirati=
onOption'];=0A> =A0 Black_Scholes_Main($m_s, $m_e, $m_rf,=0A> $m_sigm=
a,$m_time, $m_c, $m_p, $m_deltacalls, $m_deltaputs);=0A> =A0 $StockPr=
ice =3D $m_s;=0A> =A0 $ExercisePrice =3D $m_e;=0A> =A0 $RiskFre=
eRateInterest =3D $m_rf;=0A> =A0 $InstantaneousVarianceRateStocksRetu=
rn =3D $m_sigma;=0A> =A0 $TimetoExpirationOption =3D $m_time;=0A> =A0=
$ValueCallOption =3D $m_c;=0A> =A0 $ValuePutOption =3D $m_p;=
=0A> =A0 $DeltaCalls =3D $m_deltacalls;=0A> =A0 $DeltaPuts =3D =
$m_deltaputs;=0A> =A0 =A0 }=0A> function Black_Scholes_Main($m_s, $m_e, $m_=
rf, $m_sigma,=0A> $m_time, &$m_c, &$m_p, &$m_deltacalls,=0A> &$m_deltaputs)=
{=0A> =A0 =A0 =A0 =A0 $m_c =3D black_scholes($m_s,=A0 $m_e,=A0 $m_rf,=A0=
=0A> $m_sigma,=A0 $m_time/365., $nd1, $nd2);=0A> =A0 =A0 =A0 =A0 $m_p =3D $=
m_e / pow(1.+$m_rf, $m_time/365.) -=0A> $m_s + $m_c;=0A> =A0 =A0 =A0 =A0 $m=
_deltacalls =3D $nd1;=0A> =A0 =A0 =A0 =A0 $m_deltaputs =3D $nd1 - 1.;=0A> }=
=0A> function black_scholes( $s,=A0 $e,=A0 $rf,=A0 $sigma,=A0 $time,=0A> &$=
nd1, &$nd2) {=0A> =A0 =A0 =A0 =A0 $num =
> log($s/$e)+$time*($rf+.5*$si=
gma*$sigma);=0A> =A0 =A0 =A0 =A0 $d1 =3D $num/($sigma*sqrt($time));=0A> =A0=
=A0 =A0 =A0 $d2 =3D $d1 - $sigma*sqrt($time);=0A> =A0 =A0 =A0 =A0 $c =3D $=
s*myerf($d1) - $e * myerf($d2) *=0A> exp(-$rf*$time);=0A> =A0 =A0 =A0 =A0 $=
nd1 =3D myerf($d1);=0A> =A0 =A0 =A0 =A0 $nd2 =3D myerf($d2);=0A> =0A> =A0 =
=A0 =A0 =A0 return $c;=0A> }=0A> function gammln($xx)=0A> {=0A> =A0 =A0 =A0=
> $cof=3Darray(76.18009173,-86.50532033,24.01409822,=0A> =A0 =A0 =A0=
=A0 =A0 =A0 =A0
> -1.231739516,0.120858003e-2,-0.536382e-5);=0A> =0A=
> =A0 =A0 =A0 =A0 $x=3D$xx-1.0;=0A> =A0 =A0 =A0 =A0 $tmp=3D$x+5.5;=0A> =A0 =
=A0 =A0 =A0 $tmp -=3D ($x+0.5)*log($tmp);=0A> =A0 =A0 =A0 =A0 $ser=3D1.0;=
=0A> =A0 =A0 =A0 =A0 for ($j=3D0;$j<=3D5;$j++) {=0A> =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 $x +=3D 1.0;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ser +=3D $cof=
[$j]/$x;=0A> =A0 =A0 =A0 =A0 }=0A> =A0 =A0 =A0 =A0 return -$tmp+log(2.50662=
827465*$ser);=0A> }=0A> =0A> function gser(=A0 &$gamser,=A0 $a,=A0 $x, &$gl=
n)=0A> {=0A> =0A> =A0 =A0 =A0 =A0 $gln=3Dgammln($a);=0A> =A0 =A0 =A0 =A0 if=
($x <=3D 0.0) {=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ($x < 0.0) echo "x =
less than=0A> 0 in routine GSER";=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $gams=
er=3D0.0;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;=0A> =A0 =A0 =A0 =A0 }=
else {=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap=3D$a;=0A> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $sum=3D1.0/$a;=0A> =A0 =A0 $del=3D$sum;=0A> =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 for ($n=3D1;$n<=3DITMAX;$n++) {=0A> =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap +=3D 1.0;=0A> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $del *=3D $x/$ap;=0A> =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $sum +=3D $del;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 if (abs($del) <=0A> abs($sum)*EPS) {=0A> =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> $gamser=3D$sum*exp(=
-$x+$a*log($x)-($gln));=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 return;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 }=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0=
=A0 echo "a=3D$a too large, ITMAX =
> $itmax too small in routine GSER=
=0A> ";=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;=0A> =A0 =A0 =A0 =A0 }=
=0A> }=0A> =0A> =0A> function gcf( &$gammcf,$a,$x,&$gln)=0A> {=0A> =A0 =A0 =
=A0 =A0 $gold=3D0.0;=0A> =A0 =A0 =A0 =A0 $fac=3D1.0;=0A> =A0 =A0 =A0 =A0 $b=
1=3D1.0;=0A> =A0 =A0 =A0 =A0 $b0=3D0.0;=0A> =A0 =A0 =A0 =A0 $a0=3D1.0;=0A> =
=0A> =A0 =A0 =A0 =A0 $gln=3Dgammln($a);=0A> =A0 =A0 =A0 =A0 $a1=3D$x;=0A> =
=A0 =A0 =A0 =A0 for ($n=3D1;$n<=3DITMAX;$n++) {=0A> =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 $an=3D(double) $n;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ana=3D$an-=
$a;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $a0=3D($a1+$a0*$ana)*$fac;=0A> =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $b0=3D($b1+$b0*$ana)*$fac;=0A> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $anf=3D$an*$fac;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $a1=3D=
$x*$a0+$anf*$a1;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $b1=3D$x*$b0+$anf*$b1;=
=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ($a1) {=0A> =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 $fac=3D1.0/$a1;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 $g=3D$b1*$fac;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 if (abs(($g-$gold)/$g)=0A> < EPS) {=0A> =A0 =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> $gammcf=3Dexp(-$x+$a*log($x)-(=
$gln))*$g;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 return;=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }=0A> =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $gold=3D$g;=0A> =A0 =A0 =A0 =A0=
=A0 =A0 =A0 =A0 }=0A> =A0 =A0 =A0 =A0 }=0A> =A0 =A0 =A0 =A0 echo "a too la=
rge, ITMAX too small in routine=0A> GCF=0A> ";=0A> }=0A> function gammp($a,=
$x)=0A> {=0A> =0A> =A0 =A0 =A0 =A0 if ($x < 0.0 || $a <=3D 0.0) {=0A> =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "Invalid arguments in routine=0A> GAMMP=0A=
> ";=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 0.;=0A> =A0 =A0 =A0 =A0 }=
=0A> =A0 =A0 =A0 =A0 if ($x < ($a+1.0)) {=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 gser($gamser,$a,$x,$gln);=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return $g=
amser;=0A> =A0 =A0 =A0 =A0 } else {=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf=
($gammcf,$a,$x,$gln);=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1.0-$gammc=
f;=0A> =A0 =A0 =A0 =A0 }=0A> }=0A> =0A> function gammq($a,$x)=0A> {=0A> =0A=
> =A0 =A0 =A0 =A0 if ($x < 0.0 || $a <=3D 0.0) echo "Invalid=0A> arguments =
in routine GAMMQ=0A> ";=0A> =A0 =A0 =A0 =A0 if ($x < ($a+1.0)) {=0A> =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gser($gamser,$a,$x,$gln);=0A> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 return 1.0-$gamser;=0A> =A0 =A0 =A0 =A0 } else {=0A> =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf($gammcf,$a,$x,$gln);=0A> =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 return $gammcf;=0A> =A0 =A0 =A0 =A0 }=0A> }=0A> function er=
fc($x)=0A> {=0A> =0A> =A0 =A0 =A0 =A0 return $x < 0.0 ? 1.0+gammp(0.5,$x*$x=
) :=0A> gammq(0.5,$x*$x);=0A> }=0A> function erf($x)=0A> {=0A> =0A> =A0 =A0=
=A0 =A0 return $x < 0.0 ? -gammp(0.5,$x*$x) :=0A> gammp(0.5,$x*$x);=0A> }=
=0A> function myerf($argin) {=0A> =A0 =A0 =A0return .5*(1.+erf($argin=
/sqrt(2.0)));=0A> }=0A> =0A> ?>=0A> =0A>
php" method=3D"post">=0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 Black Scholes Opt=
ion Price Calculator:=0A> =0A> =A0 =A0 =A0 =A0 =A0 temp website under=
Redhat Fedora 9=0A> Linux:=0A> =0A> =A0 =A0 =A0 =A0 =A0 the first 5 =
boxes require input(try 100.=0A> 100. .12 .1 365.):=0A> =0A> =A0 =A0
=
=0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 StockPrice (required):=0A> =0A> =A0 =
=A0 =A0 =A0 name=3D"S=
tockPrice"=0A> =A0 =A0 value=3D"
> ?>" />=0A> =A0 =A0
=0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 Exercis=
ePrice (required):=0A> =0A> =A0 =A0 =A0 =A0
" maxlength=3D"40"=0A> name=3D"ExercisePrice"=0A> =A0 =A0 value=
=3D""=0A> />=0A>
=0A> =A0 =A0 =0A> =A0 =
=A0 =A0 =A0 Risk Free Rate of Interest(required):=0A> =0A> =A0 =A0 =A0 =A0 =
name=3D"RiskFreeRateI=
nterest"=0A> =A0 =A0 value=3D"
=0A> ?>" />=0A> =A0 =A0
=0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 Instantane=
ous Variance Rate of Stock's Return=0A> (required):=0A> =0A> =A0 =A0 =A0 =
=A0 name=3D"Instantan=
eousVarianceRateStocksReturn"=0A> =A0 =A0 value=3D"
=0A> $InstantaneousVarianceRateStocksReturn; ?>" />=0A>
=0A> =A0 =A0
>=0A> =A0 =A0 =A0 =A0 Time to Expiration of the Option(days)=0A> (required)=
:=0A> =0A> =A0 =A0 =A0 =A0
"=0A> name=3D"TimetoExpirationOption"=0A> =A0 =A0 value=3D"
p echo $TimetoExpirationOption;=0A> ?>" />=0A>
=0A> =A0 =A0 =0A> =A0=
=A0 =A0 =A0 Values of the Call Option :=0A> =0A> =A0 =A0 =A0 =A0
pe=3D"text" size=3D"20"=0A> maxlength=3D"40"=A0 name=3D"ValueCallOption"=0A=
> =A0 =A0 =A0 VALUE=3D" ?=
>" />=0A>
=0A> =0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 Values of the P=
ut option :=0A> =0A> =A0 =A0 =A0 =A0 m=
axlength=3D"40"=A0 name=3D"ValuePutOption"=0A> =A0 =A0 =
=A0 VALUE=3D" ?>" />=0A>
=0A> =A0 =A0
>=0A> =A0 =A0 =A0 =A0 Delta(calls):=0A> =0A> =A0 =A0 =A0 =A0
"text" size=3D"20"=0A> maxlength=3D"40"=A0 name=3D"DeltaCalls"=0A> =
=A0 =A0 =A0 VALUE=3D" ?>" />=0A>
>=0A> =A0 =A0 =0A> =A0 =A0 =A0 =A0 Delta(puts):=0A> =0A> =A0 =A0 =A0 =A0=
maxlength=3D"40"=A0 name=3D"DeltaPuts=
"=0A> =A0 =A0 =A0 VALUE=3D" ?>"=
/>=0A>
=0A> =A0 =A0 valu=
e=3D"Calculate!" =0A> =A0 style=3D"color:maroon font:18pt Courier;=0A=
> font-weight:bold ">Calculate=0A> =A0 =A0 =0A> =A0 =A0
pe=3D"submit" name =3D "reset"=0A> value=3D"Demo!"=0A> =A0 style=3D"c=
olor:red font:18pt Courier; font-weight:bold=0A> ">Demo=0A> =A0 =A0
n>=0A> =0A> =0A> ___________________________________________________=
______results=0A> =0A> Please try the following:=0A> =0A> Open the 207.254.=
225.224:8080 home page, and then look for=0A> links to the information you =
want. =0A> Click the Refresh button, or try again later.=0A> =0A> HTTP 403.=
1 Forbidden: Execute Access Forbidden=0A> Internet Information Services=0A>=
=0A> ------------------------------------------------------------ ---------=
-----------=0A> =0A> Technical Information (for support personnel)=0A> =0A>=
=0A> Background:=0A> You have attempted to execute a CGI, ISAPI, or other=
=0A> executable program from a directory that does not allow=0A> programs t=
o be executed.=0A> =0A> =0A> More information:=0A> Microsoft Support =0A> _=
___________________________________________=0A> http://207.254.225.224:8080=
/handle_log_book_mssql.php=0A> yields:=0A> =0A> Warning: mssql_connect() [f=
unction.mssql-connect]: Unable=0A> to connect to server: LANDON\SQLEXPRESSL=
MKIII in=0A> C:\Inetpub\wwwroot\handle_log_book_mssql.php on line 8=0A> (ms=
sql_connect(...)=0A> Something went wrong while connecting to MSSQL (my=0A>=
message)=0A> _______________________________________________________=0A> a=
ll these worked before trying 5.3=0A> =0A> =0A> =0A> =0A> =0A> =0A>
=
=0A
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: I retreated to 5.2.6 where everything worked for months...HELP! am 03.09.2009 06:49:59 von Fred Silsbee
one remaining problem:
Warning: mssql_connect() [function.mssql-connec=
t]: message: Login failed for user 'sa'. (severity 14) in C:\Inetpub\wwwroo=
t\handle_log_book_mssql.php on line 8
Warning: mssql_connect() [functi=
on.mssql-connect]: Unable to connect to server: LANDON\SQLEXPRESSLMKIII in =
C:\Inetpub\wwwroot\handle_log_book_mssql.php on line 8=0ASomething went wro=
ng while connecting to MSSQL
Found this in php.net search...did not he=
lp!=0A[13 Jan 9:19am UTC] bloodjazman at gmail dot com =0AProblem solved wh=
en change Default Language =3D English in properties SQL=0AServer Managemen=
t Studio=0A[14 Jan 7:46am UTC] bloodjazman at gmail dot com =0Arecomended c=
heck php.ini
mssql.allow_persistent =3D On =0Amssql.compatability_mode=
=3D Off=0Amssql.min_error_severity =3D 10 =0Amssql.min_message_severity =
=3D 10=0Amssql.secure_connection =3D Off
=0A--- On Thu, 9/3/09, =
Fred Silsbee wrote:
> From: Fred Silsbee
silsbee@yahoo.com>=0A> Subject: Re: I retreated to 5.2.6 where everything w=
orked for months...HELP!=0A> To: php-windows@lists.php.net=0A> Date: Thursd=
ay, September 3, 2009, 4:13 AM=0A> =0A> new_black_scholes.php is now workin=
g but I found a bug in=0A> IE8=0A> =0A> I deleted all history but had to re=
boot to completely clear=0A> all files hidden in history temp files=0A> =0A=
> first I had to : (not sure if this did it!=0A> IIS: properties->home=0A> =
directory->configuration =A0C:\PHP\php5isapi.dll=0A> with GET,HOST,POS=
T,DEBUG=0A> =0A> changed to:=0A> IIS: properties->home=0A> directory->confi=
guration =A0C:\PHP\php5isapi.dll=0A> with ALL=0A> =0A> --- On Wed, 9/2=
/09, Fred Silsbee =0A> wrote:=0A> =0A> > From: Fred =
Silsbee =0A> > Subject: I retreated to 5.2.6 where e=
verything worked=0A> for months...HELP!=0A> > To: php-windows@lists.php.net=
=0A> > Date: Wednesday, September 2, 2009, 2:59 AM=0A> > I tried 5.3 and fo=
und out it had no=0A> > php_mssql.=0A> > Then I retreated to 5.2.10.=0A> > =
=0A> > Trying to get back to where I had everything worked,=0A> I=0A> > dow=
nloaded 5.2.6:=0A> > (1) I uninstalled cgi 1.5=0A> > (2) php.ini =A0ha=
s:=0A> > =0A> > extension_dir =3D "C:\PHP\ext"=0A> > ; doc_root =3D "C:\ine=
tpub\wwwroot"=A0 =A0 =A0 =A0 =A0 =A0
> > commented out=0A> > doc_root=
=
> > =0A> > ALL extensions are uncommented=0A> > =0A> > I only need: =
=0A> > extension=3Dphp_mssql.dll=0A> > =0A> > ; **You CAN safely turn this =
off for IIS, in fact,=0A> you=0A> > MUST.**=0A> >=A0 cgi.force_redirect =3D=
0=0A> > =0A> > ntwdblib and php.ini moved to =0A> > C:\WINDOWS=0A> > C:\WI=
NDOWS\system=0A> > C:\WINDOWS\system32=0A> > =0A> > IIS: properties->home=
=0A> > directory->configuration =A0C:\PHP\php5isapi.dll=0A> > with GET=
,HOST,POST,DEBUG=0A> > =0A> > I also tried:=0A> > php5ts.dll=0A> > phpnsapi=
..dll=0A> > only php5isapi.dll seemed to work!=0A> > added to XP Prof SP3 pa=
th: ;C:\PHP;C:\PHP\ext=0A> > =0A> > also created (just in case) PHPRC envir=
onment=0A> variable=0A> > (alongside path)=0A> > containing C:\PHP;C:\PHP\e=
xt=0A> > =0A> > I gave IUSR_LANDON all powers=0A> > =0A> > ________________=
________________________results=0A> > this works:http://207.254.225.224:808=
0/phpinfo.php=0A> > =0A> > http://207.254.225.224:8080/new_black_scholes.ph=
p=0A> > initial display works until I select "DEMO"...then:=0A> > =0A> > Th=
e page cannot be displayed =0A> > There is a problem with a program on the =
page you are=0A> > trying to reach, and the page cannot be displayed. =0A> =
> =0A> > Here is new_black_scholes.php=0A> > > define( "ITMAX",10=
0);=0A> > define( "EPS",3.0e-7);=0A> > =A0 =A0 // If the submit button has =
been pressed=0A> > =A0 $StockPrice =3D $ExercisePrice =
> $RiskFr=
eeRateInterest=0A> > =3D $InstantaneousVarianceRateStocksReturn =3D "";=0A>=
> =A0 $TimetoExpirationOption =3D $ValueCallOption =
> > $ValueP=
utOption =3D $DeltaCalls=A0 =3D $DeltaPuts=A0 =3D "";=0A> > =0A> > =A0 =A0 =
if (isset($_POST['reset']))=0A> > =A0 =A0 {=0A> > =0A> > =A0 $m_s =3D=
100.;=0A> > =A0 $m_e =3D 100.;=0A> > =A0 $m_rf =3D .12;=0A> > =
=A0 $m_sigma =3D .1;=0A> > =A0 $m_time =3D 365.;=0A> > =
=A0 Black_Scholes_Main($m_s, $m_e, $m_rf,=0A> > $m_sigma,$m_time, $m_c, $m_=
p, $m_deltacalls,=0A> $m_deltaputs);=0A> > =A0 $StockPrice =3D $m_s;=
=0A> > =A0 $ExercisePrice =3D $m_e;=0A> > =A0 $RiskFreeRateInte=
rest =3D $m_rf;=0A> > =A0 $InstantaneousVarianceRateStocksReturn =3D=
=0A> $m_sigma;=0A> > =A0 $TimetoExpirationOption =3D $m_time;=0A> > =
=A0 $ValueCallOption =3D $m_c;=0A> > =A0 $ValuePutOption =3D $m=
_p;=0A> > =A0 $DeltaCalls =3D $m_deltacalls;=0A> > =A0 $DeltaPu=
ts =3D $m_deltaputs;=0A> > =A0 =A0 }=0A> > =A0 =A0 elseif (isset($_POST['su=
bmit']))=0A> > =A0 =A0 {=0A> > =A0 $m_s =3D $_POST['StockPrice'];=0A>=
> =A0 $m_e =3D $_POST['ExercisePrice'];=0A> > =A0 $m_rf =3D $_=
POST['RiskFreeRateInterest'];=0A> > =A0 $m_sigma =
> > $_POST['In=
stantaneousVarianceRateStocksReturn'];=0A> > =A0 $m_time =3D $_POST['=
TimetoExpirationOption'];=0A> > =A0 Black_Scholes_Main($m_s, $m_e, $m=
_rf,=0A> > $m_sigma,$m_time, $m_c, $m_p, $m_deltacalls,=0A> $m_deltaputs);=
=0A> > =A0 $StockPrice =3D $m_s;=0A> > =A0 $ExercisePrice =3D $=
m_e;=0A> > =A0 $RiskFreeRateInterest =3D $m_rf;=0A> > =A0 $Inst=
antaneousVarianceRateStocksReturn =
> $m_sigma;=0A> > =A0 $Timeto=
ExpirationOption =3D $m_time;=0A> > =A0 $ValueCallOption =3D $m_c;=0A=
> > =A0 $ValuePutOption =3D $m_p;=0A> > =A0 $DeltaCalls =3D $m_=
deltacalls;=0A> > =A0 $DeltaPuts =3D $m_deltaputs;=0A> > =A0 =A0 }=0A=
> > function Black_Scholes_Main($m_s, $m_e, $m_rf,=0A> $m_sigma,=0A> > $m_t=
ime, &$m_c, &$m_p, &$m_deltacalls,=0A> > &$m_deltaputs) {=0A> > =A0 =A0 =A0=
=A0 $m_c =3D black_scholes($m_s,=A0 $m_e,
> $m_rf,
> > $m_sigma,=
=A0 $m_time/365., $nd1, $nd2);=0A> > =A0 =A0 =A0 =A0 $m_p =3D $m_e / pow(1.=
+$m_rf, $m_time/365.)=0A> -=0A> > $m_s + $m_c;=0A> > =A0 =A0 =A0 =A0 $m_del=
tacalls =3D $nd1;=0A> > =A0 =A0 =A0 =A0 $m_deltaputs =3D $nd1 - 1.;=0A> > }=
=0A> > function black_scholes( $s,=A0 $e,=A0 $rf,=A0 $sigma,
> $time,=
=0A> > &$nd1, &$nd2) {=0A> > =A0 =A0 =A0 =A0 $num =
> > log($s/$e)+$tim=
e*($rf+.5*$sigma*$sigma);=0A> > =A0 =A0 =A0 =A0 $d1 =3D $num/($sigma*sqrt($=
time));=0A> > =A0 =A0 =A0 =A0 $d2 =3D $d1 - $sigma*sqrt($time);=0A> > =A0 =
=A0 =A0 =A0 $c =3D $s*myerf($d1) - $e * myerf($d2) *=0A> > exp(-$rf*$time);=
=0A> > =A0 =A0 =A0 =A0 $nd1 =3D myerf($d1);=0A> > =A0 =A0 =A0 =A0 $nd2 =3D =
myerf($d2);=0A> > =0A> > =A0 =A0 =A0 =A0 return $c;=0A> > }=0A> > function =
gammln($xx)=0A> > {=0A> > =A0 =A0 =A0
> > $cof=3Darray(76.18009173,-8=
6.50532033,24.01409822,=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0
> > -1.2317=
39516,0.120858003e-2,-0.536382e-5);=0A> > =0A> > =A0 =A0 =A0 =A0 $x=3D$xx-1=
..0;=0A> > =A0 =A0 =A0 =A0 $tmp=3D$x+5.5;=0A> > =A0 =A0 =A0 =A0 $tmp -=3D ($=
x+0.5)*log($tmp);=0A> > =A0 =A0 =A0 =A0 $ser=3D1.0;=0A> > =A0 =A0 =A0 =A0 f=
or ($j=3D0;$j<=3D5;$j++) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $x +=3D 1.=
0;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ser +=3D $cof[$j]/$x;=0A> > =A0 =
=A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =A0 return -$tmp+log(2.50662827465*$ser);=
=0A> > }=0A> > =0A> > function gser(=A0 &$gamser,=A0 $a,=A0 $x, &$gln)=0A> =
> {=0A> > =0A> > =A0 =A0 =A0 =A0 $gln=3Dgammln($a);=0A> > =A0 =A0 =A0 =A0 i=
f ($x <=3D 0.0) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if ($x < 0.0) echo =
"x less=0A> than=0A> > 0 in routine GSER";=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 $gamser=3D0.0;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;=0A> > =
=A0 =A0 =A0 =A0 } else {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap=3D$a;=0A=
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $sum=3D1.0/$a;=0A> > =A0 =
=A0 $del=3D$sum;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 for ($n=3D1;$n<=3DIT=
MAX;$n++)=0A> {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $ap +=
=3D 1.0;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $del *=3D $x=
/$ap;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $sum +=3D $del;=
=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (abs($del)=0A> <=
=0A> > abs($sum)*EPS) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0
> > $gamser=3D$sum*exp(-$x+$a*log($x)-($gln));=0A> > =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> return;=
=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "a=3D$a to=
o large, ITMAX =
> > $itmax too small in routine GSER=0A> > ";=0A> > =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return;=0A> > =A0 =A0 =A0 =A0 }=0A> > }=0A>=
> =0A> > =0A> > function gcf( &$gammcf,$a,$x,&$gln)=0A> > {=0A> > =A0 =A0 =
=A0 =A0 $gold=3D0.0;=0A> > =A0 =A0 =A0 =A0 $fac=3D1.0;=0A> > =A0 =A0 =A0 =
=A0 $b1=3D1.0;=0A> > =A0 =A0 =A0 =A0 $b0=3D0.0;=0A> > =A0 =A0 =A0 =A0 $a0=
=3D1.0;=0A> > =0A> > =A0 =A0 =A0 =A0 $gln=3Dgammln($a);=0A> > =A0 =A0 =A0 =
=A0 $a1=3D$x;=0A> > =A0 =A0 =A0 =A0 for ($n=3D1;$n<=3DITMAX;$n++) {=0A> > =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $an=3D(double) $n;=0A> > =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $ana=3D$an-$a;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $a0=3D=
($a1+$a0*$ana)*$fac;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $b0=3D($b1+$b0*$=
ana)*$fac;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $anf=3D$an*$fac;=0A> > =A0=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 $a1=3D$x*$a0+$anf*$a1;=0A> > =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 $b1=3D$x*$b0+$anf*$b1;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 if ($a1) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $fac=
=3D1.0/$a1;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $g=3D$b1*=
$fac;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 if=0A> (abs(($g=
-$gold)/$g)=0A> > < EPS) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0
> > $gammcf=3Dexp(-$x+$a*log($x)-($gln))*$g;=0A> =
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
> retur=
n;=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 $gold=3D$g;=0A> > =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =A0 echo "a too=
large, ITMAX too small in=0A> routine=0A> > GCF=0A> > ";=0A> > }=0A> > fun=
ction gammp($a,$x)=0A> > {=0A> > =0A> > =A0 =A0 =A0 =A0 if ($x < 0.0 || $a =
<=3D 0.0) {=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "Invalid arguments i=
n=0A> routine=0A> > GAMMP=0A> > ";=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 re=
turn 0.;=0A> > =A0 =A0 =A0 =A0 }=0A> > =A0 =A0 =A0 =A0 if ($x < ($a+1.0)) {=
=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gser($gamser,$a,$x,$gln);=0A> > =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return $gamser;=0A> > =A0 =A0 =A0 =A0 } else {=
=0A> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf($gammcf,$a,$x,$gln);=0A> > =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 return 1.0-$gammcf;=0A> > =A0 =A0 =A0 =A0 }=0A>=
> }=0A> > =0A> > function gammq($a,$x)=0A> > {=0A> > =0A> > =A0 =A0 =A0 =
=A0 if ($x < 0.0 || $a <=3D 0.0) echo=0A> "Invalid=0A> > arguments in routi=
ne GAMMQ=0A> > ";=0A> > =A0 =A0 =A0 =A0 if ($x < ($a+1.0)) {=0A> > =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 gser($gamser,$a,$x,$gln);=0A> > =A0 =A0 =A0 =A0 =A0=
=A0 =A0 =A0 return 1.0-$gamser;=0A> > =A0 =A0 =A0 =A0 } else {=0A> > =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 gcf($gammcf,$a,$x,$gln);=0A> > =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 return $gammcf;=0A> > =A0 =A0 =A0 =A0 }=0A> > }=0A> > funct=
ion erfc($x)=0A> > {=0A> > =0A> > =A0 =A0 =A0 =A0 return $x < 0.0 ? 1.0+gam=
mp(0.5,$x*$x)=0A> :=0A> > gammq(0.5,$x*$x);=0A> > }=0A> > function erf($x)=
=0A> > {=0A> > =0A> > =A0 =A0 =A0 =A0 return $x < 0.0 ? -gammp(0.5,$x*$x) :=
=0A> > gammp(0.5,$x*$x);=0A> > }=0A> > function myerf($argin) {=0A> > =A0 =
=A0 =A0return .5*(1.+erf($argin/sqrt(2.0)));=0A> > }=0A> > =0A> > ?>=
=0A> > =0A> >
=0A> > =A0 =A0 =0A> > =A0 =A0 =A0 =A0 Values of the Put o=
ption :=0A> > =0A> > =A0 =A0 =A0 =A0 >=
maxlength=3D"40"=A0 name=3D"ValuePutOption"=0A> > =A0 =A0 =A0=
VALUE=3D" $ValuePutOption;=0A> > ?>" />=0A> >
=0A>=
> =A0 =A0 =0A> > =A0 =A0 =A0 =A0 Delta(calls):=0A> > =0A> > =A0 =A0 =A0=
=A0 > maxlength=3D"40"=A0 name=3D"Del=
taCalls"=0A> > =A0 =A0 =A0 VALUE=3D" $Delta=
Calls;=0A> > ?>" />=0A> >
=0A> > =A0 =A0 =0A> > =A0 =A0 =A0 =A0 Delt=
a(puts):=0A> > =0A> > =A0 =A0 =A0 =A0 =
> maxlength=3D"40"=A0 name=3D"DeltaPuts"=0A> > =A0 =A0 =
=A0 VALUE=3D" > ?>" />=0A> >
=0A> > =A0 =A0 <=
button type=3D"submit" name =3D "submit"=0A> > value=3D"Calculate!" =0A> > =
=A0 style=3D"color:maroon font:18pt Courier;=0A> > font-weight:bold "=
>Calculate=0A> > =A0 =A0 =0A> > =A0 =A0
me =3D "reset"=0A> > value=3D"Demo!"=0A> > =A0 style=3D"color:red fon=
t:18pt Courier;=0A> font-weight:bold=0A> > ">Demo=0A> > =A0 =A0 =
=0A> > =0A> > =0A> >=0A> ___________________________________________=
______________results=0A> > =0A> > Please try the following:=0A> > =0A> > O=
pen the 207.254.225.224:8080 home page, and then look=0A> for=0A> > links t=
o the information you want. =0A> > Click the Refresh button, or try again l=
ater.=0A> > =0A> > HTTP 403.1 Forbidden: Execute Access Forbidden=0A> > Int=
ernet Information Services=0A> > =0A> >=0A> -------------------------------=
-------------------------------------------------=0A> > =0A> > Technical In=
formation (for support personnel)=0A> > =0A> > =0A> > Background:=0A> > You=
have attempted to execute a CGI, ISAPI, or other=0A> > executable program =
from a directory that does not=0A> allow=0A> > programs to be executed.=0A>=
> =0A> > =0A> > More information:=0A> > Microsoft Support =0A> > _________=
___________________________________=0A> > http://207.254.225.224:8080/handl=
e_log_book_mssql.php=0A> > yields:=0A> > =0A> > Warning: mssql_connect() [f=
unction.mssql-connect]:=0A> Unable=0A> > to connect to server: LANDON\SQLEX=
PRESSLMKIII in=0A> > C:\Inetpub\wwwroot\handle_log_book_mssql.php on line=
=0A> 8=0A> > (mssql_connect(...)=0A> > Something went wrong while connectin=
g to MSSQL (my=0A> > message)=0A> >=0A> ___________________________________=
____________________=0A> > all these worked before trying 5.3=0A> >=A0 =0A>=
> =0A> > =0A> > =0A> > =0A> > =0A> > =0A> =0A> =0A> =0A>
=0A
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php