Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Methods permitted on CCGI?
Topic Options
- 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
- :
- Methods permitted on CCGI?
Methods permitted on CCGI?
15-08-2007 11:12 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I'm trying to use the PUT, GET, and DELETE methods with a PHP script on the CCGI server, but not having much success. Are these methods actually permitted?
--
Regards,
Val
--
Regards,
Val
Message 1 of 6
(2,292 Views)
5 REPLIES 5
Re: Methods permitted on CCGI?
16-08-2007 12:55 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
PUT & GET yes, never used DELETE so can't say but I see no reason why it should not work.
What is your problem with using them?
What is your problem with using them?
Message 2 of 6
(392 Views)
Re: Methods permitted on CCGI?
16-08-2007 2:01 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Hi Peter,
I was getting the 405 error saying PUT wasn't permitted, but I see now that it's a problem with paths, of the sort http://......./code.php/level1/level2
I've hit this problem in the past with Plusnet's server not recognising the subpaths, and had to get round it using mod_rewrite.
'Twas so long ago, that I've forgotten most of how I did it
Bit of a pain that Plusnet still hasn't allowed these subpaths on their server.
--
Regards,
Val Sharp
I was getting the 405 error saying PUT wasn't permitted, but I see now that it's a problem with paths, of the sort http://......./code.php/level1/level2
I've hit this problem in the past with Plusnet's server not recognising the subpaths, and had to get round it using mod_rewrite.
'Twas so long ago, that I've forgotten most of how I did it

Bit of a pain that Plusnet still hasn't allowed these subpaths on their server.
--
Regards,
Val Sharp
Message 3 of 6
(392 Views)
Re: Methods permitted on CCGI?
14-10-2007 2:18 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
here is a example for you to play around with it works for me. All this does is open a dat file that contains just one number it adds one then resaves it.
<?php
$fd = fopen ("counter.dat", "rb");
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
}
fclose ($fd);
$fp = fopen('counter.dat', 'w'); // set the handle to the variable $fp
// and open the file in "w" mode.
$buffer = $buffer + 1;
flock($fp, LOCK_EX); // lock the file "exclusivley" for writing
fputs($fp, $buffer); // write the data to the file
flock($fp, LOCK_UN); // unlock the file
fclose($fp);
?>
To delete a file use something like this:
<?php
$delfile = "yourpath/yourdir/yourfile.txt";
if ($delfile !=""){
if(file_exists($delfile))
unlink($delfile);
}
?>
I hope this was of some help to you. Peter.
<?php
$fd = fopen ("counter.dat", "rb");
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
}
fclose ($fd);
$fp = fopen('counter.dat', 'w'); // set the handle to the variable $fp
// and open the file in "w" mode.
$buffer = $buffer + 1;
flock($fp, LOCK_EX); // lock the file "exclusivley" for writing
fputs($fp, $buffer); // write the data to the file
flock($fp, LOCK_UN); // unlock the file
fclose($fp);
?>
To delete a file use something like this:
<?php
$delfile = "yourpath/yourdir/yourfile.txt";
if ($delfile !=""){
if(file_exists($delfile))
unlink($delfile);
}
?>
I hope this was of some help to you. Peter.
Message 4 of 6
(392 Views)
Re: Methods permitted on CCGI?
14-10-2007 9:45 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Val has the problem, not me.
Also we are talking about form submit methods in PHP not writing to or deleting files.
Also we are talking about form submit methods in PHP not writing to or deleting files.
Message 5 of 6
(392 Views)
Re: Methods permitted on CCGI?
14-10-2007 9:34 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Peter we are talking about form submit methods in PHP not writing to or deleting files.
Ok. I am sorry, I didn't read the question correctly. By the way I was addressing my post to Val, my name is also Peter.
Message 6 of 6
(392 Views)
Topic Options
- 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
- :
- Methods permitted on CCGI?