Help?

Akujin's blog

avatar
  • Akujin
  • Male
  • Philadelphia, Philadelphia US
  • Status: Administrator
  • Blog Views: 34153
  • Last Seen: 9 hours ago

All About Me

Akujin's Info
  • Joined: 08/21/06
  • Account: Artician Pro
  • Visits: 34153
  • Total Discussion Posts: 1304
  • Portfolio Count: 15 | View
  • Blog Entries Count: 37 | View
  • Favorites Received: 41
  • Watchers: 61
Professional
Personal
Social Networks
Category: Computers & Internet - Programming & Web Development Tags: emergence , gentoo , php 5.4 , php
Wednesday March 7th, 2012
For the past year and a half I've been mainly developing the Emergence PHP Framework with Jarvus Innovations. The framework has a few notable advantages over other frameworks. In particular a custom file system that is maintained by the framework itself. This specific features enables another awesome feature called site inheritance. This basically means that when I create a new site in Emergence I can set a parent site for the new site. When a file is needed by the site it first checks the local file system and if it can't find it the framework asks the parent site for that file. This feature enables some amazing things.

Today I decided to check how Emergence would run in PHP 5.4. I started with a private virtual machine I have for my own personal portfolio. It's a simple virtual machine with only 1GHZ of guaranteed processing power and 512MB of guaranteed memory. I use Gentoo on this virtual machine so portage is the default package manager.

I started by running this command just to see what would happen.

sudo emerge dev-lang/php:5.4 --ask


Portage complained a little about not having =dev-lang/php-5.4.0 ~amd64 in the /etc/portage/package.keywords file.

After I added that line to package.keywords I was able to compile PHP 5.4.0 no problem.

After compiling portage reports that you will need to run this command to set apache to use PHP 5.4

sudo eselect php set apache2 php5.4


You will also need to run this command to set PHP 5.4 as the default command line version of PHP.


sudo eselect php set cli php5.4


Afterwards running php --version should yield

PHP 5.4.0--pl0-gentoo (cli) (built: Mar 6 2012 22:36:58)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies


At this point I ran sudo /etc/init.d/apache2 restart to check on how things were running before moving on.

The first thing I noticed was that the pecl extension apc wasn't working. The error I was getting was that a function that is part of apc doesn't exist. In Gentoo portage installs apc for you with the command
sudo emerge dev-php/pecl-apc however it wasn't properly configuring with PHP 5.4. Instead I had to get the pecl command line utility so that I could install it with pecl instead of portage. To do so I ran sudo emerge dev-php/pear. This command went onto install 6 relatively small packages that allowed me to then go onto run sudo pecl install apc.

At this point I actually had two versions of PHP on the machine at the same time but I had set 5.4 as the default in both apache and command line.

Portage likes to create separate configuration folders for each version of PHP installed so at this point a directory listing of /etc/php yields

drwxr-xr-x 4 root root 4096 Jan 9 20:27 apache2-php5.3
drwxr-xr-x 4 root root 4096 Mar 6 22:41 apache2-php5.4
drwxr-xr-x 4 root root 4096 Jan 9 20:27 cli-php5.3
drwxr-xr-x 4 root root 4096 Mar 6 22:41 cli-php5.4


These folders contain the respective php.ini file for each of the given versions of PHP. Since the 5.4 install was fresh I knew I needed to configure a few things in the php.ini file first.

First I set the timezone to avoid the warnings PHP throws anytime a time function is used without this setting.

date.timezone = America/New_York


Since I installed apc manually with pecl I also had to add extension=apc.so to the php.ini file.

Then I went to the error reporting.
At first I set it to

error_reporting = E_ALL & ~E_NOTICE


But I was getting two peculiar errors from this. One of the errors is well documented in this bug report from PHP 5.3. Specifically when running PHP in strict mode it will report errors when you try to define a static abstract function. The reason for this as rasmus himself explains:

[2010-10-16 07:15 UTC] rasmus@php.net

A static method belongs to the class, not to an instance of that class and since
you can't have an instance of an abstract class, static methods make no sense in
abstract classes. It is really that simple.


Personally I find this thinking to be stuck in the past and has a lot to do with the way OOP works in Java. Since by definition you are potentially redefining the method when extending the class it makes a lot of sense that you might choose to make the original an abstract method simply to force the new extended class to contain the said function.

Emergence uses this pattern for it's controllers. With the top level controller class being an abstract class RequestHandler containing an abstract static function handleRequest. Therefore any newly created class which extend RequestHandler must define their own static function handleRequest.

The other error that is actually new in PHP 5.4 has to do with having different parameters in the methods of an extending class from the parent. For example one of the errors was:

Declaration of User::save() should be compatible with ActiveRecord::save($deep = true)


