Anonymous,

Please Login or Register
Download Nuke Evolution Xtreme today for a CMS you can enjoy using and sharing with your friends!
[ Download Now ]
Forum Index  ·  Search  ·  Usergroups  ·  Edit your profile  ·  Members  ·  Login, Check Messages
Arcade  ·  Ranks  ·  Staff  ·  Statistics  ·  Board Rules  ·  Forum FAQ  ·  Log in

Search for at
Evolution-Xtreme Advanced Search


+  
Latest Site News   Next 5 >>  
 Forum   Author   Replies   Last Post 
File Repository 1.0.0 Released Announcements! Lonestar 0 Tue Apr 26, 2016 6:44 am
Lonestar View latest post
Image Repository Released Announcements! Lonestar 1 Mon Oct 27, 2014 7:39 pm
Lonestar View latest post
So what happened to us? Announcements! SgtLegend 0 Tue May 06, 2014 12:32 am
SgtLegend View latest post
[PROGRESS] Nuke Evolution Xtreme 2.0.9e Announcements! SgtLegend 2 Sun May 27, 2012 6:25 pm
SgtLegend View latest post
European Cookie Law Announcements! SgtLegend 0 Sat May 26, 2012 7:33 am
SgtLegend View latest post
   
Recent Topics   Next 15 >>  
 Forum   Author   Replies   Last Post 
Evo staff looking for some volunteers. Community Announcements coRpSE 20 Thu Jul 02, 2015 9:19 am
Depresjon2 View latest post
Evo Xtreme 2.0.9D Updated for PHP 5.6 General Support coRpSE 121 Thu Mar 23, 2017 3:57 pm
casterdon View latest post
[ MOD ] - Honeypot V2.2 AntiBot Module Security coRpSE 106 Tue Nov 22, 2016 11:30 am
coRpSE View latest post
Possible new Admin area layout Comments and Suggestions Lonestar 18 Wed Sep 14, 2016 11:37 am
Blackou View latest post
jQuery update General Support Lonestar 2 Wed May 11, 2016 4:49 pm
Charles64 View latest post
Deutsche Sprachdatei - german language files German DT50R 7 Thu Jan 28, 2016 7:04 am
DT50R View latest post
[FIX] Correct Cookie Settings (Invalid Session Error) Quick fixes killigan 110 Fri Mar 20, 2015 1:06 pm
Macdaddy View latest post
login as admin strange error General Support Worfwarrior 8 Sun May 21, 2017 12:42 pm
Worfwarrior View latest post
Does Anyone Have a Media Player Mod? Modules goosse 0 Mon May 01, 2017 9:17 am
goosse View latest post
head and body help General Support hercountrybuck 8 Tue Apr 04, 2017 2:08 pm
Sp0rAdiC View latest post
babstats nuke evo PHP 5.6 Modules pd35 4 Mon Mar 27, 2017 5:45 pm
Ragonese View latest post
Looking for coRpSE? He is gone till May. General Chat coRpSE 4 Sun Mar 26, 2017 6:50 pm
coRpSE View latest post
Think I got hit with malware somehow General Support bobdude 10 Sun Mar 26, 2017 6:44 pm
coRpSE View latest post
error log Bugs Redcougarxr7 31 Tue Mar 21, 2017 8:46 pm
coRpSE View latest post
I seem to be locked out of my website Smile General Support storm 4 Sat Mar 11, 2017 12:29 pm
coRpSE View latest post

