Re: [PHP-DB] Fwd: PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE 2.0.63 + Windows XP SP2)

2008-05-15 Thread Jeff88

I had done all that but not working either. Perhaps, I should described in
details of what I had done so that you guys and gals can figure out for me
where I had gone wrong.

a. Installed APACHE 2.0.63 using downloaded file
apache-2.0.63-win32-x86-no_ssl.msi under c:\webserver\apache group
directory. Tested with localhost on the browser and able to see the Apache
test page.

b. Installed PHP 5.2.6 using downloaded file php-5.2.6-win32 zip package
under Windows Binaries section and extracted the files under PHP directory
c:\webserver\php

c. Configured PHP.ini file by copying php.ini-recommended as php.ini and
setting the followings:
i. display_errors = On
ii. log_errors = On
iii. doc_root = c:\WebServer\Apache Group\Apache2\htdocs 
iv. extension_dir = C:\WebServer\PHP\ext

d. Did php -v on command prompt and some PHP and Zend Engine version
displayed.

e. Configured httpd.conf file with the following settings:
i. LoadModule php5_module  c:/Webserver/php/php5apache2.dll
ii. AddType application/x-httpd-php .php
iii. PHPIniDir c:/WebServer/PHP/
iv. DirectoryIndex  index.html  index.php  index.html.var

f. Able to see PHP and APACHE info displayed when did a phpinfo(). Upto this
stage, PHP and APACHE are talking

g. Installed MYSQL 5.0.51b using downloaded file Windows ZIP/Setup.EXE
(x86) package under directory c:\Webserver\MYSQL5 and tested with the
command mysql -u root -p.

h. Tried to configure PHP.ini file to talk to MYSQL where I am stuck! HELP!!
i. uncommented extension=php_mysql.dll
ii Restarted everything but not working, so I tried to be a hero by
copying libmysql.dll from MYSQLdirectory to the PHP directory, restarted
everything but not working either. When I did a phpinfo() no mysql info
displayed, only the php and apache info can be seen.

That's the end of my long story. Hope you guys and gals can figure things
for me. 



Isaak Malik-3 wrote:
 
 -- Forwarded message --
 From: Isaak Malik [EMAIL PROTECTED]
 Date: Wed, May 14, 2008 at 4:07 PM
 Subject: Re: [PHP-DB] PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE 2.0.63
 +
 Windows XP SP2)
 To: Jeff88 [EMAIL PROTECTED]
 
 
 Make sure that you have httpd.conf correctly configured to load the
 php.ini
 configuration.
 Your httpd.conf should also contain the PHPIniDir setting.
 
 If this doesn't solve your problem then copy PHP's libmysql.dll to the
 bin
 directory of Your Apache installation.
 
 
 On Wed, May 14, 2008 at 10:32 AM, Jeff88 [EMAIL PROTECTED] wrote:
 


 jeff88 wrote:
 
  chris smith-9 wrote:
 Did you restart apache?
 
 Stupid question I know but best to check.
 
 Any errors in the apache logs?
 
 Did you edit the right php.ini file? Look at the phpinfo() page and see
 which file it's loading from.
 
  ---
 
  I did restart the Apache and even the pc. I edited the right php.ini
 file
  as this is the one and only one file residing in my system. phpinfo()
 also
  shows the right path where it should read from.
 
 
 --
 View this message in context:
 http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17226151.html
 Sent from the Php - Database mailing list archive at Nabble.com.


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

 --
 Isaak Malik
 Web Developer
 
 
 
 -- 
 Isaak Malik
 Web Developer
 
 

-- 
View this message in context: 
http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17247865.html
Sent from the Php - Database mailing list archive at Nabble.com.


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



Re: [PHP-DB] Fwd: PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE 2.0.63 + Windows XP SP2)

2008-05-15 Thread Isaak Malik
Did you copy PHP's libmysql.dll to the Apache bin directory, restart
Apache and tried again?

Also add this to your httpd.conf file:
Loadfile C:/php/php5ts.dll

On Thu, May 15, 2008 at 9:48 AM, Jeff88 [EMAIL PROTECTED] wrote:


 I had done all that but not working either. Perhaps, I should described in
 details of what I had done so that you guys and gals can figure out for me
 where I had gone wrong.

 a. Installed APACHE 2.0.63 using downloaded file
 apache-2.0.63-win32-x86-no_ssl.msi under c:\webserver\apache group
 directory. Tested with localhost on the browser and able to see the
 Apache
 test page.

 b. Installed PHP 5.2.6 using downloaded file php-5.2.6-win32 zip package
 under Windows Binaries section and extracted the files under PHP directory
 c:\webserver\php

 c. Configured PHP.ini file by copying php.ini-recommended as php.ini and
 setting the followings:
