php-windows Digest 10 Jun 2010 15:32:35 -0000 Issue 3824
Topics (messages 30145 through 30149):
Re: PHP Installation Problem
30145 by: Alice Wei
30146 by: Venkat Raman Don
30147 by: Venkat Raman Don
30148 by: Alice Wei
Problems combining two criteria in a select statement
30149 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 ---
> Date: Mon, 7 Jun 2010 17:47:31 +0200
> From: [email protected]
> Subject: Re: [PHP-WIN] PHP Installation Problem
> To: [email protected]; [email protected]
>
> Hi Alice,
>
> Alice wrote:
> > I have installed PHP from using PHP
> > 5.2.13 installer [20,929Kb] - 25 February 2010, and for some reason, the
> > PHP folder did not show up on my Windows C:\ folder.
> > ...
>
> when you installed PHP through the installer, did you check "configure IIS"?
> What was the result of the installer? If any errors occurred, you should get
> an error code if anything doesn't work as expected. I would first try to
> rerun the installer, if it gives you a repair option, try this first,
> otherwise uninstall and reinstall completely.
>
> Regards,
>
> Sascha
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
Not sure what is going on. I uninstalled the entire php, and reinstall it using
FastCGI mode after restart. Now, I open up the hello world script from the
browser, and I get this:
Error Summary
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
I wonder what mode I should use, I use Windows 7, and IIS 7.
Alice
> --------------------------------------------------
> 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
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
--- End Message ---
--- Begin Message ---
Please follow my blog at
http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx
to troubleshoot the installation and if problem persists paste the output you
are getting for each command mentioned in the blog. Also as a side note the
best way to install PHP on IIS is through Microsoft Web Platform Installer as
Richard already pointed out. You can still give it a shot after uninstalling
everything. Details at
http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx.
Thanks,
Don.
-----Original Message-----
From: Alice Wei [mailto:[email protected]]
Sent: Monday, June 07, 2010 10:28 AM
To: [email protected]; [email protected]
Subject: RE: [PHP-WIN] PHP Installation Problem
> Date: Mon, 7 Jun 2010 17:47:31 +0200
> From: [email protected]
> Subject: Re: [PHP-WIN] PHP Installation Problem
> To: [email protected]; [email protected]
>
> Hi Alice,
>
> Alice wrote:
> > I have installed PHP from using PHP
> > 5.2.13 installer [20,929Kb] - 25 February 2010, and for some
> > reason, the PHP folder did not show up on my Windows C:\ folder.
> > ...
>
> when you installed PHP through the installer, did you check "configure IIS"?
> What was the result of the installer? If any errors occurred, you should get
> an error code if anything doesn't work as expected. I would first try to
> rerun the installer, if it gives you a repair option, try this first,
> otherwise uninstall and reinstall completely.
>
> Regards,
>
> Sascha
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
Not sure what is going on. I uninstalled the entire php, and reinstall it using
FastCGI mode after restart. Now, I open up the hello world script from the
browser, and I get this:
Error Summary
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
I wonder what mode I should use, I use Windows 7, and IIS 7.
Alice
> --------------------------------------------------
> 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
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
--- End Message ---
--- Begin Message ---
Sorry, forgot to add one more thing. If you still want to configure PHP on your
own rather than Web Platform Installer doing it, follow the article at
http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/
or http://www.php.net/manual/en/install.windows.iis7.php.
Thanks,
Don.
-----Original Message-----
From: Venkat Raman Don [mailto:[email protected]]
Sent: Monday, June 07, 2010 10:49 AM
To: Alice Wei; [email protected]; [email protected]
Subject: RE: [PHP-WIN] PHP Installation Problem
Please follow my blog at
http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx
to troubleshoot the installation and if problem persists paste the output you
are getting for each command mentioned in the blog. Also as a side note the
best way to install PHP on IIS is through Microsoft Web Platform Installer as
Richard already pointed out. You can still give it a shot after uninstalling
everything. Details at
http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx.
Thanks,
Don.
-----Original Message-----
From: Alice Wei [mailto:[email protected]]
Sent: Monday, June 07, 2010 10:28 AM
To: [email protected]; [email protected]
Subject: RE: [PHP-WIN] PHP Installation Problem
> Date: Mon, 7 Jun 2010 17:47:31 +0200
> From: [email protected]
> Subject: Re: [PHP-WIN] PHP Installation Problem
> To: [email protected]; [email protected]
>
> Hi Alice,
>
> Alice wrote:
> > I have installed PHP from using PHP
> > 5.2.13 installer [20,929Kb] - 25 February 2010, and for some
> > reason, the PHP folder did not show up on my Windows C:\ folder.
> > ...
>
> when you installed PHP through the installer, did you check "configure IIS"?
> What was the result of the installer? If any errors occurred, you should get
> an error code if anything doesn't work as expected. I would first try to
> rerun the installer, if it gives you a repair option, try this first,
> otherwise uninstall and reinstall completely.
>
> Regards,
>
> Sascha
> --
> Freundliche Grüße / Kind regards,
>
> Sascha Meyer
Not sure what is going on. I uninstalled the entire php, and reinstall it using
FastCGI mode after restart. Now, I open up the hello world script from the
browser, and I get this:
Error Summary
HTTP Error 500.0 - Internal Server Error
C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
I wonder what mode I should use, I use Windows 7, and IIS 7.
Alice
> --------------------------------------------------
> 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
_________________________________________________________________
The New Busy is not the old busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> From: [email protected]
> To: [email protected]; [email protected]; [email protected]
> Subject: RE: [PHP-WIN] PHP Installation Problem
> Date: Mon, 7 Jun 2010 17:55:06 +0000
>
> Sorry, forgot to add one more thing. If you still want to configure PHP on
> your own rather than Web Platform Installer doing it, follow the article at
> http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-7/
>
> or http://www.php.net/manual/en/install.windows.iis7.php.
>
> Thanks,
> Don.
>
Thanks, I followed Web Platform Installer, and now it is working!
Alice
> -----Original Message-----
> From: Venkat Raman Don [mailto:[email protected]]
> Sent: Monday, June 07, 2010 10:49 AM
> To: Alice Wei; [email protected]; [email protected]
> Subject: RE: [PHP-WIN] PHP Installation Problem
>
> Please follow my blog at
> http://blogs.iis.net/donraman/archive/2009/11/15/troubleshooting-php-installation-on-windows.aspx
> to troubleshoot the installation and if problem persists paste the output
> you are getting for each command mentioned in the blog. Also as a side note
> the best way to install PHP on IIS is through Microsoft Web Platform
> Installer as Richard already pointed out. You can still give it a shot after
> uninstalling everything. Details at
> http://blogs.iis.net/donraman/archive/2009/10/07/installing-php-on-windows.aspx.
>
> Thanks,
> Don.
>
> -----Original Message-----
> From: Alice Wei [mailto:[email protected]]
> Sent: Monday, June 07, 2010 10:28 AM
> To: [email protected]; [email protected]
> Subject: RE: [PHP-WIN] PHP Installation Problem
>
>
> > Date: Mon, 7 Jun 2010 17:47:31 +0200
> > From: [email protected]
> > Subject: Re: [PHP-WIN] PHP Installation Problem
> > To: [email protected]; [email protected]
> >
> > Hi Alice,
> >
> > Alice wrote:
> > > I have installed PHP from using PHP
> > > 5.2.13 installer [20,929Kb] - 25 February 2010, and for some
> > > reason, the PHP folder did not show up on my Windows C:\ folder.
> > > ...
> >
> > when you installed PHP through the installer, did you check "configure
> > IIS"? What was the result of the installer? If any errors occurred, you
> > should get an error code if anything doesn't work as expected. I would
> > first try to rerun the installer, if it gives you a repair option, try this
> > first, otherwise uninstall and reinstall completely.
> >
> > Regards,
> >
> > Sascha
> > --
> > Freundliche Grüße / Kind regards,
> >
> > Sascha Meyer
>
> Not sure what is going on. I uninstalled the entire php, and reinstall it
> using FastCGI mode after restart. Now, I open up the hello world script from
> the browser, and I get this:
>
>
> Error Summary
> HTTP Error 500.0 - Internal Server Error
> C:\PHP\php-cgi.exe - The FastCGI process exited unexpectedly
>
> I wonder what mode I should use, I use Windows 7, and IIS 7.
>
> Alice
>
> > --------------------------------------------------
> > 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
>
> _________________________________________________________________
> The New Busy is not the old busy. Search, chat and e-mail from your inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_3
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
--- End Message ---
--- Begin Message ---
Can anyone help?
I have a menu item that now nicely can show off all wood species in a
table called "species". The reader can then choose an alphabet to filter down
the amount of data being shown (instead of the whole 6,500 possible records).
All that (and in no small part in thanks to the help I got a while
ago from this group)
works great. The select statement for that is:
$alphaquery = "SELECT * FROM species WHERE species_name LIKE
'".$letter."%' order by species_name";
You can view how nicely this is now working at:
http://www.prowebcanada.com/taxa/alphaspecies.php
You can even pick an alphabet and see that it filters properly.
Now I made a copy of this file and want to limit the woods shown only
to commercial
woods for a new menu choice. In a column called "commercial_wood" in table
'species', I am marking all records of commercial woods in that
column as "Commercial".
Just as in the full viewing choice, I want the user to be able to
filter the volume of records
to view by being able to pick an alphabet so there is a manageable
number of records to
show each time. Most readers from the general public will wish to
look up woods that can be
bought instead of the thousands of obscure species that cannot.
I have tried various optional select statements, even putting
brackets around the two
conditions for the where statement as:
$alphaquery = "SELECT * FROM species
WHERE (species.commercial_wood = 'Commercial')
AND (species_name LIKE '".$letter."%')
order by species_name";
This still half works in the sense that it still does query the
'species' table to find all records
tagged as 'commercial'. I don't get an SQL or PHP error showing.
However, as a user when I
then try to pick an alphabet to filter this further, I get a "page
not found" error appearing. If you
care to try it you can:
http://www.prowebcanada.com/taxa/alphacommercialspecies.php
I am so close yet so far from what I am trying to accomplish. I even
tried to reverse the order
of the two criteria with no success. Can any of you help me know what
statement (or code) I should use that will both list all commercial
woods AND have the alphabetical menu for them
still working?
I am guessing that you should not need all the code from that page
but I will include it here
anyway just in case.
Much appreciation for your help,
Bill Mudry
Mississauga, Ontario
================== PAGE CODE FOLLOWS ===========================
Ignore the code lines commented out. Many have been for tracing and
debugging before.
<?php
//////////////////////////////////////////////////////////////////////////////////////
// File: Alphacommercialspecies.php
// Date last revision: Started June 10, 2010
// Description: Designed to show species marked only as commercial woods.
// Includes alphabetical menu.
//
//
//////////////////////////////////////////////////////////////////////////////////////
echo "<HTML>";
echo "<head>";
echo "<title>TAXA: Commercial Wood Listing</title>";
echo "</head>";
echo "<body>";
//$baseLink = "alphacommercialspecies.php?letter=";
// Assuming your file name is "index.php"; set up the base link for all pages
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");
echo "<table border='3'cellpadding='20' bgcolor='ivory'
align='center'><tr><td valign='top'>";
$letter=="";
// Printing alphabet with links
echo "<h2 align='center'>Commercial Woods</h2>";
echo "<h3 align='center'>Pick Species by Alphabet</h3>";
for($a=65;$a<(65+26);$a++)
{
print "<a href=\"".$baseLink.chr($a)."\">".chr($a)."</a>\n";
}
echo "<br></td></tr></table><br />";
// Now pick up a user chosen alphabet
// ---------------------- Start of display table. ---------------------------
echo "<table border='3'cellpadding='20' bgcolor='ivory' align='center'><tr>";
echo "<td valign='top' style='white-space: nowrap'>";
$letter = $_GET["letter"];
//echo "\$letter on line 27 is - $letter.<BR /> ";
if (isset($_GET["letter"]) && $_GET["letter"] != "")
{
Echo "You picked $letter <br />";
}
else {
Echo "Please choose a letter <br />";
};
//$letter = $_GET["letter"];
//Echo "\$letter is still readable as $letter <br />";
///////////////////////////////////////////////////////////////////////////////////////
// Now that the user has chosen a letter, go get the species starting
with that letter
///////////////////////////////////////////////////////////////////////////////////////
$alphaquery = "SELECT * FROM species
WHERE (species.commercial_wood = 'Commercial')
AND (species_name LIKE '".$letter."%')
order by species_name";
// AND species_name LIKE '".$letter."%'
$result5 = mysql_query($alphaquery)
or die(mysql_error());
//var_dump($result5);
$row=mysql_fetch_array($result5, MYSQL_ASSOC);
//Echo "\$row is - $row<br>\n";
Echo MYSQL_ERROR();
$l=0;
$m=1;
echo "<H4 align='center'>Each link leads to more information on the
chosen botanical species</h4>";
echo "<table border='3'cellpadding='20' bgcolor='ivory' 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))
{
extract ($row5);
$l++; // counter to set maximum columns lengths
//echo "'\$m is - '.$m";
if ($l>100)
{
echo "</td>";
echo "<td valign='top' style='white-space: nowrap'>";
$l=0;
};
$picture_filename1 = trim($picture_filename1);
if ($picture_filename1)
{
echo $showcamera; // the only time it
should show a camera icon
};
echo '<a href="displayspecies.php?&species_name='.$species_name.'
order by species_name">';
echo "$m - $species_name ";
echo"</a>.<br>\n";
$m++; // counter to increment for the next species
}
}
else echo "No species found";
$sciName="";
echo "<br></td></tr></table><br>";
// ---------------------- End of display table. ---------------------------
Echo "<br><hr width='400'>";
echo "<H3 align = 'center'>End of Listing for All Woody Species
starting with $letter</H3>";
$letter="";
$species_name="";
echo "</body>";
echo "</html>";
?>`
--- End Message ---