Archive for the 'Site' Category

Fix Drupal “Fatal error: Allowed memory size of…” error.

This error can occur for multiple reasons. In my case, it occured when trying to edit an already existing drupal page. I would attempt to edit the page, and Drupal would respond with this:

Fatal error: Allowed memory size of 18874368 bytes exhausted (tried to allocate 1481725 bytes) in __/public_html/includes/database.inc on line 224

Fix 1:

What we need to do is increase the allowed memory size for php scripts. This is easy assuming that you know the location of your php.ini file (if you don’t, read Fix 2).

Inside this file, find the following line and make the following changes:

memory_limit = xxM; (xx – your current value)

to

memory_limit = 50M;

Note: You might have to increase the number depending on how many modules your Drupal installation is using.

Fix 2:

If you cannot find your php.ini file, either it does not exist yet, or your host won’t allow you to access it. We will assume that the file does not exist yet, so lets create it.

Save the following code into a file named php.ini:

[PHP]
memory_limit = 40M;

upload_max_filesize = 20M;

post_max_size 20M;

max_execution_time = 200;

max_input_time = 200;

Put this file in your Drupal website root folder, …/public_html/.

Your memory error should no longer occur after this fix, however considering there are many reasons for this error to occur it might also not work.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

How to use .htaccess on subfolders with Drupal

If you’re trying to password protect a subdirectory of your Drupal website using the traditional .htaccess and .htpassword method, you might be having trouble accessing the contents of the subdirectory. When trying to navigate to a page under the subfolder, Drupal simply displays it as not found.

There is a very easy fix for this. Simply add this line at the top of your .htaccess file:

ErrorDocument 401 “Unauthorized”

This must be done for every single subdirectory containing the .htaccess and .htpasswd files.

Your final .htaccess file would look something like this:

ErrorDocument 401 "Unauthorized"
AuthUserFile /locationofyoursubdirectory/.htpasswd
AuthGroupFile /dev/null
AuthName "Secure Document"
AuthType Basic

require user user1
require user user2
require user user3
require user user4
require user user5

After inserting that small line at the top of your .htaccess file, your subdirectories should be password protected but accessible, like intended.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

How to add a MediaWiki article to a category

Assigining your articles to corresponding categories is very important for helping your visitors navigate your MediaWiki site with ease. Thankfully, MediaWiki comes with an included system for handling categories.

To add an article to a category:
Simply edit the article you want to add to the category, and add the following line at the end of the contents:

[[Category: Nameofcategory]] (where Nameofcategory is your category name)

It doesn’t matter if the category does not exist or was never used before. MediaWiki will create a new page for each category containing all of the articles that were added to it.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Pasting from Word into Wordpress (Paste from Word)

There is a common issue when posting from Word into the Wordpress editor which causes problems when trying to view the article using the Internet Explorer browser (it simply won’t display).

The reason behind this is because Word uses some unstandardized tags for its formatting, and those tags are not recognized by IE.

Quick Fix (and a really bad way to do it):

To quickly fix an article where the issue occurs, follow these steps:

  • Go back and edit the article.
  • Switch from Visual view to HTML view.
  • Remove any text occuring before the tag, including the tag itself.
  • Switch back to Visual view and see if the article was fixed.
  • Update the article.

Currently a few different plugins for WordPress are being developed which should stop the issue from occuring. I haven’t found a working one yet. If anyone does please comment away!

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Blue hyperlink border around images in HTML

When you add a hyperlink to an image in HTML it will automatically display with a blue border around that image. We don’t want it because it makes our page look ugly and unprofessional.

There are a couple of ways to remove the blue hyperlink border:

Using CSS
Add the following line to your style sheet code:

img {   border-style: none;   }

Using HTML
Add the following attribute to your image HTML code:

border="0"

Your line of code should look like this :

<img src="/image.jpg" border="0" />
Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Changing the header of a phpBB3 forum.

Changing the default header of a phpBB3 forum is easy.

I used this very useful website that is pretty self-explanatory to change the picture shown within the header:

http://www.easytutorials.org/phpbb3_styles_logo.html

Note: When you refresh your forums to see if the changes have taken place, do so by pressing SHIFT+F5. (This clears the cache and does a full refresh)

A faster way would be to rename your image to “site_logo.gif” and overwrite the default one by moving it into the “styles/*stylename*/imageset/”  folder.  The image will most likely be scaled to a default size so you must change the size manually by going into Administration Control Panel>Styles>Imagesets>Edit and under Select Image select Main Logo. Select ‘yes’ to Include Dimensions and manually type in the desired image size.

Keep in mind that if your image has a background with a solid colour, it will show up on top of the background of the header, sometimes making it look unprofessional. To fix this you must either create the image with a transparent background,  or edit the header background to match the image.

To do the latter, go to Administration Control Panel>Styles>Themes>Edit and comment out the following line by changing:

background-image: url(“{T_THEME_PATH}/images/bg_header.gif”);

to

//background-image: url(“{T_THEME_PATH}/images/bg_header.gif”);

Right on top of this line, the code “background-color: #FFFFFF;” can be seen. The “FFFFFF” part can be changed to any colour hexidecimal code (more colour codes can be found here).

When done, hit Submit and check out the new forum header (remember to refresh with SHIFT+F5).

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have

Open submission – Write for us

We are looking for people to write short (400+ word) articles about industrial and building automation, Industrial communication protocols, BACnet, Lonworks, Modbus, Metasys N2 by JCI, Tridium, Continuum etc

All articles will have an author statement at the bottom that credits you for your work. A lot of employers search the internet for applicants’ names before hiring them. Quality articles with your name attached will help you find the job that you are looking for.

Ideally we would like to find a semi permanent writer that can publish 5-10 articles a month. A writer that can work independently, that can select there own subjects and do there own research.

Submission guidelines

  • All submissions must be
    • Written in English
    • The original work of the author. (We want original articles, we will check for plagiarism)
    • Factually correct at the time of submission (All articles are fact checked)
    • Longer then 400 words bigger the better
    • Relate to industrial automation, industrial protocols, building automation, (if you are confused ask, if you have a suggestion ask)
  • All submissions are subject to editor approval.

Subjects for articles
We are looking for articles on the following subjects

  • What is Modbus and what is its advantages and disadvantages over other protocols
  • What is Andover continuum and what is its advantages and disadvantages over other protocols
  • How does BACnet MSTP token ring works.
  • What are something that effects BACnet MSTP performance.
  • What is the most commonly used industrial protocol and why
  • A list of HMI’s and there advantages and disadvantages
  • Cheap home automation that will save you money

Any suggestions for subjects would be appreciated.
A list of accepted articles can be found on our website
www.chipkin.com/articles/

Payment
Accepted submissions will be paid $10 CAN for each article. You can submit as many articles as you like. All payments will be done via Paypal and payments are made with in the first week after submission.

Questions
If you have a question about wither a subject is appropriate or other question that you might have feel free to contact us articles@chipkin.com

Metasys® as used in this document is a trademark of Johnson Controls, Inc.

Did you like this post?

Subscribe To The RSS Feed!
To catch many more articles like this in the future, make it easy on yourself and subscribe to me via RSS. You will not regret it!

Do you have a question?
We will do our best to try and solve any building automation, protocol, integration problem you may have