mysqli_real_escape_string() parameter in functions_attach.ph

 
Post new topic    Reply to topic    printer-friendly view   Thank Post    Evolution-Xtreme Forum Index -> General Support
View previous topic :: View next topic  
Author Message
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Tue Nov 01, 2016 8:01 pm Post subject: No icon mysqli_real_escape_string() parameter in functions_attach.ph Reply with quote

 Warning:  mysqli_real_escape_string()  expects  parameter  1  to  be  mysqli,  null  given  in  /home/**********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  998
 
 I  have  tried  everything  that  I  have  found  on  the  internet  on  various  websites,  and  nothing  I  do  fixes  this  error;  which  is  only  achieved  while  attempting  to  attach  a  file  to  my  post  on  my  site.
 
 Which,  might  I  add  is  claiming  that  the  .zip  extension  isn't  allowed,  when  it  clearly  is  in  my  forum  admin  panel.
Back to top
View user's profile Send private message Visit poster's website
coRpSE
Xtreme Developer
Xtreme Developer
Site Admin
Site Admin
Support Team
Support Team



Gender: Gender:Male
Joined: Dec 24, 2008
Age: 36
Posts: 1354
Location: Back of your mind!!!
Reputation: 186.3
votes: 10
usa.png


Status: Offline
Web Control Panel: 11.42.0 (build 23)
PostPosted: Fri Nov 04, 2016 8:18 am Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 hrm,  I  am  not  really  sure.  Never  had  this  issue.Is  it  happening  trying  to  attach  any  file,  and  size,  or  only  the  zip?
Back to top
View user's profile Send private message Visit poster's website
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Fri Nov 04, 2016 3:46 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 Any  file/size/type....
 
 Yeah,  I  don't  know  either.  I  am  running  Php  5.6...you  think  reverting  to  5.4  would  fix  this?
Back to top
View user's profile Send private message Visit poster's website
Sponsor
phpstorm.jpg
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Fri Nov 04, 2016 4:02 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 That  was  a  modified  version  of  functions_attach.php.  The  original  file  that  came  with  evo  gave  these  errors  while  attempting  to  attach  a  file.
 
 Deprecated:  mysql_escape_string():  This  function  is  deprecated;  use  mysql_real_escape_string()  instead.  in  /home/*********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  996
 
 Deprecated:  preg_replace():  The  /e  modifier  is  deprecated,  use  preg_replace_callback  instead  in  /home/*********/public_html/modules/Forums/attach_mod/posting_attachments.php  on  line  1200
 
 Deprecated:  mysql_escape_string():  This  function  is  deprecated;  use  mysql_real_escape_string()  instead.  in  /home/*********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  996
 
 
 Which  then  states  that  mysql_real_escape_string()  is  deprecated,  or  something,  to  use  mysqli_real_escape_string()
 So  I  added  in  the  mysqli_real_escape_string()  varible,  and  still  errors.
Back to top
View user's profile Send private message Visit poster's website
sgtmudd



Gender: Gender:Male
Joined: Oct 03, 2009
Age: 46
Posts: 23
Location: MA
Reputation: 2.9
usa.png


Status: Offline
Web Control Panel: Sentora
PostPosted: Wed Nov 09, 2016 2:58 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 Did  you  remember  to  add  the  DB  link?  mysqli_real_escape_string()  requires  the  DB  connection,  as  with  most  mysqli  functions.  So  it  would  look  something  like  this:
 
                                                 
PHP:                
mysqli_real_escape_string($db_link$data);                 

 More  info:  http://php.net/manual/en/mysqli.real-escape-string.php
Back to top
View user's profile Send private message Visit poster's website
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Sat Nov 12, 2016 5:59 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

                                                   
sgtmudd  wrote  (View  Post):                
Did  you  remember  to  add  the  DB  link?  mysqli_real_escape_string()  requires  the  DB  connection,  as  with  most  mysqli  functions.  So  it  would  look  something  like  this:
                                                   
PHP:                
mysqli_real_escape_string($db_link$data);                 

 More  info:  http://php.net/manual/en/mysqli.real-escape-string.php                

 
 Okay,  not  exactly  sure  where  I  would  find  the  "DB  link"  at.  However,  the  line  that  this  error  is  coming  up  at  looks  like  this.
 
                                                 
Code:                
           case  'mysqli':
                  if  (function_exists('mysql_escape_string'))
                  {
                        return  mysql_escape_string($text);
                  }
                  else
                  {
                        return  str_replace("'",  "''",  str_replace('\\',  '\\\\',  $text));
                  }
            break;                

 
 So  I  replaced  the  "mysql_escape.."  with  "mysqli_real_escape.."  (In  the  two  spots  it  had  it)
 
 
                                                 
Code:                
           case  'mysqli':
                  if  (function_exists('mysqli_real_escape_string'))
                  {
                        return  mysqli_real_escape_string($text);
                  }
                  else
                  {
                        return  str_replace("'",  "''",  str_replace('\\',  '\\\\',  $text));
                  }
            break;                

 
 Which  then  gives  me  this  error  =>  Warning:  mysqli_real_escape_string()  expects  exactly  2  parameters,  1  given  in  /home/**********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  997
 
 Where  do  I  find,  or  what  would  be  the  correct  db_link  in  a  standard  Evo  installation?  Also,  I  do  not  have  upload  via  FTP  set  in  forum  config.
 
 Of  course,  commenting  out  that  section  and  just  leaving  the  str_replace  part  allows  me  to  attach  files  and  successfully  post  in  my  forum.  But  I  believe  that  decreases  security  against  XSS.
Back to top
View user's profile Send private message Visit poster's website
Sponsor
phpstorm.jpg
sgtmudd



Gender: Gender:Male
Joined: Oct 03, 2009
Age: 46
Posts: 23
Location: MA
Reputation: 2.9
usa.png


Status: Offline
Web Control Panel: Sentora
PostPosted: Mon Nov 14, 2016 2:16 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 Try  this:
 
                                                 
PHP:                
return mysqli_real_escape_string($this->db_connect_id$text);                 
Back to top
View user's profile Send private message Visit poster's website
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Thu Dec 29, 2016 5:16 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

                                                   
sgtmudd  wrote  (View  Post):                
Try  this:
                                                   
PHP:                
return mysqli_real_escape_string($this->db_connect_id$text);                 
               

 
 
 Parse  error:  syntax  error,  unexpected  '$text'  (T_VARIABLE)  in  /home/***********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  997
Back to top
View user's profile Send private message Visit poster's website
Lonestar
Site Admin
Site Admin
Xtreme Developer
Xtreme Developer




Joined: Oct 09, 2008
Posts: 425

Reputation: 58.3
votes: 3
blank.png


Status: Offline
PostPosted: Thu Dec 29, 2016 6:36 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 http://www.evolution-xtreme.com/modules.php?name=Forums&file=viewtopic&p=45304#45304
Back to top
View user's profile Send private message Send e-mail
Sponsor
webstorm.jpg
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Thu Dec 29, 2016 7:04 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

                                                   
Lonestar  wrote  (View  Post):                
http://www.evolution-xtreme.com/modules.php?name=Forums&file=viewtopic&p=45304#45304                

 
 Using  the  attached  files,  I  then  get  the  following  errors  when  attempted  to  attach  a  zip  file;
 
 Deprecated:  mysql_real_escape_string():  The  mysql  extension  is  deprecated  and  will  be  removed  in  the  future:  use  mysqli  or  PDO  instead  in  /home/************/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  996
 
 Warning:  mysql_real_escape_string():  Access  denied  for  user  '***********'@'10.2.1.9'  (using  password:  NO)  in  /home/**********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  996
 
 Warning:  mysql_real_escape_string():  A  link  to  the  server  could  not  be  established  in  /home/**********/public_html/modules/Forums/attach_mod/includes/functions_attach.php  on  line  996
 
 Note:  ********  designates  my  hosting  username.
