1
The system was developed in php using the codeigniter 3 framework.
Works great on localhost.
I went up to the server and started giving problems. I checked php installed and is in version 5.6
Mistakes that happen:
Message: Object of class Ci_db_mysqli_result could not be converted to int
Filename: models/Users.php
Line Number: 12
Message: Cannot Modify header information - headers already sent by (output Started at /home/user145/public_html/sistema/system/core/Exceptions.php:271)
Filename: helpers/url_helper.php
Line Number: 564
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Usuarios_model extends CI_Model {
public function login($username, $password) {
$this->db->where("username", $username);
$this->db->where("password", $password);
$resultados = $this->db->get("usuarios");
if ($resultados > 0) { ----------------------> LINHA 12
return $resultados->row();
}
else {
return false;
}
}}
When I return to some page this error happens:
Severity: Warning
Message: unlink(/tmp/ci_session9c9ddb88511925d48aa2df5fd44857177296879f): Operation not permitted
Filename: drivers/Session_files_driver.php
Line Number: 384
Backtrace:
File: >/home/user145/public_html/sistema/application/controllers/Dashboard.php Line: 7 Function: __Construct
File: /home/user145/public_html/sistema/index.php Line: 315 Function: require_once
After going up the server, some pages are not being found when I try to access.
Place the error location, the reference codes!
– novic
first error any $query of yours that is returning an int that cannot be solved.
– alxwca
Okay, I’ll edit the question
– user102074
if ($resultados) { .....
already so resolves!– novic
Thanks. but that’s not normal... on the fucnion localhost and up the server, it doesn’t work
– user102074
@user102074 it is difficult to say if really in
localhost
is working properly, because, we have no way to test, now I indicated the wrong code that you are doing, because, there does not return an entire, there can returnnull
or aobjeto
so I said take it off>0
! then you are programming wrong, don’t take me so bad ... it is an indication that we need to study a little more.– novic
The bug has been fixed, but because now my ajax doesn’t work? can’t find any page? it’s as if the links are obsolete
– user102074
@user102074 ai is another context, for sure your code has other problems!
– novic
my views are not being found
– user102074
@user102074 weird even then has more coding problems.
– novic
Operation not permitted
Probably yourPHP
you are not allowed to write/remove this session file. Check permissions. Is there an error when you try to access yourviews
? You are using the same configs (Apache/Nginx, PHP etc) as the localhost on the server??– Valdeir Psr
When I try to access the views, error 404 occurs in the browser network. Views are on the server.
– user102074