Website php problems

Hi!

I run a small website for a football pool that I run for friends. Been running the website for years using Mambo (I know it’s old and not around anymore, but it was working great). Anyway, what seems out of nowhere the website is now getting a billion php deprecation errors and some other errors that started in the last week or so. The only thing I did that could have caused it is added another menu option, but even after deleting that, still having problems.

I am not good at all with php, so I am at a loss after scouring the Internet for a reason.

Website is www.cutthroatfootballpool.com if you want to view the errors.

I would really appreciate any help and am willing to compensate if that is needed.

Thanks,

Ray

I suspect your server has upgraded the php version from php 5.3 will cause the errors the best solution would be to upgrade your mambo if thats possible otherwise you could turn off warnings about deprecated functions by putting the following in a php.ini file:

[php]
error_reporting = E_ALL & ~E_DEPRECATED
[/php]

its not advisable as the problem is still there, you just don’t see the warnings.

Okay, just registered so I can reply.

I actually found that php code to add to the php.ini when searching the internet for help. I added it as you see below from my php.ini file:

[php]register_globals = off
allow_url_fopen = off

expose_php = Off
error_reporting = E_ALL & ~E_DEPRECATED
max_input_time = 60
variables_order = “EGPCS”
extension_dir = ./
upload_tmp_dir = /tmp
precision = 12
SMTP = relay-hosting.secureserver.net
url_rewriter.tags = “a=href,area=href,frame=src,input=src,form=,fieldset=”

[Zend]
zend_extension=/usr/local/zo/ZendExtensionManager.so
zend_extension=/usr/local/zo/4_3/ZendOptimizer.so
[/php]

I uploaded the file and then went to my website and all the errors are still showing.

I am also not sure it is due to an upgrade on the PHP version. I use Godaddy hosting and when I go into my control panel for my hosting, and choose programming languages, it has PHP 4.x checked and PHP 5.2 and 5.3 are options, but neither is checked.

I understand that I should fix these issues and probably will hire a programmer to do that, but as we are close to the start of the football season, I would like the get these error messages off my website as the site seems to work well except for all these error messages.

If there is anything else I can provide that would be helpful, please just let me know.

I sincerely appreciate any help and if someone wants to help me fix this I would have no problem compensating for their time.

P.S. If I did want to hire a freelance php programmer to fix these items, is there are good place on the web to do that?

Thanks

Ray

Sorry, one last item. The php.ini file I updated was on the root drive of the server, can’t find one anywhere else, but could it be somewhere else and I am just editing the wrong one?

Really lost here?

Yes I believe it should be on the root trying adding display_errors = Off

for hiring there’s a lot of freelance bidding sites such as http://www.freelancer.com/ have a look around http://www.google.co.uk/search?q=hire+a+freelance+programmer&aq=f&sugexp=chrome,mod=0&sourceid=chrome&ie=UTF-8

Yeah, tried the display_errors item as well and didn’t change anything as all the errors were still showing.

Thanks for the link to freelancers, seems that is the way I will need to go.

Very much appreciate your help

if your using a shared server it maybe that there’s a global settings that cannot be overidden from php.ini see if there’s any settings in your control panel not familiar with Go daddy so I can’t advise if there is or not.

I believe it is shared as here is the description of my hosting plan:

Hosting - Shared - Economy - Linux - 1 year (recurring)

The settings categories available in the web hosting control panel are:

FTP Users
Hosted Domains
Programming Languages
404 Error Options
FrontPage Extensions
SSH
Password Vault
Domain Change (Primary)
URL Redirects
File Extensions Management

Again, your help is really appreciated!

Ah ha, think I found what happened after perusing some of the godaddy help topics:

Troubleshooting Deprecated PHP Functions
Date Submitted: 8-3-2012 by Go Daddy
This was helpful!
Not what you’re looking for?
We want your feedback!
Topic: Web Hosting

As we announced in in June, we are discontinuing support for PHP 4.

