LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 10-25-2006, 12:09 AM   #1
lovalixir
LQ Newbie
 
Registered: Apr 2004
Location: Singapore
Posts: 15

Rep: Reputation: 0
An Unknown Filter Was Not Added:PHP


Hi,

I am trying to use Visual C#.NET to Upload pictures to my Linux Server. And Apache kept giving me this error


"An Unknown Filter Was Not Added:PHP"

I think it has something to do with the configuration of Apache.

client.UploadData("http://www.myserver.com/",UploadImage);

And Yup. I have already set the file permission on the server side corretly. Can any one help me with this problem?

Leo
 
Old 10-25-2006, 10:30 PM   #2
claytonjohnroby
LQ Newbie
 
Registered: Oct 2006
Posts: 19

Rep: Reputation: 0
From what I read after searching for client.UploadData this function uploads a data buffer to a resource with the specified URI.

This leads me to believe that
Code:
client.UploadData("http://www.myserver.com/",UploadImage);
sends the data contained in the "UploadImage" variable to the "http://www.myserver.com/" URI.

Assuming http://www.myserver.com/ defaults to http://www.myserver.com/index.html this would just send data to a process that serves the index.html file. I think that this would not do much at all.

Something better might be

Code:
client.UploadData("http://www.myserver.com/loadimage.php?imagedata=",UploadImage);
Where loadimage.php can process the data now stored in the imagedata variable.

Another alternative is to replace the PHP script with a CGI script.

The error that you received might indicate that your server is configured to default to index.php instead of index.html is which case you might be sending binary data directly to a PHP script and it is getting confused.
 
Old 10-29-2006, 07:22 PM   #3
lovalixir
LQ Newbie
 
Registered: Apr 2004
Location: Singapore
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by claytonjohnroby
From what I read after searching for client.UploadData this function uploads a data buffer to a resource with the specified URI.

This leads me to believe that
Code:
client.UploadData("http://www.myserver.com/",UploadImage);
sends the data contained in the "UploadImage" variable to the "http://www.myserver.com/" URI.

Assuming http://www.myserver.com/ defaults to http://www.myserver.com/index.html this would just send data to a process that serves the index.html file. I think that this would not do much at all.

Something better might be

Code:
client.UploadData("http://www.myserver.com/loadimage.php?imagedata=",UploadImage);
Where loadimage.php can process the data now stored in the imagedata variable.

Another alternative is to replace the PHP script with a CGI script.

The error that you received might indicate that your server is configured to default to index.php instead of index.html is which case you might be sending binary data directly to a PHP script and it is getting confused.
Yes indeed what you said is correct. I need to pass some image data to php file to sort of start process. But if I send the image data to say loadimage.php?imagedata=? would it takes the file data in? Right now I am doing some sort of PUT method on PHP to upload the picture and it works. But I would be glad if I can use POST method. Because that makes the programming much easier.

And again, thanks for your suggestion.
 
Old 10-29-2006, 11:41 PM   #4
claytonjohnroby
LQ Newbie
 
Registered: Oct 2006
Posts: 19

Rep: Reputation: 0
From what I have read and understand putting
Code:
http://www.somedomain.com/some-php-script.php?some_php_variable="some data to be placed into some variable for processing"
in the address bar of a browser is the same as
Code:
some_variable="some data to be placed into some variable for processing";
WebClient.UploadData("http://www.somedomain.com/some-php-script.php?some_php_variable=",some_variable");
inside a c# script.

If you look on msdn and search for this function you will see that you can specify the method used to send the data. POST is one of the methods available.
 
Old 10-30-2006, 12:49 AM   #5
lovalixir
LQ Newbie
 
Registered: Apr 2004
Location: Singapore
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by claytonjohnroby
From what I have read and understand putting
Code:
http://www.somedomain.com/some-php-script.php?some_php_variable="some data to be placed into some variable for processing"
in the address bar of a browser is the same as
Code:
some_variable="some data to be placed into some variable for processing";
WebClient.UploadData("http://www.somedomain.com/some-php-script.php?some_php_variable=",some_variable");
inside a c# script.

If you look on msdn and search for this function you will see that you can specify the method used to send the data. POST is one of the methods available.
Thanks alot. That's really help me. =)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[error] an unknown filter was not added: PHP ProTrooper Linux - Networking 2 10-26-2005 01:32 PM
postfix and php : recipient unknown jodaog Linux - Software 1 03-13-2005 09:25 AM
php filter file name question feetyouwell Programming 1 01-31-2005 12:48 PM
unknown filter was no added: PHP drenal Linux - Software 1 01-24-2004 08:03 PM
playlist not streaming in PHP(Code added) Xing Programming 1 09-06-2003 12:12 AM


All times are GMT -5. The time now is 02:40 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration