Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 05:24

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Register auf VPS apache2

Discussion on Register auf VPS apache2 within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jun 2009
Posts: 21
Received Thanks: 0
Register auf VPS apache2

Halo, i habe VPS mit FreeBsd 9 Os , und installiert Apache2.
My ip ist 178.238.46.57
Navicate wird über SSH verbunden, und config auf web wird über mysql verbunden.
Wie stelle ich die config.
Um via ssh verbinden.
Danke
autoprd is offline  
Old 03/19/2012, 00:04   #2
 
Mashkin's Avatar
 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,747
So einfach geht das nicht.
PHP verfügt zwar über eine SSH-Bibliothek, aber dennoch benötigt das zusätzlichen Code.
Ich empfehle dir mal einen Blick auf die SS2-Funktionen von PHP zu werfen:


Insbesondere auf die Funktion "ssh2_tunnel", die eine beliebige Verbindung (z.B. MySQL) durch SSH tunneln kann.
Mashkin is offline  
Old 03/19/2012, 00:12   #3
 
elite*gold: 0
Join Date: Jun 2009
Posts: 21
Received Thanks: 0
$mysql_host localhost oder ip?
ODER

Gibt es eine Anleitung zur Registrierung auf FreeBSD VPS machen?

********************
*General Information
********************
Server Type: MySQL
Connection Name: localhost_3306
Host Name/IP Address: localhost
Port: 3306
User Name: root
Save Password: True

********************
*SSH Information
********************
Use SSH Tunnel: True
Host Name/IP Address: 178.238.46.57
Port: 22
User Name: root
Authentication Method: Password
Save Password: True

_________________________
Wie richtet man einen Config?

$mysql_host = "???";
$mysql_user = "???";
$mysql_pass = "???";
$mysql_db = "account";
autoprd is offline  
Old 03/19/2012, 01:49   #4
 
elite*gold: 5
Join Date: Mar 2012
Posts: 154
Received Thanks: 90
$mysql_host = "Dein Ip die da oben steht178.....";
$mysql_user = "root";
$mysql_pass = "dein navicat passwort";
$mysql_db = "account";
MegaChilla12 is offline  
Old 03/19/2012, 04:12   #5
 
Mashkin's Avatar
 
elite*gold: 44
Join Date: May 2010
Posts: 2,053
Received Thanks: 1,747
Quote:
Originally Posted by MegaChilla12 View Post
$mysql_host = "Dein Ip die da oben steht178.....";
$mysql_user = "root";
$mysql_pass = "dein navicat passwort";
$mysql_db = "account";
Er will es aber doch über SSH tunneln...

PHP Code:
$ssh ssh2_connect('178.238.46.57'22) or die('SSH connection failed');
ssh2_auth_password('root''password') or die ('SSH login failed');
ssh2_tunnel($ssh'localhost'3306) or die('cannot establish tunnel');

$mysql_host "localhost";
$mysql_user "root";
$mysql_pass "password";
$mysql_db    "account"
Funktioniert dann etwa so:
PHP--> localhost:3306--> SSH: 178.238.46.57:22--> localhost:3306 (auf dem Root-Server)--> MySQL
Mashkin is offline  
Old 03/19/2012, 17:30   #6
 
elite*gold: 0
Join Date: Jun 2009
Posts: 21
Received Thanks: 0
$ssh = ssh2_connect('178.238.46.57', 22) or die('SSH connection failed');
ssh2_auth_password('root', '****') or die ('SSH login failed');
ssh2_tunnel($ssh, 'localhost', 3306) or die('cannot establish tunnel');

$mysql_host = "localhost";
$mysql_user = "root";
$mysql_pass = "****";
$mysql_db = "account";