As a constantly developing language, PHP versions include functions that become deprecated (cease to exist or change the expected result of the function). These changes can result in warnings and error messages when you update your version of PHP.

Modifying the error reporting helps treat symptoms of deprecated functions, but it’s not the same as updating the code. Keeping your code updated is the preferred solution.

Common issues can arise when using deprecated functions:

Functions just flat-out stop working — Very few functions get completely removed from PHP. But sometimes it happens. Applications or scripts might rely on functions that are simply no longer supported. PHP.net has a page for each function describing its use, and includes information about when or if a function was deprecated or removed. In these cases it suggests which functions could be used instead, or which functions were meant to replace the deprecated version.
Warning messages display about deprecation — These warning messages don’t normally interfere with site functionality. However, in some cases they might disrupt the process of the server sending headers. This can cause login issues (cookies/sessions don’t get set properly) or forwarding issues (301/302/303 redirects use headers to instruct the browser).
If you receive errors regarding function deprecation, the following two methods can tell PHP to simply stop mentioning deprecated functions or coding:
You can add the following line to your php5.ini file:
error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE
Or you may add the following line to a PHP file itself, inside existing or new <?php ?> tags:
error_reporting(E_ALL & ~E_DEPRECATED & ~E_NOTICE);

This leaves on important PHP error reporting such as Fatal Errors or Parser Errors. These errors flat-out prevent a file from working correctly, so it’s best you leave them on. Fatal Errors are things such as “I tried to perform that command but I’m not sure what that command is” or “I ran out of time to work on running these instructions”. Parser Errors are things such as “I was not expecting this comma in the middle of the line” or “Why is there a variable here, I was already done with this line.”

If somehow all else fails and you need to turn off all error messages, you can add the following line to your php5.ini file:
display_errors = Off
or you may add the following line to a PHP file itself, inside existing or new <?php ?> tags:
error_reporting(0);

This means you’ll get no indication of why a file failed to perform its expected function, so typically this is not the solution you’re looking for.

Finally, if you are interested in suppressing a specific error message, you can do so for even a single time that a function is used. For instance, running this in PHP 5.3:
split(‘l’,‘hello’);
gives you the error message
Deprecated: Function split() is deprecated in /test.php on line 1
This error message conveniently tells you exactly what line uses the offending function.

So if you update the line to say:
@split(‘l’,‘hello’);
There is no more error message. The @ symbol instructs the function to try, and not report if it fails.

For more information, see:
Setting the levels in-code
Setting error reporting levels in php.ini
Suppressing individual errors with @

I will try the above.

Okay, got the error messages disappearing now, so that is good.

But, now my frontpage is not showing my news feeds/posts. Everything else seems to be working fine, but click “home” anywhere should take you back to the main page and show “posts” but it is not showing anything.

Any ideas? but this may be more specific to Mambo than php, but really not sure.

Okay turned some of the error messages back on and the front page is now showing the following:

Home

Warning: date() [function.date]: 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/Denver’ for ‘MST/-7.0/no DST’ instead in /home/content/c/i/r/circle909/html/pool/components/com_content/content.php on line 24

Warning: Parameter 2 to frontpage() expected to be a reference, value given in /home/content/c/i/r/circle909/html/pool/includes/Cache/Lite/Function.php on line 100

would either of these cause my “content” to not show up on the main page?

the date just means no timezone specified nothing to worry about really but frontpage() one is, I’m guessing thats a function that gets the content not sure what you would need to do to resolve it, may be due to the php version upgrade

Warning: Parameter 2 to frontpage() expected to be a reference, value given in /home/content/c/i/r/circle909/html/pool/includes/Cache/Lite/Function.php on line 100

Ok, well thank you very much for the help and some direction. Guess I got some detective work and php learning to do this weekend or get a freelancer to fix it all.

If anyone else has any ideas or is knowledgable enough that wants to do some quick freelance work, please just let me know.

Thanks!!

Sponsor our Newsletter | Privacy Policy | Terms of Service