i. display_errors = On
ii. log_errors = On
iii. doc_root = c:\WebServer\Apache Group\Apache2\htdocs
iv. extension_dir = C:\WebServer\PHP\ext

 d. Did php -v on command prompt and some PHP and Zend Engine version
 displayed.

 e. Configured httpd.conf file with the following settings:
i. LoadModule php5_module  c:/Webserver/php/php5apache2.dll
ii. AddType application/x-httpd-php .php
iii. PHPIniDir c:/WebServer/PHP/
iv. DirectoryIndex  index.html  index.php  index.html.var

 f. Able to see PHP and APACHE info displayed when did a phpinfo(). Upto
 this
 stage, PHP and APACHE are talking

 g. Installed MYSQL 5.0.51b using downloaded file Windows ZIP/Setup.EXE
 (x86) package under directory c:\Webserver\MYSQL5 and tested with the
 command mysql -u root -p.

 h. Tried to configure PHP.ini file to talk to MYSQL where I am stuck!
 HELP!!
 i. uncommented extension=php_mysql.dll
 ii Restarted everything but not working, so I tried to be a hero by
 copying libmysql.dll from MYSQLdirectory to the PHP directory,
 restarted
 everything but not working either. When I did a phpinfo() no mysql info
 displayed, only the php and apache info can be seen.

 That's the end of my long story. Hope you guys and gals can figure things
 for me.



 Isaak Malik-3 wrote:
 
  -- Forwarded message --
  From: Isaak Malik [EMAIL PROTECTED]
  Date: Wed, May 14, 2008 at 4:07 PM
  Subject: Re: [PHP-DB] PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE
 2.0.63
  +
  Windows XP SP2)
  To: Jeff88 [EMAIL PROTECTED]
 
 
  Make sure that you have httpd.conf correctly configured to load the
  php.ini
  configuration.
  Your httpd.conf should also contain the PHPIniDir setting.
 
  If this doesn't solve your problem then copy PHP's libmysql.dll to the
  bin
  directory of Your Apache installation.
 
 
  On Wed, May 14, 2008 at 10:32 AM, Jeff88 [EMAIL PROTECTED] wrote:
 
 
 
  jeff88 wrote:
  
   chris smith-9 wrote:
  Did you restart apache?
  
  Stupid question I know but best to check.
  
  Any errors in the apache logs?
  
  Did you edit the right php.ini file? Look at the phpinfo() page and
 see
  which file it's loading from.
  
   ---
  
   I did restart the Apache and even the pc. I edited the right php.ini
  file
   as this is the one and only one file residing in my system. phpinfo()
  also
   shows the right path where it should read from.
  
  
  --
  View this message in context:
 
 http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17226151.html
  Sent from the Php - Database mailing list archive at Nabble.com.
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Isaak Malik
  Web Developer
 
 
 
  --
  Isaak Malik
  Web Developer
 
 

 --
 View this message in context:
 http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17247865.html
 Sent from the Php - Database mailing list archive at Nabble.com.


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

 --
Isaak Malik
Web Developer


[PHP-DB] Re: Shopping cart shipping logic

2008-05-15 Thread Ron Piggott
I have figured it out.  When I first started I was trying to do too much
in one command; when I broke it down into sections I figured it out. Ron
Ron

