tjost
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 1
Hello,
I am new to the forums here and have had great experience with x10hosting so far. One of the better free hosts I've been on aside from the heavy restrictions set on the servers here. I am experiencing an error with a particular post and am posting for support as I believe the issue may be on the server side at this point.
I run a fully updated version of WordPress and when trying to write a post with this particular segment of code (a tutorial about a simple ANSI C application) I receive a 406 Not Acceptable error. Here's the offending code:
Anyone that is even medially proficient in even php can see this segment of code is not malicious, in fact it's oriented specifically to function only on Linux and it cannot be executed server side unless it's compiled. Even still, without the full code, this function is absolutely benign. Either way, the server throws a Not Acceptable error. I've confirmed this as I run a server on localhost which does not throw the error when attempting to save a draft or publish the post. Through searching on WordPress forums, the most common fix is to add this:
To .htaccess in the wp-admin directory. This has not fixed the issue on my x10host site and now I come to this fine community to inquire if there's anything I can do to remedy this situation. I've also reviewed the thread about the fixes done in September and what is allowed to be put in .htaccess so I'm assuming that's why the common fix doesn't work here. Is my only option to post images of the code snippets instead? I would rather avoid that as being able to copy and past the code instead is something most people expect from tech blogs.
Thank you for any assistance you can offer.
I am new to the forums here and have had great experience with x10hosting so far. One of the better free hosts I've been on aside from the heavy restrictions set on the servers here. I am experiencing an error with a particular post and am posting for support as I believe the issue may be on the server side at this point.
I run a fully updated version of WordPress and when trying to write a post with this particular segment of code (a tutorial about a simple ANSI C application) I receive a 406 Not Acceptable error. Here's the offending code:
Code:
void kpid() { // void function to remedy compile warning.
FILE *p; // assign pointer p
p = popen("killall vlc", "r"); // kill process named vlc
if(!p) { // if process does not exist, error and exit.
fprintf(stderr, "Error.");
exit(1);
}
pclose(p);
}
Anyone that is even medially proficient in even php can see this segment of code is not malicious, in fact it's oriented specifically to function only on Linux and it cannot be executed server side unless it's compiled. Even still, without the full code, this function is absolutely benign. Either way, the server throws a Not Acceptable error. I've confirmed this as I run a server on localhost which does not throw the error when attempting to save a draft or publish the post. Through searching on WordPress forums, the most common fix is to add this:
Code:
<ifmodule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</ifmodule>
To .htaccess in the wp-admin directory. This has not fixed the issue on my x10host site and now I come to this fine community to inquire if there's anything I can do to remedy this situation. I've also reviewed the thread about the fixes done in September and what is allowed to be put in .htaccess so I'm assuming that's why the common fix doesn't work here. Is my only option to post images of the code snippets instead? I would rather avoid that as being able to copy and past the code instead is something most people expect from tech blogs.
Thank you for any assistance you can offer.