-
Recent Posts
- Problems connecting to unix:///var/mysql/mysql.sock
- Using rails and respond_to to include nested data
- Handle different environments with PHP
- MySQL 5.5, Mac OS X and startup item security error
- Rails plugin development using WebMock
- Read more, continue reading, and how to easily fix it using WP
- Windows clients with CUPS and Samba
- Making a Cafe Latté without a “do it all” machine
- Using form_tag and collection_select with Rails3
- Switching coffee and PHP testing
Tags
ajax apache api authentication cakephp coffee configuration cups cxf daily365 design firebug gedit hibernate history java javascript jcs job language linux mac mvc mysql non-tech opensource paginate php plugin projects prototypejs quick tip rails ror ruby samba smashingmag snapopen spring terminal test twitter usability wordpress wpml
Tag Archives: php
Problems connecting to unix:///var/mysql/mysql.sock
In this post I’ll go through fixing the problems with PHP and connecting to your local mysql install, using “localhost”.
The problems began a while back, with lots of errors in my apache error log saying:
[error] [client ::1] PHP Warning: mysql_connect(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in …
Continue reading “Problems connecting to unix:///var/mysql/mysql.sock” »
Tagged mac, mysql, osx, php
3 Comments
Handle different environments with PHP
Being both a Rails and PHP developer, I’m often lacking a few things when I’m switching from Rails to PHP.
One of the things I miss the most, is the different environments that Rails has, which makes testing, developing, staging and production environments easy.
However, I found a way to do this in PHP as well, without using frameworks like Zend, CakePHP etc.
Continue reading “Handle different environments with PHP” »
Read more, continue reading, and how to easily fix it using WP
Yesterday I updated my grayish blog theme to a new blue and white theme, with more whitespace and less constraints.
While the new theme is isn’t perfect, I shined my website up a bit and it seems nice.
However, scrolling through my twitter list today, I read a blog post by Karan over at mardahl.dk, where she discusses the usage of “Read more” and “Click here” links on webpages. (Direct link to the blog post here).
This made me investigate what my own website was doing, and while the wording was a bit different, I had the same usability problem she describes in the blog post (you should really read it). People tend to overlook the wording, since lots and lots of advertisements use it. So when I use excerpts on my blog front page, and use the wording “Continue reading”, I’m actually scaring the user off, because my message will be misunderstood.
Continue reading “Read more, continue reading, and how to easily fix it using WP” »
Switching coffee and PHP testing
Whoa, long time since my last post.
Anyways, what has happened recently?
I’ve switched jobs and are now working at a small IR firm in Denmark, which is located on Amager.
We do webcasts / Quarterly reports for firms in Denmark.
Saying “We do” is a bit off though.
I don’t, that is. I help out if we are missing a technician, else i’m creating webapps to help the business complete daily tasks faster.
Continue reading “Switching coffee and PHP testing” »
WPML, what is the current language?
While building a wordpress theme that has multilingual support, I needed to know what the current language was for fixing some static parts of my template. After searching a bit on the WPML site, I found a code example where …
Continue reading “WPML, what is the current language?” »
(php) php-mvc-base project released
Whenever I create a new PHP project I use a certain base structure.
This structure allows me to have pretty URLs and have a nice way of configuring the database connections. Furthermore this structure also allows me to use a form of plugins in my system.
Continue reading “(php) php-mvc-base project released” »
Tagged mvc, opensource, php
1 Comment
(php) flash-message plugin
For a long time I’ve wanted a way to send messages from my controller to my view, when posting data. The message could be “Your update went well” or some error.
Continue reading “(php) flash-message plugin” »
Tagged opensource, php, plugin
Comments Off
(php) Paginate component
After removing CakePHP from my site, I really missed having pagination on it. So I created a small PHP component I’ve called Paginate and I’ve released it over on github: http://github.com/jimmiw/php-paginate.
It’s designed to be easy to use (only 3 lines of code!), and the output should be easy to style.
I hope you enjoy it
Continue reading “(php) Paginate component” »
Tagged opensource, paginate, php, plugin
Comments Off
More features
Alrighty then… I finally got around to add some more features to my webpage, and the first thing I added was the comments section! it’s finally up and running, all you need, is an OpenID and you can login and type a comment to the various posts. I also updated my CakePHP backend to version 1.2rc3, just so i’d have all new thingies.
What else… ah yes… I’ve added a syntax highlighter to the code sections as well. It works rather well, but increases the load time on the page slightly… I’ve also included pagenation on the blog! Was actually kinda fast to implement, just a few lines of Cake code and wupti.
Continue reading “More features” »
CakePHP and the (in)famous Auth component
After struggling for a while with CakePHP (specifically 1.2 rc3, but also in general) and the Auth Component, I finally found out how it works. While working freelance on a site for a customer, I had to make some form of Authentication in order to login the users of the system etc. What better place to start than CakePHP’s own documentation: http://book.cakephp.org/view/172/Authentication…
This didn’t really help me on my quest
Continue reading “CakePHP and the (in)famous Auth component” »
Tagged authentication, cakephp, php
Comments Off