On Wed, 2008-05-14 at 23:17 -0400, Ron Piggott wrote:
 I have just made a change that I realize is going to be necessary for
 the shipping logic queries.  I have added packaging_type int(1) into
 the table.  Value 1 is for poster tubes; Value 2 is for all other
 
 shopping_cart_packaging_options:
 
 reference int(2)
 packaging_name varchar(50)
 packaging_type int(1)
 packaging_image_filename varchar(40)
 package_length decimal(3,1)
 package_width decimal(3,1)
 package_height decimal(3,1)
 packaging_cost_to_ship_canada decimal(3,2)
 packaging_cost_to_ship_us decimal(3,2)
 packaging_cost_to_ship_international decimal(3,2)
 
 On Wed, 2008-05-14 at 23:12 -0400, Ron Piggott wrote:
  I need help writing a mySQL query and syntax that will determine the
  shipping packing selected and will then determine the cost to ship.  I
  have assigned dollar values to various packaging.  I have a designed the
  following table which contains various packaging, the maximum size (in
  centimeters) that packaging may contain and the cost to ship within
  Canada, US or international:
  
  shopping_cart_packaging_options:
  
  reference int(2)
  packaging_name varchar(50)
  packaging_image_filename varchar(40)
  package_length decimal(3,1)
  package_width decimal(3,1)
  package_height decimal(3,1)
  packaging_cost_to_ship_canada decimal(3,2)
  packaging_cost_to_ship_us decimal(3,2)
  packaging_cost_to_ship_international decimal(3,2)
  
  When I input a product I have been recording it's dimensions into this
  table:
  
  shopping_cart_product:
  
  reference int(5)
  category_reference int(3)
  product_name varchar(50)
  product_description longtext
  product_length decimal(3,1)
  product_width decimal(3,1)
  product_height decimal(3,1)
  supplier_reference int(3)
  sku varchar(12)
  reorder_alert int(5)
  discontinued int(1)
  
  The following code is from my check out script.  It displays the
  products being purchased at check out, quantity ordered and pricing.  It
  also creates the order record in the shopping_cart_orders table.  I am
  hoping some code could be added in here to figure out shipping costs
  based on product dimensions and the dimensions of the available
  packaging.  I haven't been able to figure out how to compare the total
  dimensions of the products with the available packaging.  There are (2)
  types of packaging:  Tubes for posters (The poster category has a
  category_reference of 2) and envelopes / boxes for everything else.
  Perhaps a split shipment needs to take place if someone orders a poster
  and something else that needs to ship in an envelope.  I want the logic
  behind this to optimize packaging shipping and handling costs and for
  the order created to indicate to me which type of packaging I should use
  that will hold all items ordered.
  
  Thanks for helping me.  Ron
  
  
  mysql_connect('localhost',$username,$password);
  @mysql_select_db($database) or die( Unable to select database);
  $query=SELECT * FROM ( shopping_cart_category INNER JOIN
  shopping_cart_product ON shopping_cart_category.reference =
  shopping_cart_product.category_reference ) INNER JOIN
  shopping_cart_product_image ON
  shopping_cart_product_image.product_reference =
  shopping_cart_product.reference INNER JOIN shopping_cart_inventory ON
  shopping_cart_inventory.product_reference =
  shopping_cart_product.reference WHERE
  shopping_cart_product_image.primary_image =1 ORDER BY product_name ASC;
  $product_result=mysql_query($query);
  $number_of_products=mysql_numrows($product_result);
  mysql_close();
  
  echo uToday's Order Is For:/up\r\n;
  echo ul\r\n;
  
  echo table border=\1\\r\n;
  
  echo trtd width=\225\font face=\times new roman
  \centeruProduct Name/u/center/td\r\n;
  echo td width=\100\font face=\times new roman\centeruUnit
  Price/u/center/td\r\n;
  echo td width=\125\font face=\times new roman
  \centeruQuantity Ordered/u/center/td\r\n;
  echo td width=\100\font face=\times new roman
  \centeruTotal/u/center/td/tr\r\n;
  
  $product_cost_total = 0;
  $i=0;
  while ($i  $number_of_products) {
  
  $product_reference = mysql_result($product_result,
  $i,shopping_cart_product.reference);
  $product_name = mysql_result($product_result,
  $i,shopping_cart_product.product_name);
  $quantity = $_SESSION['selection'][$product_reference];
  $cost_of_product = mysql_result($product_result,
  $i,shopping_cart_inventory.selling_price);
  
  if ( $_SESSION['selection'][$product_reference]  0 ) {
  
  echo trtd width=\225\font face=\times new roman\centera
  href=\ . $path_to_shopping_cart . product/ .
  stripslashes($product_reference) . /\ .
  stripslashes($product_name) . /a/center/td\r\n;
  echo td width=\100\font face=\times new roman\center$ .
  $cost_of_product . /center/td\r\n;
  echo td width=\125\font face=\times new roman\center .
  $quantity . 

Re: [PHP-DB] Fwd: PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE 2.0.63 + Windows XP SP2)

2008-05-15 Thread Jeff88

Had tried that just now, but not working.


Isaak Malik-3 wrote:
 
 Did you copy PHP's libmysql.dll to the Apache bin directory, restart
 Apache and tried again?
 
 Also add this to your httpd.conf file:
 Loadfile C:/php/php5ts.dll
 
 On Thu, May 15, 2008 at 9:48 AM, Jeff88 [EMAIL PROTECTED] wrote:
 

 I had done all that but not working either. Perhaps, I should described
 in
 details of what I had done so that you guys and gals can figure out for
 me
 where I had gone wrong.

 a. Installed APACHE 2.0.63 using downloaded file
 apache-2.0.63-win32-x86-no_ssl.msi under c:\webserver\apache group
 directory. Tested with localhost on the browser and able to see the
 Apache
 test page.

 b. Installed PHP 5.2.6 using downloaded file php-5.2.6-win32 zip
 package
 under Windows Binaries section and extracted the files under PHP
 directory
 c:\webserver\php

 c. Configured PHP.ini file by copying php.ini-recommended as php.ini and
 setting the followings:
i. display_errors = On
ii. log_errors = On
iii. doc_root = c:\WebServer\Apache Group\Apache2\htdocs
iv. extension_dir = C:\WebServer\PHP\ext

 d. Did php -v on command prompt and some PHP and Zend Engine version
 displayed.

 e. Configured httpd.conf file with the following settings:
i. LoadModule php5_module  c:/Webserver/php/php5apache2.dll
ii. AddType application/x-httpd-php .php
iii. PHPIniDir c:/WebServer/PHP/
iv. DirectoryIndex  index.html  index.php  index.html.var

 f. Able to see PHP and APACHE info displayed when did a phpinfo(). Upto
 this
 stage, PHP and APACHE are talking

 g. Installed MYSQL 5.0.51b using downloaded file Windows ZIP/Setup.EXE
 (x86) package under directory c:\Webserver\MYSQL5 and tested with the
 command mysql -u root -p.

 h. Tried to configure PHP.ini file to talk to MYSQL where I am stuck!
 HELP!!
 i. uncommented extension=php_mysql.dll
 ii Restarted everything but not working, so I tried to be a hero by
 copying libmysql.dll from MYSQLdirectory to the PHP directory,
 restarted
 everything but not working either. When I did a phpinfo() no mysql info
 displayed, only the php and apache info can be seen.

 That's the end of my long story. Hope you guys and gals can figure things
 for me.



 Isaak Malik-3 wrote:
 
  -- Forwarded message --
  From: Isaak Malik [EMAIL PROTECTED]
  Date: Wed, May 14, 2008 at 4:07 PM
  Subject: Re: [PHP-DB] PHP 5.2.6 integrating MYSQL 5.0.51b on APACHE
 2.0.63
  +
  Windows XP SP2)
  To: Jeff88 [EMAIL PROTECTED]
 
 
  Make sure that you have httpd.conf correctly configured to load the
  php.ini
  configuration.
  Your httpd.conf should also contain the PHPIniDir setting.
 
  If this doesn't solve your problem then copy PHP's libmysql.dll to the
  bin
  directory of Your Apache installation.
 
 
  On Wed, May 14, 2008 at 10:32 AM, Jeff88 [EMAIL PROTECTED] wrote:
 
 
 
  jeff88 wrote:
  
   chris smith-9 wrote:
  Did you restart apache?
  
  Stupid question I know but best to check.
  
  Any errors in the apache logs?
  
  Did you edit the right php.ini file? Look at the phpinfo() page and
 see
  which file it's loading from.
  
   ---
  
   I did restart the Apache and even the pc. I edited the right php.ini
  file
   as this is the one and only one file residing in my system.
 phpinfo()
  also
   shows the right path where it should read from.
  
  
  --
  View this message in context:
 
 http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17226151.html
  Sent from the Php - Database mailing list archive at Nabble.com.
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
  --
  Isaak Malik
  Web Developer
 
 
 
  --
  Isaak Malik
  Web Developer
 
 

 --
 View this message in context:
 http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17247865.html
 Sent from the Php - Database mailing list archive at Nabble.com.


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

 --
 Isaak Malik
 Web Developer
 
 

-- 
View this message in context: 
http://www.nabble.com/PHP-5.2.6-integrating-MYSQL-5.0.51b-on-APACHE-2.0.63-%2B-Windows-XP-SP2%29-tp17201936p17265994.html
Sent from the Php - Database mailing list archive at Nabble.com.


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