I’m off to a reunion in Minneapolis, so I cannot perform any services during this time.
I kept busy with phpBB work in August but fortunately not too busy. It was all just right for a change.
The big project was a Amazon Web Services (AWS) rehosting project that consumed four days after about two months of erratic testing and prototyping. I wrote about the project as it relates to AWS here. However, there were other details of wrapping up this project unrelated to AWS:
- A heavily modified AllanStyle SUBSILVER style was used, with the colors tweaked to closely match the old style. During the prototyping there were all sorts of things that had to be just right because the community is very fussy and they wanted extremely high fidelity for what they used to have. This style is basically you only choice now if you like the boxy, full width styling of the old phpBB subsilver2 style. Members in a certain group had to have a different color number name and font size, so it took a lot of puzzling there to get something acceptable. Fine tuning the styles included moving the view topic author column from the right to the left, and getting the width of this column just right to match what they had. There were some peculiar requirements such as having the Administration Control Panel open in a separate tab and adding additional links to the navigation bar.
- Six extensions were installed: Advertisement management, Pages, Media Embed, Smartfeed, Smilies Scroll and Topic Preview. There was quite a bit of work getting the advertisement management extension to serve ads correctly and to the correct groups.
- I created a forum test environment and kept it around so subsequent changes could be tested there before being deployed to production.
- Some BBCode was in the database for ranks messing up the display of ranks. These had to be removed from the database.
- Figured out why hide my online status wasn’t working. It was a permissions issue.
- There was also BBCode in the user_jabber column that could not be edited and had to be manually removed in the database. It messed up editing profiles. I discovered the Jabber module was not enabled, so I enabled it.
- Changed the text in the email templates to match content that was in there before.
- Later in the month there were more requested tweaks. The client wanted more ads to display on the view topic screen, every ten posts. This is not built into the Advertisement management extension. I used the group template variables extension to get the group information I needed and tweaked the view topic template to serve the ads unless users were in a particular group. Now they want another ad on the index between forums that I am working on.
Other work in August:
- I upgraded a forum from phpBB 3.1.6. to 3.2.2. I reinstalled an updated Latte style. Four extensions had to be upgraded: Joined Date Format, Board Rules, Reimg Image Resizer and Topic Solved. I reapplied the background logo and footer links. There was an issue when posting. Email notifications did not go out because SSL check didn’t work, causing an error. Disabling it allowed posts to be saved but email notifications still did not go out. Client had to get a correct set of SMTP settings from their web host to fix the emailing issue.
- Stood up a new forum and new domain for an existing client of nine years using a forum solution largely the same as their existing forum, Siteground hosting was selected on my recommendation. Installed phpBB 3.2.2, placed logo after resizing it, installed an orangish style to match the logo colors. Hid forum content from public. Disabled user registration. Installed ACP Add User extension. Installed and tested Tapatalk extension and access. Set up email account and forwarder to test email interface via SMTP. Set up SSL using free Let’s Encrypt certificates. Added Mailing List extension with same changes I made for their other site. Created a robots.txt file to deny search engines. Disabled contact form. Need to manually add users when deployed. Currently this project is not complete and is in user testing. As a result of testing, I applied a new style and made a number of fine styling changes, including some fine color changes. I also applied new specified fonts to forum name and site description. Installed media embed extension to embed a video.
- Client reported this error: “Error: [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4190: ob_start(): output handler ‘ob_gzhandler’ conflicts with ‘zlib output compression'”. Solved by changing PHP to 7.1, turning off the PHP ziplib extension, but needed to turn on mysqli extension because on this host it was not enabled by default. Later, it was discovered that some searches timed out after 30 seconds. I changed tables from MyISAM to InnoDB storage engines, but this did not solve the problem. I changed the PHP timeout to 60 seconds but the error still happened. I changed search index to MySQL FullIndex and it did not solve the problem. Eventually I determined the PHP mbstring extension needed to be enabled. I filed this as a documentation issue with the phpBB Group as enabling this PHP extension is not a system requirement.
- Updated a forum from phpBB 3.2.1 to 3.2.2. Was getting messages including “Parameter must be an array or an object that implements Countable.” The update made the error go away.
- Upgraded Tapatalk mod for a phpBB 3.0 forum to version 5.0.1 and made necessary file changes too. I removed the Tapatalk rebranding module because it was giving errors and is not needed.
- Styling work to integrate site headers and footers onto phpBB 3.2.2 using prosilver on a test site. 3 templates modified. Stylesheet changes were added to stylesheet.css. This project is not quite complete yet, but nearly so.
- Upgraded Tapatalk mod for phpBB 3.0 from version 4.9.8 to 5.0.0 for a client. I removed the Tapatalk rebranding module because it was giving errors and is not needed.
Occasionally I do something new. This month something new meant helping to rehost a client on Amazon Web Services (AWS). AWS provides cloud computing services, and its EC2 service (EC = Elastic Computing) is probably its most popular service.
Cloud services provide scalable services. Also, you pay for what you use. They can be configured so that if there are spikes in demand the service will become “elastic”, scaling to meet demand.
I did not do this rehosting by myself. The client had another technical guy that set up and configured his AWS EC2 workspace. The forum is very large with 2.6M posts. In addition to rehosting the forum, I had to upgrade the client at the same time to the newest version of phpBB and move his WordPress site. This project literally took months to complete, although I was not working on it all the time.
I don’t know what Amazon Machine Instance (AMI) was set up in this case. I don’t think the AMI chosen was ideal because WordPress had technical issues that required fine tuning EC2 to get things to work. One thing I took away from the project though is that there is a “tax” if you move to AWS. The learning curve is steep and the tools available to you are miniscule.
Some lessons learned:
- AWS doesn’t do any handholding. While you get a console to configure EC2, you don’t get any rich control panel like cPanel or Plesk to allow you to easily do complex things. So there is no File Manager, no phpMyAdmin (unless you want to install it yourself), no easy way to create mailboxes or send email. Instead, you need a UNIX geek. I was given a SSH key file and I had to use that to do my work. This meant doing pretty much everything from the command line.
- Connecting to the AWS workspace was complex since I had to use SSH. The command lines used to connect with SSH were long to type in and easy to get wrong. I had to reference an argument to use the key (.pem) file I was given. When you work from the command line, it’s easy to type something incorrectly. So you often end up typing the command multiple times until you get it right. Closing and opening sessions becomes time consuming and a hassle.
- To access the database, I had to do it from the command line. It took a while to get database credentials and since I had to do things from the command line again I had to type statements very carefully. I had to export and import databases but getting the syntax just right was challenging. I frequently had to go into the database to tweak things, which meant typing a lot of SQL statements. It’s a good thing I am very fluent in SQL. This really slowed me down. Had I had phpMyAdmin, I would have saved hours of time and hassle.
- File permissions were a pain. The default user did not have the permissions to the web root folder, which meant becoming root and granting correct group and file permissions. Then secure FTP would work. These problems kept recurring which made the process quite tedious and time consuming.
- The Apache web server was not configured correctly for WordPress. The AMI was apparently not tuned for WordPress, so it took research and carefully editing of a httpd.conf file to get the settings right. Then the web server had to be restarted from the command line, which is not intuitive, particularly since it had to be done as root.
- Editing files became a pain. There was a lot of this, mostly tweaking forum styles, templates and configuration files. Since I had only the command line, I had to use a command line text editor. I chose nano, but it was still tedious. There is also a lot of command line navigation to get to the right folders where you needed to do stuff. This would have been easier if I had an editor on my computer that worked with SSH and .pem files. I had the former but not that latter, as I use an old copy of Dreamweaver to more easily edit files remotely.
- I often had to become root to do things, like read the error_log file to troubleshoot issues.
- The database import for the forum failed three times. I finally figured out the issue from the obscure error message. I had written two triggers for the client and that required CREATE TRIGGER privileges that were not granted to the default MySQL DBA. I had to snip these lines out of a 2GB+ export file to get the import to succeed. This has never been a problem on other hosts I have worked on.
- Setting up HTTPS was a pain. It too required special permissions to create public and private key files, on the command line only, of course. It took many attempts before it worked and a valid certificate was installed. While we were waiting to test WordPress and the forum, it required using the long URL provided by AWS, which meant changing the configuration of WordPress and phpBB via the database.
I suspect that the wrong AMI was used or that using a better one would have prevented a lot of problems. In any event, the move to AWS turned out to be tricky, time consuming and a large hassle. For my client, it was an expensive endeavor. It turned out that all this work turned into my largest bill ever. In that sense it was good, although I would have been happier if it had spent a lot less time and a lot less of his money.
Now that my client is on AWS though, as long as it is tuned properly there will be some big advantages. Hosting may cost less in the long run, and the service should be more predictable and scalable.
If you take up a project like this, you will definitely need someone who has set up AWS EC2 instances successfully and will work through all these issues with you. Even so he could not do it alone. The migration took four days to complete, although the forum was functional in less than twenty four hours.
For very large forums that need scalability and high reliability, using a cloud service like AWS makes a lot of sense. However, a project like this should not be taken lightly. Most forum owners will probably be much more comfortable on a good shared host, or a good virtual or dedicated server.
See this post on phpbb.com for details.
This version of the extension can be downloaded from my digest extension page or from the GitHub 3.2.8 branch page. When downloading from GitHub, remember that it must be copied into a blank /ext/phpbbservices/digests folder.
Of course disable the current digest extension first then remove the /ext/phpbbservices/digests/* files. Then upload the new version then enable again.
Using email as a primary means to contact me has some disadvantages, such as long threads that make it hard to find information and lags in my responses. So in response I’ve created a Slack workspace: https://phpbbservices.slack.com.
If you join my workspace you can ask me questions anytime. Hopefully I’m on my computer and can respond quickly. Otherwise I will respond when I am available and you can look for my response in the workspace’s channel of your choice.
If you use the #general channel what you post is public to anyone in my workspace. So most of the time use the direct message feature to keep our conversation private.
We’ll see how this goes. I’m fairly new to Slack too so you may know more about it than I do!
You can read more about Slack here.
Happily, there was a lot more work in July than there was in June. I am noticing that I tend to get called in for more complex projects and fewer simple projects. One effect this has is that these projects can span months. I worked on two projects like this during July that I do not detail below, but will when finally completed. They will have amount to nice sales when they finally cash in. Both projects are complex upgrades from phpBB 3.0 where there were many customizations by previous developers (including me). Moving them to phpBB 3.2 involves a lot of talking, compromise and prototyping. Both involve standing up test instances of their forums and iterating through them getting the style and features right. As for the other work I did in July:
- Upgraded a forum from phpBB 3.0.12 to 3.2.2. I had to do it minus the tools I usually have. I had only SSH access. As such there were various technical issues. Trying to make a database backup took a long time in phpBB. But with root privileges I was able to do it very quickly. There were issues uploading files. I had to change the Unix group I was in to get the file permissions correct. I seemed to lose ability to create directories using Secure FTP. I worked closely with client who did some work and gave me additional privileges. There was an unexpected issue with /config directory that did not properly upload and a missing line in the config.php file. Th install folder was not recognized. I had to fix some database issues with upgrade, mostly done from the command line. I reapplied styling changes including logo, various buttons and some help links. Search indexes would not work (MySQL fulltext) so I created phpBB native index instead. I removed dead modules and updated spambot countermeasure to use reCaptcha V2.
- Troubleshooting. The host set PHP 7 as the new default version of PHP, which caused issues bringing up the phpBB 3.0 forum. I could only revert back to PHP 5.6 on a phpBB 3.0.12 forum but it came up. Later, I upgraded the forum to phpBB 3.2.2 which does work with PHP 7. There were no issues. I placed the logo, changed the spambot countermeasure to reCaptcha V2, added a home link, and removed dead modules.
- I created two MySQL database triggers to add forum notifications, similar to work for another client in May. This was more involved since 17 forum notifications were needed for each user in the group. I also wrote SQL to make the phpbb_forum_watch table contain rows for all existing users in the newly registered users and registered users groups, so the new triggers would work for people in these groups. I analyzed an issue with notification emails being checked by default. It looks like the two critical ones (new topics in subscribed forums, and replies to topics in subscribed topics) are set by default. I suggested not to turn additional email notifications on by default but it can be done with a trigger if necessary.
- Fixed a digests issue on version 3.2.7 of my digests extension for a client. Digests were not going out reliably with their cron. A manual test worked fine. To fix cron job I removed /forum from the path since the forum is in a subdomain and added /usr/bin to the curl path.
- Issue of FatalErrorException in container_builder.php line 146, which brought the forum down. /cache/development folder had 755 permissions. Removed it, changed config.php so phpBB development mode was disabled, cleared the cache manually, and the forum came back up.
- I upgraded a forum from phpBB 3.0.5 to 3.2.2. The old style was not available, so a new style choice had to be made. The default prosilver style was used. There were some minor issues during upgrade that I had to puzzle through. I added the old logo. I recreated the MySQL full text search index. I added reCaptcha V2 spambot countermeasure and enabled it. I removed some dead modules including old AutoMOD modules. I added a home link.
- Troubleshooting. There were issues with users not getting email notifications when registering or for forum/topic replies. First I advised setting email package size to 0. That did not seem to work, so I was asked to test it. I created an account and verified that both the registration email was received and forum notifications were received. It is now working correctly. Some permissions looked odd: newly registered could only reply to topics and registered users could not post in most forums.
- Installed the mChat extension on a new forum with the Flat Style Blue style. Used cPanel to upload the extension. Later, I made text changes to mChat (changing its title to “Live Chat” among other changes) and removed credit lin,e substituting one provided by user. Some days later, I installed the forum icons extension and an archive of forum icons mentioned in the topic for the extension. The next day, the client requested some tutoring so I created a tutorial video using SnagIt. I demonstrated adding an extension, using cPanel, Filezilla, Dreamweaver, File Manager, making a sized and transparent logo and swapping the default logo, changing phpBB’s default text.
- A site got hit by malware and was recovered. After recovery, I was asked to check the extensions and base code for malware. I upgraded my digests extension and the Cleantalk extension to the latest versions. I compared files with a 3.2.2 reference and found no malware. Later in the month, I removed unneeded phpBB software files, probably from previous versions, that remained in the forum folder. I also enabled the contact form check in Cleantalk because contact form spam was happening. Even later in the month, more spam was reported. Cleantalk extension was somehow disabled. I reenabled it. I removed spam users via Cleantalk once it was reenabled.
- Troubleshooting. There were regular HTTP 500 errors accessing certain folders in the ACP. When I finally found the web server error log, the log indicated that the /cache/production/twig folder could not be written to. 755 permissions existed. I changed the permissions to 777 and deleted the files inside it that had 755 permissions and the issue was resolved.
- Troubleshooting. The forum could not send mass emails. Since he has Siteground hosting, passed on what I learned when I set up my hosting: create an account on the domain and configure phpBB to use SMTP. It took a little back and forth with Siteground technical support but this approach eventually proved fruitful.
- This job was a referral from a recent client. I was asked to straighten out an inconsistent .htaccess file for the site. Issue were http to https redirects weren’t happening, index.html page needed to be hidden if called directly and certain hotlinking needed to work right.
- The Cleantalk extension was disabled, so spam started to appear, same issue as another client had this month. I updated the Cleantalk extension to the latest version and reenabled it. I found about 20 spam users that I deleted.
- I installed the Detailed Online View extension, a development quality extension, after warning client it was a bad idea to use any extension that was not approved. It is accessed through the Who’s online link.
This will hit you if a subscriber needs a table of content and you installed version 3.2.7 of the digests extension. What happened was that in cleaning up the code I decided that the assign_vars method should be simplified to use assign_var when only one template variable needs to be connected to a template. Except that the messenger class used for email is a subset of the template class and it doesn’t support the assign_var method. So it fails. You can see the patch here.
As I have noted before, since I work with many clients I have developed hopefully informed opinions about many web hosts. Perhaps I should not paint with a broad brush but I do have one suggestion: avoid any web hosts owned by the Endurance International Group.
Web hosting tends to be a low profit business. With so much competition, customers will shop around for the best deal. This results in many hosts offering cheap plans for $5 or $10 per month. Web hosts can hope to find profitability in volume but since there is a lot of competition profitability usually comes from consolidation. The Endurance International Group buys web hosts. It looks like they find profitability through throwing all these companies under one umbrella and one hosting center.
I used to host with Hostgator. I found their support good and their infrastructure above average, yet their pricing was very reasonable. Then they were bought out by the Endurance International Group. Almost immediately afterward their support became crappy and I noticed delays accessing my domain as well as infrastructure related issues. When my hosting contract was over, I was happy to move somewhere else.
When you call these companies for support, you are immediately placed into a third-level support queue. After you finally connect with a human, these brain-dead support people follow scripts that are designed basically to not solve your problem and make you go away. Moreover, I found myself far more knowledgable about hosting and how to solve problems than they were. They could rarely even cover the basics. If you needed real help I found I had to badger for second-tier support.
All this is to keep their costs low since one support center for dozens of companies is obviously cheaper. But it results in inferior service, as evidenced by my experience with hostgator.com.
Endurance International Group own a lot of hosts, most pretty obscure. Among those they purchased you may be familiar with include Hostgator, Bluehost, Hostcentric, iPage and Site5. You can see a full list of the brands they bought on this Wikipedia page.
Given the low margins, the hosting business is likely to continue consolidating. There is certainly a lot of smoke and mirrors in this business. What used to be good hosting can turn into poor hosting pretty quickly when they get acquired. This is true of MediaTemple, at least it’s Grid Service, based on my latest experience since it was bought by GoDaddy. Right now my recommended hosts include Siteground for most hosting and Rackspace for dedicated and virtual server hosting.
It’s quite clear to me though that you are likely to be unhappy with any hosting owned by the Endurance International Group. So avoid.
Emailing from phpBB is often problematic. In a previous post I looked at various ways to make sending email from phpBB more reliable.
In this post I look at why you might want to configure phpBB to use SMTP (Simple Mail Transfer Protocol) to send emails. If you are using a Windows web server (IIS), this is usually required. You can change these settings in ACP > General > Client communications > Email settings, which can be set halfway down the page.
By default, phpBB hands off email to PHP using PHP’s mail function and hopes for the best. If the mail function returns FALSE, the email should not have gone out. You won’t necessarily be know if it fails, however. Known email sending failures appear in phpBB’s error log: ACP > Maintenance > Error log.
Even if the PHP mail function returns TRUE, it may be a false report. In many cases TRUE only means that the mail was accepted. Whether TRUE means “accepted” or “successfully sent” depends on how your host’s email server is configured.
Once accepted by the email server, the email is likely to be closely examined. If it has some of the markers of being spam, it will probably get blocked from actually being sent out. In this case, you probably won’t know about it. You can greatly improve the odds that emails will go out successfully if you:
- Create an email account that uses your forum’s domain, ex: email@example.com
- Assert this email address in phpBB: ACP > General > Client communications > Email settings. Set this email address for Contact email address and From email address.
By default on Linux web servers (most typical kind of hosting), PHP’s mail function sends outgoing email to a sendmail process. Essentially, emailing is the job of your server’s operating system, so you can’t control it. Because you can’t control it, sendmail will be configured generically. Any other domains on the server you are using will send email out through the same sendmail process.
However, if you use SMTP to send email instead, you have to authenticate yourself with the SMTP mail server. By properly authenticating yourself, emails are likelier to go out. The downside is that it’s a bit of a hassle to set up SMTP. I discovered this on this site when I moved my hosting to siteground.com. It uses WordPress which by default also uses sendmail. Emails weren’t going out. A call to Siteground’s tech support revealed that SMTP was a better way to go. They provided the credentials to use and now my WordPress email notifications go out quickly and reliably. This should work for phpBB too.
Don’t assume that you can use an external SMTP server like GMail. Many web hosts will block outgoing SMTP email. If it’s allowed, by all means go ahead. You should check with your web host for the proper email settings to use.
One possible downside is that outgoing email quotas are likely, but that’s probably also true if your host uses sendmail. Your web host can tell you what policies if any apply to your hosting. See the previous post for instructions on how to properly set your email package size and to set up a system cron, if necessary. Make sure it works by sending a test email, an option available on the email settings page.
June was a very slow month. This wasn’t bad as March was so crazy and I was teaching a class too. Summers are often slow around here as people have other things to do with their time.
I used the month to get out version 3.2.7 of my digests extension instead. I actually did quite a bit of analysis for clients, trying to work through the requirements of a job. A lot of my work these days involves very complex upgrades where many things have to factored and considered by the client before moving forward. I expect some of these will get authorized and worked on in July. Anyhow, it was nice to have a break. Overall though I’d prefer work to be more regular rather than either light or super heavy.
- I upgraded the Cleantalk extension for a client to latest version (5.6.5) per client’s request. I also changed the spambot countermeasure from simple image to reCaptcha V2.
- I upgraded a forum from phpBB 3.0.12 to 3.2.2. There were lots of issues associated with the client’s hosting. FTP did not work reliably (regular timeouts) meaning lots of files had to get requeued and resent. Upgrade was to place forum in a new /forum folder instead of root folder. There were issues upgrading on web server, so I converted database on my machine. I had to empty the migrations table to get it to work. One error discovered later by the upgrade: missing row in the phpbb_acl_options table meant that I could not install extensions. Once I added it, the manage extensions link appears in the Administration Control Panel. I installed the Absolution V3 style. Installed Thanks for the Post (RC) extension and Banner Scroll (RC) extensions. I had to move some files for the banner scroll extension into /forum/images folder. Lots of work tweaking the style. I abandoned provided site logo and reverted to earlier one as it worked better with the style. I tweaked the logo so it is kind of centered, hard to do with CSS blocks. Added G+, Facebook, YouTube and Twitter icons to navigation bar. Installed reCaptcha V2 as spambot countermeasure. Later: finally got SSH access and that allowed me to move files and images folder. I removed all other content in public_html directory.
- Configured Cleantalk for a client with two similar websites. I used Cleantalk to remove spam accounts from both of their domains. Additional work troubleshooting an issue with moderation, not quite understood yet, want to know if it recurs. I removed items in moderation queue by approving each then deleting manually from the topic. There were still issues with Cleantalk extension being unable to communicate with Cleantalk server. Both allow_url_fopen and CURL are enabled in PHP. Probably an outgoing firewall issue. I asked client to talk to web host about the issue and provided a list of servers that should be allowed to communicate with. Later, I was asked to resolve signature issues on one domain for a particular issue. The role was not assigned for many forums for the person’s group and in the case of some forums the Registered Users group permission for signatures was set to NEVER meaning the special group’s permissions were being overwritten. Later, I disabled search on another of the client’s domains because he had integrated a Google Custom Search field.
- I migrated a forum and also upgraded it. BitNami was installed (phpBB 3.2.2) on new host so rather than simply migrating to new host I converted the database on my machine instead. SSH was my only tool, so I used it to change and import the database from the command line and make file changes manually using vi. I installed seven additional language packs. I removed dead modules. I installed reCaptcha V2 spambot countermeasure. I placed the old logo on the default prosilver style. About a dozen files would not copy over, and caused Filezilla to crash. This client was kind enough to leave a comment on my home page expressing satisfaction with my work.
- I upgraded a forum from phpBB 3.1.3 to 3.2.2 on a Windows server running IIS. I provided guidance on a Joomla issue which led the client to take care of that issue first with a Joomla expert. The upgrade went fine and I reapplied logo on the prosilver style. However mysterious issue with posting (no refresh screen after posting) remained. I eventually determined it was due to incorrect integration of email by the forum. When posts are made, post notifications are sent. This was causing the error. I suggested raising issue with web host or moving to Linux hosting. Did not install Social Media login extension, although we discussed this.