adriantc 0 Report post Posted September 18, 2007 Hello! Some time ago (over 2 years) I used a script to make a website... In only customized a little the script and some more the HTML template. Over an year ago I noticed that something happened to the previously working website... tons and tons of PHP errors... Now keep in mind I haven't done any changes t the website for a long long time (had exams decisive for my life) and now I want to get back.Since I don't know much PHP I want to get the experts opinion on why this errors appeared out of nowhere!Thank you! Share this post Link to post Share on other sites
rvalkass 5 Report post Posted September 18, 2007 Without knowing what the errors are, its very difficult to say what has gone wrong. However, if you are certain you haven't touched the script then the other possibility is a PHP upgrade. Some functions are removed in newer PHP versions, some have their parameters changed, all sorts of stuff goes on. It is possible that one function has been changed. That then snowballs and causes loads of other stuff to fail in your script, hence the mountain of errors.Also, if the script accesses a database, make sure it is using the correct username and password. If you changed those since you uploaded the script, then you need to give the script the new details.If that doesn't help, post the errors you get here, and I should be able to offer more precise help. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted September 18, 2007 I agree with rvalkass. The trap is now running php 5.2.0 and Mysql 5.0.27, both of which have had serious changes from 2 years ago. Get ready for php6 coming out soon. Very serious changes coming with that one. the option of running Safe Mode 'ON' is completely removed, apparently, which will do serious damage to older scripts which are programmed to be run under that. Share this post Link to post Share on other sites
adriantc 0 Report post Posted September 18, 2007 (edited) You can check the website from my signature for any errors. I'm sure you're both right so I guess it's hard now to find what function has changed. I wonder why don't they do PHP backwards compatible.I don't what to upgrade it or anything, I simply what it to work. I have begun programming on a new project... but it will take a while and meanwhile I need it to work!PS: This error emerged like 6-9 months ago without any changes whatsoever (no code changes, no password changes) Edited September 18, 2007 by adriantc (see edit history) Share this post Link to post Share on other sites
rvalkass 5 Report post Posted September 18, 2007 Just for simplicity, here are the errors:Â The last 3 (errors 7, 8 and 9) are easy to fix. They show that you have passed no username, password or server name to a MySQL database connection. Make sure your script has the right username, password and server name in it. Also, make sure the function you use to connect to the database is still in the latest version of PHP. If not, replace it with the latest function and syntax.Errors 1 to 6 refer to loading 2 external files. Firstly, make sure the two files (vars.php and regmail.php) still exist in the location the script is looking in. The error it comes up with (open_basedir) implies the script is trying to snoop around in locations it shouldn't be (such as other users accounts or system folders). Try changing the method you use to include those files to a simple include('filename.php'); . Again, that error could easily be caused by a PHP upgrade. Share this post Link to post Share on other sites
adriantc 0 Report post Posted September 20, 2007 Thank you for your help... I'll start figuring that out... By the way, can you tell me how I can stop the errors from appearing... as a temporal fix until I can check out every error? Share this post Link to post Share on other sites
galexcd 0 Report post Posted September 20, 2007 To stop php errors from occuring ad an @ symbol before each function that is giving you problems. Check the line numbers in the errors for seeing where to add them.Example: @include'file.php'; Share this post Link to post Share on other sites
rvalkass 5 Report post Posted September 20, 2007 Personally I would actually put the following function at the very top of the page: error_reporting(0); That will turn all errors off. When you want them tuned back on, either remove that line or replace the 0 with E_ALL to turn all errors back on. Share this post Link to post Share on other sites
adriantc 0 Report post Posted September 20, 2007 Ok. Thank you everybody! I'll come back as soon as I will start fixing the problems! Share this post Link to post Share on other sites