Major website crash -- HELP!


#1

I have a website I coded in the late 1990’s using PHP & HTML. I added a sub-domain in the mid 2000’s, and updated the site weekly through 2011…

In 2011, I re-purposed the site, with some secure modules for sending personalized Greeting Cards to my friends. In 2017, the hosting service changed their architecture, but I was not informed with any details.

Many of my pages subsequently crashed, failed to load, or produced web server errors; Some issues MIGHT be related to differences between PHP 4 & PHP 7; other issues may be a simple architecture (folder structure) issue, but I have been unable to figure out exactly what the problems are.

I have the PHP 7 stack installed on my home PC, with Apache, Python & mySQL, and many of the pages that don’t load on the web, do load on my localhost…

Without making this too long of a post, I need help in getting this fixed.

My thanks in advance for your time & consideration.

–JT


#2

Since you have not posted code, are you looking to hire someone? I can move this to the freelance forum.

Most likely the issues are from trying to use Php4 code on Php7. The code will need to be updated.


#3

Thank you for the follow-up reply…

The error prompts are too vague to be able to direct me to focus on a specific portion of the code.

I agree that one likely cause is the loss of PHP 4 support, and my attempt to migrate to PHP 7 – HOWEVER, I am not seeing definitive error reports to help me identify any code that must be changed.

Hiring someone is likely my eventual end-point, but until I can get a better idea of the issues, I don’t want to pay for someone else to stumble as I am…

Suggestions for any tools to help me “walk through the code” would be a great start. (For example, I found two lines in the PHP.INI files that were using deprecated code, but removing those did not help. (It is frustrating to have the code work on my home PHP 7 environment, but fail in the hosted site.)

For example, I coded a very simple page with just a few lines to display text via HTML. Changing the file to a PHP extension fails on the hosted site, but works on my localhost… (I only did this as an exercise to help me figure out what is breaking… evidently, something in PHP is key.)

I am open to any suggestions.

Thank you!
JT


#4

Without seeing any code no one is going to be able to help you. Bottom line, Php4 code is going to require a re-write.


#5

^^^ That.

The errors would be helpful. And there is likely some funky stuff going on with your config as well.

PHP 4 tended to have php4 extensions.


#6

Thank you, I concur…

I’m weeding-through it now. For example, I found over 50 instances of php.ini (PHP 4) that the hosting service inserted into every folder (many years ago). Just deleting those got me into the actual pages where I am seeing mySQL errors on deprecated functions, so I am weeding through those one by one.
e.g.: mysqli_connect() replacing mysql_connect() and various error handling functions that have changed.

The code is probably way too sloppy to post at this time, but after some clean-up I may have something presentable.


#7

Yes, and after deleting the old out of date php.ini files, I am now seeing relevant error messages. Before that, I was just getting blank non-specific Web Server errors…


#8

Thank you for your earlier responses, and suggestions…

Once I deleted ALL of the old PHP.INI files (more than 50 locations), I began to get relevant error messages, and at least 90% were related to the deprecation of the old “mysql_” prefix that was replaced with “mysqli_”…

Over about 9 hours, I changed several hundred lines of code, and updated the related function parameters, and now, the site once again works as intended.

In short, problem solved. (But I am stiff quite perturbed the Hosting Service did not give me advance warning that they were dropping support for PHP 4; I believe it would have been easier to migrate while PHP 4 was still functioning).