Posts Tagged ‘cron jobs’

Image Upload Form, Cron Job Tester, & MySQL Table Copier

Sunday, November 30th, 2008

Over the weekend, I posted three new code snippets:

The Image Upload Form has everything you need to create a simple HTML form allowing users to upload their own JPEG images. After it verifies that the image is valid, it saves it and generates a thumbnail using the PHP GD library of image functions. The code is clean, so it's pretty easy to manipulate it to suit your needs (other file formats, different resizing, etc.)

The Cron Job Tester is the result of an epic battle I had with the server hosting one of my client's sites. I couldn't figure out why these cron jobs weren't running and so constructed this little tester to simply log an entry in a text file every minute. From there, I was eventually able to find out that the host's "Easy Cron" function was overwriting my crontab file. Arrrgh...

Finally, I posted the PHP code to Copy All the Rows in a MySQL Table to another, identical MySQL table. You can, of course, do this easily in phpMyAdmin, but I needed to have the function automated for this particular project. Hopefully you can get some use out of it too.


Copyright © 2010, Ink Plant. All rights reserved.