By Martin Lines on Friday, 13 November 2015
Posted in Technical Issues
Likes 0
Views 781
Votes 0
I am trying to post a blog that shows some PHP code that I have written.

Instead of showing the code, it appears to run it!

Martin
Ah - ok thanks for sorting. I did not realise that plugin would interact with a code block like that.

Martin
·
Friday, 13 November 2015 17:46
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Martin,

I am sorry for the delay of this reply,

Unfortunately it will not execute the code at this point of time, the current code block is only display as what you written on the block.
·
Friday, 13 November 2015 09:37
·
0 Likes
·
0 Votes
·
0 Comments
·
I think you misunderstand me.

I also only want to display the code.

It looks like it actually runs the code.

The code is a script to perform a local databased lookup. When I look at the blog posting, instead of seeing the text from the script, I can see the result of the database lookup.

Take a look at this post http://www.sportsboat.org.uk/index.php/our-boat/news/entry/boat-monitor-full-write-up

In the section marked "Pebble Watch" you can see the code block and the word "ERROR". This word is the result of it attempting the local database look up. It is running the code, not displaying it.

THis appears to not only be a bug but a major security issue
·
Friday, 13 November 2015 15:13
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Martin,

It seems like the provided credentials is not working for me. Please advise.

By the way I just tried to display the code that you gave above in my local instance by using Code Block but I am not able to replicate the issue as you can see from my screenshot here, http://screencast.com/t/TcPCpCPyBxT .
·
Friday, 13 November 2015 16:14
·
0 Likes
·
0 Votes
·
0 Comments
·
I have updated the credential, please try again
·
Friday, 13 November 2015 16:25
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Martin,

Thanks for the access. However when I'm trying to access your ACL settings, it hitting some sort of sql error due to massive amount of records on the acl table. Can I have your phpMyAdmin access so we can fix this for you and proceed with the main issue here?
·
Friday, 13 November 2015 16:39
·
0 Likes
·
0 Votes
·
0 Comments
·
How can I pass further confidential information to you? I can no longer see any boxes to put confidential information in,
·
Friday, 13 November 2015 16:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Martin,

If you are requested to submit your site details, you may do so at site details area here, http://stackideas.com/dashboard/site. You can also submit your site details access by editing the main post here and put the information there.
·
Friday, 13 November 2015 16:59
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok - I have given the phpmyadmin details
·
Friday, 13 November 2015 17:03
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Martin,

Thanks for the access and I am able to fix the sql issue for you.

Regarding on the code block issue, it seems like it caused by the following plugins, DirectPHP where it will automatically run any php script on the content. After I disabled the plugins the code is showing up correctly on your blog post. Please have a look.
·
Friday, 13 November 2015 17:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Martin,

You are most welcome. Glad that your issue has been resolved now.
·
Friday, 13 November 2015 17:51
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post