Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

Solving error 500 when activating a Wordpress Theme

Recently I was tasked of moving a web portal from an old architecture onto a more up to date accommodation.

My platform of choice to manage content is Wordpress nowadays. The reason is mostly due to the huge popularity of the software, the freedom from license costs and the painless upgrade/expansion of features.

It was required to preserve the same look & feel from the old portal (based on OpenCMS). So one of my first tasks was hiring a designer to replicate the same theme onto the new portal.

This was done in a satisfactory manner, the only problem occurred when moving from a test machine (my windows worstation running on xampp) to the pre-production machine (suse linux).

Wordpress would be running but every time I would try to activate the theme it would simply crash the whole software application and reply with a ERROR 500 message.

I've looked around the web and many people were pointing as culprit a badly written .htaccess file that halted apache from serving the page, some others advocated a lack of appropriate permissions and however, none of these cases helped my situation in concrete: permissions were correct, .htaccess was empty.

I needed information, to know more than a simple "ERROR 500" and get details. Apache provides a nifty reporting log that can be activated through .htaccess. At least in theory this would have helped me, however in practice I simply saw no log being generated where I wanted one.

The machine had been specially tailored to provide no details whatsoever, in order to prevent attackers from exploiting potential vulnerabilities (it's all about security by obscurity I guess..)

So, different approaches needed to be taken.

I remembered that PHP can be run from the command line too. And if it runs from the command line, we get output. Turns out that my instinct was correct.

When doing something as simple as "php index.php" from the SSH window, I was capable to see why and where the error was occurring. It was complaining about mb_substring(), this reminded me that I might be using a PHP version different from the one on the server and that was the correct situation.

To solve, I just remembered that "mb_" stands for multibyte and that previous PHP versions come shipped without that feature. This could be solved by simply removing the "mb_" from the conflicting commands and the legacy command would still be valid.

This solved the matter. After some ten edits I was seeing the intended template working on the new portal at the new server.


Talk about troubles.. I am just writing this here so that more people in future can keep some sanity if they ever stumble in similar situation.

Good luck!
:)


Ninja pendisk site update

Recently I've began playing more often with Wordpress and it has become a good tool to deploy new websites.

So, I picked a small popular site that would be easy to play with - ninja - because it is the right tool for simplicity sake and the website should also be made as simple as possible.


One of the advantages that I like the most at wordpress is the integrated plugin system. Very neat. You simply look for plugins with particular features and click to install.

On the ninja site, I've decided to replace the old plain html pages with a wordpress CMS. The transition went smoothly and took less than a day to complete.

The biggest obstacle was finding a proper new visual theme and then adding back the text present on the old pages. One sad thing that could not be ported are the posts that were made on the old forum system.

I've decided to use the integrated forum simple:press inside the CMS to ensure that everything fall well together. This new forum system also brings some other neat features that might help make it more appealing for other ninja users.

For example, it's not necessary to register on the forums as it is using OpenID, people on participate on a given topic get email warnings whenever someone replies to their threads and so on.

Also, this is a good homework practice for larger projects. My next goal is to also port the http://nunobrito.eu from the e107 CMS onto wordpress.

Next would be turn of http://winbuilder.net and this would complete the round of site conversions. Why converting to wordpress?

Well, the main reason is flexibility to change things around. With e107 or static html pages is a real bothersome to add changes on the website or make it look exactly as you want.

Besides, the available plugins are really cool and I'm just scratching the surface.

I don't really like the fact that it's dependent to MySQL but for the moment there is still no other alternative.

If you have the time, don't forget to visit the new ninja site at http://nunobrito.eu/ninja and tell me what you think.

:)

Google Social Network

Maybe old news for some but I've just tried out Google Social Network and it's impressive.

It allows to literally port a social network onto your website without the need to ask people to re-register themselves on your site.

One other cool feature is the fact that wordpress and phpbb already come prepared for google connect which means a lot less worries about integration and more free time to work out the gimmicks of the site.

This is a very approach to the same concept implemented by Microsoft (and others) over a decade ago when Passport was first introduced but with the twist that you have so much more control over the login registrations and are allowed to do a lot more.

At the moment I don't see myself using often this tool but it's certainly something to keep in memory for future projects.

Very good google, keep it up.

http://www.google.com/friendconnect

Remote posting to wordpress using Gmail


Wordpress is a really cool tool for running blogs but one of my favorite features (remote posting) was not working correctly with gmail.

This happened because wordpress itself has no support for secure connections. So, after googling for a good while, the solution presented itself in the form of a new script that is capable of handling gmail.

The article where this approach is explained is available here: http://www.mattromaine.com/2005/03/07/wordpress-gmail-mobile-blogging/

Fairly simple approach. Just copy the two files onto the installation folder of wordpress, rename the extension of both files from .phps to .php and you're ready to go.

As mentioned on the instructions, you still need to automate the calling of the wp-gmail.php script but that is the easy part.

As for setting up wordpress itself, don't forget that the pop address is "pop.gmail.com" and that it will use port 995.

Last but not least, the username should be as "example@gmail.com" where "example" is your real username to log inside your gmail account.

That's it, good luck!

:)