php-windows Digest 25 Jun 2010 01:16:40 -0000 Issue 3830

Topics (messages 30184 through 30188):

Re: php_apache2_2.dll missing in current PHP 5.3 Windows builds
        30184 by: Pierre Joye
        30185 by: Sascha Meyer
        30186 by: Richard Quadling
        30187 by: Richard Quadling

Getting rid of bugs I never thought I would have
        30188 by: Bill Mudry

Administrivia:

To subscribe to the digest, e-mail:
        php-windows-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-windows-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-wind...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
hi,

Take the thread safe builds, not the non thread safe (NTS).

Cheers,

On Thu, Jun 24, 2010 at 1:56 PM, Sascha Meyer <harlequ...@gmx.de> wrote:
> Hi list,
>
> one of my colleagues recently tried to manually install PHP 5.3 on Windows XP 
> using Apache2 but failed because both php5apache2.dll and php5apache2_2.dll 
> are missing in the most up to date archives on windows.php.net. We tried both 
> VC6 and even VC9 build archives and both lack the above files, although the 
> install.txt in the archives still mentions php5apache2_2.dll and the other 
> one.
> I tried to have a look at the Changelog to check if there has been a major 
> change in the way PHP is used with Apache2, but the Changelog link on 
> windows.php.net is dead.
>
> Could someone have a look at this? Thanks a lot in advance!
>
> Regards,
>
> Sascha
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
> --------------------------------------------------
> EE:  http://www.experts-exchange.com/M_761556.html
> ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290
>
> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

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

Pierre wrote:
> Take the thread safe builds, not the non thread safe (NTS).

thanks for the quick reply, that helped a lot. Could you give me some 
background info what the NTS versions are used for?

Regards,

Sascha


-- 
Freundliche Grüße / Kind regards,

Sascha Meyer
--------------------------------------------------
EE:  http://www.experts-exchange.com/M_761556.html
ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290

GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.  
Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl

--- End Message ---
--- Begin Message ---
On 24 June 2010 13:39, Sascha Meyer <harlequ...@gmx.de> wrote:
> Hi Pierre,
>
> Pierre wrote:
>> Take the thread safe builds, not the non thread safe (NTS).
>
> thanks for the quick reply, that helped a lot. Could you give me some 
> background info what the NTS versions are used for?
>
> Regards,
>
> Sascha
>
>
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
> --------------------------------------------------
> EE:  http://www.experts-exchange.com/M_761556.html
> ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290
>
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If you are using cli, cgi, fast-cgi (or variants of these), then you
can use NTS. Each instance of the php interpreter is executed
completely separately to any other instance, so anything you do in
instance 1 is not going to interfere in instance 2. Specifically (as I
understand things), the allocation, reading and writing to memory is
done in a "non thread safe" way. This means it takes no account of
other processes attempting to read/write to that memory.

Where the php interpreter is executed with "shared memory", (for
example the defunct ISAPI for Windows and I assume by the reply you
got the apache handlers also), then 1 instance of PHP is loaded and
elements of the execution are split into threads (1 thread per request
is the norm here). In this form, the threads have to play nice when
they read/write memory. They have to be "thread safe".

OK. This is probably an extreme over simplification and probably
misses other important aspects, but is pretty much the general idea.

Where PHP is "loaded" into another process, then the thread safe
variant should be used. Where PHP is "executed" as a separate process,
then the non thread safe variant can be used and will have the slight
performance increase garnered from not having to handle
memory/resources/etc in a thread safe way.



-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---
--- Begin Message ---
On 24 June 2010 13:39, Sascha Meyer <harlequ...@gmx.de> wrote:
> Hi Pierre,
>
> Pierre wrote:
>> Take the thread safe builds, not the non thread safe (NTS).
>
> thanks for the quick reply, that helped a lot. Could you give me some 
> background info what the NTS versions are used for?
>
> Regards,
>
> Sascha
>
>
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
> --------------------------------------------------
> EE:  http://www.experts-exchange.com/M_761556.html
> ZCE: http://www.zend.com/en/yellow-pages#show-ClientCandidateID=ZEND011290
>
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

And, of course, WikiPedia has an understandable explanation :
http://en.wikipedia.org/wiki/Thread_safety

-- 
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling

--- End Message ---
--- Begin Message --- Overall, I am happy with the progress on my pet TAXA project but the journey is proving to be like riding over a rocky road. The most recent effort at a functional addition has been a form to let users decide whether 2 of three types of data will show (general, woodworking & numeric). The general data for each wood should always so and the users should be able to choose if either or both of hte other two should show (using include files).

At first in the form's simplest unformatted form, I got it working fine (and I rejoiced ....). Then when I tried to put it into a table to pretty it up again --- I would no longer work (... almost). I tried all kinds of things. If you temporarily hardcode the choices, the two tables show or do not as desired. Somehow the user choices are not latching to the control lines. Every time you click on the submit button
(named ''Choose Data to View"), it cycles back to the same page like it should.

Now the weird things start. Yesterday, in reviewing everything before submitting to this forum, I decided I should try it again ---- and to my astonishment for a while --- it worked! I could choose the working data checkbox, the woodworking checkbox or both and they would show. Don't check either and they didn't show just like should be. That was short lived, though(!). It hasn't
worked since. Ahem..... talk about flaky.....

But then I noticed another problem. To activate the user choice you have to click on the submit button of course. When I cycled through is when I noticed that now on species detail sheets that are set up to show a scan of the wood being reported on the scan that first showed disappears,
leaving only the 'missing' graphic' symbol only.

So now I have two consternating problems:

1 - How do I get the form to let users choose what data tables to show to work consistently well all the time? If it works mysteriously some of the time, my code should be fairly
             close to what it needs to be <fingers-crossed>.

2 - How do I keep the scan showing always? I realize that each time the submit button is hit, the location for what scan file (all .jpg) should show gets lost. All scans are kept in and alphabetical list of folders according to the first letter of the (botanical) name of the wood being showed:
                /taxa/wood_scans/gallery_a/<filename>
/taxa/wood_scans/gallery_b/<filename> /taxa/wood_scans/gallery_c/<filename> /taxa/wood_scans/gallery_d/<filename> and so on, but have been loaded into the 'species' MySQL file (species.sql) also in column 'picture_filename'.

I looked at various examples on the Net but could not see why it won't consistently work. Probably the best way to understand what is happening is to try out the site. You can find it at (as before) www.prowebcanada.com/taxa. On the left side menu under 'Woods by Alphabet", use the menu choice 'Woody Species'. Pick a name with a camera icon in front of it in the range of A,B or C where there is more data for now). It doesn't matter whether or not you use the alphabetical menu first.

As long as you picked a species with a camera beside it, you should see a scan of what that wood looks like --- as long as you have not yet used the user choice form below the Genera Data table. Now try picking if you want either the woodworking data and/or Numeric Data tables to show. Click the submit button and notice it does recycle ok ---- but it is a minor miracle if the tables really do
show. Meanwhile, the graphic scan has disappeared <frustrating sigh....>

This time I think I had better show the code for the entire file :-( . All this is happening in file 'displayspecies.php'. There are many debugging commented lines you can ignore ;-) .

Glad for the help,

Bill Mudry


======================= Code follows =======================================

<?php

//////////////////////////////////////////////////////////////////////////////////////
//  File: displayspecies.php
//  Date last revision: May 26, 2010
//  Description: Displays all details of a chosen species.
//      Called by: displaygenera2.php
//
//
//////////////////////////////////////////////////////////////////////////////////////

parse_str($_SERVER['QUERY_STRING'], $qs);
$species_name=$qs['species_name'];

//$picture_filename1=$qs['picture_filename1'];


# ////////////////////////////////////////////////////////////////////////////////////
#                                           CONNECT TO DATABASE
# ////////////////////////////////////////////////////////////////////////////////////

include ("connecttotaxa.php");
$connection = mysql_connect($hostname, $username, $password)
        or die("Unable to connect to database server");

$db = mysql_select_db($dbname, $connection)
        or die("Unable to connect to database");

/* --------------------------------------------------------------------------------
                                            HOPEFULLY CONNECTED AT THIS POINT
----------------------------------------------------------------------------------
*/


$query6 = "SELECT * FROM species WHERE species_name='$species_name'";
//var_dump($query6);
$result6 = mysql_query($query6)
        or die(mysql_error());

If ($result6)
        {
        $row6=mysql_fetch_array($result6, MYSQL_ASSOC);
        // Echo "\$row6 is - $row6<br>\n";
        Echo MYSQL_ERROR();

        if ($row6){
        $z=extract($row6); //Echo MYSQL_ERROR();
        };

        Echo "<html>";
        Echo "<head>";

Echo "<title>Data on a specific chosen botanical species $species_name" ;
        Echo "</title>";
        //Echo "        <!---
// <style type='text/css'>webmessage.p {font-size: 7px; font-family:Verdana, Geneva,
        //              sans-serif;}</style>
        //    -->       ";

///////////////////////////////////////////////////////////////////////////////////////////
//
//                                                 START OF BODY
//
///////////////////////////////////////////////////////////////////////////////////////////

?>

        <BODY bgcolor='antiquewhite' border='1'>


<TABLE align='CENTER' cellpadding='10' bgcolor='antiquewhite' border='5' bordercolor='navy' width='800'>
        <TR>
                <TD>

        <P align='left' class = 'webmessage.p'>
The programming works well now but there is a lot of data to be stored. It is a huge job that will take a long time to get most of it in. Till then, there may seem
                to be a lot of data missing --- because there is!
        </P>
        <P align='left' class='webmessage.p'>
This species area is still under development. It is the bottom of the botanical tree. No further elements are under species. There are three categories for species data; GENERAL DATA, WOODWORKING DATA AND NUMERIC TEST DATA. General Data will always be shown while future programming will let the reader choose if woodworking or numeric test data shows.
        </P>
                </TD>
    </TR>
        <TR>
                <TD>
        <P align='left' class='webmessage.p'>
Some species will have a lot of information for them, a few even for all three data areas. The species that TAXA reports ranges from massive wood from the largest trees in the world weighing tons to ssmall shrubs that are "woody" but without enough wood to be used for anything other than academic interest. Some woods have been researched and tested thoroughly while others are amongst the thousands that are only known by some basic facts. This shows why some data areas are rich with text and pictures while others have very little known about them. For such rare, obscure or small sized species, listing woodworking or numeric test data is neither practical or
    useful.
    </P>
                <DL class='webmessage.p'>
                <DT><B>General Information</B></DT>
<DD>Basic information on wood any reader would want. Always present.
            </DD>
                <DT><B>Woodworking Information</B></DT>
<DD>Optional information on what a wood is like to use and work with.<BR />
                Of interest for anyone who will work with a wood.
            </DD>
                <DT><B>Numeric Test Information</B></DT>
            <DD>Optional information on lab test results.<BR />
Largely of interest to architects, engineers and researchers. Data is less common.
            </DD>
                </DL>

        </P>

                </TD>
    </TR>
    </TABLE>

<!-- -------------------------------------------------------------------------------------
                      END OF WEBMASTERS MESSAGE
------------------------------------------------------------------------------------------>
    <BR><BR>

<?php

        echo "<h2 align='center'>Woody Species $species_name</h2>";

echo "<H4 align='center'><strong>Data on a chosen woody species known under a chosen genus</strong></h4>";


//////////////////////////////////////////////////////////////////////////////////////////////////////
// Section to show scans
//////////////////////////////////////////////////////////////////////////////////////////////////////
Echo "<div align = 'center'>";

        //$picture_filename1 = $_GET[picture_filename1];

         //Echo "START OF PICTURE AREA<br><br>";

// Echo "On line 141 \$picture_filename1 is - $picture_filename1<br><br>";
        $picture_path = "./wood_scans/$picture_filename1";
         //Echo "\$picture_path is - $picture_path<br><br>";

        //echo "<img src = $picture_path><br />";

        //Echo " Before if, \$picture_path is - $picture_path<br /><br /";

        If ($picture_path)
                {echo "<img src = $picture_path><br /><br />";}
        else echo "No picture<br /><br />";

        //(Echo "\$picture_path is - $picture_path<br /><br /;


 // Echo "<br />END OF PICTURE AREA<br /><br />";

Echo "</div";

//////////////////////////////////////////////////////////////////////////////////////////////////////
// Start of reporting general data.
//////////////////////////////////////////////////////////////////////////////////////////////////////

Echo "<table align='CENTER' cellpadding='10' bgcolor='white' border='2' bordercolor='saddlebrown' width='800'>";
        Echo "<tr>";
Echo "<td colspan=2><h2 align='center'>General Data for Species $species_name</h2></td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Authority - $authorities_species</td>";
Echo "<td>Varieties, cultivars, Hybrids, Subspecies - <br>\n $varieties</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Common Names - $species_commonname</td>";
        Echo    "<td>Synonyms - $syn_species</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Gymnosperm or Angiosperm? $gymno_angio</td>";
        Echo    "<td>Commercial wood? - $commercial_wood </td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Uses - $species_uses</td>";
        Echo    "<td>Durability -  $durability</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Plant forms - $species_life_form</td>";
        Echo    "<td>Typical sizes of plant - $species_lifeform_size</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td>Seasoning - $seasoning</td>";
        Echo    "<td>Stability - . $stability</td>";
        Echo "</tr>";
        Echo "<tr>";
Echo "<td colspan=2>General Description - $species_description</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td colspan=2>Typical Defects - $defects</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td colspan=2>Toxicity - $toxicity</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td colspan=2>World Distribution - $location</td>";
        Echo "</tr>";
        Echo "<tr>";
        Echo    "<td colspan=2>Comments - $comments</td>";
        Echo "</tr>";



        Echo  "</td></tr></table><br><br>\n"; //Close off data table;

   Echo "<hr width='400'><br />";
        }


//////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Let users decide if they wish to view woodworking and/or numeric test data.
//
//////////////////////////////////////////////////////////////////////////////////////////////////////

//$show_woodworking = "off";
//$show_numeric = "off";
?>
<div align="center">
<H3 align="center">Choose if you wish to also view Woodworking or Numeric Data</H3>

<FORM name="choose_data" method="GET" action="<?php echo $_SERVER['PHP_SELF']; ?>" >

<TABLE align="center" border=0 bgcolor='ivory' cellpadding=10>
<TR>
        <TD >
                <B>Show Woodworking Data  </B>
                <Input type='checkbox' name='show_woodworking' value="OFF">
        </TD>
        <TD >
                <B>Show Numeric Test Data  </B>
                <Input type='checkbox' name='show_numeric' value="OFF">
        </TD>
</TR>
<TR>
        <TD colspan=2 align="center">
                <Input type='submit' value='Choose Data to View'>
        </TD>
        </TR>
        </TABLE>
</FORM>

<?PHP
////////////////////////////////////////////////////////
//    END OF FORM, START OF PROCESSING USER INPUT
////////////////////////////////////////////////////////

//$display_working_data =""; // initialize responses to empty before retrieving them
//$display_numeric_data ="";

//Echo "line 254 \$display_working_data is - $display_working_data ";
//Echo "<br />";
//Echo "line 256 \$display_numeric_data is - $display_numeric_data ";
//Echo "<br />";

//bring in user's answers from form:
//$display_working_data = $_GET['show_woodworking'];
//$display_numeric_data = $_GET['show_numeric'];

//check what user responses are:
//echo "Line 262 - \$display_working_data is - $display_working_data<br />";
//Echo "line 263 - \$display_numeric_data is - $display_numeric_data<br />";

if ($display_working_data) {
    Echo "line 269 - \$display_working_data is - $display_working_data ";
        Echo "<br />";
        include "./woodworking_data.php";
        }
else {
                Echo "Working data chosen not to show<br /><br />";
// echo "Line 274 - \$display_working_data is - $display_working_data<br />";

                };

//  echo "working_data is - $display_working_data";

//Echo "line 282 - \$display_numeric_data is - $display_numeric_data ";


if ($display_numeric_data) {
Echo "line 284 - \$display_numeric_data is - $display_numeric_data ";
Echo "<br />";
        include "./numeric_data.php";
        }
        else {Echo "Numeric data chosen not to show<br /><br />";
};

//echo "numeric_data is - $display_numeric_data";

echo "<br />";

//include "./wood_data.php";

?>

<H3 align="center" >END OF WOOD DATA REPORT</H3>


</BODY>
</HTML>

(I haven't added in the two include files since I have seen them work ok when the form does work.).


--- End Message ---

Reply via email to