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); ?>

Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt,

Tengo el siguiente script en php el cual funciona perfectamente en Windows 10 pero no en windows server

  <?php require_once('../conexion.php');     if (! empty ($  _SERVER[ 'HTTP_X_REQUESTED_WITH']) && strtolower ($  _SERVER[ 'HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {   $  cuenta = $  _POST['usuario'];   $  contra =mysqli_real_escape_string($  con, $  _POST["contraseña"]);   $  query = mysqli_prepare($  con, "SELECT idusuario, cuenta,nombre,tipo_usuario, contraseña from usuarios where cuenta = ?;");           mysqli_stmt_bind_param($  query, "s",$  cuenta);           $  query->execute();           mysqli_stmt_bind_result($  query,$  idusuario,$  cuenta,$  nombre, $  tipo_usuario,$  contraseña);           while (mysqli_stmt_fetch($  query)) {             if (password_verify($  contra,$  contraseña)) {               #$  token = password_hash($  fecha, PASSWORD_DEFAULT);               session_start();               session_regenerate_id(true);               $  _SESSION["usuario"] = $  idusuario;               $  _SESSION["tipousuario"] = $  tipo_usuario;               $  _SESSION["nombre"] = $  nombre;               #$  _SESSION["token"] = $  token;               $  _SESSION["start"] = time();               $  _SESSION['expire'] = $  _SESSION['start'] + (180 * 60);               $  respuesta =  "success";                echo utf8_decode($  respuesta);             }else {               echo "";           }         }           mysqli_stmt_close($  query); }  ?> 

Al intentar hacer la consulta me lanza el siguiente error:

<b>Warning</b>:  mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, boolean given in <b>C:\AppServ\www\analisis\php\consulta_usuario.php</b> on line <b>11</b><br /> <br /> <b>Fatal error</b>:  Call to a member function execute() on boolean in <b>C:\AppServ\www\analisis\php\consulta_usuario.php</b> on line <b>12</b><br /> 

Magento2 error ltrim() expects parameter 1 to be string, array given

I moved my Magento 2.2.5 based website into another existing site inorder to make them both one multi-site. I used a paid migration tool and all seemed to go fine except now when I am editing some products to add them to a category for one of my store views I get the below error. I even tried deleting the category within the admin panel and then re-creating the category thinking maybe something with the category just didnt migrate over correctly.   No such entity with id = 128   Warning: ltrim() expects parameter 1 to be string, array given in vendor/magento/module-catalog/Model/Category/FileInfo.php on line 102 

I am not sure how to find out what entity id 128 is . I checked all my other categories which have category images and descriptions added to them all that looks fine.

Any suggestions on how to troubleshoot this further and or how to fix it? I also checked my folder and file permissions already

Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\wamp64\www\updatemob.php on line 24

When I run the code, this error message is given. I did not fix the problem

Warning: mysqli_query() expects at least 2 parameters, 1 given in C:\wamp64\www\updatemob.php on line 24

$ Code12=$ _POST[‘Code’];

$  Source12=$  _POST['Source'];  $  Destination12=$  _POST['Destination'];  $  StartDate12=$  _POST['StartDate'];  $  EndDate12=$  _POST['EndDate'];  $  RisingTime12=$  _POST['RisingTime'];  $  ClearedTime12=$  _POST['ClearedTime'];  $  Duration12=$  _POST['Duration'];  $  Description12=$  _POST['Description'];  $  Option112=$  _POST['Option1 '];  $  Option212=$  _POST['Option2']; 

$ update = mysqli_query(“UPDATE tablefail SET

code=’$ Code12′,Source=’$ Source12′,Destination=’$ Destination12′,

StartDate=’$ StartDate12′,EndDate=’$ EndDate12′,RisingTime=’$ RisingTime12′,

ClearedTime=’$ ClearedTime12′ WHERE code=’$ Code12′”)

or die(mysql_error());

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given (PHP)

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given

Все статьи пересмотрел, не помогло. Первоначальный код такой:

$  row = mysqli_fetch_array($  result); 

Какой второй должен быть параметр чтобы ошибка ушла?