arthur.kamst.com if we all take the backseat, who's gonna drive?

15May/120

Testbericht

Even iets typen

Filed under: Blog No Comments
21Feb/120

CodeIgniter

Turns out my hosting provider has CodeIgniter in Installatron...
Now I am finding out how to use that framework. Looks promising!

Filed under: Blog No Comments
12Jun/110

iPhone, Airprint and HP F4580 all in one

I got an iPhone, running iOS 4. iOS 4 has a new functionality called Airprint, with which you can print to wifi printers. The iPhone is connected to our home wifi router. Our HP F4580 printer is also connected to our wifi router.

I should be able to print wirelessly from the iPhone to the HP, right?

Wrong.

Airprint only works on a selected few HP printers (according to the Apple page on AirPrint, a whopping 16 models in total), and on nothing else.

In comes Netputing's AirPrint Activator. Apparently, all it does is add one single line to the CUPS configuration on your mac; then you share the printer from your Mac et voilĂ : printing from the iPhone...

Now I think it's a bad move from Apple not to enable this by default.

15Feb/112

Symfony – first project

Creating a project
Now the basis tools are installed, let's create a project. I'll use the tutorial at Jason Grissom's page.

First, we have to create a Subversion repository. if you use the command as stated on Grissom's site, it won't work:

g4:~ arthur$ svnadmin create /Users/arthur/SVN-Repos/learn-symfony
svnadmin: Repository creation failed
svnadmin: Could not create top-level directory
svnadmin: Can't create directory '/Users/arthur/SVN-Repos/learn-symfony': No such file or directory

... because you'll have to create the SVN-Repos directory first. When that's done, the command will run and won't give you feedback when it's successfull.

Now we'll create a directory for the site itself. As my Mac is running MAMP, it makes sense to put it in the htdocs directory of the MAMP installation.

g4:~ arthur$ mkdir /Applications/MAMP/htdocs/learn-symfony

Then, we move to that directory and run he symfony command with the generate:project flag. This will create the necessary files and directories inside the project directory:

g4:~ arthur$ cd /Applications/MAMP/htdocs/learn-symfony
g4:learn-symfony arthur$ /Applications/MAMP/Library/share/symfony/1.4/data/bin/symfony generate:project LEARN_SYMFONY

Now import these changes into the SVN repository.

g4:bin arthur$ svn import /Applications/MAMP/htdocs/learn-symfony file:///Users/arthur/SVN-Repos/learn-symfony -m "initial import"

12Feb/110

Problem with day 3 of the Jobeet project: solved

So, I am following the Jobeet tutorial and had come to day 3. I am now using my MacBook Pro running Snow Leopard, and Zend server CE.

Now when I came to the point where the tables are created using this command:

Arthurs-Mac-Pro:jobeet arthur$ symfony doctrine:insert-sql

I got this error:

Warning: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in /usr/local/zend/share/symfony/1.4/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 470

PDO Connection Error: SQLSTATE[HY000] [2002] No such file or directory

The problem here is that the mysql.sock Mac OS X expects to use is not there; because Symfony is not using the Mac mysql installation but the Zend mysql. I had to tell Mac where the Zend mysql.sock file is.

Here's how I did it, following the instructions on Stephen Rhoades' site:

First, find out where the mysql.sock lives that Zend uses. In my case, it's in /usr/local/zend/mysql/tmp/
Now in the error message you see that Mac OS expects it to be in /var/mysql/.
So I created a symlink to the Zend mysql.sock in /var/mysql:

Arthurs-Mac-Pro:jobeet arthur$ sudo mkdir /var/mysql
Arthurs-Mac-Pro:jobeet arthur$ sudo ln -s /usr/local/zend/mysql/tmp/mysql.sock /var/mysql/mysql.sock

There also is a my.cnf, Mac OS expects to be in /etc. Zend stores it in /usr/local/zend/mysql/data/.
Also make a symlink for that file:

Arthurs-Mac-Pro:jobeet arthur$ sudo ln -s /usr/local/zend/mysql/data/my.cnf /etc/my.cnf

And after that... success!

10Feb/110

Klira project

Klira bass

Klira bass, next to Aria 1520t

Een collega kwam langs met deze bas, en de vraag of ik er nog wat van kan maken. 't Is een mooi ding, maar de hals staat er scheef op, en is vastgezet met een schoef en ring uit de Gamma... en de elementen doen het ook niet.
Wordt nog een hele klus!

Filed under: Blog, Guitars, Pics No Comments
4Feb/110

Setting up a PHP developing environment, part 2

After we installed MAMP and Symfony, and changed the password for MySQL, on to the next steps.

Install Eclipse PDT
PDT stands for PHP Developer Tools. If you are on a current OS, just install the newest Eclipse PDT version. Annoyingly, although the link to the Mac OS X Carbon file is there, the actual file is not. It seems PowerPC support is dropped on the 2.2 Helios version, so I chose the 2.1 Galileo release, which is based on Ecipse 3.5.

Subversion
On a Mac, from OS X 10.5 on, Subversion is already installed; you can check the version by typing svn --version:

g4:~ arthur$ svn --version
svn, version 1.4.4 (r25188)

If we want to use Subversion with Eclipse, the plugin Subclipse is needed. But there's a caveat; you can't just install any version of Subclipse on any version of Eclipse and Subversion and expect it to work.

We have the following table of working combinations:
- Eclipse 3.5 needs Subclipse 1.4 or 1.6
- Subclipse 1.4 needs Subversion 1.5
- Subclipse 1.6 needs Subversion 1.6
- Installed on Mac OS X 10.5.8 is Subversion 1.4

It's always nice to use the newest software possible; so let's see if Subclipse 1.6 is installable.

Follow the instructions on the Subclipse download and install page. When the installer reaches step 6, there will be a few more features that are found to be installed. Check them all and install those too.

After that it's time to install the newest Subversion for Mac OS X 10.5 from CollabNet. This is needed to get the necessary JavaHL library, without which Subclipse won't work. You need to register on the CollabNet site to get this.

After installing, there is some post install work to do.

First, add the following line to your ~/profile file. If you don't have one (my account hadn't) just create a new one.

export PATH=/opt/subversion/bin:$PATH

Then, if you are using an Apache subversioning server, edit /usr/sbin/envvars:

g4:bin arthur$ cd /usr/sbin
g4:sbin arthur$ sudo vi envvars

insert /opt/subversion/lib: into the line containing to look like this:

DYLD_LIBRARY_PATH="/opt/subversion/lib:/usr/lib:
$DYLD_LIBRARY_PATH"

Alright! The installing phase is over. Next up: creating the first project.

2Feb/110

Setting up a PHP developing environment, part 1

I want to turn my old Apple G4 running Mac OS X Leopard 10.5.8 into a Apache/MySQL/PHP developing machine. Here I will describe how I plan to accomplish that.

There already is a guide on mummey.org that I will follow a bit; it's 3 years old though so I will follow that with caution.
You won't be able to use Zend Server CE on PowerPC Macs, as it is Intel only.

Now on to the steps I took to setup my environment.

Install XCode
Download and install Xcode. I did this primarily to get gcc installed. It's a bit overkill, maybe, but it works. You'll have to log in with your Apple ID to get it.

Installing MAMP
Then download and install MAMP. It's free, and it consists of a Apache/MysQL/PHP stack that is capable of running on an old PowerPC powered Mac.

Changing default MySQL password
Next, set a new password for MySQL and PHPMyAdmin. MAMP must be running in order to change the password. The default is user=root, password=root.
The command to use is:

g4:bin arthur$ sudo ./mysqladmin -u root -proot password NEWPASSWORD

NEWPASSWORD is your personally chosen new password. Don't use spaces, and don't use special characters.
Also note there is no space between -p and root! This is NO TYPO; if you do have a space between p and root, you'll get an error like: Unknown command: yournewpassword.

Now edit the information in the phpMyAdmin config file:

g4:bin arthur$ cd /Applications/MAMP/bin/phpMyAdmin
g4:phpMyAdmin arthur$ sudo vi config.inc.php

Find the following line and change 'root' to the new password, within single quotes:

$cfg['Servers'][$i]['password'] = 'root'; // MySQL password

Now if you open the MAMP localhost server page, you'll get an error: Error: Could not connect to MySQL server!
That's because that site still uses the old root/password configuration. So let's change that too:

g4:phpMyAdmin arthur$ cd /Applications/MAMP/bin/MAMP
g4:MAMP arthur$ vi index.php

Now in the 3rd or 4th line, change the second 'root' to your newly created password, within single quotes:

$link = @mysql_connect(':/Applications/MAMP/tmp/mysql/mysql.sock', 'root', 'root');

Save and reload, and the http://localhost page should open.

By the way, if you want to use MAMP without having to add a portnumber, you can change that in MAMP's preferences, under the ports tab.
Click on the Set to default Apache and MySQL ports button:

MAMP port settings

MAMP port settings

Installing Symfony
After that, install Symfony. I used the svn checkout method, mentioned on Jason Grissom's tutorial.
I installed it in the /Applications/MAMP/Library/share/symfony directory:

g4:bin arthur$ cd /Applications/MAMP/Library/share
g4:share arthur$ sudo mkdir symfony
g4:share arthur$ cd symfony
g4:symfony arthur$ sudo svn checkout http://svn.symfony-project.com/branches/1.4/

OK, that's all the time I had for part one...
After this post we have:
- gcc installed with XCode
- a running MAMP environment
- with a more secure password on the MySQL root account
- and symfony installed by using svn checkout on the svn repository.

2Feb/110

Rise and shine, it’s…

Groundhog day!!!

Filed under: Blog No Comments
31Jan/110

Back to work…

Na een weekje ziek thuis weer aan het werk.
Dat betekent: veel pcs, veel windows, veel administratie; weinig Macs, weinig web development. :(

Filed under: Blog No Comments