Strange characteres and one result more
| From: | Julio Nobrega Trabalhando | Date: | Fri, 26 Oct 2001 19:36:25 +0000 |
| Subject: | Strange characteres and one result more | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-435@lists.php.net to get a copy of this message | ||
Hi All,
I was using the DB Pear classes that came with PHP 4.0.6 for Windows. They
run fine on my machine (Win2k, Apache 1.3.22). But when I upload to a web
server, strange things happen.
On a Win2k with IIS 5, if I have more than one row at the database, it
doesn't return nothing. The page goes loading and loading forever, until
somekind of 'CGI Timeout error' happens.
Thinking that these errors were because of a poor machine performance
(since they work fine on my computer), I switched web server.
It is a Linux (I don't know the distribution), running latest Apache and
PHP (0.6). I do can have more than one row at the database. But when I use
the php 4.0.6's PEAR DB classes, if I have 3 rows at the database, the last
one will come with a result, which is 'aaa' (just for tests) randomly as:
'[strange characters]'.
And I mean, STRANGE characters, Pretty much like the bitwise operators
when you use them on a varibale. Also, the 'id' that it should appear on a
link it does not. Other filds display fine.
Then I downloaded DB.php, PEAR.php, common.php and mysql.php from CVS.
Now, all three results come. But also a fourth one! Since there's no 4th
result, it only appear the HTML I have, without any mysql field contents (of
course, there's no 4th result).
I am running a simple while loop, from a 'SQL = SELECT field1, field2,
field3, etc...',and NOT 'SELECT *.
Is it a performance problem? I am going crazy with this.
The mysql table has this format:
CREATE TABLE noticias (
idnoticia mediumint(8) unsigned NOT NULL default '0',
titulo varchar(35) NOT NULL default '',
chamada varchar(255) NOT NULL default '',
conteudo text NOT NULL,
imagem_nome varchar(255) NOT NULL default '',
author varchar(25) NOT NULL default '',
publicado datetime NOT NULL default '0000-00-00 00:00:00',
loja varchar(255) NOT NULL default 'Todas',
PRIMARY KEY (idnoticia),
KEY publicado (publicado),
KEY loja (loja)
) TYPE=MyISAM;
#
# Extraindo dados da tabela
noticias
#
INSERT INTO noticias VALUES (20,'aaaaaa aaaaaa aaaaaa aaaaaa','b 3r23 r23
r23rwfd wdfwf','aaaaaa aaaaaa aaaaaa aaaaaa aaaaaa
aaaaaa','','clovis','2001-10-26 16:37:47','Todas');
INSERT INTO noticias VALUES (21,'aaaaaa aaaaaa','aaaaaa aaaaaa aaaaaa aaaaaa
aaaaaa aaaaaa','aaaaaa aaaaaa aaaaaa aaaaaa aaaaaa
aaaaaa','','clovis','2001-10-26 16:38:06','Todas');
INSERT INTO noticias VALUES (22,'bbbb','bbbb bbbb bbbb bbbb bbbb
bbbb','bbbb
bbbb bbbb bbbb bbbb bbbb bbbb','','clovis','2001-10-26
16:39:04','Todas');
If I must say, pretty strange!
Anyone can help me what to do?
--
Julio Nobrega
A hora está chegando:
http://toca.sourceforge.net