1
votes

EDIT: I rephrased the question because I have not explained well. Let's see if this time we do best.

I'm working on a very simple blog system in PHP and MySQL through Kohana Framework. For the content of a post / entry I am using TinyMCE (POST request). I recently tried to add an entry with a piece of code in javascript by way of explanation, but it is running a part of it. More specifically I'm "using" the "exec()" inside TinyMCE/textarea (not to run it). Something like:

/regexval/.exec('string');

As I say, the problem is in the call to "exec" and when I send the form Kohana returns me the following message:

TTP_Exception_404 [ 404 ]: Unable to find a route to match the URI: 500.shtm

It seems that there is an internal error which I do not know where. My CPanel error log not showing anything and on localhost it's working properly. I wonder if there is a time when this function can be executed. I tried to debug in stopping Kohana during request execution, but whenever I stop the execution "$_POST" is empty, so I guess the problem is elsewhere.

I suppose it's a rookie mistake, but I do not know what can be and have not found anything about it (maybe I have not looked properly). So if someone can shed some light, I would be grateful. And if it is necessary to provide other information, please let me know.

Thanks for your trouble and sorry for my english.

1
Hello @user1375362 and welcome to our community. I don't understand why you get this down-vote. Maybe you could make your question more clear (what you really want).Michel Ayres
Thanks for your interest, Michel. I rephrased the question, so maybe, this time, I explained better. I deleted the above to save space.seus
@MichelAyres There are some stupid haters\downvoters appeared.. don't think about them. Stackoverflow - is actually a good resource, there's a lot of good people here.obenjiro
@Ai_boy I know about it. Just trying to make it clear to +seus as well =)Michel Ayres
Can you paste us the code that has the tinyMCE as well as the one that processes the code and the view for the editor.gspatel

1 Answers

0
votes

After trying without success to detect the problem, I chose to contact the hosting. Apparently is due to a rule of "mod_security" module installed on the server. One solution, if you don't want or can't disable this rule is to change the text in some way, for example, adding spaces between letters:

/regexval/.e x e c('string');

Sorry for wasting your time, maybe I should first ask my hosting, but first I had not thought of this possibility. I have also removed the pasted code because they take place and ultimately not necessary.

Thanks for your time.

EDIT:

cs278, from kohana forums, proposes another solution (in this case functional):

RegExp.prototype['ex'+'ec'].call(/regexval/, 'string');

Best regards.