0

Can you guys tell me why Im showing list of PHP error messages on http://stocktongunshop.com/g1/

Somebody built my website long time ago and I recently uploaded some pictures on the photo gallery page and I got the list of PHP error messages. I have no idea whats going on.

Thanks!

Christian
  • 45
  • 1
  • 10
  • Yeah, your current version of php exceeds the standards this site was developed in. You need to update your site, or find a host willing to run an ancient version of php – Kai Qing May 07 '13 at 01:39
  • 1
    Because `display_errors` is enabled in your php.ini or via `ini_set('display_errors', true)` somewhere in your code. See http://stackoverflow.com/search?q=%22Deprecated%3A+Function+ereg()+is+deprecated%22 to actually _fix the error_. – Michael Berkowski May 07 '13 at 01:40
  • In short, `ereg()` is an old deprecated function. – Michael Berkowski May 07 '13 at 01:40
  • 1
    if you click on the link at the bottom of your own page, you could update to gallery 3 –  May 07 '13 at 01:42

1 Answers1

1

Without seeing code it's hard to give you the solutions.. But heres the list of depreciated functions being used and the recommended switch.

ereg();  // Switch to preg_match();
split(); // switch to preg_split();

Your warning:

Warning: Cannot modify header information - headers already sent by (output started at /home/stockton/public_html/g1/Version.php:41) in /home/stockton/public_html/g1/lib/lang.php on line 356

You have output prior to issuing a header();

Your other warning:

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/stockton/public_html/g1/Version.php on line 41

Add this at the beginning of the page:

date_default_timezone_set('America/Chicago');

Alternatively you are using Gallery v1.. To take out the heartache of having to re-code another API, upgrade as @dagon said.. Upgrade to gallery3


All this can be found and double checked by reading your depreciation/warning notes and using php.net or stackoverflow to finding a resolution to these problems.

Daryl Gill
  • 5,464
  • 9
  • 36
  • 69
  • I probably will need to upgrade the API and redo the codes. Its been so long since I've used the old codes. – Christian Aug 05 '13 at 20:25