Bom dia,

É provável que sua aplicação não tenha conseguido se conectar ao banco:

189.149.25.1:50708] PHP Warning:  mysql_fetch_array() expects
parameter 1 to be resource, boolean given in (...)


Outra coisa, cuidado ao publicar logs com IPs válidos.

faz assim:

mysql_pconnect('host,'login,'pass') or die(mysql_error());


Felipph

Em 28 de fevereiro de 2018 22:45, Leonardo S. S. da Rocha <
leonardo...@gmail.com> escreveu:

> Eis o que o Log de erro me retornou. Não diz muito pra mim. Pode ser
> pelo fato de eu não conhecer muito PHP. Alguma coisa está passando
> neste log que eu não estou vendo e que poderia ser o motivo do meu
> problema?
>
> [Wed Feb 28 22:33:13.013875 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined index: idPessoa in
> /var/www/html/sistema/sessao.php on line 4
> [Wed Feb 28 22:33:13.014863 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  A session had already been started -
> ignoring session_start() in /var/www/html/sistema/sessao.php on line
> 25
> [Wed Feb 28 22:33:13.014950 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: imagem in
> /var/www/html/sistema/index.php on line 107
> [Wed Feb 28 22:33:13.014978 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 139
> [Wed Feb 28 22:33:13.014986 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 152
> [Wed Feb 28 22:33:13.014993 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 157
> [Wed Feb 28 22:33:13.015001 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 163
> [Wed Feb 28 22:33:13.015007 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 169
> [Wed Feb 28 22:33:13.015014 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 176
> [Wed Feb 28 22:33:13.015021 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined variable: nivel in
> /var/www/html/sistema/index.php on line 219
> [Wed Feb 28 22:33:13.101396 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 386
> [Wed Feb 28 22:33:13.105538 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 538
> [Wed Feb 28 22:33:13.105682 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Warning:  mysql_num_rows() expects parameter 1
> to be resource, boolean given in /var/www/html/sistema/index.php on
> line 630
> [Wed Feb 28 22:33:13.105694 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 633
> [Wed Feb 28 22:33:13.105817 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 645
> [Wed Feb 28 22:33:14.021971 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined index: msg in
> /var/www/html/sistema/login.php on line 51, referer:
> http://gaia.uel.br/sistema/
> [Wed Feb 28 22:33:14.022006 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined index: msg in
> /var/www/html/sistema/login.php on line 61, referer:
> http://gaia.uel.br/sistema/
> [Wed Feb 28 22:33:14.022016 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined index: email in
> /var/www/html/sistema/login.php on line 72, referer:
> http://gaia.uel.br/sistema/
> [Wed Feb 28 22:33:14.022024 2018] [:error] [pid 1709] [client
> 189.149.25.1:50700] PHP Notice:  Undefined index: senha in
> /var/www/html/sistema/login.php on line 78, referer:
> http://gaia.uel.br/sistema/
> [Wed Feb 28 22:33:28.103500 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Notice:  Undefined index: msg in
> /var/www/html/sistema/index.php on line 221, referer:
> http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:28.191985 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 386, referer:
> http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:28.196796 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 538, referer:
> http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:28.196954 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Warning:  mysql_num_rows() expects parameter 1
> to be resource, boolean given in /var/www/html/sistema/index.php on
> line 630, referer: http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:28.196981 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 633, referer:
> http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:28.197111 2018] [:error] [pid 2533] [client
> 189.149.25.1:50708] PHP Warning:  mysql_fetch_array() expects
> parameter 1 to be resource, boolean given in
> /var/www/html/sistema/index.php on line 645, referer:
> http://gaia.uel.br/sistema/acessar.php
> [Wed Feb 28 22:33:34.372007 2018] [:error] [pid 29556] [client
> 189.149.25.1:50716] PHP Notice:  Undefined index: msg in
> /var/www/html/sistema/cadastrar_cientifica_trabalhos.php on line 232,
> referer: http://gaia.uel.br/sistema/cientifica_trabalhos.php
> [Wed Feb 28 22:34:08.870392 2018] [:error] [pid 29557] [client
> 189.149.25.1:49729] PHP Notice:  Undefined index: s in
> /var/www/html/producao_tecnica.php on line 116
> [Wed Feb 28 22:34:08.870427 2018] [:error] [pid 29557] [client
> 189.149.25.1:49729] PHP Notice:  Undefined index: s in
> /var/www/html/producao_tecnica.php on line 128
>
> 2018-02-28 16:53 GMT-03:00 Paulino Kenji Sato <pks...@gmail.com>:
> > Ola,
> > Isso me parece uma falta de tratamento de erros por parte de quem fez a
> > aplicação.
> >
> > Existem dois "driver" de acesso ao mysql no php, o original, mysql  e o
> > melhorado o mysqli.
> > O mysql original esta em desuso, não sendo mais suportando no php7.
> > Tem também o PDO_MYSQL, orientado a objeto.
> > O mysqli tanto pode ser orientando a objeto como procedural.
> > Não e complicado migrar do mysql para o mysqli procedural, muitas vezes
> > bastando somente trocar o mysql_ pelo mysqli e incluir o "link" de
> conexão
> > com o bando de dados.
> >
> > Verifique o log de erro do servidor.
> > Não existe erro? o log deve estar desligado no php.ini
> >
> > Servidores de produção costumam suprimir as mensagens de erros produzidos
> > pelo php. Dificultando a identificação de que esta ocorrendo erros de
> > execução. Muitas vezes apresentando um resultado aparentemente normal ,
> caso
> > o programador não tenha feito as rotinas de tratamento de erro.
> > As mensagens de erros podem ser habilitados no php.ini, o .htaccess e o
> > próprio .php
> > Busque no google por: php error reporting
> >
> >
> >
> >
> > 2018-02-28 13:56 GMT-03:00 Leonardo S. S. da Rocha <
> leonardo...@gmail.com>:
> >>
> >> Olá pessoal, boa tarde!
> >>
> >> estou com uma aplicação que gerencia o conteúdo de um site da
> >> universidade onde estudo (gaia.uel.br). Esta aplicação, escrita em php
> >> 5.6, não está funcionando corretamente no servidor de produção. Ao
> >> tentar inserir um novo artigo, por exemplo, recebemos a mensagem de
> >> que o artigo foi inserido corretamente. No entanto algo acontece pois
> >> o artigo não foi inserido de fato. Já testei, via phpmyadmin, a
> >> inserção de um artigo e funciona perfeitamente. Isso me faz pensar que
> >> não estou com problemas no Mysql.
> >> Como a versão stretch atualizou a versão do php pra 7, penso que tenha
> >> alguma coisa a ver com isso!
> >>
> >> Eu tentei este material:
> >>
> >> https://stackoverflow.com/questions/46378017/install-php5-6-in-debian-9
> >>
> >> Mesmo assim a coisa não funciona. Eu simulei um cenário com máquina
> >> virtual com Windows 7 e xampp instalado (ambiente usado pelo
> >> desenvolvedor) pra testar e a aplicação funciona perfeitamente bem.
> >> Não sei se está me escapando algo que o xampp trata. Enfim, gostaria
> >> de um ajuda pra me dar uma luz por onde começar pra encontrar o
> >> problema e resolve-lo.
> >>
> >> Esta é a versão do ambiente de produção:
> >>
> >> PHP Version 5.6.33-1+0~20180105151408.9+stretch~1.gbp0deeda
> >>
> >> Esta é a versão do PHP do ambiente de teste
> >>
> >> PHP Version 5.6.33
> >>
> >> Alguém saberia me orientar em como proceder pra achar esse problema?
> >>
> >> Agradeço.
> >>
> >
> >
> >
> > --
> > Paulino Kenji Sato
>
> </leonardo...@gmail.com></pks...@gmail.com>
>
>

Responder a