php help needed

Associate
Joined
24 Sep 2006
Posts
1,267
Hi,
I maintain a little website, including the gaming script vWar. My service provider upgraded its PHP however and now my vWar is not working :(

All pages display the error:
Fatal error: Cannot redeclare lcfirst() in /home/user/public_html/website/vwar/includes/functions_common.php on line 534

Can anyone help me fix this? I have no knowledge of PHP myself.

Thanks
 
Thanks for the help. I tried to apply the fix
Code:
<?php
if ( false === function_exists('lcfirst') ):
    function lcfirst( $str )
    { return (string)(strtolower(substr($str,0,1)).substr($str,1));}
endif;
?>

This had some success - the main page now loads but the following errors appear:
Code:
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/user/public_html/website/vwar/includes/functions_common.php on line 94

Deprecated: Function eregi() is deprecated in /home/user/public_html/website/vwar/includes/_config.inc.php on line 2

Deprecated: Function eregi() is deprecated in /home/user/public_html/website/vwar/includes/_config.inc.php on line 2

In addition, the admin page is not loading, the following errors appear:
Code:
Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/user/public_html/website/vwar/includes/functions_common.php on line 94

Deprecated: Function eregi() is deprecated in /home/user/public_html/website/vwar/includes/_config.inc.php on line 2

Deprecated: Function eregi() is deprecated in /home/user/public_html/website/vwar/includes/_config.inc.php on line 2

Virtual War v1.5.0 Administrator Control Panel


Deprecated: Function split() is deprecated in home/user/public_html/website/vwar/includes/functions_admin.php on line 935
 
Thanks all, I managed to fix all the errors - or so I thought.
I now am getting the following:
Code:
Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/website/vwar/admin/admin.php:210) in /home/user/public_html/website/vwar/admin/admin.php on line 335
This seems a more complicated problem than the above ones, so I was hoping someone could help.
The line of code in question is:
Code:
if ($GPC['action'] == "addwar")

Thanks for any help!
 
Hey guys, thanks for the replies. Sadly I think you over estimate my PHP knowledge :p . It's not my code, I was only able to fix the other errors because they were very simple (changing "split" to "explode" for example).
I uploaded the page in question (to my space) perhaps someone can give it a quick look, if it's an easy fix.link
Thanks if you can! :)
 
Thanks for all the help :) I re-downloaded the original script and line 210 does have content:
Code:
	list ($hour, $minute) = split("[:]", $wartime);
I am unsure why my version on the webspace does not. I may have changed the "split" but I would not have deleted it entirely :confused:
I replaced my hosted version with this one and now see the following:
Code:
Deprecated: Function split() is deprecated in /home/user/public_html/website/vwar/admin/admin.php on line 210

Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/website/vwar/admin/admin.php:210) in /home/user/public_html/website/vwar/admin/admin.php on line 335

The first error I think I can fix (replacing split with explode?) the second one I have no idea what to do with. The line it references contains:
Code:
		header("Location: admin.php?action=warlist");

Thanks again :)
 
Back
Top Bottom