Jump to content

X`Ray

Members
  • Posts

    10
  • Joined

  • Last visited

About X`Ray

  • Birthday 11/23/1990

Contact Methods

  • ICQ
    260842598

Profile Information

  • Gender
    Male
  • Location
    Germany, Bavaria

X`Ray's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. @$link = mysql_connect("webshard.heliohost.org","xray_root","*************"); $log->log(mysql_errno(),mysql_error(),getenv('REMOTE_ADDR')); @mysql_select_db("xray_schule",$link); $log->log(mysql_errno(),mysql_error(),getenv('REMOTE_ADDR')); yeah I'm sure thats right, i use this above to connect to server in every script which needs a database connection. The thing is, if you take a look at the last log, the errors didn't follow any regular repeats. I can tell you i was always online on this site, so that means the automatically loading works just fine, every 10 seconds 2 requests and every 30 seconds 4 requests with a maximum of 2 connections. I think the errors are detailed enough to take a look in google, the problem is I doesn't know the server enough to make any references, what the cause could be. but i think another one should test the same scenario and another like this, because it seem that no one have the same problems with the sql connection? Thats another interesting thing. If this problem would be everyones problem, i think there are further possibilities to resolve this. Any other ideas? P.S. I will put the chat on ice till there is a solution or an idea whats the cause of this problem. I'm at the point to give it up. //Edit, i got another idea: There is a possibility that netcup.de got problems during the remote connect from therse host to yours. So i think i should test this script now on your webserver. let us see what happens. If its just all fine within the next week, i think there is a problem with the remote host or the connection between this 2 hosts. Isn't that an idea? //Edit: Ok, i changed "webshard.heliohost.org" to "localhost" and it works.
  2. I have edited the post, so i hope its good enough English to read is. and sorry about the German posts
  3. Ok, finally it is at the same point like the last time . so i please you again to flush me, thank u. I definitly added this at the end of all files at 4:33pm: <? mysql_close($link); $log->log(mysql_errno(),mysql_error(),getenv('REMOTE_ADDR')); $log->write(); ?> I got a theoretic about this cause: The first script interval is 10 seconds and the second script interval is 30 seconds, so there will be 2 connections at all 30 seconds, that could be a problem if there are only 1 connection allowed, but I see this problem doesn't cause every 30 seconds, take a look at the log. If that is the problem, I have to add a delay at one of the two scripts. Otherwise mysql says there could be other serverside problems, see this link: http://dev.mysql.com/doc/refman/5.1/en/err...connection.html I' m sure there could be other problems At this point the last error appears again and again.
  4. Ok, i have improved the script and removed all "or die()" requests. so it will save all errors and at least only run without mysql error. So i can catch now all errors Die momentane Liste sieht so aus: i hope that helps //Edit: 79.xxx.xxx.xxx <2010-06-02, 3:31:19 pm> MySQLerror(1040): Too many connections Could it be that no using of mysql_close() cause this error, im a real idiot. I didn't noticed that I edit that an then we could look forward.
  5. ok, i have added to all the queries a mysql error logging to file, so all 10 seconds i can see the last mysql error in a file. so if there are any problems, we will see. And thanks for flushing <?php require_once("FileAdapter.php"); ?> <?php class Logging { private $myFile; private $arr = array(); public function __construct($file) { $this->file = $file; $this->myFile = new base_FileAdapter($file); } public function log($no,$error,$ip) { if($no != 0) { echo("Error({$no})"); array_push($this->arr, $ip . " <" . date("Y-m-d, g:i:s a") . "> MySQLerror(" . $no . "): " . $error); } } public function write() { if (count($this->arr) > 0) { $this->myFile->appendFile($this->arr); } $this->myFile->closeFile(); } }
  6. I see thats not only the many connections its about some errors, the script worked since the 24.05 and i only get 1 error back, that was while trying to write with another id or an wrong password. It could be that i didn't rechange the userid and the password didn't matched. But the thing is, you can see the only one check of the userid and password is when i wrote a message, which will activate by clicking a button and i didn't do that. Then the loadchat only need a id to update the last change, so the fake id i used existed in the database and it doesn't displayed me an error either, so i think we can ignore this too. The onlinechat() function only requests the users and don't need any id or password. So i think there is another problem. If you want you can take a look at the sources in the backup file. The 3 chat scripts are placed with the suffix "chat." in the layout folder. Please Note, that are only prototypes, so they are not documented nor written in a good coding guideline.
  7. Hey there, i read this topic, and i need the exec() for my modulesystem to execute the sql files on the server, it is the esiest way, but if that wouldn't going to allowed, i need another possible methode to run sql files on the server, if a new module need to add new tables class base_mainmodule { protected $sqlobj = NULL; public function __construct($sqlobj/*SQL Adapter*/,$parms/*Array*/ = null) { $this->sqlobj = $sqlobj; } public function installSQL($modulename/*string*/, $file/*string*/) { $dbhost = $this->sqlobj->gethost(); $dbuser = $this->sqlobj->getuser(); $dbpass = $this->sqlobj->getname(); $db = $this->sqlobj->getdb(); if ($dbpass != '') { $cmd = '/usr/bin/mysql -h '.$dbhost.' -u '.$dbuser.' -p '.$dbpass.' < '.$file; } else { $cmd = '/usr/bin/mysql -h '.$dbhost.' -u '.$dbuser.' < '.$file; } exec($cmd,$out,$retval); } public function configSQL(); //Fills the Table with initialvalues public function installXML(); //Saves the Module information in the Main config File public function cache(); //Cache some informations }
  8. Hi there, I got a problem with my ajax chat prototype, it tells me that my host were blocked because of 2 many mysql requests, so i tell you first how it works: You see every 30 and 10 seconds two javascript functions will be loaded by the page var x = window.setInterval("loadChat()", 30000); var x = window.setInterval("onlineChat()", 10000); The 3 functions collect some information needed for the query by this page. There is a 3rd function which does this, its triggered by the send button. function loadChat() { id = document.getElementById("id").value; XMLqueryA('displaybox','chat.display.php','?id='+id); } function onlineChat() { XMLqueryB('onlinebox','chat.online.php',''); } function writeChat() { id = document.getElementById("id").value; pass = document.getElementById("pass").value; text = document.getElementById("text").value; XMLquery('info','chat.write.php','?id='+id+'&pass='+pass+'&text='+text); document.getElementById("text").value = ""; XMLqueryA('displaybox','chat.display.php','?id='+id); } Thats the example for one xmlhttprequest, so it starts to load a page and the responed text will set into the html page. The sql queries are: try { // Mozilla, Opera, Safari sowie Internet Explorer (ab v7) xmlHttp = new XMLHttpRequest(); } catch(e) { try { // MS Internet Explorer (ab v6) xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch(e) { try { // MS Internet Explorer (ab v5) xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch(e) { xmlHttp = null; } } } function XMLquery(target, source, parameters) { if(xmlHttp) { xmlHttp.open('GET', 'layout/'+source+parameters, true); xmlHttp.onreadystatechange = function () { if (xmlHttp.readyState == 4) { document.getElementById(target).innerHTML = xmlHttp.responseText; } }; xmlHttp.send(null); } } So that means, there are 12 automatically sql request per user in one minute, and at the moment there are only 1 up to 2 users. At my point of view, thats not a big amount of sql requests. So is there a possible solution to avoid this error message and to use this page unchanged? If its not possible from your side, I'm willing to lower the refresh rate, but please unlock my host. I need that for a project at school and personal learning studies. Thanks, X`Ray
  9. Thanks for your answer, i will detonate, if i have enough money and I'm still happy with this service, I'm sure! So i think thats a lot to pay, but I'm on an apprenticeship for an IT-Specialist in Software development and its a great thing to host a server, so all can use it to learn you to manage and secure the server, and the members to host sites and other web applications So thanks again And I'm sure its serious if you do this business for 5 years as students.
  10. Hi there As you can see I'm new there, I am really happy with the performance of your server and i like to use your hosting united with my paid once. I see you offer much features, its really great to test some things. I read a lot of threads in there and I didn't saw any kind of these questions, but I think there other people then me, who are interested in this thing, too. So I wan't to know how you finance this server? I don't think this server will be payed by itself. It sounds a little bit cheeky, but i want to know that your business is serious and my information are secure on your server and wouldn't abused. Thank you for answering. P.S.: Sorry about my bad english sentence construction.
×
×
  • Create New...