php-windows Digest 17 Jun 2005 17:01:16 -0000 Issue 2699

Topics (messages 26113 through 26118):

PHP 4.3.2-Win32 - This Program has Performed an Illegal Operation
        26113 by: GKE
        26114 by: M. Sokolewicz

PHP & GD on Windows
        26115 by: Aaron Todd
        26116 by: Edin Kadribasic
        26117 by: Jason Barnett
        26118 by: Aaron Todd

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
I am learning the PHP programming using Larry Ullman's book "PHP Advanced
for the World Wide Web". After successfully going through a few scripts one
script kept producing error message whenever I ran it. The script is
provided herebelow:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
        <title>Football Picks</title>
</head>
<body>
<?php # Script 1.11

/* ------------------------------- */
/* Calculate the season standings. */
/* ------------------------------- */

function do_the_math ($value, $key, $total) { // This function adds up the
wins and losses.

        if ($key != 0) { // Ignore the first dummy line.

                $line = explode ("\t", $value); // Separate out the
username, wins, and losses.
                $_REQUEST['username'] = $line[0];
                $total["{$_REQUEST['username']}"]["wins"] += $line[1];
                $total["{$_REQUEST['username']}"]["losses"] += $line[2];
        }
}

function read_results ($dp, $directory, &$total) {

        if ($file_name = readdir ($dp)) { // Search through the directory.
                if (substr($file_name, 0, 8) == "results_") { // If it's a
results file ...
                        $the_file = $directory . $file_name;
                        array_walk (file ($the_file), 'do_the_math',
&$total); // Do the math on all the data.
                }
                read_results ($dp, $directory, $total); // Repeat through
the directory.
        }
}

$total = array(); // Initialize the main variable.

$directory = '2001/';
$dp = opendir ($directory);
read_results ($dp, $directory, $total); // Start the process.
closedir ($dp);
echo "<pre>\n";
var_dump ($total); // Quickly print out the results.
echo "</pre>\n";
?>
</body>
</html>

The error message is: "PHP - This program has performe an illegal operation
and will be shut down....."
Details of the error are as follows:

PHP caused an invalid page fault in
module PHP4TS.DLL at 0167:100b8beb.
Registers:
EAX=00638528 CS=0167 EIP=100b8beb EFLGS=00010246
EBX=00000000 SS=016f ESP=00638420 EBP=00000010
ECX=00000007 DS=016f ESI=00761010 FS=5b97
EDX=007637c0 ES=016f EDI=01182e28 GS=0000
Bytes at CS:EIP:
8a 45 08 3c 04 57 89 5c 24 54 89 5c 24 5c 89 5c
Stack dump:
00761010 00000003 00000001 011827cc 00000001 00000000 0118316c 0000000b
00010003 100ba272 100bf1b0 00000000 00638580 00000000 81847340 0248c270

Could anyone help me resolve this problem.

Thanks

GKE

--- End Message ---
--- Begin Message ---
hello,

this is not a problem with the script, which I'll try not to criticise here; instead it's a problem with your php installation. Since this is PHP 4.3.2, I would suggest you redownload/reinstall PHP, and preferably do that with the *latest* version. There's a big chance that the bug you ran into has already been fixed.

hope that helps,
- tul

GKE wrote:
I am learning the PHP programming using Larry Ullman's book "PHP Advanced
for the World Wide Web". After successfully going through a few scripts one
script kept producing error message whenever I ran it. The script is
provided herebelow:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
        <title>Football Picks</title>
</head>
<body>
<?php # Script 1.11

/* ------------------------------- */
/* Calculate the season standings. */
/* ------------------------------- */

function do_the_math ($value, $key, $total) { // This function adds up the
wins and losses.

        if ($key != 0) { // Ignore the first dummy line.

                $line = explode ("\t", $value); // Separate out the
username, wins, and losses.
                $_REQUEST['username'] = $line[0];
                $total["{$_REQUEST['username']}"]["wins"] += $line[1];
                $total["{$_REQUEST['username']}"]["losses"] += $line[2];
        }
}

function read_results ($dp, $directory, &$total) {

        if ($file_name = readdir ($dp)) { // Search through the directory.
                if (substr($file_name, 0, 8) == "results_") { // If it's a
results file ...
                        $the_file = $directory . $file_name;
                        array_walk (file ($the_file), 'do_the_math',
&$total); // Do the math on all the data.
                }
                read_results ($dp, $directory, $total); // Repeat through
the directory.
        }
}

$total = array(); // Initialize the main variable.

$directory = '2001/';
$dp = opendir ($directory);
read_results ($dp, $directory, $total); // Start the process.
closedir ($dp);
echo "<pre>\n";
var_dump ($total); // Quickly print out the results.
echo "</pre>\n";
?>
</body>
</html>

The error message is: "PHP - This program has performe an illegal operation
and will be shut down....."
Details of the error are as follows:

PHP caused an invalid page fault in
module PHP4TS.DLL at 0167:100b8beb.
Registers:
EAX=00638528 CS=0167 EIP=100b8beb EFLGS=00010246
EBX=00000000 SS=016f ESP=00638420 EBP=00000010
ECX=00000007 DS=016f ESI=00761010 FS=5b97
EDX=007637c0 ES=016f EDI=01182e28 GS=0000
Bytes at CS:EIP:
8a 45 08 3c 04 57 89 5c 24 54 89 5c 24 5c 89 5c
Stack dump:
00761010 00000003 00000001 011827cc 00000001 00000000 0118316c 0000000b
00010003 100ba272 100bf1b0 00000000 00638580 00000000 81847340 0248c270

Could anyone help me resolve this problem.

Thanks

GKE

--- End Message ---
--- Begin Message ---
I am new to building and runnning PHP on windows.  I have only used Linux in 
the past, but I need to get it on a windows box.  I have built PHP 
sucessfully by following the instructions in the manual, but I would like to 
add GD, JPEG and PNG support, and the FREETYPE library.  I have gathered all 
the source for these, but I am now unsure how to make this all happen.  The 
source that I downloaded for GD and the JPEG library do not seem to have any 
dsw files to build from.  The PNG and FREETYPE had the dsw files, but when I 
tried to build the files I got build errors.

I also noticed that in a GD readme file it said its pointless to build it 
because all you need is the DLL.

Is there any good tutorials or anyone that knows how to get all of this to 
work?  I am very confused on getting this all to run on windows. 

--- End Message ---
--- Begin Message ---
Hi,

Why would you want to build PHP on windows. In the downloads section of the
site you can find precompiled binaries for PHP including all the extensions.

Edin

----- Original Message ----- 
From: "Aaron Todd" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 17, 2005 3:23 PM
Subject: [PHP-WIN] PHP & GD on Windows


> I am new to building and runnning PHP on windows.  I have only used Linux
in
> the past, but I need to get it on a windows box.  I have built PHP
> sucessfully by following the instructions in the manual, but I would like
to
> add GD, JPEG and PNG support, and the FREETYPE library.  I have gathered
all
> the source for these, but I am now unsure how to make this all happen.
The
> source that I downloaded for GD and the JPEG library do not seem to have
any
> dsw files to build from.  The PNG and FREETYPE had the dsw files, but when
I
> tried to build the files I got build errors.
>
> I also noticed that in a GD readme file it said its pointless to build it
> because all you need is the DLL.
>
> Is there any good tutorials or anyone that knows how to get all of this to
> work?  I am very confused on getting this all to run on windows.
>
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message --- Yep. In Windows all you do is enable in your php.ini and have the extension DLL in the extension directory.


Edin Kadribasic wrote:
Hi,

Why would you want to build PHP on windows. In the downloads section of the
site you can find precompiled binaries for PHP including all the extensions.

Edin

----- Original Message ----- From: "Aaron Todd" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, June 17, 2005 3:23 PM
Subject: [PHP-WIN] PHP & GD on Windows



I am new to building and runnning PHP on windows.  I have only used Linux

in

the past, but I need to get it on a windows box.  I have built PHP
sucessfully by following the instructions in the manual, but I would like

to

add GD, JPEG and PNG support, and the FREETYPE library.  I have gathered

all

the source for these, but I am now unsure how to make this all happen.

The

source that I downloaded for GD and the JPEG library do not seem to have

any

dsw files to build from.  The PNG and FREETYPE had the dsw files, but when

I

tried to build the files I got build errors.

I also noticed that in a GD readme file it said its pointless to build it
because all you need is the DLL.

Is there any good tutorials or anyone that knows how to get all of this to
work?  I am very confused on getting this all to run on windows.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php

--- End Message ---
--- Begin Message ---
I want to build it myself so I can disable a lot of the functions that I 
dont need.


""Edin Kadribasic"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hi,
>
> Why would you want to build PHP on windows. In the downloads section of 
> the
> site you can find precompiled binaries for PHP including all the 
> extensions.
>
> Edin
>
> ----- Original Message ----- 
> From: "Aaron Todd" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, June 17, 2005 3:23 PM
> Subject: [PHP-WIN] PHP & GD on Windows
>
>
>> I am new to building and runnning PHP on windows.  I have only used Linux
> in
>> the past, but I need to get it on a windows box.  I have built PHP
>> sucessfully by following the instructions in the manual, but I would like
> to
>> add GD, JPEG and PNG support, and the FREETYPE library.  I have gathered
> all
>> the source for these, but I am now unsure how to make this all happen.
> The
>> source that I downloaded for GD and the JPEG library do not seem to have
> any
>> dsw files to build from.  The PNG and FREETYPE had the dsw files, but 
>> when
> I
>> tried to build the files I got build errors.
>>
>> I also noticed that in a GD readme file it said its pointless to build it
>> because all you need is the DLL.
>>
>> Is there any good tutorials or anyone that knows how to get all of this 
>> to
>> work?  I am very confused on getting this all to run on windows.
>>
>> -- 
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>> 

--- End Message ---

Reply via email to