Urgent php problem

On the morning of Sept 6, my site stopped working. I had not made any changes for a couple of months. The Host (Netfirms) said to update my php, so I changed it to the lates on my RW program (8.2.9). It still did not work, and after chatting with people on their help line, I was told to set it back to 7.4, which I have done. The site still did not work.

I uploaded it into a new folder, and it does not work there, so I started experimenting, and noticed that html pages work fine (in other places on the site). I changed the main index page on the “new” location, and it works except for the counter, which is php.

For my counter (HitCounter v1.1.1) to work, I need all the pages in php. How can I get the php pages to run.

Hi @RichardLW,

We’ll first need to figure out what is causing the problem.

If you post a link to the page (the php version) here, we can have a look at the code, and the error messages.

I can make an educated guess though: PHP 7.4 is REALLY old, the people behind PHP stopped offering support in November 2022 They have been urging hosters to uninstall PHP 7.4 and replace it with a newer version to prevent security issues. Your hoster has most likely updated their installed version of PHP, removing the version your pages were depending on.

If HitCounter requires PHP 7.4 functionality, and your hoster no longer offers 7.4, then that explains the sudden issues.

but before we get ahead of ourselves, please post a link to the page in question.

Cheers,
Erwin

The site is

www.widman.biz

I have also written to Bryn Owen Design to see if there is an update to my counter.

Hi @RichardLW,

The page is a bit of a mess.

At the moment, there is no index.php file on your server, but there IS an index.html. The browsers that your visitors ar using, find that file, and try to load it. But that file contains a security problem, which will cause modern browsers to abort loading the file.

In index.html, you’re trying to load unencrypted data (HTTP) over an encrypted (HTTPS) by trying to serve visitors a snippet from searchvity.com. Modern browsers block this, as loading assets from an unencrypted domain and then embedding them into an encrypted connection, is a security risk.

See if you can alter the URL to searchivity.com into an HTTPS variant. So:

http://www.searchvity.com/?dn=widman.biz&pid=9POL6F2H4  

should become:

httpS://www.searchvity.com/?dn=widman.biz&pid=9POL6F2H4

(note the S in httpS://)

Similarly:

http://www.searchvity.com/

should become:

httpS://www.searchvity.com/

This should take care of the mixed content blocking.

Now I can’t check for the errors in PHP that you’re reporting, as the index.php file has been deleted from your server.

If you put it back (perhaps rename it to index-2.php if you don’t want browsers to load it in by default at this point), we can have a look at the errors it generates.

Cheers,
Erwin

Thank you.

First, I’ve b been playing with different ideas to get it to work, so I had changed the index file. I just put it back to php.

On the security part, where do I set that? When https started, my hosting service made the change, and it has worked for a while. I have no idea where I would change that.

And when I click on your link to http://www.searchvity.com/ I get an Avast blocker that it is malware.

Hi @RichardLW,

It looks like you pasted in a bit of code, which means you can manually alter it and add the extra ‘s’ to the URL. Find the code (t’s pasted somewhere in the body of the pages in your project) and alter it like you would alter other text on your site.

If you’re unsure, you could share the project file with us here and we can have a look. Make sure you remove your server credentials (username, password) before you share your project file here though - you do not want to share those with others.

Cheers,
Erwin

Thank you very much. Then I guess someone hacked into the server, as I don’t show “searchvity” anywhere on my hard drive. This looks like it is over my head, as I don’t know where you saw it nor how to edit it.

I am uploading a zip file (157 MB) of the site without my name or password. And really appreciate the help.

I decided to look through files on the server, and have found two files in the main directory (not the public) that are duplicates to two on my opening page, but contain the serchvity. I have deleted those, and will upload again, but don’t know if that is all I have to do.

It is now almost 5 pm. I have deleted the files in question, and uploaded. Now I get a 404. I’ve requested Netfirms to see why, but they have not been very useful.

Thanks for your help

Hi @RichardLW,

No problem.

If all else fails, remove all files from the diredctory on the server (using either an FTP client or your host’s control panel).

Then, open your project in RapidWeaver and click File > Re-Publish All Files. This will force RapidWeaver to upload all files to the server again, as if it was your very first time publishing the website.

If the Searchvity.com pointers are still present in the code after that, then it is something that you pasted in your code (either yourself, or a stack did it for you).

The problem on my end is that every browser I have (and I have quit a few of them) simply blocks your page from loading as it spots the unsafe Searchvity.com referral. This also means that I can’t view the full source code or any other assets.
So in order to help, the project file would be best (as I can then publish it locally and have a stroll through the files myself).

Cheers,
Erwin

I forgot to put the link to my upload of the zip file of my project. Here it is: https://www.widman.biz/uploads/Widman.rwc.zip

There is no “searchivity” on my hard drive.

What I uploaded was after having RW republish all files.

This is the response I got this morning from the host:

| Dear Richard,
|
|----|
| |
| |
| Thank you for following up with us. I recognize how important it is to get this issue resolved.

I understand that there were some files that you did not upload and that were also not part of the website present in the web directory. I have scanned your entire account and did not find any malware in it. Additionally, I have verified uploading a test file at https://widman.biz/test.php and it works fine. Also, I tried accessing the file https://widman.biz/metric.html it works fine. Here’s the screenshot for reference:

I have accessed your website, and currently it keeps on loading and times out. However, the test PHP and also HTML files work fine with the domain, indicating that there is no server-side issue affecting the website. We provide support only in hosting and server-related inquiries. I’m afraid we are unable to dig deep into the scripting-related issues of the website. If your website requires any particular php.ini settings or server requirements, let us know so we can check further.

Please feel free to reply to this email if you have any further questions, we are happy to help you.

Regards,
Ishwara M
Escalated Support |

Hi @RichardLW,

I took a look at your site.

You’ve used a number of (older) stacks that I don’t have, so I’ve not been able to publish your site locally in the exact same fashion as it would on your own Mac. I’ve also not been able to test your site with your theme, as I don’t own that theme.

I was able to check for PHP code insertions in the header or body in RapidWeaver itself though (there were none, other than Google Tag Manager which is not the culprit).

So where the Searchvity.com links came from - I cant tell you. But your original problem is most definitely caused by an incompatibility in Hit Counter, as that’s the only stack that’s used on all your PHP-pages that actually generates PHP code. The other stack that you use, do not generate PHP code (but HTML and JavaScript instead), so those cannot cause the PHP incompatibility issue.

My advice:

  • Remove Hit Counter from all pages in your project file
  • Delete all files from the directory on your server
  • Open your project file in RapidWeaver, and click File > Re-Publish All Files to upload everything to the server.

The above steps will fix the PHP error (as Hit Counter is gone) and will remove the index.html that links to searchvity.com and replace it with a fresh index.php.

This is a quick fix to get your business site up and running again.

Next, it’s best leave Hit Counter off your site to prevent PHP incompatibility issues. If you really need to show a counter, there are other options out there (or use a simple PHP script that you can get for free off the internet).

Cheers,
Erwin

Thanks. I will try that. I would like to show the hits, but not at the expense of the site not working. I wonder why all of a sudden something changed and it started having problems, since I had not done anything to cause it to stop.

Hi @RichardLW,

PHP is awesome, but working with PHP can be a bit finicky - each new version of PHP (that your host installs) removes functionality that was introduced in older versions (usually because it has been replaced with a newer or faster way to do things). If you still have an older stack that generates PHP code, those will eventually stop working, unless their publisher updates it of course.

The people behind PHP usually give you a few months notice so you can convert your old PHP code into the new way or working, but if no one is there to update a stack that you use, it will stop eventually working.

Cheers,
Erwin