phpScheduleIt
May 22, 2013, 11:21:03 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: phpScheduleIt 2.4.2 has been released!
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: DB create error  (Read 9571 times)
jgillett
Newbie
*

Karma: 0
Posts: 1


« on: March 30, 2006, 12:49:33 PM »

I get all the way to the end of the table create list, and then this...

Creating database user...Failed: DB Error: syntax error

Error connecting to database: DB Error: connect failed

Yes, that's pretty left-field, but any thoughts appreciated.

Thanks.
Logged

ohn
ASU West
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #1 on: March 30, 2006, 01:11:46 PM »

What kind of database is this?
Logged
Anonymous
Guest
« Reply #2 on: April 06, 2006, 07:08:08 PM »

mySQL.
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #3 on: April 07, 2006, 10:05:41 AM »

That's weird, I've never seen this error before.  What version of MySQL?

I would try following the manual install instructions (if you are installing on a local server) or the remote host install instructions if on a hosted server, or using a tool like phpMyAdmin.  That may solve this issue.
Logged
Kitty Carlyle
Newbie
*

Karma: 0
Posts: 9


« Reply #4 on: June 12, 2006, 11:23:57 AM »

Ok this is a little simular to my problem but also more involved.   I am a newbie to php and MySQL.  I have to have phpScheduleIt up and running on a Windows XP for my job.  Originally the whole thing crashed before I work on it.  So I deleted the old phpScheduleIt (version 1.1.0) along with the old server that supported it
 (WAMP with Apache 1.0.x, MySQL 4.02, php 3.x, phpMyAdmin 2.61, and MySQLite 0.9.x)

 NOW I downloaded and installed the new WAMP5 with the lated updated versions of php5, phpMyAdmin 2.8.1, MySQLite 1.2.0, and MySQL 5. Then I installed phpScheduleIt 1.1.3 just because I wanted something that is more stable.  I installation took a little work with the code (because of where the files are located). It seems like phpScheduleIt would work BUT I only get the login and the registraion page to operate BUT for any other page I get this error on the top of the screen

There was an error executing your query:
DB Error: no such table
Back

phpScheduleIt v1.1.3  

I used my Administator username and password to enter in the database.  But what is odd is that I created the tables in phpMyAdmin and that gives me access to the tables but I can only edit the tables there and who can use them and edit them.  So my question is... HOW CAN I CREATE THESE TABLES ON THE WEB ?  Because according to MySQL the tables and indexes have aready been created but why wouldn't phpScheduleIt display them.  

I even tried changing the error messages in the DBEngine.class.php file so that it would make a different error message that tells the location for each function in that class.  Granted I know that there are subclasses that depend on DBEngine.class for the same function but I don't see it coming up.  Here's what I wrote for the check_error function.

//------------------------------------------------------------------------------------------------------------
function check_for_error($result) {//-----------------------------------------------The part I changed
        if (DB::isError($result))//                                                                      VVVVV 06/12/06 VVVVV
            CmnFns::do_error_box(translate('There was an error executing your query (at god knows where)') . '<br />'
                . $result->getMessage()
                . '<br />' . '<a href="javascript: history.back();">' . translate('Back') . '</a>');
        return false;
    }
///-------------------------------------------------------------------------------------------------------------

WHAT CAN I DO?Huh :shock:
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #5 on: June 12, 2006, 11:56:59 AM »

From here, I would create a file called test.php which contains just this:  
 
Code:
<?php  
$link 
mysql_connect&#40;'localhost', 'schedule_user', 'password'&#41;;  
if &#40;!$link&#41; &#123;  
die&#40;'Could not connect&#58; ' . mysql_error&#40;&#41;&#41;;  
&#125;  
echo 'Connected successfully';  
 
$db_selected mysql_select_db&#40;'phpScheduleIt', $link&#41;;  
if &#40;!$db_selected&#41; &#123;  
die &#40;'Can\'t use phpscheduleit &#58; ' . mysql_error&#40;&#41;&#41;;  
&#125;  
echo 'Selected DB';  
mysql_close&#40;$link&#41;;  
?>
 

 
You may need to change 'schedule_user' to whatever user that was set up to access the DB, 'password' to whatever password you assigned that user, and 'phpScheduleIt' to the name of the DB you set up.
 
Put the file in the phpScheduleIt directory and open that in a browser. If that works, then it is likely just a configuration issue. If not, it should print out a more helpful message.
Logged
Kitty Carlyle
Newbie
*

Karma: 0
Posts: 9


« Reply #6 on: June 12, 2006, 12:31:51 PM »

Thank you very much for the tip and the test.php code. But if the problem is not the configuration, then what else could contribute to this error?

PS
when I tried my error edited code, all it gives me is this

?
DB Error: no such table
Back

and that's just from adding a space in the original message

Original:  There was an error executing your query --> result is the above error message
Edited: There  was an error executing your query --> result is the '?'

How come?
Logged
Kitty Carlyle
Newbie
*

Karma: 0
Posts: 9


« Reply #7 on: June 12, 2006, 01:18:27 PM »

I FOUND IT!!! by just creating the two error functions, I went through one by one which function was failing.  The error message is coming from the userExsists function from AuthDB.class.php file.  But I don't know why, is it because it doesn't reconize my user name? or is it returning a NULL string?
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #8 on: June 12, 2006, 01:31:18 PM »

If you're getting a "No such table" error message then this isn't data related.  Are your table names prefixed with some value?
Logged
Kitty Carlyle
Newbie
*

Karma: 0
Posts: 9


« Reply #9 on: June 12, 2006, 01:35:16 PM »

Yes they are

// Prefix to attach to all table names [phpsched_]
$conf['db']['tbl_prefix'] = 'phpsched_';

and this is from the config.php file
Logged
Nick
Administrator
Hero Member
*****

Karma: 15
Posts: 5419


WWW
« Reply #10 on: June 12, 2006, 02:01:56 PM »

But are your actual tables prefixed in the DB?  I would try removing that prefix from the config file, that may be causing your issue.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!