[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

no communication with database (WAMP, Vista, localhost, oscommerce site)

Asked by jullialynch in Scripting Languages, Web Servers, WebApplications

Tags: database; localhost: wamp;

Local host established with WAMP on Vista home premium, Site is established with Oscommerce base that has many modifications. No errors in mysql logs. Apache logs say "file not found" and list the paths incorrectly.
No errors in database tables.
Site does not appear to be communicating with database.
Example of code that is not working is below in the index.php ("picture_schedule_query_result")
I think it might be related to the path in configure files for includes.
thank you,
Julie
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
<?php
/*
  $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $
 
  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com
 
  Copyright (c) 2003 osCommerce
 
  Released under the GNU General Public License
*/
 
require('includes/application_top.php');
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
 
// the following cPath references come from application_top.php
  $category_depth = 'top';
  if (isset($cPath) && tep_not_null($cPath)) {
    $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
    $cateqories_products = tep_db_fetch_array($categories_products_query);
    if ($cateqories_products['total'] > 0) {
      $category_depth = 'products'; // display products
    } else {
      $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
      $category_parent = tep_db_fetch_array($category_parent_query);
      if ($category_parent['total'] > 0) {
        $category_depth = 'nested'; // navigate through the categories
      } else {
        $category_depth = 'products'; // category has no products, but display the 'no products' message
      }
    }
  }
 
// Header
require(DIR_WS_INCLUDES . '/' . FILENAME_HEADER);
?>
<!-- BODY //-->
<table width="100%" border="0" cellpadding="0" cellspacing="1" summary="visual supports">
                    <tr>
                      <td><table width="100%" border="0" cellpadding="0" cellspacing="0" summary="Picture Schedules">
                          <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Language Images">
                                <tr>
                 				  <td style="width:6px; height:25px; background-image:url(images/left_orange.gif); background-position: left"></td>
                                  <td style="background-image: url(images/bg_orange.gif); background-repeat:repeat-x;"><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="communication boards">
                                      <tr>
                                        <td><img src="images/pic_schdule.gif" alt="Picture Schedules" width="145" height="17" border="0"></td>
                                        <td align="right" class="morelink"> &raquo;
                                          <a href="<? echo tep_href_link(FILENAME_DEFAULT, 'cPath=24')?>" class="morelink">more</a></td>
                                      </tr>
                                    </table></td>
                                  <td style="width:5px; height: 25px; background-image: url(images/right_orange.gif); background-position: right;"></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td class="text">Picture schedules are visual supports for communication that teach new behaviors, preview the steps of  upcoming events, or provide checklists for everyday tasks. These Stillwater Speech picture schedules are suitable for children and adults with receptive language disorders associated with autism, aphasia, cognitive deficits, fetal alcohol syndrome, dementia, and many other neurological disorders. Stillwater Speech visual supports are designed to be used by children and adults of all races and cultures.</td>
                          </tr>
                          <tr>
                            <td height="123"><table width="100%" border="0" cellpadding="0" cellspacing="0" summary="Picture Schedule improve understanding of upcoming events, educational concepts, and provide checklists for everyday events.">
                                <tr>
								<?
									$picture_schedule_query = tep_db_query("select p.products_id, p.products_image, p.products_image_thumbnail, p.products_price, p.products_tax_class_id, pd.products_name from products as p, products_description as pd, products_to_categories as ptoc where p.products_id = ptoc.products_id and p.products_id = pd.products_id and ptoc.categories_id = '24' limit 0, 2");
									$i = 1;
									while($picture_schedule_query_result = tep_db_fetch_array($picture_schedule_query)){
								?>
                                <td width="50%"><table width="100%" border="0" cellpadding="2" cellspacing="0" summary="picture schedule">
                                  <tr>
                                    <td><?php  echo tep_image(DIR_WS_IMAGES . $picture_schedule_query_result['products_image'], $picture_schedule_query_result['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, "class=picture-border"); ?></td>
                                  </tr>
                                  <tr>
                                    <td><table width="100%" border="0" cellpadding="2" cellspacing="2" summary="view or add to cart">
                                      <tr>
                                        <td valign="middle" width="79">
										<div><a href="<? echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $picture_schedule_query_result['products_id']); ?>"><img src="file:///F|/site/images/view.gif" alt="view" width="79" height="22" border="0"></a></div>
										<div style="padding-top:5px;"><a href="<?php echo tep_href_link(FILENAME_CREATE_WIZARD,'pid=' . $picture_schedule_query_result['products_id']).'">'.tep_image(DIR_WS_IMAGES . 'customize.gif').'</A></div></td>';?>
                                        <td class="main" valign="top"><?=$picture_schedule_query_result['products_name']?><br>
											<?=$currencies->display_price($picture_schedule_query_result['products_price'], tep_get_tax_rate($picture_schedule_query_result['products_tax_class_id']))?>										</td>
                                      </tr>
                                    </table></td>
                                  </tr>
                                </table></td>
								 <?
								 	if($i != 3){
								 	}
								 	$i++;
								 	}
								 ?>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td height="6" valign="top"><img src="images/horizontal_divider.gif" alt="divider" width="557" height="1"></td>
                    </tr>
                    <tr>
                      <td><table width="100%" border="0" cellpadding="0" cellspacing="0" summary="Communication Boards give those who cannot speak the ability to participate in family and community life.">
                          <tr>
                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="Language Images">
                                <tr>
                                  <td style="width:6px; height:25px; background-image:url(images/left_grayblu.gif); background-position: left"></td>
                                  <td style="background-image: url(images/bg_grayblue.gif); background-repeat:repeat-x;"><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="communication boards">
                                      <tr>
                                        <td><img src="images/communication_board.gif" alt="Communication Boards" width="178" height="18"></td>
                                        <td align="right" class="morelink"> &raquo;
                                          <a href="<? echo tep_href_link(FILENAME_DEFAULT, 'cPath=21')?>" class="morelink">more</a></td>
                                      </tr>
                                    </table></td>
                                  <td style="width:5px; height: 25px; background-image: url(images/right_corner_grayblue.gif); background-position: right;"></td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr>
                            <td class="text">Communication boards are visual supports for communication that give those who cannot speak the ability to make their desires known and to participate in family and community life. These pre-made Stillwater Speech communication boards are suitable for children and adults with expressive language disorders associated with autism, fragile x syndrome, motor speech disorders, dementia, aphasia, and other neurological disorders. Stillwater Speech images include high quality images that are appropriate for mature users.  </td>
                          </tr>
                          <tr>
                            <td height="123"><table width="100%" border="0" cellspacing="0" cellpadding="0" summary="autism">
                                <tr>
								<?
									$picture_schedule_query = tep_db_query("select p.products_id, p.products_image, p.products_image_thumbnail, p.products_price, p.products_tax_class_id, pd.products_name from products as p, products_description as pd, products_to_categories as ptoc where p.products_id = ptoc.products_id and p.products_id = pd.products_id and ptoc.categories_id = '21' limit 0, 2");
									$i = 1;
	        							while($picture_schedule_query_result = tep_db_fetch_array($picture_schedule_query)){
								?>
                                <td width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="images">
                                  <tr>
                                    <td><?php  echo tep_image(DIR_WS_IMAGES . $picture_schedule_query_result['products_image'], $picture_schedule_query_result['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, "class=picture-border"); ?></td>
                                    </tr>
                                  <tr>
                                    <td><table width="100%" border="0" cellpadding="2" cellspacing="2" summary="view or add to cart">
                                      <tr>
                                        <td width="79" valign="middle">
											<div><a href="<? echo tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $picture_schedule_query_result['products_id']); ?>"><img src="images/view.gif" alt="view" width="79" height="22" border="0"></a></div>
											<div style="padding-top:5px;"><a href="<?php echo tep_href_link(FILENAME_CREATE_WIZARD,'pid=' . $picture_schedule_query_result['products_id']).'">'.tep_image(DIR_WS_IMAGES . 'customize.gif').'</A></div></td>';?>
                                        <td class="main" valign="top"><?=$picture_schedule_query_result['products_name']?><br>
											<?=$currencies->display_price($picture_schedule_query_result['products_price'], tep_get_tax_rate($picture_schedule_query_result['products_tax_class_id']))?>
										</td>
                                      </tr>
                                    </table></td>
                                    </tr>
                                </table></td>
								 <?
								 	if($i != 3){
 
								 	}
								 	$i++;
								 	}
								 ?>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td height="6" valign="top"><img src="images/horizontal_divider.gif" alt="divider" width="557" height="1"></td>
                    </tr>
                  </table>
<!-- body_eof //-->
 
<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
 
Related Solutions
Keywords: no communication with database (WA…
 
Loading Advertisement...
 
[+][-]03/02/09 12:01 PM, ID: 23777593Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/09 12:16 PM, ID: 23777751Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03/02/09 12:44 PM, ID: 23778012Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/09 12:56 PM, ID: 23778107Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03/02/09 01:21 PM, ID: 23778402Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/20/09 01:02 PM, ID: 24435715Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091118-EE-VQP-93 - Hierarchy / EE_QW_3_20080625