Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 132,463 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 1,383 people online right now. Registration is fast and FREE... Join Now!




Warning I Can't Figure Out..

 
Reply to this topicStart new topic

Warning I Can't Figure Out..

DanceInstructor
post 26 Mar, 2005 - 06:32 PM
Post #1


New D.I.C Head

Group Icon
Joined: 18 Mar, 2005
Posts: 41



Dream Kudos: 25
My Contributions


I get this warning:

PHP Warning: Unknown(): Unable to call \b() - function does not exist in Unknown on line 0

I think it is related to classes I am using:

first class:
CODE
<?php

require_once('rw_functions.php');


class rwc_system
{
/*

Some comments...


*/

     var $rwa_settings;
     
     function rwf_get_settings()
     {
           // System variables
           $rwa_settings['site_dir'] = getcwd();
           
           // Database variables
           $rwa_settings['db_host'] = 'localhost';
           $rwa_settings['db_name'] = 'somedb';
           $rwa_settings['db_user'] = 'someuser';
           $rwa_settings['db_pass'] = 'somepass';
           
           return $rwa_settings;
     }
}

?>


second class:
CODE
<?php

require_once('rw_system.php');

class rwc_db_conn extends rwc_system
{
     var $rwv_query;
     var $rwv_link;
     
     function rwc_db_conn()
     {
           // Load settings from the parent class
           $rwa_settings = rwc_system::rwf_get_settings();
           
           // Get the main settings from the array just loaded
           $rwv_db_host = $rwa_settings['db_host'];
           $rwv_db_name = $rwa_settings['db_name'];
           $rwv_db_user = $rwa_settings['db_user'];
           $rwv_db_pass = $rwa_settings['db_pass'];
           
           // Connect to the database
           $this->rwv_link = mysql_connect($rwv_db_host, $rwv_db_user, $rwv_db_pass);
           mysql_select_db($rwv_db_name);
           register_shutdown_function(array(&$this, 'close'));
     }
     
     function rwf_db_query($query)
     {
           $this->rwv_query = $query;
           return mysql_query($query, $this->rwv_link);
     }
     
     function rwf_db_fetch_array($result)
     {
           return mysql_fetch_array($result);
     }
     
     function rwf_db_fetch_row($result)
     {
           return mysql_fetch_row($result);
     }
     
     function rwf_db_close()
     {
           mysql_close($this->rwv_link);
     }
}

?>


Its hard for me to understand how to debug on line 0 crazy.gif

Thanks in advance for any help.
User is offlineProfile CardPM

Go to the top of the page

Endo
post 26 Mar, 2005 - 08:13 PM
Post #2


New D.I.C Head

*
Joined: 26 Mar, 2005
Posts: 2


My Contributions


Only possible answer to this i can think of is that your php installation is wrong, or you are trying to use the wrong version. Try uninstalling apache\mysql\php, and retrying. You could always try a simple EasyPHP type program to help you find if thats the cuase, but you dont have to stick with it.

Hope that helps!
Regards.
User is offlineProfile CardPM

Go to the top of the page

DanceInstructor
post 26 Mar, 2005 - 09:29 PM
Post #3


New D.I.C Head

Group Icon
Joined: 18 Mar, 2005
Posts: 41



Dream Kudos: 25
My Contributions


I get the same warning on a linux system and a windows system. The linux system is with a professional webhost...
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 01:22PM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month