I have a longtext field called Article in which i store articles of various lengths. My longest article is 'just' a 100,000-word play, and yet when I try to echo it on my screen, only half of it shows up. Why is that? I thought the longtext data type took waaaay more data than that. Thanks, Brian
LONGTEXT has a maximum length of 4,294,967,295 or 4GB (232 – 1) characters which should be sufficient for your data. Make sure max_allowed_packet size (in my.cnf) is not affecting your saving and retrieval of data.
I have a shared hosting package. Where would I find my.cnf? I called my host, and they don't know -- said an engineer would get back to me in three days.
I'm on UNIX shared hosting -- I'm not sure those files are available to me. I can't access them using FTP in TextWrangler, in any case. My main folder is htdocs, but i can't go below that. --could the problem with LONGTEXT be caused by excessive use of STR_REPLACE? For each character in the play, I have str_replace insert CSS based on the character name. The script to do that looks something like what follows. Could this script be overtaxing the server and causing it to cut out before echoing the entire article? $find="#".$CLASSNAME."#"; $replace="<div class='insertcharnew' style='color:".$kolor1.";'>".$NOTES."<img src='".$BACKGROUNDIMAGE."' title='".$TITLETEXT."' class='insertcharnewimage' style='border-color:".$kolor1."' alt='".$TITLETEXT."'></div>"; $Article=str_replace($find,$replace,$Article); PHP: