Jump to content

Recommended Posts

Hi

 

I'm hoping someone can help me with an old PHP 3 script which used to work fine but now bombs since my ISP upgraded us to a new server with PHP 5.3.

 

The script (see attached) is supposed to query a MYSQL database table called observations and display the output.

 

Would be grateful if anyone could tell me why it's not working and how to correct it.

 

Thanks.

 

James

results-date-1.php

Pfft-- Are you surprised it doesn't work? PHP 3 is one month away from being 12 years old. It's even older than Windows XP and that's been around forever.

 

At 6.26 KB it shouldn't take long to rewrite it for 5.3. Long-form globals like $HTTP_POST_VARS are now just $_POST, function signatures have changed quite a bit (mostly by adding options, but some have been changed), and there's support for classes and objects. And that only gets you up to 5.2: after that a bunch of things became deprecated (magic_quotes, register_globals, assorted functions and extensions).

 

Check the changelogs to find out more - the above is just some of the more important changes in a nutshell.

Edited by requinix

You have bugs in this code that would have thrown errors 12 years ago had you turned error-reporting on. Put this at the top of your script:

 

error_reporting(E_ALL);

 

Then start from the top and fix every warning and error.

 

You also have blocks in here which are unnecessary, like your switch to determine the month of the year.

 

wren_functions.php probably has more problems.

 

You should also tell strangers what "bombs out" means, since we're not sitting next to you able to actually read the errors that you can see.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.