php-windows Digest 4 Jun 2010 03:46:26 -0000 Issue 3821

Topics (messages 30128 through 30139):

Re: php compilation
        30128 by: Tomasz Krawczyk
        30129 by: samuel
        30130 by: Tomasz Krawczyk
        30131 by: samuel
        30132 by: Pierre Joye
        30133 by: samuel
        30134 by: Pierre Joye
        30135 by: samuel
        30136 by: Pierre Joye
        30137 by: samuel
        30138 by: Pierre Joye

Can't figure out a difficult conditional statement
        30139 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 ---
samuel pisze:
Hello,
I was trying to install Ogg/vorbis pecl extension in wamp, but it seems to
be impossible.
So npw I'm trying to compile PHP on my PC forwarding
http://wiki.php.net/internals/windows/stepbystepbuild
but at 14th step I have an wire error : Erreur en entr=C3=A9e: Il n'y a pas=
 de
moteur de script pour l'extension de fichier ".js".
in english that make some thing like : Input error: there's no script motor
for ".js" file extension
I think I have installed all I need, cscript command is found so I don't
hunderstand where is the problem, if you have an idea you realy are welcome=
.

p.s.: It 's my first mail on this miling-list, maybe I should ask
php-installation mailing-list ?


Hi samuel

It may be a problem with Windows Scripting Host. I had similar problem with it. Try to install it or reinstall if you have WSH installed. In my case (Win XP) I had to apply some patch for .js to my registry. I found that patch somewhere in the Internet. Try to find that patch for WSH nad JavaScript.

regards
Tomek

--- End Message ---
--- Begin Message ---
Hello,
What patch do you speak about ?

--- End Message ---
--- Begin Message ---
samuel pisze:
Hello,
What patch do you speak about ?

I found file xp_js_fix.reg. This was for WSH problem with JS. After I applied it to my registry I could compile PHP. There was also patch for vista.


--
pozdrawiam
Tomek

--- End Message ---
--- Begin Message ---
ok thank you that 's work,
now , two step later, It's

configure --disable-all --enable-cli --enable-$remains


What 's $remains please ?

--- End Message ---
--- Begin Message ---
On Sun, May 30, 2010 at 6:17 PM, samuel <zoulil...@gmail.com> wrote:
> ok thank you that 's work,
> now , two step later, It's
>
> configure --disable-all --enable-cli --enable-$remains
>
>
> What 's $remains please ?

Whatever you may need as extension or options. For your 1st try,
simply using --disable --enable-cli will give you a minimal PHP.


Cheers,
-- 
Pierre

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

--- End Message ---
--- Begin Message ---
ok tahnks again,
do you know something who has tryed to use ogg/vorbis extension ?
This one seems to be not up to date ?


2010/5/30 Pierre Joye <pierre....@gmail.com>:
> On Sun, May 30, 2010 at 6:17 PM, samuel <zoulil...@gmail.com> wrote:
>> ok thank you that 's work,
>> now , two step later, It's
>>
>> configure --disable-all --enable-cli --enable-$remains
>>
>>
>> What 's $remains please ?
>
> Whatever you may need as extension or options. For your 1st try,
> simply using --disable --enable-cli will give you a minimal PHP.
>
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>

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

On Sun, May 30, 2010 at 6:26 PM, samuel <zoulil...@gmail.com> wrote:
> ok tahnks again,
> do you know something who has tryed to use ogg/vorbis extension ?
> This one seems to be not up to date ?

I never tried to build this ext or the library it uses.

Cheers,
-- 
Pierre

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

--- End Message ---
--- Begin Message ---
I can now compile php, but the ogg library isn't found :

Checking for ogg/ogg.h ...  <not found>
Checking for ogg/ogg.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
Checking for vorbis/codec.h ...  <not found>
Checking for vorbis/codec.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
Checking for library ogg_static.lib ... <not found>
WARNING: oggvorbis not enabled; libraries and headers not found

although Ihave compiled libogg and libvorbis,
I should have a file named ogg_static.lib ?

2010/5/30 Pierre Joye <pierre....@gmail.com>:
> hi,
>
> On Sun, May 30, 2010 at 6:26 PM, samuel <zoulil...@gmail.com> wrote:
>> ok tahnks again,
>> do you know something who has tryed to use ogg/vorbis extension ?
>> This one seems to be not up to date ?
>
> I never tried to build this ext or the library it uses.
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>

--- End Message ---
--- Begin Message ---
On Sun, May 30, 2010 at 10:27 PM, samuel <zoulil...@gmail.com> wrote:
> I can now compile php, but the ogg library isn't found :
>
> Checking for ogg/ogg.h ...  <not found>
> Checking for ogg/ogg.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
> Checking for vorbis/codec.h ...  <not found>
> Checking for vorbis/codec.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
> Checking for library ogg_static.lib ... <not found>
> WARNING: oggvorbis not enabled; libraries and headers not found
>
> although Ihave compiled libogg and libvorbis,
> I should have a file named ogg_static.lib ?

Looks like yes. But you can change the config.w32 to use the DLL lib
instead. Do OGG libs compile fine on Windows with VC9? Any link?

By the way, we have a dedicated list for windows internals
development, or pecl. That could be a better place to discuss that
(see the lists list on php.net, windows internals).

Cheers,
-- 
Pierre

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

--- End Message ---
--- Begin Message ---
ogg compile fine bit I compiled it qith mingw, I have installed the
vc9 after for php compilation.
In fact it's my first compilation of a c application on window so I'm
a little bit lost.
With vc9 the command .\command is unknow. To compile libogg and
libvorbis with I've only to do .\configure and mingw-make it seems
different for vc9, am I wrong ?

2010/5/30 Pierre Joye <pierre....@gmail.com>:
> On Sun, May 30, 2010 at 10:27 PM, samuel <zoulil...@gmail.com> wrote:
>> I can now compile php, but the ogg library isn't found :
>>
>> Checking for ogg/ogg.h ...  <not found>
>> Checking for ogg/ogg.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
>> Checking for vorbis/codec.h ...  <not found>
>> Checking for vorbis/codec.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
>> Checking for library ogg_static.lib ... <not found>
>> WARNING: oggvorbis not enabled; libraries and headers not found
>>
>> although Ihave compiled libogg and libvorbis,
>> I should have a file named ogg_static.lib ?
>
> Looks like yes. But you can change the config.w32 to use the DLL lib
> instead. Do OGG libs compile fine on Windows with VC9? Any link?
>
> By the way, we have a dedicated list for windows internals
> development, or pecl. That could be a better place to discuss that
> (see the lists list on php.net, windows internals).
>
> Cheers,
> --
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>

--- End Message ---
--- Begin Message ---
the libraries can be compiled easily using VC9, please do it (and
avoid some pains later). See the win32 directory in the zip archive,
use the 2008 version.

On Sun, May 30, 2010 at 10:56 PM, samuel <zoulil...@gmail.com> wrote:
> ogg compile fine bit I compiled it qith mingw, I have installed the
> vc9 after for php compilation.
> In fact it's my first compilation of a c application on window so I'm
> a little bit lost.
> With vc9 the command .\command is unknow. To compile libogg and
> libvorbis with I've only to do .\configure and mingw-make it seems
> different for vc9, am I wrong ?
>
> 2010/5/30 Pierre Joye <pierre....@gmail.com>:
>> On Sun, May 30, 2010 at 10:27 PM, samuel <zoulil...@gmail.com> wrote:
>>> I can now compile php, but the ogg library isn't found :
>>>
>>> Checking for ogg/ogg.h ...  <not found>
>>> Checking for ogg/ogg.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
>>> Checking for vorbis/codec.h ...  <not found>
>>> Checking for vorbis/codec.h ...  c:\msys\1.0\home\temp\libogg-1.2.0\include
>>> Checking for library ogg_static.lib ... <not found>
>>> WARNING: oggvorbis not enabled; libraries and headers not found
>>>
>>> although Ihave compiled libogg and libvorbis,
>>> I should have a file named ogg_static.lib ?
>>
>> Looks like yes. But you can change the config.w32 to use the DLL lib
>> instead. Do OGG libs compile fine on Windows with VC9? Any link?
>>
>> By the way, we have a dedicated list for windows internals
>> development, or pecl. That could be a better place to discuss that
>> (see the lists list on php.net, windows internals).
>>
>> Cheers,
>> --
>> Pierre
>>
>> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org
>>
>



-- 
Pierre

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

--- End Message ---
--- Begin Message --- You would think that a relatively simple conditional statement should be quite easy to get working --- but after many retries and reworks, this has got me stumped. I look forward to being shown why and (even better) what actually will work.

First, lets give everyone access to the knowledge base that I am building so you can
see what users now see versus what I want them to see.
The site URL is http://www.prowebcanada.com/taxa/.

However, the data pages are within a Frames environment which makes it hard to read what each page really is. Therefore I will escape these frames so I can list the actual files I am
working on and make it easier to follow and understand.

Lets say a reader has chosen to view information on the wood genus of "acer" (ie. all maples). The URL would be http://www.prowebcanada.com/taxa/displaygenera2.php?&genus_name=Acer and information on that genus would show on the top half of the page. Ignore that and look at
the second part of the page under "Woody Species of Acer".

The Objective - Notice how a reader can choose a particular Acer species (ie. Maple) and let it follow out to a data page that would show data on the chosen wood. If you would have
chosen Acer barbatum, the URL for this data page works out to a successful:
   
http://www.prowebcanada.com/taxa/displayspecies.php?&species_name=Acer%20barbatum

