cancel
Showing results for 
Search instead for 
Did you mean: 

PHP files not being served at ccgi.username.plus.com

pentwyn
Grafter
Posts: 41
Thanks: 6
Registered: ‎31-07-2007

PHP files not being served at ccgi.username.plus.com

Hello,

This morning, I noticed that my PHP files are not being served on my cgi webspace - I get a blank page with just "Not Found [CFN #0005]" on it.

Other file types (e.g. jpg, .txt) are being served OK.

I have changed nothing on the website recently (apart from trying a permissions change on one file this morning, to see if it would fix the issue - it didn't), and it was working fine in the last couple of days.

I'm able to access management via hosting.plus.net and via FTP to confirm the file(s) still exist in /public.

 

If any Plusnet staffer would be able to take a look, that would be great, thanks.

Rhys

16 REPLIES 16
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

PHP on my cgi webspace is working. However I'm using the Fast CGI experimental system.

Since yesterday that seems to have changed from PHP 5.6 to 7.1. Fast CGI uses different user start-up files so I need to check what's changed.

In your case are you asking for specific PHP files or is the "Not Found" problem for the default index.php?

David
andydg
Grafter
Posts: 46
Thanks: 10
Registered: ‎16-03-2010

Re: PHP files not being served at ccgi.username.plus.com

Hi, having a similar problem - though not gone too deep yet.

My Wordpress hosted site seems to be working fine, but my own additional php coded pages are not ...

Same blank or not found error

Some problem at Hostopia?

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

@andydg Are you using the default CGI set up? If that has also changed to PHP 7.1.15 I can understand a blank page being served if a PHP error occurs (for example do you use mysql rather than mysqli?). However that shouldn't give "Not Found" errors.

WordPress will have been updated a long time ago to work with PHP 7.1.

Edit: corrected PHP minor version number.

David
andydg
Grafter
Posts: 46
Thanks: 10
Registered: ‎16-03-2010

Re: PHP files not being served at ccgi.username.plus.com

Thanks David, yes am using pretty old php code (not broken, don't fix - till now!) and so per your suggestion have changed mysql calls to mysqli and some pages now (part) loading Smiley.

Need to go through the rest now and check for other mysql calls.

Fingers crossed no other major changes in move to PHP7 .

 

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

Thanks for that information @andydg

Removal of the mysql interface (in favour of mysqli) is the main incompatibility I'm aware of. Also all the ereg functions have been removed. Anyone catching execution errors and doing special handling might also find code changes are needed.

There are lots of changes to how PHP code operates but code relying on non-documented behaviour has always been high-risk.

You mentioned getting either a blank page, or a "Not Found" error - from your ongoing code inspection are there any clues on what determines which applies? Huh

David
andydg
Grafter
Posts: 46
Thanks: 10
Registered: ‎16-03-2010

Re: PHP files not being served at ccgi.username.plus.com

So far the only real issue have come across is mysql -> mysqli, but it does take some careful checking as odd parameters need checking for correct syntax/order. Am still working through my code changing these mysql calls so will flag up anything else I find in case others doing same. 

Maybe misled on the original error, with Chrome I think it was either Page not found or Page load error (500), while on Firefox it just had blank page. 

pentwyn
Grafter
Posts: 41
Thanks: 6
Registered: ‎31-07-2007

Re: PHP files not being served at ccgi.username.plus.com

Thanks to everyone for their input.

I found the reason for the "Not found" message:  In the root of my CGI /public directory was a .htaccess file, presumably there since day one, pointing to php5 code, which I assume has recently disappeared.

Content of .htaccess:

# php5-cgi enabler
AddHandler phpCGI .xml .php
<IfDefine SSL>
Action phpCGI https://secure50.securewebsession.eu/cgi.username.plus.com/cgi-bin/php5-cgi
</IfDefine>
<IfDefine !SSL>
Action phpCGI /cgi-bin/php5-cgi
</IfDefine>

 

Now that I've deleted that file, PHP code is being run, and I'm in the process of changing from mysql to mysqli as helpfully pointed out earlier.

 

Many thanks to all once again.

Rhys

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

@pentwyn I'm glad you found the cause of the "Not Found" errors. As you said it's likely the PHP binary referenced in that .htaccess file has been removed as part of the version upgrade. Thumbs_Up

David
bobpullen
Community Gaffer
Community Gaffer
Posts: 16,886
Thanks: 4,977
Fixes: 316
Registered: ‎04-04-2007

Re: PHP files not being served at ccgi.username.plus.com

Looks like we overlooked the notice from our partner about the PHP upgrade, so apologies for that! Undecided

If the upgrade is causing significant pain for anybody, then I believe you can drop the PHP version back to 5x using the PHP Manager application in the Hosting Control Panel:

php_manager.jpg

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

dunbankin
Grafter
Posts: 26
Fixes: 1
Registered: ‎28-05-2008

Re: PHP files not being served at ccgi.username.plus.com

Bob:

Help!  I've got the same problem - my old php page used to work very well until a few days ago - I understand that somebody's changed the PHP version from v5 to v7, without telling me.  Now I'm getting "Not Found [CFN #0005]" in Firefox and Opera, as described above, even though Filezilla shows the .php file sitting there on the server.  I've been into PHP Manager and tried both the second option "PHP-CGI" and the third option "PHP5-CGI" as shown in this post, they both said "enabled" after a while, but neither got my old code working again.  I don't have a .htaccess file - never needed one, and don't understand what they're for.  Correction:  Just checked again, and a .htaccess file has appeared - must have been put there when I enabled PHP-CGI.  It contains:

# for PHP-CGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php-cgi

# for php and securewebexchange
<IfDefine SSL>
    AddHandler php-cgi .php
    Action php-cgi https://secure50.securewebsession.eu/ccgi.jpdljd.plus.com/cgi-bin/php-cgi
</IfDefine>

- but it's still not working.  I don't understand why my old code hasn't started working again.  I've checked MySQL Manager in Control Panel, and my db is still there, and I seem to be able to log into it.  Can you (or anybody else) help, please?

andydg
Grafter
Posts: 46
Thanks: 10
Registered: ‎16-03-2010

Re: PHP files not being served at ccgi.username.plus.com

Hi dunbankin (and Bob), I also tried the PHP version swap originally and made no difference to my site either - not sure why.

I am just about fully running again having changed all my php code to be compliant with v7 - certainly need to change mysql to mysqli (inc checking required parameters) as previous replies, but also any other calls to removed functions - I found I still used split(), now removed.

Might find this page useful http://php.net/manual/en/migration70.php

 

 

bobpullen
Community Gaffer
Community Gaffer
Posts: 16,886
Thanks: 4,977
Fixes: 316
Registered: ‎04-04-2007

Re: PHP files not being served at ccgi.username.plus.com

@dunbankin, what happens if you delete, or rename that .htaccess file, e.g. to .htaccess.bak?

Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵

spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

@andydg Yes, split() would be missing as it's part of the ereg* extension which was also removed in PHP 7.

David
spraxyt
Resting Legend
Posts: 10,063
Thanks: 674
Fixes: 75
Registered: ‎06-04-2007

Re: PHP files not being served at ccgi.username.plus.com

@dunbankin Selecting PHP-CGI does indeed create that /public/.htaccess file but the version of PHP which is run is still 7.1.15; it just becomes the fastcgi module.

Selecting PHP5-CGI should modify that file to run PHP 5.6.34 fastcgi. What happened when you tried that?

David