The error was thrown by PHP because the child method save() in class User didn't contain the parameter $deep = true. Fortunately I later found out that removing E_STRICT errors in php.ini would suppress this issue.

So finally after running into these issues and changing error_reporting in php.ini to this value I was able to get Emergence to fully load.

error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT


The issues I ran into were relatively small and when E_STRICT error reporting was disabled I was able to run the Emergence code base without issue. I'm looking forward to playing with traits. Emotion: smile.gif
Category: Computers & Internet - Macintosh Tags: osx86 , howto , laptop , g60 , g51jx , asus , mac , osx , hackintosh
Saturday February 19th, 2011
I found out that my laptop actually has pretty decent support for OSX. So I ordered a Solid State hard drive for my laptop and put OSX on it.

For those that don't know anything about OSX, the current version of it is 10.6.6. Snow Leapord is any version of 10.6. There are only two clean copies of OSX distributed by Apple. Those are 10.6.0 and 10.6.3. I used to the 10.6.3 disc and then tried out both 10.6.6 and 10.6.4.

In 10.6.6 caused my Wifi to stop working so I stay at 10.6.4 now. The only thing that is broken is the sdcard reader and the power management isn't properly awakening from sleep.

Other then that I pretty much have a working 10.6.4 OSX install.

The install disk is pretty much a live CD but you need to use a boot loader to load the CD on a none mac. The boot loader could be a USB thumb drive or another CD.

The boot loader I used was Intel ONLY (Empire EFI V1.085) which you can get here:
http://prasys.info/2010/07/empireefi-1-085-for-osx-10-6-3-is-out/

Screenshots:
http://dl.dropbox.com/u/4163/articiandev_coda.png
http://dl.dropbox.com/u/4163/Screen%20shot%202011-02-04%20at%207.01.45%20PM%20%282%29.png

For anyone interested in doing this, here's my /Extra/ folder which contains a bunch of kernel extensions (this is what Apple calls drivers).
http://dl.dropbox.com/u/4163/Extra.zip

If you have this exact laptop or a derivation of it (such as the G60) it is likely that you can simply use the boot loader on the real OSX untouched 10.6.3 CD and install. Post installation you can use a USB thumb drive to get the Extra.zip I linked to above into your /Extra/ folder on the OSX main partition which the Chameleaon boot loader (which Empire EFI is based on) will look for when booting to inject any kernel extensions in the /Extra/ folder. The one caveat here is that the permissions have to be set correctly after copying the files.

Once you have an OSX installation with all your drivers setup, the great thing is any time you boot into the Live CD installer again, you'll actually have full drivers during the installation (including networking and graphics).
Category: Computers & Internet - Software Reviews, Tips & Tricks Tags: 64-bit , x64 , windows , sp2 , service pack 2 , vista
Tuesday May 26th, 2009
Just installed Service Pack 2 for Vista x64 bit on my main work machine. Took about 20 minutes to install through Windows Update. I normally avoid upgrading the service packs on Windows installs because through experience they are many times very unstable but this time I didn't really feel like reformatting and installing a slipstreamed copy of Vista again. Still this time the experience was very quick and all I had to do was replace my uxtheme.dll files after I finished installing the service pack to get my themes back up.

Category: Environment - Protection Tags: landscapes , earthday , earth
Wednesday April 22nd, 2009

Earth day

Since it's Earth day I decided to collect some of the best shots of our planet from around the world so let's go around the planet, shall we...


Tea Farm by Fath on Artician

Tea Farm by Fath




Monument Valley Panorama by barbroute on Artician

Monument Valley Panorama by barbroute




Spiti Valley by chaoskaizer on Artician

Spiti Valley by chaoskaizer




The Color of Magic by AngelaBarnett on Artician

The Color of Magic by AngelaBarnett




Crater Lake by soyrwoo on Artician

Crater Lake by soyrwoo




Our Endangered Planet by BenKern on Artician

Our Endangered Planet by BenKern




Maui From the Air by Geoff CB on Artician

Maui From the Air by Geoff CB




Dragon teeth 2 by dgheban on Artician

Dragon teeth 2 by dgheban




Phalasarna Cliffs by Akujin on Artician

Phalasarna Cliffs by Akujin




Moosehead Lake, ME by mattdclimber24 on Artician

Moosehead Lake, ME by mattdclimber24




Costa Rican Lake by OpheliaMist on Artician

Costa Rican Lake by OpheliaMist




The alps by robowan on Artician

The alps by robowan




Praia da Guarita by fx5588 on Artician

Praia da Guarita by fx5588




ALPINE2 by frERA on Artician

ALPINE2 by frERA




Niagara Falls - Day Panorama by zohar on Artician

Niagara Falls - Day Panorama by Zohar




Iceland by wuziwug on Artician

Iceland by wuziwug




They Live - Nallihan Ankara by nightdog on Artician

They Live - Nallihan Ankara by nightdog




Stonehaven by GregMcKinnon on Artician

Stonehaven by GregMcKinnon




Moraine lake by reizvolle on Artician

Moraine lake by reizvolle




Glen Lake HDR by GuyStrong on Artician

Glen Lake HDR by GuyStrong




Sant Georgios Bay by dgheban on Artician

Sant Georgios Bay by dgheban




Category: Philosophy - General Philosophy Tags: politics , artician , web design , censorship , politicals , network , habeas corpus , freedom of expression , freedom of speech , freedom
Friday April 17th, 2009
Started as a comment reply to this blog post by Ben Heine.

Artician's job is to provide creative individuals a way to present their work. It is not to police the Internet. We only remove content in any form for being spam, illegal in the USA (hey, our servers are here), or for Copyright Infringement.

We take the approach that we are more of a host rather then a police of content so we will not remove anything for simply being offense to a single person. If you have multiple Admins who can be the judge, jury, and executioner of kicks/bans you will see a situation in which the various volunteers (and/or paid staff) of a website begin to develop their own moral compass on whether or not something must be removed or not.

I believe that if there's simply a solid, rigid rule that no content is removed except for complete, defined, reasons (like above) then you will see less of this type of thing happening.

Then again, why should you believe what I say?
The answer is simple: because I am a student of history. I know what Free Speech is. I know what Censorship is. I know the exact definitions of capitalism, communism, socialism, fascism, and I definitely know what a police state is. I also would like to think that I have a pretty decent grasp of how human nature works. With that being said, as long as I am part of the development team: I will continue to promote an atmosphere of intelligent debate, equal rights, and the freedom to say what you want without retribution on the part of the staff.

On top of this my world view is shaped not only by my knowledge of history but also from my background. I was born in Ukraine in 1987 under the former Soviet Union. Today, I'm an American citizen with extended family members in Germany and Israel as well as the United States. Even today though, despite having all my education in the US (school to college), I still speak to my grandparents in Russian. I can honestly say that because I know history, despite having been only 4 years old when the USSR collapsed, I am eternally grateful for that fact. And because I know all of this, I am tolerant of views that are contrary to my own, even if I disagree.

Having said all of this, it might be a good time to end this blog entry but there's still something I need to point out.
Artician has areas that are considered "public" and there's also that which is considered "private". For this reason while we may not delete an artwork submitted, we might decide to unlist it from Browse, Explore, or any other public listing. Likewise we might remove a forum post or thread if it offends specific people. This is because these areas are public and also because in public we need to show some restraint in provoking random visitors. On your own subdomain, however, you represent yourself and as such should be responsible for the content. So as long as it's not Spam, Illegal, or Copyright Infringing we will continue to tolerate it even if we disagree with it's content. Because removing your digital voice is like denying you to your digital habeas corpus.
Category: Computers & Internet - Web Design
Sunday April 5th, 2009
Category: Computers & Internet - Software Reviews, Tips & Tricks Tags: social networks , twitter
Monday March 2nd, 2009
I decided to start using Digsby instead of a very old school version of AIM with DeadAIM. With it's ability to track multiple social network accounts it became very useful for me to be able to track Artician's official twitter and since I didn't have a personal one I made one for myself as well.

So if you want follow me at http://twitter.com/digitalaku

I'll be mainly talking about Artician and probably complaining about class quite a bit. :-D
Category: Technology - Inventions & Innovation Tags: browser wars , statistics , vmware , artician , osx
Wednesday February 11th, 2009
I'm constantly on the look out for new ways in which I can debug web design better. These days it's getting harder and harder to do that since the browser war and the operating system war has started to expand. Today it looks like we will never again see the days of the single browser dominating the Internet. Artician in particular sees one fifth of it's traffic come from the OS X platform, 2% from Linux, and the rest from various flavors of Windows. When we look at browsers the stats get even more colorful. Firefox dominates with 64% of the Artician market share. Internet Explorer comes in at a shrinking 16% and Safari continues to expand it's growing 9%.

When we combine the OS and the Browser into pairs all of a sudden all majorities are lost. Firefox on Windows come in at just under 50% followed by IE on Windows with 16% and then Firefox and Safari split the OS X share at 13% and 8%.

tn_browser_os_stats.png

So having to be able to support OS X when the buy in for the operating system includes the hardware is a deal breaker for us since we are a startup. Luckily the VMWare community comes through with a way to run OS X in VMWare.

So here it is, Artician on OS X 10.5.5. Emotion: smile.gif

tn_artician_osx.png