![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 28.06.2007 Ostrzeżenie: (0%) ![]() ![]() |
Witam
Mam Problem z instalacją chata PHPCHATNVID-99b. Instaluję go lokalnie, mam zainstalowanego Apacha, PHP i MySQL (inne skrypty działają). Tak więc mimo "jak sądzę" poprawnej instalacji po wejściu na stronę chata wywala mi błąd: You don't read the INSTALL instructions! Use the PHPOpenChat-Installer to install and configure your chat. "; exit; } Error_Reporting(7); /* * Open a database connection * The following include returns a database handle */ include ("includes/connect_db_inc.php"); $db_handle=connect_db($DATABASEHOST,$DATABASEUSER,$DATABASEPASSWD); if($db_handle<1){ exit; } include ("includes/channels_inc.php"); if($HTTP_POST_VARS["nick"]){ if($ENABLE_SESSION){ @session_destroy(); } include ("includes/write_line_inc.php"); include ("includes/login_inc.php"); $return = user_login($HTTP_POST_VARS["nick"],$HTTP_POST_VARS["password"],"",$HTTP_POST_VARS["entry"],$db_handle); if($return == TRUE){ if($ENABLE_SESSION){ $nick = $HTTP_POST_VARS["nick"]; $pruef=Crypt($nick,$salt_nick); $entry=$HTTP_POST_VARS["entry"]; $ii=0; session_register('pruef','nick','entry','vip','moderator','is_vip','is_como','is_moderator_for','ii','lastRow','BROWSER_NAME','salt_nick'); // create "join"-message $hellothere = ' '; $result=mysql_query("SELECT count(*) AS count FROM chat_data WHERE Online>=$onlinetime",$db_handle); $a=@mysql_fetch_array($result); if($a[count]>0){ //$join = "* ".$JOINING_IN." und sitzt auf dem ".mysql_result($result,0,"count").". Platz des Stammtisches *"; $join = "* $JOINING_IN *"; }else{ $join = "* $JOINING_IN *"; } schreib_zeile($hellothere.$join.'<\/font><\/i>',$entry); header('Status: 301'); header("Location: frame_set.".$FILE_EXTENSION."?".session_name()."=".session_id()); exit; }else{ $nick = $HTTP_POST_VARS["nick"]; $pruef=Crypt($nick,$salt_nick); $entry=$HTTP_POST_VARS["entry"]; header('Status: 301'); header("Location: frame_set.".$FILE_EXTENSION."?nick=".urlencode($nick)."&pruef=".urlencode($pruef)."&entry=".urlencode($entry)); exit; } } } $REMOTE_USER=strip_tags($PHPOPENCHAT_USER);//cookie if($PHPOPENCHAT_USER){ $date = date("H"); if ($date >= 5) { $gruss = $GREETINGS[1]; } if ($date >= 12) { $gruss = $GREETINGS[2]; } if ($date >= 14) { $gruss = $GREETINGS[3]; } if ($date >= 18) { $gruss = $GREETINGS[4]; } if ($date >= 22) { $gruss = $GREETINGS[5]; } switch (randomint(3)) { case 0: $hello_message = $COME_IN; break; case 1: $hello_message = $TELL_US; break; case 2: $hello_message = $WHATS_UP; break; default: $hello_message = $CHAT_WITH_US; } }else{ $entrylink = " $I_WANT_TO_CHAT! "; } $num_reg_chatters = mysql_result(mysql_query("SELECT count(Nick) AS count FROM chat_data",$db_handle),0,"count"); //count of chatters in the last 24 hours $num_last24h_chatters = mysql_result(mysql_query("SELECT count(Nick) AS count FROM chat_data WHERE Zeit>(UNIX_TIMESTAMP()-(60*60*24))",$db_handle),0,"count"); /** Loesche alle Teilnehmer aus der Tabelle der Telnehmer, die 10 Minuten nix gesagt haben **/ /*$result=mysql_query("DELETE FROM chat WHERE Zeit<(UNIX_TIMESTAMP()-(10*60))",$db_handle);*/ $result=mysql_query("DELETE FROM chat WHERE Zeit<(UNIX_TIMESTAMP()-(120*60))",$db_handle); $num=mysql_result(mysql_query("SELECT count(*) AS count FROM chat",$db_handle),0,"count"); if ($num>0) { $online_users = ''.$num.''; $online_table = ' '; $online_table .= ''; $online_table .= ''; $online_table .= ''; $online_table .= ''; $online_table .= ''; $raumresult=mysql_query("SELECT DISTINCT Raum FROM chat ORDER BY Raum",$db_handle); $i=0; $smileydir="images/chatter/"; while($row=mysql_fetch_object($raumresult)){ $raum=$row->Raum; $result=mysql_query('SELECT Nick FROM chat WHERE Raum="'.$raum.'" ORDER BY Nick'); while($nickrow=mysql_fetch_object($result)){ if($i % 4 ==0){$online_table .= "\n";} $online_table .= ''; $i++; } } if($i % 4 != 0){ echo ''; } $online_table .= ' '.$NICK_NAME.' '.$CHANNEL.' '.$NICK_NAME.' '.$CHANNEL.' '.$NICK_NAME.' '.$CHANNEL.' '.$NICK_NAME.' '.$CHANNEL.' '; $nickname=$nickrow->Nick; if(file_exists($smileydir.strtolower(str_replace(" ","_",$nickname)).".gif")){ /* $online_table .= "";*/ $online_table .= ""; }else{ $online_table .= ""; } if(mysql_result(mysql_query("SELECT count(*) AS count FROM opers WHERE Nick='$nickname'",$db_handle),0,"count")){$color="#ff0000";}else{$color="#000000";} if($PHPOPENCHAT_USER && mysql_result(mysql_query("SELECT count(*) AS count FROM chat_notify WHERE Nick='$PHPOPENCHAT_USER' AND Friend='$nickname'",$db_handle),0,"count")){ $color="#0000ff"; } $online_table .= ' '.str_replace(" "," ",$nickname).' '.$raum.' '; }else{ $online_users = '0'; $online_table = ''; } mysql_close($db_handle); include ("includes/index_tpl.php"); ?> Proszę o przetłumaczenie na "polski-prosty" język instrukcji instalacji phpchatnvid ponieważ może tam popełniam jakiś błąd. Poniżej instrukcja: ************ REQUIREMENTS ************ Before you install phpchatnvid you need to install the following things Linux ;-) or an other UNIX! Win32 is not recommended AT ALL FOR ANYTHING. MySQL database (http://www.mysql.com/) Apache (http://www.apache.org/) with the PHP3 (version >=3.0.9) or PHP4 module (http://www.php.net/) - because of an error into php 4.0.3 code in mysql_close function, we recommend php version >= 4.0.4 this bug concerns only php4 (but a workaround for 4.0.3 is implemented yet) Internet Explorer 4 or higher WebCamXP for video chat if needed (http://www.webcamxp.com) ************ INSTALLATION ************ step 1. untar into directory phpchatnvid (or whatever). EXAMPLE: mkdir /var/www/html/phpchatnvid mv phpvidnchat-99b.tar /var/www/html/phpchatnvid cd /var/www/html/phpchatnvid tar -xvf phpchatnvid-99b.tar step 2. create a database if you can in mysql called phpchatnvid. if you can't create a new database, supply the following argument to import tables in the sql directory: mysql -D YOURDATABASE -uUSERNAME -pPASSWORD < phpchatnvid.sql or mysqladmin -uUSERNAME -pPASSWORD create phpchatnvid mysql -D YOURDATABASE -uUSERNAME -pPASSWORD < phpchatnvid.sql step 3. edit dbsettings.php AND defaults.inc.php in the includes directory. make sure database name is set correcty from where you imported tables in step 2. change the CHANGE_ME variables in BOTH FILES. step 4. make sure the images and chatters directory are still writable. if they are not, users will NOT be able to upload their photo to their profile. EXAMPLE: chmod 777 /var/www/html/phpchatnvid/images chmod 777 /var/www/html/phpchatnvid/images/chatter step 5. go to http://yoursite.com/phpchatnvid/ for chatting and register your username. go to http://yoursite.com/phpchatnvid/admin/ for administration. you need to set a .htaccess file for security in the admin directory. security will be built into the admin section in the final release. ***** NOTES ***** natfilter - if you the administrator are behind a firewall, and you use webcamxp, and go ONLINE in chat. chatters on the outside will NOT be able to click on your video. however, chatters inside your network will have no problems. to get around this, go into admin, natfilter, enter your chatter name, inside address, outside address and chatters on both sides will be able to see your video. works like a champ. smileys - a pull down menu for the smileys where the latest addition. not all of them are listed. more can be found in the help section. the final release will have them all listed in the pull down menu. includes - the original phpopenchat required you to have all the includes in the root of your server or, in the includes directory. this isn't always possible for some people to modify. so i have corrected this issue. no modification to the php.ini, includes etc are required. if you are using phpopenchat, this program may conflict with the openchat includes since they are in your path statement. if your not using phpopenchat, you won't have that issue. session timeout - depending on your php.ini settings, users who are inactive for x amount of time will be booted. if you wish to increase or descrease this setting, you must change your session.gc_maxlifetime variable in the php.ini file. consunt php.net for documentation. code and stuff - major changes where made from the original phpopenchat. some tables where renamed, added and the code was formatted to be more consistant throughout the program. the forum section was also dropped. |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 18.07.2025 - 10:55 |