PHP files not being served at ccgi.username.plus.com
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- PHP files not being served at ccgi.username.plus.c...
PHP files not being served at ccgi.username.plus.com
16-08-2018 10:31 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 11:29 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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?
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 11:34 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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?
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 11:43 AM - edited 16-08-2018 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@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.
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 1:06 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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 .
Need to go through the rest now and check for other mysql calls.
Fingers crossed no other major changes in move to PHP7 .
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 2:14 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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?
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 2:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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.
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 8:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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
Re: PHP files not being served at ccgi.username.plus.com
16-08-2018 9:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@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.
Re: PHP files not being served at ccgi.username.plus.com
18-08-2018 11:13 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Looks like we overlooked the notice from our partner about the PHP upgrade, so apologies for that!
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:
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: PHP files not being served at ccgi.username.plus.com
20-08-2018 1:45 PM - edited 20-08-2018 2:00 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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?
Re: PHP files not being served at ccgi.username.plus.com
20-08-2018 2:39 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
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
Re: PHP files not being served at ccgi.username.plus.com
20-08-2018 2:56 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@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 ⤵
Re: PHP files not being served at ccgi.username.plus.com
20-08-2018 3:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@andydg Yes, split() would be missing as it's part of the ereg* extension which was also removed in PHP 7.
Re: PHP files not being served at ccgi.username.plus.com
20-08-2018 3:20 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
@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?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- PHP files not being served at ccgi.username.plus.c...