PHP upgrade killed my Wordpress site...
- 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 upgrade killed my Wordpress site...
PHP upgrade killed my Wordpress site...
12-04-2010 2:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Since the PHP upgrade my Wordpress install has stopped running with a
'Premature end of script headers: index.php' error.
When you try and bring up the homepage. I've followed a few threads over here and tried setting the recommended permissions (including blanket setting everything with 755) to no effect.
I've followed Gabe's suggestions for creating a .cgi permissions script, set it to 700, but trying to run that in a browser brings up a
'Premature end of script headers: perms.cgi' error instead.
.htaccess just has a couple of comment lines in it so I don't think that's doing much...
Anyone out there seen anything similar or have any thoughts as to what might be happening?
Thanks in advance...
Andrew.
Re: PHP upgrade killed my Wordpress site...
12-04-2010 11:55 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
<?php
phpinfo();
?>
FTP it to your root ccgi directory (/), change its permissions to 0700 then browse to it does that run?
If not, if you move it down a level set permissions on that directory to 0710 (file still 0700) and browse to it will it run?
If it still will not run make sure you do not have a .htacess file in either / or that directory - comment them out by adding a letter in front of the dot if necessary.
David
Re: PHP upgrade killed my Wordpress site...
13-04-2010 8:51 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks for your help, there could be life in the website yet!
Quote FTP it to your root ccgi directory (/), change its permissions to 0700 then browse to it does that run?
That came up with the premature end of script error again...
Quote If not, if you move it down a level set permissions on that directory to 0710 (file still 0700) and browse to it will it run?
Ahh! Now that did run

Quote If it still will not run make sure you do not have a .htacess file in either / or that directory - comment them out by adding a letter in front of the dot if necessary.
Commenting out the .htaccess didn't make any odds when trying to run stuff from the / directory. Does that mean I need to move everything into a subfolder of / and reference it in some way?
Thanks for your help - it's much appreciated!
Andrew.
Re: PHP upgrade killed my Wordpress site...
13-04-2010 3:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: pushbike
Quote If not, if you move it down a level set permissions on that directory to 0710 (file still 0700) and browse to it will it run?
Ahh! Now that did run![]()
OK, that is what I was hoping to hear.

I think the problem could be that permissions on your root directory are not set correctly. If that is the case you can't change it yourself, Plusnet have to do it.
What you can do is check those permissions, but demonstrating the ability to run a script was essential first.
Create a file called toplevelperms.cgi (and that extension is important) containing
#!/bin/bash
echo "Content-type: text/plain"
echo
ls -l -d ../
FTP it to the directory one level down where you know files run. Change it's permissions to 0700 and browse to it.
You should get something like
drwx--x--T 8 username cgiusers 4096 Mar 25 01:09 ../
(that's chmod 1710) but I suspect you will have something else there.
If that is the case, give the CSC a ring and ask for it to be fixed.
David
Re: PHP upgrade killed my Wordpress site...
13-04-2010 8:41 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
drwx-wxrwx 7 username cgiusers 4096 Apr 13 09:16 ../
I'll get a ticket raised!
Thanks for being patient - I've just discovered you answered a similar question not that long ago

You've certainly been more help than Plus Net

Re: PHP upgrade killed my Wordpress site...
13-04-2010 11:29 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

Once the top-level permissions are fixed the directory and file permissions within your WordPress installation would probably benefit from sorting put using Gabe's script which I think you've already stored as perms.cgi.
Unfortunately the script only modifies directory and .cgi/.pl/.php file permissions so files of other types need changing manually to 0640 (or 0600 if not read by browsers) - see cgi platform php upgrade faq.
Additionally if your installation contains uploaded images you might find images don't display after running Gabe's script. This is because the images need to be readable by the web server. The following quote describes how to fix that.
Quote from: spraxyt The permissions on the WordPress uploads directory (which is created when you upload your first image) are probably 0710 if you've followed the recommendations for CCGI. Change these for the uploads directory, and any sub-directories of uploads that WordPress might have created to 0750. Change the permissions of existing images to 0640. Images uploaded in future should automatically inherit 0640 from the directory structure.
David
Re: PHP upgrade killed my Wordpress site...
15-04-2010 5:10 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Thanks!
Re: PHP upgrade killed my Wordpress site...
03-05-2010 8:42 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Does anyone know how to get round that one???
Re: PHP upgrade killed my Wordpress site...
03-05-2010 11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
If you carry out the check mentioned in reply #1 will that simple program run?
David
Re: PHP upgrade killed my Wordpress site...
11-07-2010 11:28 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Unfortunately I am not very experienced with this website malarky and was wondering what is meant by 'running' a file? When I attempt to access the files in question it asks me to login, then asks me if I want to open or save the file. When I click open it just shows me the text in the file in my web browser, nothing seems to 'run'. Am I being a bit thick or is there something amiss? Any help would be great, thanks
Re: PHP upgrade killed my Wordpress site...
12-07-2010 8:30 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Try replacing 'ftp:' in your address line with 'http:' and if you made the file executable (chmod to 0700) you should find it will execute (run).
Re: PHP upgrade killed my Wordpress site...
12-07-2010 10:59 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator

Re: PHP upgrade killed my Wordpress site...
13-07-2010 4:37 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
- 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 upgrade killed my Wordpress site...