cancel
Showing results for 
Search instead for 
Did you mean: 

CCGI error when trying PHP

brianhabby
Newbie
Posts: 6
Registered: 07-07-2007

CCGI error when trying PHP

I'm trying to use PHP and have uploaded two files as a test to my CGI space but when I go to http://ccgi.username.plus.com/ I get an error message that says CCGI Error: Execution of this script not permitted.
I think it might have to do with file permission not set to 755. I have no idea how to do this. Can anyone help please?
regards
brian
16 REPLIES
brianhabby
Newbie
Posts: 6
Registered: 07-07-2007

Re: CCGI error when trying PHP

Okay,
I've managed to change the file permissions now. It seems it is also called CHMOD Value. However, I am still having problems.
I have a webpage with a footer and I want to use the PHP include function to place the footer in the page.
I have put the following code into my index.htm page:
<?
include("footer.php");
?>
I have a simple text file called footer.php which I have put in the CGI space but when I test it the footer is not displayed on my web page.
Any ideas would be helpful.
regards
Brian
Community Gaffer
Community Gaffer
Posts: 17,665
Thanks: 658
Fixes: 162
Registered: 05-04-2007

Re: CCGI error when trying PHP

Is the footer.php file in the same folder as the file calling it?
Thats about the extent of my php knowledge Cheesy
If this post resolved your issue please click the 'This fixed my problem' button
 Chris Parr
 Plusnet Staff
brianhabby
Newbie
Posts: 6
Registered: 07-07-2007

Re: CCGI error when trying PHP

Hi Chris
Thanks for your reply.
Yes the footer.php file is in the same folder. Actually I've now got it working - after a fashion. Trouble is I'm still trying to figure out what I did to make it work at all.
I think file permissions is very important, it just won't work if this is wrong. I think all I did was to make the footer.php file permissions to 755 as well as the index.php but to be honest I've lost track of exactly what I did, which is a bit annoying.
I have now got two files in the CGI space, index.php and footer.php both with file permissions set to 755.
When I had the site hosted in the normal FTP space I had a folder with some graphics in it and because the PHP file is stored in the CGI space I had to make sure the link to those graphics was redirected back to the FTP space - if you follow me.
Anyway, now what I want to do is have a link in the footer text to a contact us page. That's my next challenge for this evening - well there's now't on the telly worth watching is there...
If you're interested the site is www.bhall.co.uk - not much there, still experimenting.
regards
Brian
Community Gaffer
Community Gaffer
Posts: 17,665
Thanks: 658
Fixes: 162
Registered: 05-04-2007

Re: CCGI error when trying PHP

I probably should learn php, used to know asp quite well (not .net)
You could try putting a header.php file on there too, this time keep track of the changes you make to get it working Wink
If this post resolved your issue please click the 'This fixed my problem' button
 Chris Parr
 Plusnet Staff
brianhabby
Newbie
Posts: 6
Registered: 07-07-2007

Re: CCGI error when trying PHP

Hi Chris
Funny how the obvious just never seems to hit you - why didn't I think about doing a header.php as well?
This is a great idea and one I shall now embark upon.
I got the link working in the footer BTW. Just a case of inserting the HTML into the file where you want the link.
regards
Brian
moorhouses
Grafter
Posts: 44
Registered: 30-07-2007

Re: CCGI error when trying PHP

Hi guys, just to let you know, there is actually a prewritten script on the ccgi servers which you can use to easily set the permissions of all of the files in your directory...
Just enter the following command line:
/usr/local/bin/fixphpperms.sh -r
I hope that helps.
Ben
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Re: CCGI error when trying PHP

Just for clarity it only fixes .php files and the -r will do a recursive search for .php files in all sub-directories of the current directory. You may still need to use chmod for setting permissions on directories.
See http://usertools.plus.net/tutorials/id/3 for an overview of file permissions and using chmod. Note: it was written for the old cgi platform, the new one is much mor secure and you should never set any world/all permissions on files or directories.
Also I recommend you use <?php ?> rather than the short form <? ?> as some web hosting does not support the short form.
eileenabbas
Newbie
Posts: 6
Registered: 03-08-2007

Re: CCGI error when trying PHP

peter i have website which is being upgraded. the webdesigner tried to ftp the new site which is written in PHP. did not work. got the cgi server space information but i get the same error message as the other guy? you mentioned chmod but my web designer man is onholiday and i do not know how to get this permission if indeed this is the problem? can you help
Quote from: Peter
Just for clarity it only fixes .php files and the -r will do a recursive search for .php files in all sub-directories of the current directory. You may still need to use chmod for setting permissions on directories.
See http://usertools.plus.net/tutorials/id/3 for an overview of file permissions and using chmod. Note: it was written for the old cgi platform, the new one is much mor secure and you should never set any world/all permissions on files or directories.
Also I recommend you use <?php ?> rather than the short form <? ?> as some web hosting does not support the short form.

nadger
Rising Star
Posts: 4,498
Thanks: 46
Registered: 13-04-2007

Re: CCGI error when trying PHP

Easiest way to change permissions is to use ftp programme to access your ccgi space and you can chmod files.
To get 755 you can sometimes just type it in - alternatively you need
User - read- write - execute
Group - read - execute
Other - read - execute
   
eileenabbas
Newbie
Posts: 6
Registered: 03-08-2007

Re: CCGI error when trying PHP

thanks, i think i know how to change the permission now but may not need it as i can see my new files in ftp://ccgi.username.plus.com so in theory the files are there and just need plusnet to point the domain at the new server which they have not done yet. they have sent me an answer today saying they can point the domain there but they are now saying it is not set up properly? could they mean that i did not use the correct permission and if so should i try to upload them again using ftp but with the permission set to 755?
by the way i am such a novice at this so excuse any basic misundertandings!
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Re: CCGI error when trying PHP

You can point your domain at the ccgi by changing the DNS records associated with it under the domain name page on the portal.
See http://usertools.plus.net/tutorials/id/14
You then wait 24 hours for the change to be actioned.
nadger
Rising Star
Posts: 4,498
Thanks: 46
Registered: 13-04-2007

Re: CCGI error when trying PHP

Quote from: eileenabbas
thanks, i think i know how to change the permission now but may not need it as i can see my new files in ftp://ccgi.username.plus.com so in theory the files are there and just need plusnet to point the domain at the new server which they have not done yet. they have sent me an answer today saying they can point the domain there but they are now saying it is not set up properly? could they mean that i did not use the correct permission and if so should i try to upload them again using ftp but with the permission set to 755?
by the way i am such a novice at this so excuse any basic misundertandings!

You can actually see files regardless of their permissions - no need to reload them as you just chmod them.
Which ftp programme are you using?
eileenabbas
Newbie
Posts: 6
Registered: 03-08-2007

Re: CCGI error when trying PHP

thanks. i can see my files in ftp://ccgi.username.plus.com as you said but plus net must have pointed the server now as when i log into my actual website www.theavenueclinic.com i get the error message script not accepted permission problem again.  i am using ispwich ftp profesional to upload. you said i do not need to upload them again just change the chmod them but how do i actually do this??
thanks again
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Re: CCGI error when trying PHP

I gave a tutorial link earlier
Quote from: Peter
See http://usertools.plus.net/tutorials/id/3 for an overview of file permissions and using chmod. Note: it was written for the old cgi platform, the new one is much mor secure and you should never set any world/all permissions on files or directories.