close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Let's start a discussion about PHP versions

Thread began 10/12/2023 3:44 pm by Patrice | Last modified 2/23/2024 5:30 pm by Patrice | 428 views | 28 replies

Mags

Here's a tip for anyone trying to debug PHP errors - use the View Source option in the browser to see where the page stops loading.

I've been trying to upgrade an eCart site to PHP8 and was having an issue with the product detail page - even though I'd added error reporting to the page, I was getting the dreaded white screen with no error messages. I then used View Source to see how far the page was loading before it failed, and got this:

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description" content="

The meta description was loading information dynamically from the recordset but my previous code wasn't working in php8, so the page stopped loading at the point where the code was included. For info, the old code was this:

<meta name="description" content="<?php echo preg_replace('/(<[^>]*) style=("[^"]+"|\'[^\']+\')([^>]*>)/i', '$1$3',$WADAproducts->getColumnVal("ProductShortDesc",false)); ?>">

I replaced it with this and now everything is working as it should on PHP8:

<meta name="description" content="<?php echo strip_tags(($WADAproducts->getColumnVal("ProductShortDesc", false))); ?>">

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...