close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

rsobj.php // version 2.11 Causing Issues

Thread began 7/06/2018 5:03 pm by snakeeyes1314512 | Last modified 7/16/2018 2:27 pm by Ray Borduin | 166 views | 9 replies |

snakeeyes1314512

rsobj.php // version 2.11 Causing Issues

When using echo eval('?>' . $Recordset1->getColumnVal("example") . '<?php '); it breaks in version 2.11.
However, it works perfectly in rsobj.php // version 2.8 which was the last copy I had when it was working without issue.
What changed?

Sign in to reply to this post

Ray BorduinWebAssist

I'm confused by the code you are using? What is the purpose or context?

I feel like it should just be:

php:
echo($Recordset1->getColumnVal("example"));
Sign in to reply to this post

snakeeyes1314512

Using eval to show some php coding and html that is stored in a database which is being used for a template. It worked great and then something changed with the update and stopped working. So there is a conflict with eval() and rsobj.php in version 2.11

Sign in to reply to this post

Ray BorduinWebAssist

I don't think you can eval "<?php" or "?>". I don't think it has anything to do with the version of the rsobj.php file.

Sign in to reply to this post

snakeeyes1314512

Forget eval(), next issue is it breaks HTML code stored in the database. So if you use an HTML WYSIWYG Editor to store content in your database it displays html code as text. If includes are used and contain any html in the code it displays as text. The other version displayed html as html. There is something definitely wrong with rsobj.php and worth reviewing. Even if used as <?php echo($Recordset1->getColumnVal("example")); ?>

Sign in to reply to this post

Ray BorduinWebAssist

Yes, this version has built in Cross Site Scripting protection that will automatically encode html included.

You can turn off the encryption by passing an extra "true" parameter to the method like:

php:
<?php echo($Recordset1->getColumnVal("example",false)); ?>
Sign in to reply to this post

snakeeyes1314512

Can this be turned off in rsobj.php instead of passing an extra parameter?

Sign in to reply to this post

snakeeyes1314512

Parse error: syntax error, unexpected ',' when used <?php echo($Recordset1->getColumnVal("example"),true); ?>

Sign in to reply to this post

Ray BorduinWebAssist

Here is a version 2.12 of rsobj.php. It allows you to set the default for cross site protection in the object on line 11 site wide. You can still override it for individual recordsets or getColumnVal() calls.

I've updated the syntax above to reflect the new v2.12 syntax, but you can also just change the global setting.

Attached Files
rsobj.php
Sign in to reply to this post

snakeeyes1314512

Now that made things a lot easier. Thanks a million.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...