Nichts (

________
und aus web

$mysql_host = "178.238.46.57";
$mysql_user = "root";
$mysql_pass = "****";
$mysql_db = "account";

->

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/clients/client19/web184/web/index.php on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /var/www/clients/client19/web184/web/index.php on line 4

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/clients/client19/web184/web/index.php on line 5

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /var/www/clients/client19/web184/web/index.php on line 5

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/clients/client19/web184/web/index.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /var/www/clients/client19/web184/web/index.php on line 6

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/clients/client19/web184/web/index.php on line 7

Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server could not be established in /var/www/clients/client19/web184/web/index.php on line 7

Warning: mysql_query() [function.mysql-query]: Access denied for user 'www-data'@'localhost' (using password: NO) in /var/www/clients/client19/web184/web/index.php on line 10

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /var/www/clients/client19/web184/web/index.php on line 10
NOT

Index ist -
Quote:
<?php
include('config.php');
if(isset($_POST['submit']) && $_POST['submit'] == 'Register') {
$username = mysql_real_escape_string($_POST['username']);
$password = mysql_real_escape_string($_POST['password']);
$rl_name = mysql_real_escape_string($_POST['rl_name']);
$email = mysql_real_escape_string($_POST['email']);

$sql = "INSERT INTO account SET login = '".$username."', password = PASSWORD('".$password."'), real_name = '".$rl_name."', email = '".$email."'";
$result = mysql_query($sql);
if($result) { echo 'EEE ASTA E FRATE MERGE CONTU go...'; } else { echo 'NOT'; }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Registration</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Registration" />
<meta name="keywords" content="some, keywords, comes, later" />
<meta name="language" content="en" />
<meta name="robots" content="index,follow" />
<meta name="author" content="S3cr3t" />
<meta name="revisit-After" content="5 days" />
<meta name="distribution" content="local" />
<style type="text/css">
<!--
body { background:#000; color:#FF0; font:bold 8pt Verdana,Arial,Helvetica,sans-serif; }
#container { margin:40px auto; width:750px; overflow:hidden; }
#text { padding:5px; }
#text ul { padding:0px; margin-left:15px; }
#text li { display:block; }
#left { float:left; }
#right { float:right; margin-right:15px; }
!.style1 {color: #00FF00}
.style1 {color: #00FF00}
-->
</style>
<script type="text/javascript">
if (top.frames.length != 0)
top.location=self.location;
</script>
</head>
<body>
<div class="style1" id="container">
<div id="text">
<form action="index.php" method="post">
<ul>
<li>Username:</li>
<li><input type="text" name="username" size="60" /></li>
<li>&nbsp;</li>
<li>Password:</li>
<li><input type="password" name="password" size="60" /></li>
<li>&nbsp;</li>
<li>Password Again:</li>
<li><input type="password" name="password" size="60" /></li>
<li>&nbsp;</li>
<li><input type="submit" name="submit" value="Register" /></li>
</ul>
</form>
</div>
</div>
<span class="style1">Goooooooooooooooooooooooooooooooooo ooooooooooooood</span>
</body>
</html>
autoprd is offline  
Reply


Similar Threads Similar Threads
[DEBIAN]Apache2, aber keine Socket?
12/09/2011 - Unix/Linux - 4 Replies
Huhu, ich habe Garde auf einen Vserver apache2 mit mysql etc installiert, alles auch gut, nur Lädt er die Seite, bis Socket Verbindungen kommen, und weiter läd er nicht... Muss man für Sockets ein Spezielles packte auch installieren? Mfg .NoThx
Apache2 läuft nicht mehr
08/28/2011 - Technical Support - 3 Replies
Hey Leute, habe ein Problem und zwar habe ich meinen vServer Linux(Debian) von 32-bit auf 64-bit umgestellt, jetzt bekomme ich aber meine Seite nicht mehr ans laufen, also habe eigt alles so gemacht wie es im Tutorial stand, aber es kommt immer ein Datenbank Fehler oder ähnliches. Vielleicht kann mir ja jemand helfen der sich damit auskennt, als Dankeschön gibt es auch ne Belohnung in Form einer PSC oder ähnlichem. Vielen Dank im vorraus, SeriousPatty
PHP 5 Apache2.2 installieren
08/03/2011 - Metin2 Private Server - 4 Replies
Hallo Leute, Ich hab gerade php 5 für apache22 installiert und ich will jetzt apache installieren aber leider hab ich eine fehlermeldung bekommen die mir echt nichts sagt, außer dass ich irgendwas löschen soll aber was bitte um hilfe !!! ImageShack® - Online Photo and Video Hosting
apache2.2 fehler
11/19/2010 - General Coding - 0 Replies
Hi, habe jetzt apache2.2 installiert und es hat geklappt nur dann hab ich die httpd datei geändert und wollte apache restarten nur jetzt kommt der fehler: The requested operation has failed! Wie kann ich das beheben bitte hilft mir.



All times are GMT +1. The time now is 05:25.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.