In recent times, I have been able to add code to show off actual scans of a limited number of woods ---- including a decent scan for Acer barbatum. Showing off actual scans on a species
data page is working quite fine now.

Now go back to the genus page where we started from. What I am trying to do is to have the code look ahead to show a small camera icon in front of the species listings but ONLY for those that will offer a scan (ie. photo) of each wood that has one displaying. I do not have
scans for every wood.

You should think that should be an easy job to set up but after reading up and many tries with different configurations, I still cannot seem to get this to work right. At this point, I don't know why. Either I get no camera icons at all OR icons in front of every listing when they should
show up only where there are photos installed.

The photos are stored as a path and file name in the picture_filename1 column of table 'species'. The cells in this column either have a scan filename and path to the file name stored or a "<NULL>". The camera icon should show only if there is a valid (.jpg) picture stored.

I have echoed all the scan file names for now:
        - to show that they do show up and that is not the problem
        - to show which species have photos and which don't
- and finally, to show that the camera icon is showing up even when there is a NULL
          stored. That is what should not happen.
Once this is working properly I would comment out or even erase that statement

Assume a successful connection to the database (named taxa by the way). No use displaying the code for showing data on one genus. That part is working fine, so I will list the code for the lower part. Just so the code is easier to understand, the loop not only displays all the woody species but has provisions to start another column if the column gets too large. The code I am
trying to develop to work properly is inside that loop.

..... Where it seems like a file name is not showing, it actually is but showing a NULL is the same as showing ---- nothing(!). Just ignore all the statements commented out. They have all been efforts during earlier development and debugging. I can clean that up some later.

Here, then is the code I have so far (that should work and does not).

As the code will show, $showcamera is set up to display one instance of a camera icon but it is in a loop that shows all species of a genus.

Thanks in advance for your suggestions,

Bill Mudry,

=====================================================================
< Upper code left out for relevance and brevity>

/////////////////////////////////////////////////////////////////////////////////////////
//           LISTING SPECIES OF THE CHOSEN WOODY GENUS
//           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// A query now runs to display relevant woody species of the chosen genus. Choosing a // species will take the user to a page detailing information on the chosen species.
//
/////////////////////////////////////////////////////////////////////////////////////////


echo "<H2 align = 'center'>Woody Species of $genus_name</H2>";
        //echo "\$generaID is - $generaID";

echo "<H4 align='center'>Each link leads to more information on the chosen botanical species</h4>";

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

$query5 = "SELECT * from species where generaID = '$generaID' order by species_name";

$result5 = mysql_query($query5)
        or die(mysql_error());

//var_dump($result5);
$l=-0;
$m=1;



echo "<table border='3' bgcolor='ivory' cellpadding='20' align='center'><tr>";
echo "<td valign='top' style='white-space: nowrap'>";


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Now as each species is generated in a list of the woody species of the chosen genus, we want to show a small camera // icon (as images/cameraicon01.jpg) in front of each listed species ONLY if the species has a scan or photo // stored in the 'species' table under column 'picture_filename1'. The program has to look ahead in the 'species' // table for all of them to see which ones should and which should not have a camera icon beside them. The whole // idea is to let readers be informed on which choices include a scan or photo before choosing. If there is no // null or empty value in that location, it is assumed that there is a scan to view.
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////

$camera_icon = "images/cameraicon01.jpg";
$showcamera = "<img src = $camera_icon>...";



if($result5) {
    while($row5 = mysql_fetch_array($result5))
           {
                //echo "\$genus_name is - $genus_name";
        extract($row5);
                //Echo "extract($row5)";
                //Echo "\$row5 is - %row5";
                $l++; // counter to set maximum columns lengths

        //echo "'\$m is - '.$m";

                if ($l>60)
                        {
                        echo "</td>";
                        echo "<td valign='top' style='white-space: nowrap'>";
                        $l=0;
                        };

                $picture_filename1 = trim($picture_filename1);

echo "$picture_filename1<br />"; // Debug statement to show which entries do have photos attached.

        // Here is the main conditional statement area:
                if ('$picture_filename1' !== "('<NULL>' or ''")" )
                   {
echo $showcamera; // the only time it should show a camera icon
                        }
                else if ('$picture_filename1' == "('<NULL>' or ''")
                        echo "No scan<br />";

        echo '<a href="displayspecies.php?&species_name='.$species_name.'">';
                //echo "$picture_filename1<br />";


                echo "$m - $species_name";
                echo"</a><br>\n";
                $m++; // counter to increment for the next species


            }
}
    else echo "No species found";

        $species_name="";
echo "<br></td></tr></table><br>";


// End of display table.
    Echo "<br><hr width='400'>";

echo "<H3 align = 'center'>End of Listing for Woody Species of $genus_name</H3>";

echo "</body>";
echo







--- End Message ---

Reply via email to