Ir para conteúdo
Fórum Script Brasil

ddoctor

Membros
  • Total de itens

    2
  • Registro em

  • Última visita

Sobre ddoctor

ddoctor's Achievements

0

Reputação

  1. ddoctor

    Erro em arquivo php

    Ok vou dar uma olhada , desculpa a demora para responder.
  2. ddoctor

    Erro em arquivo php

    Galera boa tarde , Sou novo no forum , já peço desculpa caso postei no lugar errado. Vamos ao problema , tenho um site e migrei ele para outro hospedagem , tenho uma ferramenta onde envio os arquivos a serem postados no site mais ao fazer o login aparece os seguintes erros *1 ,*2 e *3. O primeiro mando o codigo para verificarem para saber se conseguem me ajudar, já os demais caso precisem me pedem que envio também. Muito obrigado. 1 - Warning: session_start() [function.session-start]: open(/var/lib/php-cgi/session/sess_ro4p4hqm026r8dhpsqnqe2ofg0, O_RDWR) failed: No such file or directory (2) in /home/storage/7/15/4b/spgatas1/public_html/manager/functions.php on line 5 <?php include_once($_SERVER['DOCUMENT_ROOT']."/configuration.php"); $jconfig = new JConfig; $mysqli= new mysqli($jconfig->host,$jconfig->user,$jconfig->password,$jconfig->db); //session_start(); //header("Content-Type: text/plain"); function checaCredenciais($user,$pass,$db){ $user=$db->real_escape_string($user); $q="SELECT * FROM man_users WHERE user='$user' AND pass='$pass'"; $response=$db->query($q); if($row=$response->fetch_object()){ return true; } else return false; } function todasGarotas($db){ $jconfig = new JConfig; $db= new mysqli($jconfig->host,$jconfig->user,$jconfig->password,$jconfig->db); $q="SELECT id FROM jos_content WHERE sectionid=1 ORDER BY created DESC"; $result=$db->query($q); while($row=$result->fetch_object()) $garotas[] = new garota($row->id,$db); return $garotas; } class garota{ public $nome; public $maior; public $menor; public $publicada; public $assinantes; public $data; public $texto; public $matches; public $id; public $telefones; public $tones; public $introtext; public function __construct($id,$db){ $q="SELECT title,alias,introtext,state,sectionid,catid,created FROM jos_content WHERE id=$id"; $result=$db->query($q); $row=$result->fetch_object(); $this->id=$id; $this->nome = $row->title; $this->link="/index.php?option=com_content&view=article&id=".$this->id; $this->publicada = $row->state; $this->data = $row->created; $this->texto = $row->introtext; $this->parseText(); } public function parseText(){ $stripped=strip_tags($this->texto,'<img>'); preg_match_all("/\[dados\](.*?)\[\/dados\]/is",$stripped,$dados); preg_match_all("/\[fotos\](.*?)\[\/fotos\]/is",$stripped,$fotos); preg_match_all("/\[telefones\](.*?)\[\/telefones\]/is",$stripped,$telefones); preg_match_all("/\[(.*?)=(.*?)\]/is",$dados[1][0],$this->matches); foreach($this->matches[1] as $key => $value){ $this->$value=$this->matches[2][$key]; } preg_match_all("/\[(.*?)=(.*?)\]/is",$fotos[1][0],$this->matches); foreach($this->matches[1] as $key => $value){ $this->foto[]=$this->matches[2][$key]; } preg_match_all("/\[(.*?)=(.*?)\]/is",$telefones[1][0],$this->matches); //print_r($this->matches[2]); unset($this->tones); foreach($this->matches[2] as $key => $value){ $this->tones[]=$value; } $this->telefones=$this->tones; unset($this->tones); unset($this->matches); unset($this->texto); } public function makeText(){ $this->texto="[dados]\n"; foreach($this as $key => $dado){ if($key=="nome"||$key=="publicada"||$key=="data"||$key=="texto"||$key=="id"); elseif($key=="foto"); else{ $this->texto .= "\t[".$key."=".$dado."]\n"; } } $this->texto.="[/dados]\n[fotos]\n"; foreach($this->foto as $key => $foto){ $this->texto .= "\t[foto=".$foto."]\n"; } $this->texto.="[/fotos]\n[telefones]\n"; foreach($this->telefones as $key => $telefone){ $this->texto .= "\t[telefone=".$telefone."]\n"; } $this->texto.="[/telefones]"; } public function makeAlias(){ $this->alias=trim(strtolower($this->nome)." ".$this->id); $this->alias=str_ireplace(" ","-",$this->alias); $this->alias=str_ireplace(array("--","---","----","-----"),"-",$this->alias); $this->alias=utf8_encode($this->alias); $this->alias=iconv("UTF-8", "ASCII//IGNORE", $this->alias); } public function save($db){ $q="SELECT id FROM jos_content WHERE id=$this->id"; $result=$db->query($q); if($db->error)echo $q."\n".$db->errno.":".$db->error; if(!$row=$result->fetch_object()){ $q="INSERT INTO jos_content(id) VALUE ($this->id)"; $db->query($q); if($db->error)echo $q."\n".$this->db->error." =>".$db->error; } $this->makeAlias(); $this->nome=utf8_encode($this->nome); $this->introtext=utf8_encode($this->introtext); $q="UPDATE jos_content SET title='$this->nome', alias='$this->alias', introtext='$this->texto', state='$this->publicada', sectionid=1, catid=$this->categoria, created='$this->data', access='$this->assinantes' WHERE id=$this->id"; $db->query($q); if($db->error)echo $q."\n".$this->db->error." =>".$db->error; } } ?> 2 - Warning: Unknown: open(/var/lib/php-cgi/session/sess_ro4p4hqm026r8dhpsqnqe2ofg0, O_RDWR) failed: No such file or directory (2) in Unknown on line 03 - Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php-cgi/session) in Unknown on line 0
×
×
  • Criar Novo...