fflandrath53
New Member
- Messages
- 42
- Reaction score
- 0
- Points
- 0
Ok, when it comes to programming I'm living proof a little knowledge is dangerous. A php script to clean-up some hot links was launched, it appeared to process for a while then it crashed. The first strangeness, the server displayed a "web site temporarily unavailable" page instead of a standard php error message. At first I shrugged it off as just another bug somewhere in my code, the code that crashed and exited the system, flushed into electronic oblivion. Or so I thought.
I was messing around with php image functions, copying source images from remote hosts to a rollerposter directory, /bm_images/. For example:
Next I checked the error log. Nothing. Then things got really strange. I looked in the target directory, which was emptied before running the script, (See example1.txt attachment), it was full of images. And it was continuing to add images every time I refreshed the display. The script was still running, doing exactly what I had intended except, it was invisible. It had crashed, I was certain of that. But here it was, steadily adding images.
For about an hour I flailed around like a fish out of water trying to make the problem go away. Nothing I did worked and instead crashed my browser trying to delete images from the ever-growing directory.
Frustrated I went over to the legacy file manager, it has a command to delete a folder and any files in it. That seemed to work, at least the directory was gone and so the images stopped. Or so I thought.
Well I re-created the directory /bm_images/ and made some code changes, then I noticed the strangest thing, remember I'm not running any script at this time, yet suddenly the /bm_images/ directory is once again full of images. And it's still growing.
So, back to the legacy fm and delete the directory, again. I tried one more time, same result, images just keep coming.
There are about 5300 entries in the table that are SELECTED into a standard mysql array ($row=['FIELD']) in a WHILE loop controlled by the array length.
If anyone can shed some light on this odd turn of events I would really appreciate it.
Thanks Floyd
btw, Starka seems to be running very well, and the new cpanel is much improved over the last one. Thanks for such a great free hosting service (and I'm very close to being able to purchase an upgrade).
I was messing around with php image functions, copying source images from remote hosts to a rollerposter directory, /bm_images/. For example:
Code:
case "JPEG":
$im=@imagecreatefromjpeg($img0);
if( !$im )
{
$img0="http://rollerposter.pcriot.com/images/bookmark.png";
$img0_width=32;
$img0_height=32;
} else {
$img0="http://rollerposter.pcriot.com/images/bm_images/$temp.jpg";
$write_img=@imagejpeg($im, "./images/bm_images/$temp.jpg");
if( !$write_img )
{
$img0="http://rollerposter.pcriot.com/images/bookmark.png";
$img0_width=32;
$img0_height=32;
}
}
break;
Next I checked the error log. Nothing. Then things got really strange. I looked in the target directory, which was emptied before running the script, (See example1.txt attachment), it was full of images. And it was continuing to add images every time I refreshed the display. The script was still running, doing exactly what I had intended except, it was invisible. It had crashed, I was certain of that. But here it was, steadily adding images.
For about an hour I flailed around like a fish out of water trying to make the problem go away. Nothing I did worked and instead crashed my browser trying to delete images from the ever-growing directory.
Frustrated I went over to the legacy file manager, it has a command to delete a folder and any files in it. That seemed to work, at least the directory was gone and so the images stopped. Or so I thought.
Well I re-created the directory /bm_images/ and made some code changes, then I noticed the strangest thing, remember I'm not running any script at this time, yet suddenly the /bm_images/ directory is once again full of images. And it's still growing.
So, back to the legacy fm and delete the directory, again. I tried one more time, same result, images just keep coming.
There are about 5300 entries in the table that are SELECTED into a standard mysql array ($row=['FIELD']) in a WHILE loop controlled by the array length.
If anyone can shed some light on this odd turn of events I would really appreciate it.
Thanks Floyd
btw, Starka seems to be running very well, and the new cpanel is much improved over the last one. Thanks for such a great free hosting service (and I'm very close to being able to purchase an upgrade).