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!
:)


I'm very happy to have finally discovered support of Beanshell script files inside Netbeans.

For the readers not aware of Beanshell, it is literally speaking a PHP version of Java. Consists on scripts written in Java-like language that are interpreted at run time: http://www.beanshell.org

Beanshell is not one of those hype things that you hear about and then vanishes the next day, the project is just as old as Java itself and still rocks today!

I'm a big fan of Beanshell as you can see. It was added as the scripting framework for the Remedium project. My only sorrow was not being able to use the Netbeans IDE to edit these files. Ok, you can edit any text file inside the IDE.

However, I missed the nice syntax highlighting and polished/familiar features provided by Netbeans and had been using Notepad plus since the past year.

Right now, everyone can include beanshell scripts inside their Java projects. Head out to the project from Thomas Werner at sourceforge: https://sourceforge.net/projects/nbbeanshell/ and install it on your IDE.

If you like this plugin, don't forget to vote at the sourceforge page.

One piece of advice, you will need to install the latest Netbeans (version 7.1.1 at the time of this writing) to get it running without any fuss.

I was very happy to see this plugin installed, now I can finally work with Netbeans again... :)

CPanel support on reboot.pro

We've done a server overhaul this weekend and thanks to the generous sponsoring from R1Soft we are now making available CPanel to our forum members.

In practice, this means that we started making available the opportunity for our members to register by themselves a subdomain on reboot.pro and use it for hosting web pages and sites such as Wordpress, MyBB and so forth.

Even nicer since we also had the means to acquire the lifetime license of Installatron that allows our community members to install these software packages without worries about setting up any MySQL databases or uploading files.

As for the server overhaul by itself, we gave a serious leap to reinforce the server security which had been under serious attack over the past two weeks. A lot of work to complete a smooth transition, credits go to Mikorist that made most of the heavy work, found a good backup server and did all this in record time so that we could did not place any forum site offline.

Hope you enjoy the new work conditions, more details can be read at http://reboot.pro/16676/


ACE or Codemirror?

Recently I wanted to implement a way of directly editing script files from my server on a browser window.

Looking around for prospective projects, the most prominent one looked as ACE: http://ace.ajax.org/ from the Cloud9 IDE. Looked nice and I gave it a go for a day. Unfortunately, I found myself struggling to make it work as required for my purposes and it was not working under Internet Explorer.

A bit disappointed, I looked around the wikipedia article: http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors and decided to try out CodeMirror: http://codemirror.net/

Interesting enough, I got it working as intended under 30 minutes and it was working fine under IE as well as other browsers. As far as I'm concerned, CodeMirror has gained me as a fan of their project.

Breaking the 50 000 barrier on Alexa

Today we broke through a milestone in mainstream popularity. The reboot.pro community is scoring on the top 50 000 web sites on earth.



Little by little we are moving up the charts. We started using the new reboot.pro in early 2010 and the results are positive so far: http://nunobrito1981.blogspot.de/2010/12/fresh-start-on-alexa-rank.html

The next milestone is reaching the top 30 000. The value is not far from reach if the current trend continues for more two months. Plenty of changes are being introduced to improve usability and provided services, this means more work to get changes implemented however it is certainly worth the time and effort.

We are building a site to stand the test of time and gather quality knowledge for future generations. Albeit the current Alexa score is a good motivator, our main aim is to bring better quality in the art of booting computers.

The next challenge is to preserve our community small, friendly and personal as always, despite the masses of daily visitors/users that we get nowadays. Lots of fun for sure, lots of reboot going on.

:)

Coverage on Com! of the WinBuilder Leopard project

A very nice surprise this month.

The Com! magazine in Germany has published an intensive report on the mini-windows topic and they elected the Leopard Project authored by MaxRealQNX as a legal way for building a nicely customized windows.

Of course that I am very proud to see this happen. Over the past months we are getting regular attention on PC magazines, the difference is that this month it was worthy of being displayed on the cover page, the editorial, the DVD and include an article with 8 pages of information.

The whole article can be viewed at http://reboot.pro/gallery/album/3-2012-march-com-leopard-project/

Very nice motivator.

We are finally getting the necessary motion to leap onto more challenging projects.

Converting Java bytecode to .NET executable

There exists a nice manner of running Java programs without the need for a Java Virtual Machine.

Look on the IKVM project that is found at http://www.ikvm.net/

Converting an existing JAR file to EXE is just as simple as typing:
ikvmc -target:exe myapp.jar
Of course that this means that you are not depending on Java, but rather on .NET to run your program. However, this is a nice tool to allow developers/users pick the most adequate weapon (platform) of choice.

:)

Helping the FreeDOS effort

Our community at reboot.pro has been officially recognized as a FreeDOS supporter.

We have already been hosting (and welcoming) discussions about FreeDOS for a very long time now (8 years). This recognition is certainly a good reason to commemorate and feel honored about.

Our community is found listed at the official support channels on http://www.freedos.org/freedos/lists/ alongside with the forum community of "DOS ain't dead" at http://www.bttr-software.de/forum/board.php

For me, these are very good news. I'm still a big fan of console based applications and really miss the time when running some tool would not require an Internet connection and 100Mb of RAM..

Go FreeDOS go.. :)

Adding a site policies legal page at reboot.pro

Recently I added a page that details the legal position of the user generated content at reboot.pro

This step was necessary after one of our members that was unhappy about a sequence of events at the community has decided to officially notify me (as admin of reboot.pro) that his posts and writings were copyrighted and subject to a series of limitations.

Ever since the inception of our community, we strive to treat each and every member on a personal and fair manner. However, the liability of legal action is a risk that we never had to deal before in the past.


To avoid ambiguities in regards to our position on this matter, I have made available a page that details our site policies. They can be read at http://reboot.pro/about/policies

It is based on the forum policies found at the Ammnesty International web site: http://www.amnesty.org/en/forum-policies

Basically, it sets out the rules and what to expect from our services. It is nothing more than what we have already been doing for years, with the difference that is written to make things a bit more clear.

:)

Uploading and downloading your music with Google

For those who have access to the Google Music service, it feels nice to be able to upload your music collection onto a cloud environment and then listen your songs from just about everywhere using just a web browser.

However, one my issues was how to retrieve back the musics to the hard drive if necessary.

This was solved with a nice look on the "Music Manager" from google. It comes with a nice option to download your music directly from the cloud down to your machine without any nuisance.

So, enjoy the service with some good songs and no worries.
:)

Downloading torrent files from the command line using rtorrent

Recently I need to download some drivers from driverpacks.net and noticed that now they only offer the option to download through torrents.

Unfortunately, my workstation is limited and does not allow either admin rights or access to ports other than 80.

I do have access to SSH on a Linux machine running Ubuntu that is outside my firewall. However, I had no access to a desktop through VNC or NX clients.

So, command line is all that is left to get torrent files. On this short blog post I will show how it can be done in a few easy steps.

1) Install rtorrent using "apt-get install rtorrent"
2) Use "cd" to change onto the dir where you want the files to be located
3) Run the program, type "rtorrent"
4) Press backspace to open the dialog for a new torrent
5) Type the full download URL with http:// (I use http://goo.gl to shorten the direct URL address)
6) Press enter, watch rtorrent work

To quit rtorrent, press "ctrl+q".

This is not complicated and from there I can grab the files using direct download onto my workstation.

I hope this tip helps other people out there. If you have any doubts, just write a comment below.

Take care!
:)

Creating ISO images with Java

I'm happy to have stumbled on a nice project that allows creating ISO images from Java.

You can find it at http://jiic.berlios.de

Haven't had yet a chance of trying out the code to see if it can be used in lieu of the old mkisofs. However, reading the code at the test case already gives a good idea that it is suited for the task.

In the past, interacting with mkisofs has always been a troublesome relation. Just to keep things in context, I have been wrestling with the non-elegant mkisofs command line progress window for six years now: http://www.911cd.net/forums//index.php?showtopic=16829

Kudos to Jens Hatlak at http://jens.hatlak.de/

:)

Installing Windows 7 in Hebrew language

For the first time I am installing a Windows under a language and character set that I am nowhere familiar with. The idea is to test some of my software under a different localization and verify what else needs to be dynamically be converted from English to other languages.

These are the times where I really see the work from Microsoft as a deep effort to make the install coherent and intuitive across the globe. For those curious, I leave a screenshot of my installation screen.



:)

WinBuilder supporting the WIC program

WinBuilder is helping the WIC (Women and Infant Children) program that is provided by the Texas Department of State Health Services. Besides providing past and future versions of our software royalty free for their use, we are also committed to help them with active support their technical projects where our knowledge can be applied.

I'm really happy to see our software helping others in such a positive manner.

:)

Free photo storage on google plus

If you are a fan of picasa, flickr and the such, then there is a nice feature on google plus: free storage of pictures.

This is nice when considering a cloud storage of your favorite pictures.

More details can be found at:
http://support.google.com/picasa/bin/answer.py?hl=en&answer=39567
Google+ provides unlimited storage for photos uploaded in Google+, which are automatically resized to 2048 pixels. Videos up to 15 minutes in length are also free.

Have fun while the freebie lasts! :)

Calculating the year using only milliseconds

Nice way to get the current year in Java.

int year = System.currentTimeMillis()/1000/3600/24/365.25 + 1970;

Credits are due to Ewin Makepeace at http://stackoverflow.com/questions/136419/get-integer-value-of-the-current-year-in-java

IFRAME and reloading back the page to the top

I was trying to solve my way around a nuisance.. On web portal that I am working on, there exists the need to use an IFRAME in order to interface two difference platforms.

So, far things were going great but when I was submitting a long form, the new page that came as result would not be visible unless the user would manually wind up the browser window all the way to the top.

Tried out a few things until I finally found a working solution: using the "onload" event triggered by the IFrame and some java script.

So the end result to get neat looking pages is:

<iframe src="http://localhost?display=register" onLoad="window.parent.scroll(0,0);"></iframe>

And this way you get yourself back to the top of the page every time that a new page is requested inside the iframe window. Problem solved.

Take care!

:)

Reboot hosts the official forum for ISOstick

ISOstick is an interesting USB flash drive because it believes (and fools others) that it is an optical DVD drive. Recently received a full sponsoring from kickstarter.com to begin production: http://www.kickstarter.com/projects/elegantinvention/isostick-the-optical-drive-in-a-usb-stick/posts/120874 and should soon be available to everyone.

This a great tool for a any self-claimed rebooter. Allows to switch on-the-fly between multiple ISO images and customize them to his will, so I invited the creator behind this cool product to join our community and we are now the official discussion forum for isostick.

Really cool distinction, really cool person to help and work with. More details about this cooperation can also be read in Elegant Invention's blog at http://blog.elegantinvention.com/?p=161

Take care! :)


30

Regardless of what others might say, I can only see that life gets stranger as you get old.

Wouldn't necessarily say better or worse but simply strange. We learn so much and get wiser, yet one can also get so unsurprised about new things and becomes quite boring per times.

As I grow older, I also start to note some patterns emerging on people around my age gap. And this reflection comes to place since this month is my birthday date. It is a special event for me as I will be celebrating thirty years of existence.

I truly wish that I could have done many things differently across these short decades. There were so many happy thoughts, sad moments and unique emotions that will never be repeated. Perhaps I should (finally) give some credit to the comments from some friends claiming that I am a fatalistic person, looking too often to the past and interpreting my own future has already written.

 However, if the future hasn't been written already, what else can be waiting behind the door?

Oh well.. I just wish that I could smile more often. Wish that I could enjoy life with the same passion as before.

While writing this I see that I'm not so fatalistic after all, I do want to feel life, I don't want to stop feeling amazed when I see new things, I want to keep moving and doing new things that make each day special. Thirty is not the end of the world, it is the beginning of a new chapter.

Let's break the patterns and move forward! :)

Java scripting for the Remedium platform

The latest version of Remedium comes with support for dynamic Java scripting provided by the BeanShell interpreter: http://www.beanshell.org/

If you never heard of it, think of bean shell as the PHP equivalent for Java.

Remedium needed a way of getting away from statically compiled classes onto a scripting language. There were plenty of choices available and I chose beanshell because of its simplicity and close resemblance to the Java language. If you know Java or C, you will instantly figure out how this works.

What's the advantage for Remedium?

As a web based platform, it allows developers to create scripts that take advantage of the platform without needing to setup a full development environment. This also eases the task of customization and updates.

Along with support for bean shell scripts I also added support for displaying pages of raw HTML from the disk. This works nicely to create, for example, HTML forms that call a given bean shell script. This way it is possible to add business logic without any compilation being necessary.


So, now we have a neat standalone application server that is capable of serving and interpreting scripts that output web pages. No need for a JBoss, Tomcat, JSP, Apache or even PHP interpreters.

If you haven't try out BeanShell before, go ahead. It is worth the time to try out.

:)