ltwCalendar
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsProjectsltwCalendar

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old June 28th, 2004, 09:08 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
Newbie Install Problems

Got a Problem while installing the ltw_calendar available from this site:

____
ltwCalendar Installer (v4.0)
Error: Connection to MySQL server localhost failed.
Error: Connection to MySQL server localhost failed.
Error: Connection to MySQL server localhost failed.
Getting a list of tables from the database.

Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/newschaefers/www/www/private/ltw_classes.php on line 624
Error: A problem was encountered while executing this query.
$query

--------------------------------------------------------------------------------
show tables
Error: Fatal db Error.

___
Now i am new to php but i don't get it here is the lines it has trouble with:

php Code:
Original - php Code
  1.  
  2. function db_query($query = ''){
  3.     switch( $this->db_type ){
  4.     case 1: //mySql
  5.         $result = mysql_query($query, $this->dbh);
  6.         if ( !$result ){
  7.             echo "
  8.             Error: A problem was encountered while executing this query.<br>
  9.               $query<BR><HR>$query<br>
  10.             ";
  11.               die ("Error: Fatal db Error.<br>n");
  12.             }
  13.         break;
  14.     }// end switch 
  15.     return $result;
  16. }// end function.db_query()
  17.  


The first line i posted was 621 so maybe you guys understand.

Reply With Quote
  #2  
Old June 29th, 2004, 08:25 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Newbie Install Problems

Mibble, Thanks for the reply however i do not see where these variables are defined,

Here is the first section of code wher this information should be contained:

php Code:
Original - php Code
  1.  
  2. <?php
  3. ////////////////////////////////////////////////////////////////////////////
  4. // ltw_config.php
  5. // $Id: ltw_install.php,v 1.11 2003/08/16 13:09:25 t51admin Exp $
  6. //
  7. // ltwCalendar Installer
  8. ////////////////////////////////////////////////////////////////////////////
  9. // needed files
  10. require_once('./private/ltw_config.php');   
  11. require_once($ltw_config['include_dir'].'/ltw_classes.php');
  12.  
  13. //the following lines are added for backwards compatibility for pre 4.1.0 PHP versions..
  14. if ( !isset($_POST)     ) $_POST = $HTTP_POST_VARS;
  15. if ( !isset($_REQUEST)) $_REQUEST = $HTTP_GET_VARS;
  16. //end backward compatibility
  17.  
  18. // page header
  19. <html>
  20. <head><title>ltwCalendar (4.0) Installer</title></head>
  21. <body>
  22. <b>ltwCalendar Installer (v4.0)</b><br>
  23. ";
  24.  
  25. // if no command passed, welcome
  26. if ( empty($_REQUEST['command']) ){
  27.     echo "
  28.     This script will install a new ltwCalendar database if one is not defined,<br>
  29.     or upgrade an existing V2.x or 3.x database to work with version 4.0.<br><br>
  30.     <b>Before running this process</b><br>
  31.     It is <b><i>highly recommended</b></i> you back up your existing database structure and contents.<br>
  32.     The script will alter existing tables to add columns needed for v4.0 to work properly.<br><br>
  33.     <A href="".$_SERVER['PHP_SELF']."?command=install">Click to continue</A>
  34.     ";
  35.     return;
  36. }
  37.  
  38. // check for needed config parameters
  39. $errors = '';
  40. if ( empty($ltw_config['db_type'])   ) $errors .= "Missing 'db_type' parameter in ltw_config.php<br>";
  41. if ( empty($ltw_config['db_server']) ) $errors .= "Missing 'db_server' parameter in ltw_config.php<br>";
  42. if ( empty($ltw_config['db_user'])   ) $errors .= "Missing 'db_user' parameter in ltw_config.php<br>";
  43. if ( empty($ltw_config['db_pass'])   ) $errors .= "Missing 'db_pass' parameter in ltw_config.php<br>";
  44. if ( empty($ltw_config['db_name'])   ) $errors .= "Missing 'db_name' parameter in ltw_config.php<br>";
  45. if ( empty($ltw_config['db_server']) ) $errors .= "Missing 'db_server' parameter in ltw_config.php<br>";
  46.  
  47. if ( empty($ltw_config['db_table_users'])   ) $errors .= "Missing 'db_table_users' parameter in ltw_config.php<br>";
  48. if ( empty($ltw_config['db_table_calendar'])) $errors .= "Missing 'db_table_calendar' parameter in ltw_config.php<br>";
  49. if ( empty($ltw_config['db_table_category'])) $errors .= "Missing 'db_table_category' parameter in ltw_config.php<br>";
  50. if ( empty($ltw_config['db_table_log'])     ) $errors .= "Missing 'db_table_log' parameter in ltw_config.php<br>";
  51. if ( !empty($errors) ) die($errors);
  52.  
  53. // I need my objects now
  54. $db   = new ltwDb;
  55. $auth = new ltwAuth;
  56. $user = new ltwUser;
  57.  
  58. $showForm = 0;
  59. $errors   = '';
  60. $rstr     = '';
  61.  
  62. // If Submit was pressed, then we are going to
  63. // create the user account in the db
  64. if ( $_REQUEST['command'] == 'user' ){
  65.     if ( empty($_POST['Submit']) ){
  66.         $showForm = 1;
  67.     }else{
  68.         if (  empty($_POST['uname'])    ){
  69.             $errors .= "Missing username<br>";
  70.         }else{
  71.             if ( $user->findByName($_POST['uname']) ){
  72.                 $errors = "Username <b>".$_POST['uname']."</b> already exists.<br>";
  73.             }else{
  74.                 $rstr = $auth->isPasswordValid($_POST['uname'],'',$_POST['pword'], $_POST['pwa']);
  75.                 if ( !empty($rstr) ) $errors .= $rstr;
  76.             }
  77.  
  78.             // show the form if any errors!
  79.             if ( !empty($errors) ){
  80.                 $showForm = 1;
  81.             }else{
  82.                 $user->username    = $_POST['uname'];
  83.                 $user->password     = crypt($_POST['pword'],$ltw_config['salt']);
  84.                 $user->email       = $_POST['email'];
  85.                 $user->status       = 0;
  86.                 $user->privledges   = UPADMIN;
  87.                 $user->bad_logins   = 0;
  88.                 $user->last_pw_change   = date("Y-m-d H:I:s");
  89.                 $user->create();
  90.                 


Thank you very much for your help I am used to using flash and scripting everything with vb, but the customer wanted the calender he saw on another site.

Reply With Quote
  #3  
Old June 30th, 2004, 01:23 AM
System System is offline
Codewalkers Novice (500 - 999 posts)
 
Join Date: Apr 2007
Posts: 665 System User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Message Moved

Thread moved from 'PHP Coding' to 'ltwCalendar' by sliver.

Reason: ltw Calendar question

Reply With Quote
Reply

Viewing: Codewalkers ForumsProjectsltwCalendar > Newbie Install Problems


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway