Don’t you just hate it when you upgrade PHP to a new version and then you check the error_log file in your web hosting and notice it’s full of errors and warnings.
You really should always watch your error_log file no matter what content management system you use.
In this example it’s WordPress 6.2 on PHP 8.0.
[29-Apr-2023 23:56:51 UTC] PHP Warning: Constant ABSPATH already defined in /home/website/public_html/wp-config.php on line 34
Now what’s happening here is that WordPress has been updated to correct code issues with previous versions of PHP however the update process never updates the wp-config.php file which holds you precious website user and database credentials.
So you ALWAYS need to compare your wp-config.php with wp-config-sample.php after a major WordPress upgrade.
Here is what was in my old wp-config.php
define('ABSPATH', dirname(__FILE__).'/');
Here is what was in the new wp-config-sample.php
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
The solution then is to update the wp-config.php and get the code right to what the sample showed.
Let me show you how I use online live chat to increase sales and have better customer support.
Watch this video.
As mentioned in the video leave me a comment on this blog post if you would be interested in an info product that makes this super easy to setup on your own site and / or across multiple niches. Videos on installing and setting up the Livezilla chat software (Windows only I’m affraid people), and the script to get a nice hover popup over your existing pages. Which is the best way to get a chat going. Not some static live help image sitting off to the side of the website that no one sees.
For those brave souls that like a challenge and do it on your own, make sure you get started with LiveZilla.
Forget all the paid chat services, they can’t handle multiple instances of the chat software which is what internet marketers need. Those with multiple personalities anyway 🙂
ed. 13Nov12 – This has been tested and amended to be current with v3.11 of PHPBB3 (if you haven’t upgraded your PHPBB3 board to the current version I highly recommend it).
I use PHPBB3 for my niche forums that I own. It’s powerful open source software, and I highly recommend it.
However on certain servers the emails that the PHPBB3 software sends out have incomplete header information. Now in PHPBB3 defense they do specify all the header information in their code, but it’s only on certain server configurations that you need to go one extra step further. Hopefully one day they will add this to their core code.
Here is the problem, the return-path and envelope-from fields are not marked with the forum email address. They are marked with the servers nobody email address.
Return-path: < nobody@server.com >
Envelope-to: user@forumuser.com
Delivery-date: Sat, 04 Apr 2009 22:22:21 +1000
Received: from nobody by server.com with local (Exim 4.69)
(envelope-from < nobody@server.com >)
id 1Lq4tB-0000vz-FW
for user@forumuser.com; Sat, 04 Apr 2009 22:22:21 +1000
What this means is that any bounce messages will go to the server admin (if they are even looking) and not back to the individual PHPBB3 board administrator for them to take action on it.
Unfortunately a core code hack is required to fix this, and this will need to be re-applied each time PHPBB3 has an upgrade. But it’s only a couple of lines of code, so it’s easy.
You want to edit the /includes/functions_messenger.php file…
Find this code (there is 1 instance of this code in v3.11)
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);
and make it this code
// On some PHP Versions mail() *may* fail if there are newlines within the subject.
// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, "-f" . $config['board_email']);
What that does is add in the 5th parameter (“-f”forumadmin@messageboard.com) to the PHP sendmail function which is for specifying the return-path and envelope-from fields.
Now your output will look like this
Return-path: < forumadmin@messageboard.com >
Envelope-to: user@forumuser.com
Delivery-date: Sat, 04 Apr 2009 22:33:17 +1000
Received: from nobody by server.com with local (Exim 4.69)
(envelope-from < forumadmin@messageboard.com >)
id 1Lq53l-000177-Nx
for user@forumuser.com; Sat, 04 Apr 2009 22:33:17 +1000
and any bounces or PHPBB3 sent email issues will come back to you personally and not your hosting server admin.
Step 3. Upload all the original FAQ-Tastic Lite files to your WordPress plugins directory.
Step 4. Before you activate the FAQ-Tastic plugin, make sure to upload all the patch files straight into the the faq-tastic plugin sub directory overwriting the original files that you just uploaded.
Step 5. Go to your Plugins area in the admin of WordPress and you should see a plugin with v1.07 Patched for WP2.7 that you can activate.
(Why didn’t I just include the whole FAQ-Tastic Lite ZIP – because that’s for the developer to do not me. I’ve just made your life easier by supplying you with the patch. Make sure to download the original FAQ-Tastic Lite v1.07 from the site I listed above)
Thanks go to Copernicus who explained the problem. I just implemented it and thought I’d share. Enjoy.
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional
Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.