Back to top
View user's profile Send private message Visit poster's website
Lonestar
Site Admin
Site Admin
Xtreme Developer
Xtreme Developer




Joined: Oct 09, 2008
Posts: 425

Reputation: 58.3
votes: 3
blank.png


Status: Offline
PostPosted: Thu Dec 29, 2016 7:13 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 What  version  PHP  are  you  using  m8?
Back to top
View user's profile Send private message Send e-mail
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Thu Dec 29, 2016 7:37 pm Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 At  that  point,  was  on  5.5....  switched  to  5.6  and  same  error.  Should  I  revert  to  5.4?
 
 EDIT:  I  changed  to  mysql  to  mysqli  and  no  longer  get  the  first  error.  I  still  get  the  access  denied  and  unable  to  connect  errors;  even  on  PHP  5.4
Back to top
View user's profile Send private message Visit poster's website
Sponsor
phpstorm.jpg
Lonestar
Site Admin
Site Admin
Xtreme Developer
Xtreme Developer




Joined: Oct 09, 2008
Posts: 425

Reputation: 58.3
votes: 3
blank.png


Status: Offline
PostPosted: Fri Dec 30, 2016 5:00 am Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 Are  you  using  FTP  upload  for  attachments?
Back to top
View user's profile Send private message Send e-mail
AnonSpider



Gender: Gender:Male
Joined: Oct 13, 2016
Age: 34
Posts: 19

Reputation: 2.4
usa.png


Status: Offline
PostPosted: Fri Jan 06, 2017 1:55 am Post subject: No icon Re: mysqli_real_escape_string() parameter in functions_attac Reply with quote

 I  do  not  have  the  FTP  settings  set  within  Forum  CP.  So,  no.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:
Post new topic  Reply to topic   printer-friendly view   Thank Post Evolution-Xtreme Forum Index ->  General Support All times are UTC - 5 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Help with Site Navigation mod 34 TimBitz 14665 Thu Oct 04, 2012 1:38 pm
usbigoil View latest post
No new posts Site Staff 1.5 error 17 Saint 7535 Wed Aug 31, 2011 2:34 am
SgtLegend View latest post
No new posts You might already use. 7 Soulkeeper 5237 Fri Apr 29, 2011 7:44 am
forgotz View latest post
No new posts Where to create email adressfrom site 10 odawgg 3997 Sun Sep 05, 2010 2:23 pm
odawgg View latest post
 




Powered by phpBB © 2001, 2006 phpBB Group
EvoXtreme Theme by SgtLegend ©
Forums ©