|
#1
|
||||
|
||||
SQL ERROR
Hey all,
can you help me please Got this error SQL ERROR MySQL server has gone awayin /home/admin/web/include/functions.php, line 157 line is in fuctions.php Code:
function write_log($text) { $text = sqlesc($text); $added = sqlesc(get_date_time()); mysqli_query($GLOBALS["___mysqli_ston"], "INSERT INTO sitelog (added, txt) VALUES($added, $text)") or sqlerr(__FILE__, __LINE__); } Code:
PHP Warning: Error while sending QUERY packet. PID=23744 in /home/admin/web/public_html/userdetails.php on line 240 Code:
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 130968 bytes) in /home/admin/web/public_html/include/functions.php on line 154 |
#2
|
|||
|
|||
you have a wrong query in the userdetails and not in the sql error function.
Show the request in userdetails line 240. |
#3
|
||||
|
||||
However, it is interesting that it does not show me an error in all users only for some
Quote:
Last edited by elvira; 2nd June 2021 at 07:00. |
#4
|
|||
|
|||
Add this to the top of the file ini_set('memory_limit','-1'); or edit it in php.ini
__________________
Live Free... Share Free... |
#5
|
|||
|
|||
just increase your memory_limit
__________________
Need HELP!? I can install:
|
#6
|
||||
|
||||
ok, where can find memory_limit in php.ini
|
#7
|
|||
|
|||
Quote:
Code:
$rescom = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT COUNT(*) FROM comments WHERE user = ".$user['id']) or sqlerr(__FILE__,__LINE__); $arrcom = mysqli_fetch_row($rescom ); $torrentcomments = $arrcom[0]; $resposts = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT COUNT(*) FROM posts WHERE userid = ".$user['id']) or sqlerr(__FILE__,__LINE__); $arrposts = mysqli_fetch_row($resposts); $forumposts = $arrposts[0]; $resclient = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT name FROM clientselect WHERE id = ".$user['clientselect']." LIMIT 1") or sqlerr(__FILE__,__LINE__); $row = mysqli_fetch_array($resclient);if($row){$clientselect = "$row[name]";} For the first two - you can not mix the names of variables, you will sometimes get out errors. Or so you can: Code:
$resclient = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT name FROM clientselect WHERE id = ".$user['clientselect']) or sqlerr(__FILE__,__LINE__); $row = mysqli_fetch_array($resclient);if($row){$clientselect = "$row[name]";} |
#8
|
|||
|
|||
Hello!
PHP Code:
|
#9
|
|||
|
|||
Code:
if(!function_exists("htmlspecialchars_uni")){function htmlspecialchars_uni($message){ $message = preg_replace("#&(?!\#[0-9]+;)#si", "&", $message); // Fix & but allow unicode $message = str_replace("<","<",$message);$message = str_replace(">",">",$message); $message = str_replace("\"",""",$message);$message = str_replace(" ", " ", $message);return $message;} //////////////////////////////// function html_uni($str){return htmlspecialchars_uni($str);}} I would have someone to take a picture - why the hell do I need to find out the client's name? |
#10
|
||||
|
||||
i still don't know what to do
|
|
|