php-windows Digest 17 Mar 2009 15:44:47 -0000 Issue 3587

Topics (messages 29205 through 29207):

Re: Using php5ts.lib in 5.3.0beta2-dev snapshot
        29205 by: Jeff McKenna
        29206 by: Jeff McKenna

Can't seem to transfer a dynamically chosen parameter to next page
        29207 by: Bill Mudry

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 ---
Keisial wrote:
Jeff McKenna wrote:
Hello,

I am using the 'php5ts.lib' file included in the "VC9 x64 Thread Safe"
5.3.0beta2-dev snapshot (from http://windows.php.net/snapshots/),
downloaded 2009-Mar-15, to build a module...but when I try to load the
module using those same PHP binaries I get the following error:

  >php -v
    PHP Warning:  PHP Startup: MapScript: Unable to initialize module
    Module compiled with build ID=API20090115,TS
    PHP    compiled with build ID=API20090115,TS,VC9
    These options need to match

Is it possible that the 'php5ts.lib' file included in that snapshot
was not used to make those binaries?  Or, does someone see my mistake?
(where is this mysterious "VC9" ID coming from?)

thanks for any advice.

-jeff
Did you use Visual C++ 9 to build that module?
VC9 means that it was made with Visual C++ 9, and thus use a different C
library.



Yes I built the module with VC9 also. My question is: how is this extra parameter "VC9" set on the build ID?

-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/



--- End Message ---
--- Begin Message ---
Jeff McKenna wrote:
Hello,

I am using the 'php5ts.lib' file included in the "VC9 x64 Thread Safe" 5.3.0beta2-dev snapshot (from http://windows.php.net/snapshots/), downloaded 2009-Mar-15, to build a module...but when I try to load the module using those same PHP binaries I get the following error:

  >php -v
    PHP Warning:  PHP Startup: MapScript: Unable to initialize module
    Module compiled with build ID=API20090115,TS
    PHP    compiled with build ID=API20090115,TS,VC9
    These options need to match

Is it possible that the 'php5ts.lib' file included in that snapshot was not used to make those binaries? Or, does someone see my mistake? (where is this mysterious "VC9" ID coming from?)

thanks for any advice.

-jeff



For the record, this build_id value is set in the /main/config.w32.h file, such as:

  /* Compiler compatibility ID */
  #define PHP_COMPILER_ID "VC9"

That magic did the trick for me :)

-jeff


--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/



--- End Message ---
--- Begin Message --- I hope someone has an answer to what has been a thorny problem for me. I am still junior to using PHP. I have a script that displays a bunch of woody botanical orders out of a MySQL file nicely in columns.
That part works fine.

Next what is wanted is for a user to be able to click on one of them, the result being that it would open up a new page that would get details on the woody order the person chose out of another MySQL table. Well .... I got it to link to a page that opens up ok ---- except after numerous attempts and ways I cannot
get the name of the chosen woody order to transfer to this next page.

- the examples I have seen on the Internet and book use static information for the better part while the very parameter that needs to be passed is derived dynamically. I am fairly sure that is complicating
          things more.

- Cookies would be an overkill and have too much persistence. I believe using "session" would be overkill, too, even if it might work. All I need is to make the choice the reader makes go global enough to use it in the very page that it calls. It is then also used both for titles on that page (dynamic) and to do a query for information to display on that chosen order. Writing to a file seems to be an inefficient way if
          there is only a way to just make it be memory resident instead.

The running copy can be seen and tried (to the degree it is working so far) at:
        http://www.prowebcanada.com/taxa/viewallorders.php

The files used are viewallorders.php and the response page of showorder.php. I will add these as attachments.

What *will* work? Hope someone can help.

Bill Mudry
MIssissauga, ON
<?php
include ("connecttotaxa.php");
Echo "<html>";
Echo "<head>";
Echo "<title>Information on ordername . $ordername"; //actual order name still 
not 
// transfering properly yet. Different attempts made.
Echo "</title>";


echo "<body bgcolor='ivory' border='1'>";
echo "Debug statement: Chosen order is . $ordername . $name"; // debig 
statement only. Remove later.
echo "<h2 align='center'>Woody Order $ordername</h2>";
// Can't seem to get the order name to transfer properly yet. Erase these lines 
once it is
// working fine.
/////////////////////////////////////////////////////////////////////////////////////////
// Once the reporting function above for each woody order is working properly,
// a query has to be run to display all woody families of that order and, as 
with the
// woody order list, set as links to be chosen to go further down the 
botanicaal tree.
//
//
/////////////////////////////////////////////////////////////////////////////////////////

echo "<H4 align='center'>This area will expand to show details on this order<br>
        (after the order chosen parameter transfers properly)</h4>";

Echo "<br><br>";


echo "<hr>";
echo "<H2 align = 'center'>Woody Families of this Order</H2>";
echo "<H4 align = 'center'>(As above, the order name has to transfer properly 
first<br>
                before a query can bring forth all woody families that belong 
to the chosen order)</H4>";

echo "</body>";
echo "</html>";
?>
 <html>
 <head>
    <title>Link List of All Woody Orders</title>
 </title>
<?php include ("connecttotaxa.php"); ?>
</head>

<body>
<?php

mysql_connect($hostname, $username, $password) OR DIE ('Unable to connect to 
database! Please try again later.');
mysql_select_db(taxa);

$query = "SELECT * FROM sci_order";
$result = mysql_query($query);
//Echo "Got as far as \$result line<br>"; // debug statment only.
$j=0;
$k=0;
echo "<h2 align='center'>All Woody Orders</h2>";
echo "<H4 align='center'>Each link leads to more information on the chosen 
botanical order</h4>";
                //Global $name, $ordername; // One of many vain efforts to make 
the order name chosen
                // go global so it can be retrieved on the following page.

// Set up a table for displaying all the woody orders
echo "<table border='3' bgcolor='ivory' align='center'><tr><td valign='top'>";
        //$name ="";

if($result) {
    while($row = mysql_fetch_array($result)){
        extract ($row);
                $j++; // counter to set maximum columns lengths
                $k++; // counter to increment for the next order
                echo $j." - ";
                //Global $name, $ordername; // stabbing in the dark to make the 
name stay in memory.
                $ordername = $name; // stabbing in the dark to make the name 
stay in memory.
                
                // Here is where each order is listed and as a link to the next 
page.
                
        echo "<a href='showorder.php?$name '>";
                echo $name;
                echo"</a>.<br>\n";
                
                if ($k>23)
                        {
                        echo "</td><td>";
                        $k=0;
                        };
        }

}
    else echo "No result value";
        $name ="";
echo "<br><br><br></td></tr></table><br>";
// End of display table.
    Echo "<br><hr>"; 
    
        // essentially another debug statement of some use to users.
If ($name !="") {
        Echo "<div align='center>'";
    Echo "<h3 align='center'>You chose order named $name</h3>\n";
        Echo "</div>";
        }
else {
        echo "the order name is null";
         }

?>

</body>
</html>

--- End Message ---

Reply via email to