Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘wpss_social_addtoany_js’

I have made an update of the plugins and themes and now it throws me this warning.

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘wpss_social_addtoany_js’ not found or invalid function name in /home/html/wp-includes/class-wp-hook.php on line 286

mysqli_fetch_row() expects parameter 1 to be mysqli_result, bool given in /opt/lampp/htdocs/fundavnzla/index.php on line 158

El siguiente es un simple formalario con dos inputs, nombre y comentario. Deseo imprimir esos dos campos en una tabla, pero al momento de ejecutar me sale error. la coneccion con la base de dato esta bien.

mysqli_fetch_row() expects parameter 1 to be mysqli_result, bool given in /opt/lampp/htdocs/fundavnzla/index.php on line 158

Expongo mi codigo para que lo analizen y puedan ver en que estoy errando Formulario:

                <div class="form-group">                     <label for="nombre"  class="sr-only">Nombre:</label>                     <input type="text" class="form-control" id="nombre" name="nombre" placeholder="Nombre">                  </div>                 <div class="form-group">                     <label for="comentario"  class="sr-only"></label>                     <textarea class="form-control" rows="3" id="comentario" name="comentario" placeholder="Deja tu comentario..."></textarea>                   </div>                 <button class="btn btn-primary" onclick="showValue()" type="button">Enviar</button>               </form> 

tengo el llamado del conexion.php al inicio del index

<?php include("conexion.php"); ?> 

ahora deseo consultar en una tabla los resultados, para ello uso :

        <div class="col-xs-12 col-sm-12 col-md-6 col-lg-6">                   <?php         $  sql="select * form comentarios";         $  resultado=mysqli_query($  connection,$  sql);                    ?>          <table class="table">             <thead>                 <tr>                     <td>nombre</td>                     <td>comentario</td>                  </tr>             </thead>             <tbody>                     <?php while ($  row=mysqli_fetch_row($  resultado))                       {                     ?>                     <tr>                         <td><?php echo $  row['nombre'];?></td>                         <td><?php echo $  row['comentario']; }?></td>                     </tr>              </tbody>          </table> 

La linea que me resalta error es :

<?php while ($  row=mysqli_fetch_row($  resultado)) 

Linux Shell pipe (print) output of a command that expects file argument

I know you can pipe output of a one command to another – for example

ls -la | less 

to see output of ls -la inside of less instead of terminal stdio.

But if you use a command with a parameter that saves the output to a file

command --save-to-file file.txt 

Then how to pipe that to another command?

this way will not work:

command --save-to-file | less 

because command will complain that you used --save-to-file without any argument (filename)

If I remember well there was something like a buffer or a temp file in ram you could put instead of file.txt so you could do something like:

command --save-to-file ram-buffer.txt && cat ram-buffer.txt 

Without even creating a file on disk, it that right?

Why I need that?

Some of commands have only a basic output to the stdio and more useful type of output cannot be printed by them but only saved to file. The thing is I am not interested in saving the more useful type of output to any file at all but just to print it in terminal or pipe to chain of another commands that do the filtering etc and then eventually print the processed output.

I would not like to be responsible to crating a tmp file then delete it etc. Perfectly I would like to just use a kind of magic file (or redirection) in place of file.txt that I could pipe to another command.

It is important to me to not write any content of the output to a disk if this is possible. Just print it in terminal or pipe to other command(s).

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli

Migrei o site da locaweb para a hostgator e o php estão em versões diferentes. Agora preciso usar mysqli. Ja arrumei o /public_html/…/mysql.php. Agora esse arquivo: /home3/…/PHPFrodo.class.php está com esse erro.

Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, string given in /home3/.../PHPFrodo.class.php on line 1951 

Pelo que entendi, é preciso passar uma conexão como 1º parametro, mas não sei como fazer.

Parte do código da linha 1951:

public function post2Query( $  arr2query ) {     try     {         if ( !is_array( $  arr2query ) || empty( $  arr2query ) )         {             throw new Exception( 'post2query: O paramêtro não é um array ou está vazio!' );         }         else         {             foreach ( $  arr2query as $  key => $  value )             {                 $  value = mysqli_real_escape_string( $  this->dbase, $  value); // <== linha 1951                 $  this->post_fields[] = trim( "$  key" );                 $  this->post_values[] = trim( "$  value" );                 //$  this->post_values[] = preg_replace('/\s+/', ' ', $  value);             }         }     }     catch ( Exception $  e )     {         echo $  e->getMessage();         exit;     }     return $  this; } 

Acredito que o $ this->dbase está sendo declarado no código abaixo. O erro acontece ao tentar incluir informações via dashboard.

public function database( $  dbase = 'default' )     {         try         {             if ( $  dbase != null )             {                 $  this->dbase = $  dbase;             }             if ( file_exists( DATABASEDIR . 'database.conf.php' ) )             {                 include DATABASEDIR . 'database.conf.php';             }             else             {                 throw new Exception( "database: Arquivo de configuração do banco inexistente!" );             }             if ( !isset( $  databases["$  this->dbase"] ) )             {                 throw new Exception( "database: banco [$  this->dbase] não configurado em " . DATABASEDIR . "database.conf.php" );             }             //conexao adapters             $  this->adapter( $  databases[$  this->dbase]['driver'] );             $  this->objBanco = new $  this->adapter( $  databases[$  this->dbase] );             $  this->dbname = $  databases[$  this->dbase]['dbname'];             $  this->sgbd = $  databases[$  this->dbase]['driver'];         }         catch ( Exception $  e )         {             echo $  e->getMessage();             exit;         }         return $  this;     } 

Warning: is_readable() expects parameter 1 to be a valid path

I have been getting this error pointing to this function

protected function _checkSrcIsFile($  src)     {         $  result = false;         if (is_string($  src) && is_readable($  src) && is_file($  src)) {             $  result = true;         }          return $  result;     } 

and the funtion is being passed here:

 $  srcIsFile = $  this->_checkSrcIsFile($  src);         if ($  srcIsFile) {             $  src = realpath($  src);             $  result = $  this->cp($  src, $  filename);         } else {             $  result = $  this->filePutContent($  filename, $  src);         }          if (!is_null($  mode) && $  result !== false) {             $  this->chmod($  filename, $  mode);         }          return $  result; 

can anyone explain to me what is causing this and what is the solution and how can I recreate it.

Thank you.

Aviso: mysqli_query() expects parameter 1 to be mysqli, integer given

$ db = mysqli_connect ($ host, $ usuario, $ senha); //conecta ao mysql $ basedados = mysqli_select_db(($ bd),$ banco);

if (@$ _POST[‘operacao’] == ‘login’) { $ login = $ _POST[‘login’]; $ senha = md5($ _POST[‘senha’]);

$ confirmacao = mysqli_query(“SELECT * FROM usuarios WHERE login = ‘$ login’ AND senha = ‘$ senha'”, $ db); $ contagem = mysqli_num_rows($ confirmacao); $ linha = mysqli_fetch_array($ confirmacao); //o problema aparentemente começa em confirmação, não sei o que fazer

if (@$ contagem == 1 ) { $ _SESSION[‘login’] = $ linha[‘login’]; // Login do Usuário $ _SESSION[‘id’] = $ linha[‘id’]; // ID do Usuário $ _SESSION[‘nivel’] = $ linha[‘nivel’]; // Nível de Permissão echo “location.href=’index.php'”; //Acessa o Painel } else { echo ‘ alert (“LOGIN OU SENHA ESTÃO INVALIDOS!”); document.location.href = (“login.php”); ‘; } } // Função POST OK ?> Login

Informe seu Login:

Informe sua Senha:

Help with Fatal error: Uncaught TypeError: number_format() expects parameter 1

I am using a php web script that all works successfully. But when I added this:

declare( strict_types=1); error_reporting(-1); ini_set('display_errors' , 'true');
PHP:

I now see this:

Fatal error: Uncaught TypeError: number_format() expects parameter 1 to be float, string given in /home/public_html/sources/videos/content.php:136 Stack trace: #0 /home/public_html/sources/videos/content.php(136): number_format('2.00') #1 /home/public_html/index.php(57): include('/home/.....') #2...
PHP:

Help with Fatal error: Uncaught TypeError: number_format() expects parameter 1

Ajuda com ERRO mysqli_query() expects at least 2 parameters, 1 given in

Olá, sou novo na programação em PHP e estou convivendo com este erro no meu script.

Warning: mysqli_query() expects at least 2 parameters, 1 given in    C:\xampp\htdocs\teste\adm\Model\connectDB.php on line 30 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in    C:\xampp\htdocs\teste\adm\Model\user.class.php on line 42 Notice: Undefined variable: arr in    C:\xampp\htdocs\teste\adm\Model\user.class.php on line 51 Warning: count(): Parameter must be an array or an object that implements Countable in    C:\xampp\htdocs\teste\adm\View\user.php on line 279 

meu código

<?php  class MySQLDB {      private $  host = "localhost";     private $  user = "teste";     private $  senha = "";     private $  base = "curso_online";      public function mysqli__construct()     {         $  this->db = mysqli_connect($  this->host, $  this->user, $  this->senha, $  this->base);         if (!$  this->db) {             echo "Erro: " . mysqli_error();             die();         } elseif (mysqli_select_db($  this->db, $  this->base)) {             echo "Erro: " . mysqli_error();             die();         }         mysqli_query("SET NAMES 'utf8'");         mysqli_query('SET character_set_connection=utf8');         mysqli_query('SET character_set_client=utf8');         mysqli_query('SET character_set_results=utf8');     }      public function ExecuteQuery($  query)     {         $  this->query = $  query;         return mysqli_query($  this->query);     }      public function close()     {         if (mysqli_close($  this->db)) {             $  this->db = null;         }     }      public function mysqli__destruct()     {         $  this->close();     }  }  ?> 

a outra página

<?php     include('includes/auth.php');     require('../Controller/controller.php');      if(isset($  _REQUEST['action'])){         switch ($  _REQUEST['action']) {             case "in":                 $  cad = new Control();                 $  cad->cadUser($  _POST["nome"], $  _POST["senha2"], $  _POST["email"], $  _POST["status"]);             break;             case "out":                 $  cad = new Control();                 $  cad->delUser($  _GET["nu"]);             break;             case "edit":                 $  cad = new Control();                 $  cad->editUser($  _POST["id"], $  _POST["nome"], $  _POST["email"], $  _POST["status"]);             break;             case "edit_senha":                 $  cad = new Control();                 $  cad->passUser($  _POST["id"], $  _POST["senha"]);             break;         }     } ?> <?php   include('includes/head.php'); ?> <body>     <!--[if !IE]>start wrapper<![endif]-->     <div id="wrapper">         <!--[if !IE]>start head<![endif]-->         <div id="head">             <? include('includes/header.php') ?>             <div id="menus_wrapper">                 <div id="main_menu">                     <ul>                         <li><a href="#" class="selected"><span><span>Home</span></span></a></li>                         <li><a href="online.php"><span><span>Curso-online</span></span></a></li>                                                 <li><a href="simulado.php"><span><span>Simulado</span></span></a></li>                                               </ul>                 </div>                 <div id="sec_menu">                     <ul>                         <?php                         if(isset($  _REQUEST['nu'])){                         ?>                           <li><a href="user.php" class="sm5">Voltar</a></li>                         <?php                         }else{                         ?>                         <li><a href="index.php" class="sm5">Voltar</a></li>                                              <?php                         }                         ?>                     </ul>                 </div>             </div>         </div>         <div id="content">             <div id="page">                 <div class="inner">                     <div class="section">                         <!--[if !IE]>start title wrapper<![endif]-->                         <div class="title_wrapper">                             <h2>Usuários</h2>                              <span class="title_wrapper_left"></span>                             <span class="title_wrapper_right"></span>                         </div>                         <!--[if !IE]>end title wrapper<![endif]-->                         <!--[if !IE]>start section content<![endif]-->                         <div class="section_content">                             <!--[if !IE]>start section content top<![endif]-->                             <div class="sct">                                 <div class="sct_left">                                     <div class="sct_right">                                         <div class="sct_left">                                             <div class="sct_right">                                                 <?php                                                     if(isset($  _GET['nu'])){                                                     $  c = new Control();                                                     $  arr = $  c->Controle_user($  _GET['nu']);                                                     for ($  i = 0; $  i < count($  arr); $  i++){                                                  ?>                                                 <h3>Usuário do sistema: <?=$  arr[$  i]->nome['nome']?></h3>                                                  <form id="VI_User" action="user.php?action=edit" method="POST" class="search_form general_form">                                                     <fieldset>                                                         <div class="forms">                                                             <div class="row">                                                                 <label>Nome Completo:</label>                                                                 <div class="inputs">                                                                     <input name="id" id="id" type="hidden" value="<?=$  arr[$  i]->id['id']?>" />                                                                     <span class="input_wrapper"><input class="text" name="nome" id="nome" type="text" value="<?=$  arr[$  i]->nome['nome']?>" title="Verifique o nome" /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                 <label>E-mail:</label>                                                                 <div class="inputs">                                                                     <span class="input_wrapper"><input class="text" id="email" name="email" type="text" value="<?=$  arr[$  i]->email['email']?>" title="O email está incorreto. Verifique." /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                    <label>Ativo:</label>                                                                                                                        <div class="inputs">                                                                     <span class="input_wrapper blank">                                                                         <select name="status" id="status">                                                                             <option value="1" <?=$  arr[$  i]->status['status']?'selected':''?>>Sim</option>                                                                             <option value="0" <?=!$  arr[$  i]->status['status']?'selected':''?>>Não</option>                                                                         </select>                                                                     </span>                                                                     <span class="system negative"></span>                                                                 </div>                                                                   </div>                                                                                                                           <div class="row">                                                                 <div class="buttons">                                                                     <ul>                                                                         <li><span class="button send_form_btn"><span><span>Atualizar</span></span><input name="" type="submit" /></span></li>                                                                         <li><span class="button send_form_btn"><a class="inline" href="#inline_content" style="color: white;"><span><span>Alterar senha</span></span></a></span></li>                                                                     </ul>                                                                 </div>                                                             </div>                                                         </div>                                                     </fieldset>                                                 </form>                                                 <div style='display:none'>                                                     <div id='inline_content' style='padding:10px; background:#fff;'>                                                         <form id="User_SENHA" action="user.php?action=edit_senha" method="POST" class="search_form general_form">                                                             <fieldset>                                                                 <div class="forms">                                                                     <div class="row">                                                                         <label>Senha:</label>                                                                         <div class="inputs">                                                                             <span class="input_wrapper"><input class="text" name="senha" id="senha" class="password_test" onkeyup="passwordStrength(this.value)" type="password" title="Verifique a senha" /></span>                                                                             <span class="system negative"></span>                                                                         </div>                                                                     </div>                                                                     <div class="row">                                                                         <p>                                                                             <label for="passwordStrength">Password strength</label>                                                                             <div id="passwordDescription">Password not entered</div>                                                                             <div id="passwordStrength" class="strength0"></div>                                                                         </p>                                                                     </div>                                                                     <div class="row">                                                                         <label>Repita a senha:</label>                                                                         <div class="inputs">                                                                             <span class="input_wrapper"><input name="id" value="<?=$  arr[$  i]->id['id']?>" type="hidden" /><input class="text" name="senha1" id="senha1" type="password" title="As senhas tem que ser iguais." /></span>                                                                             <span class="system negative"></span>                                                                         </div>                                                                     </div>                                                                     <div class="row">                                                                         <div class="buttons">                                                                             <ul>                                                                                 <li><span class="button send_form_btn"><span><span>Editar</span></span><input name="" type="submit" /></span></li>                                                                             </ul>                                                                         </div>                                                                     </div>                                                                 </div>                                                             </fieldset>                                                         </form>                                                     </div>                                                 </div>                                                 <?php                                                     }                                                     }else{                                                 ?>                                                 <h3>Cadastrar novo usuário do sistema</h3>                                                  <form id="User" action="user.php?action=in" method="POST" class="search_form general_form">                                                     <fieldset>                                                         <div class="forms">                                                             <div class="row">                                                                 <label>Nome Completo:</label>                                                                 <div class="inputs">                                                                     <span class="input_wrapper"><input class="text" name="nome" id="nome" type="text" title="Verifique o nome" /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                 <label>E-mail:</label>                                                                 <div class="inputs">                                                                     <span class="input_wrapper"><input class="text" id="email" name="email" type="text" title="O email está incorreto. Verifique." /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                 <label>Senha:</label>                                                                 <div class="inputs">                                                                     <span class="input_wrapper"><input class="text" id="senha2" name="senha2" type="password" onkeyup="passwordStrength(this.value)" title="Senha inválida. Tente uma nova senha." /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                 <p>                                                                     <label for="passwordStrength">Password strength</label>                                                                     <div id="passwordDescription">Password not entered</div>                                                                     <div id="passwordStrength" class="strength0"></div>                                                                 </p>                                                             </div>                                                             <div class="row">                                                                 <label>Repita a senha:</label>                                                                 <div class="inputs">                                                                     <span class="input_wrapper"><input class="text" id="senha3" name="senha3" type="password" title="As senhas devem ser iguais." /></span>                                                                     <span class="system negative"></span>                                                                 </div>                                                             </div>                                                             <div class="row">                                                                    <label>Ativo:</label>                                                                                                                        <div class="inputs">                                                                     <span class="input_wrapper blank">                                                                         <select name="status" id="status">                                                                             <option value="" selected>---</option>                                                                             <option value="1">Sim</option>                                                                             <option value="0">Não</option>                                                                         </select>                                                                     </span>                                                                     <span class="system negative"></span>                                                                 </div>                                                                   </div>                                                                                                                   <div class="row">                                                                 <div class="buttons">                                                                     <ul>                                                                         <li><span class="button send_form_btn"><span><span>Cadastrar</span></span><input name="" type="submit" /></span></li>                                                                         <li><span class="button cancel_btn"><span><span>Limpar</span></span><input name="" type="reset" /></span></li>                                                                     </ul>                                                                 </div>                                                             </div>                                                         </div>                                                     </fieldset>                                                 </form>                                                 <?php                                                     }                                                 ?>                                                 <?php include('includes/alerta.php'); ?>                                             </div>                                         </div>                                     </div>                                 </div>                             </div>                             <span class="scb"><span class="scb_left"></span><span class="scb_right"></span></span>                         </div>                     </div>                     <div class="section table_section">                         <div class="title_wrapper">                             <h2>Usuários cadastrados</h2>                             <span class="title_wrapper_left"></span>                             <span class="title_wrapper_right"></span>                         </div>                         <div class="section_content">                             <div class="sct">                                 <div class="sct_left">                                     <div class="sct_right">                                         <div class="sct_left">                                             <div class="sct_right">                                                  <form action="#">                                                 <fieldset>                                                 <!--[if !IE]>start table_wrapper<![endif]-->                                                 <div class="table_wrapper">                                                     <div class="table_wrapper_inner">                                                         <table cellpadding="0" cellspacing="0" border="0" class="display" id="example" width="100%">                                                             <thead>                                                                 <tr>                                                                     <th><a href="#" class="asc">ID#</a></th>                                                                     <th><a href="#" class="desc">Nome completo</a></th>                                                                     <th><a href="#">Email</a></th>                                                                     <th style="width: 96px;">A&ccedil;ões</th>                                                                 </tr>                                                             </thead>                                                             <tbody>                                                                 <?php                                                                 define('TABLE1', 'odd gradeA');                                                                 define('TABLE2', 'odd gradeB');                                                                 $  c = new Control();                                                                 $  arr = $  c->Controle_user($  id = null);                                                                 for ($  i = 0; $  i < count($  arr); $  i++){                                                                  ?>                                                                 <tr class="<? if($  i % 2){ echo TABLE1; }else{ echo TABLE2; }?>">                                                                     <td><?=$  arr[$  i]->id['id']?></td>                                                                     <td><?=$  arr[$  i]->nome['nome']?></td>                                                                     <td class="center"><?=$  arr[$  i]->email['email']?></td>                                                                     <td class="actions">                                                                         <ul>                                                                             <li><a class="action2" href="user.php?nu=<?=$  arr[$  i]->id['id']?>">2</a></li>                                                                             <li><a class="action4" href="user.php?action=out&nu=<?=$  arr[$  i]->id['id']?>" onClick="return confirm('Deletar o usuário <?=$  arr[$  i]->nome['nome']; ?> ?')">4</a></li>                                                                         </ul>                                                                     </td>                                                                 </tr>                                                                 <?php                                                                 }                                                                 ?>                                                             </tbody>                                                             <tfoot>                                                                 <tr>                                                                     <th><a href="#" class="asc">ID#</a></th>                                                                     <th><a href="#" class="desc">Nome completo</a></th>                                                                     <th><a href="#">Email</a></th>                                                                     <th style="width: 96px;">A&ccedil;ões</th>                                                                 </tr>                                                             </tfoot>                                                         </table>                                                     </div>                                                 </div>                                                 <div class="table_menu">                                                 </div>                                                 <!--[if !IE]>end table menu<![endif]-->                                                   </fieldset>                                                 </form>                                               </div>                                         </div>                                     </div>                                 </div>                             </div>                             <!--[if !IE]>end section content top<![endif]-->                             <!--[if !IE]>start section content bottom<![endif]-->                             <span class="scb"><span class="scb_left"></span><span class="scb_right"></span></span>                             <!--[if !IE]>end section content bottom<![endif]-->                          </div>                         <!--[if !IE]>end section content<![endif]-->                     </div>                     <!--[if !IE]>end section<![endif]-->                 </div>             </div>             <!--[if !IE]>end page<![endif]-->             <!--[if !IE]>start sidebar<![endif]-->             <div id="sidebar">                 <div class="inner">                                                  <?php //include('includes/info_user.php'); ?>                 </div>             </div>         </div>     </div>     <?php include('includes/footer.php'); ?> </body> </html> 

htmlspecialchars() expects parameter 1 to be string, array given drupal 8 [on hold]

I am getting the below error, I am not getting why it’s coming and i google it, But didn’t found any solution.

htmlspecialchars() expects parameter 1 to be string, array given in Drupal\Component\Utility\Html::escape() (line 424 of core/lib/Drupal/Component/Utility/Html.php)

Below is the image for the error.

error

mysqli_num_rows() expects parameter 1 to be mysqli_result, bool

Estou com um erro na hora de autenticar no php7. Esse meu código funciona no php5. Fiz as mudanças de msql para msqli, mas o problema continua. Alguem pode dar uma força ?

<?php 

include “conexao.php”; $ con = conectar();

$ username = $ _POST[“username”]; $ senha = $ _POST[“senha”];

$ resultado = mysqli_query($ con,”SELECT * FROM usuario where username=’$ username'”); $ linhas = mysqli_num_rows($ resultado); // erro nesta linha

if ($ linhas==0) {

echo “”; echo ” Usuário não encontrado !

“; echo ” Voltar

“; echo “”;

} else {

if ($ senha != mysqli_result($ resultado, 0, “senha”)) {

echo “”; echo ” A senha está incorreta !

“; echo ” Voltar

“; echo “”;

} else {

header (“Location: pagina_inicial.php”);

}

}

mysqli_close($ con); ?>