Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error on event_win.php


DieterR

Recommended Posts

Posted

Hi guys,

 

I need help in getting this solved asap. If someone can help me out, It's a paid project. PM me, please.

 

I know nothing of OsCommerce and on a clients website i'm getting this error:

 

Warning: mysql_query() [function.mysql-query]: Access denied for user 'something'@'localhost' (using password: NO) in /home/something/public_html/event_win.php on line 16

 

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/something/public_html/event_win.php on line 16

 

Fatal error: Call to undefined function tep_db_fetch_array() in /home/something/public_html/event_win.php on line 22

 

As I said, if someone is interested, PM me for more details please.

Posted

Hi guys,

 

Warning: mysql_query() [function.mysql-query]: Access denied for user 'something'@'localhost' (using password: NO) in /home/something/public_html/event_win.php on line 16

 

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/something/public_html/event_win.php on line 16

 

Fatal error: Call to undefined function tep_db_fetch_array() in /home/something/public_html/event_win.php on line 22

 

I do not recognize event_win.php as an osC file. Perhaps some add on? Maybe someone else that knows that add on will show up soon. In the mean time I would analyze that file to see what it does.

Community Bootstrap Edition, Edge

 

Avoid the most asked question. See How to Secure My Site and How do I...?

Posted

Dieter,

 

If event_win.php is an oscommerce file or from a contribution it should look to the configure.php file for access information to the database and NOT require that information included in that specific file.

 

Could you post the contents of the file for us ?

 

 

 

Chris

Posted

Hey guys thanks so much for your quick replies :)

 

I have no clue has if the event_win.php file is an oscommerce file or not. This was made by a programmer a few years ago and the company lost track of him.

 

Here's the code of event_win.php file as Chris asked:

 

<?php
//require('includes/application_top.php');
?>
<!-- <link rel = "stylesheet" type = "text/css" href = "stylesheet.css"> -->

<?php



$event_query_raw="select p.products_id, p.products_image,p2c.categories_id, pd.products_name, pd.event_day, pd.event_hour, pd.event_place,p.products_date_from from "
                           . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION
                           . " pd on p.products_id = pd.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, "
                           . TABLE_CATEGORIES
                           . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id  and p.products_status = '1' order by p.products_date_from asc LIMIT 3";

$event_data = mysql_query($event_query_raw);

?>

<?php 

while ($e_row=tep_db_fetch_array($event_data))
                               {
                       ?>
       <table border = "0" width = "246px" cellspacing = "0" cellpadding = "0"> 
                       <!-- Dias modificação para tabela -------------------------------------------------->

           <td valign = "top" class = "main">
               <?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO,'products_id='. $e_row['products_id']) .'" class="' . escolha_cor($e_row['categories_id'])
       . '"><b>• ' . $e_row['products_name'] . '</b></a>';?>
           </td>
           </tr><tr>
               <td align="left"><a class="normal"><?php echo $e_row['event_day'] ;?> </a></td>
           </tr><tr>
               <td align="left"><a class="normal"><?php echo $e_row['event_hour'] ;?> </a></td>
           </tr><tr>
               <td align="left"><a class="normal" ><?php echo $e_row['event_place']; ?></a></td>
           </tr><tr>
                   <td align="left" ><img src="images/spacer.gif" width="8" height="8" /></td>
            </tr>
               <!--            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                 <tr>
                   <td align="left" ><img src="images/spacer.gif" width="8" height="8" /></td>
                 </tr>
                 <tr>
                   <td align="left" ><img src="images/home/linha_divisoria_eventos.gif" width="251" height="1" /></td>
                 </tr>
                 <tr>
                   <td align="left" ><img src="images/spacer.gif" width="8" height="8" /></td>
                 </tr>
           </table>-->
       </table>    



<?php
   }
?>

 

 

It also calls up an application_top.php file on the includes folder. I can give you that code if you find it necessary.

 

Thanks again guys!

Posted

Here's the configure.php:

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 //define('HTTP_SERVER', 'http://ipaddress/~username'); // eg, http://localhost - should not be empty for productive servers
 define('HTTP_SERVER', 'http://www.website.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', '');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/ccolgaca/public_html/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'username');
 define('DB_SERVER_PASSWORD', 'password');
 define('DB_DATABASE', 'username_main');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

Should the line:

define('HTTPS_SERVER', '');

be empty?

 

I've masked the ip address, database name and username/password for privacy reasons.

 

Thanks in advance to all that can help me out ;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...