Cleverweb

Webdev, Apache, Linux and Wordpress.
List all controllers and methods in Codeigniter

List all controllers and methods in Codeigniter

codeigniter

Use the following library to list all Controllers and methods of a Codeigniter application. You could use it for information about your application or to protect controllers and methods with an ACL plugin for example.

a simple search with AngularJS and PHP

a simple search with AngularJS and PHP

AngularJS-large

Recently I found AngularJS, a so called “Superheroic Javascript MVC framework” by Goole®.
I must say I am impressed by its simple, readable and quick way of working.

jQuery Ajax call tutorial

jQuery Ajax call tutorial

jquery

Somehow I got a lot of questions about jQuery and Ajax, which is quite easy to understand.
I’ll show you how to create an ajax call using jQuery and update the page without reloading.

I assume you have knowledge of HTML, CSS and basic HTTP techniques.

List all controllers in Cakephp 2

List all controllers in Cakephp 2

cake

I needed to list all the Controllers of an Cakephp 2 application. I searched the webz and found an old article that got me started. The original article with code is here: http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers/.

Here is the (rewritten) code for a CakePHP 2 Component:

PHP and MySQL LOAD_FILE solution

PHP and MySQL LOAD_FILE solution

mysql-rage

Are you near your boiling point when using the MySQL LOAD_FILE function fromĀ  a PHP script, here is the solution.
You already debugged the file uploads, file movements, renaming and so on, nothing worked.

Mount USB devices to a fixed mountpoint in Debian

Mount USB devices to a fixed mountpoint in Debian

debian-linux

The problems I faced when using USB harddisks or USB pendrives for backup processes is that each time you connect them they will have a different ID.
For example:

I connect USB harddisk “Iomega” to my Debian Squeeze machine which will assign ID /dev/sdc1 to it. The next time I connect the same “Iomega” harddisk, Debian will assign ID /dev/sda1 to it.

You can imagine that backup scripts or programs rely on these IDs because they need to mount the USB device to a specific mountpoint.

Luckily there is Udev, which will execute some rules to identify hardware that is being connected. Each hardware device has some info like manufacturer, serialnumbers, type and so on.

Access MySQL from a remote machine

Access MySQL from a remote machine

mysql-logo

If you want to access your MySQL server from a remote machine you must adjust some settings first. Be warned though, remote access might attract some unwanted visitors :-)
Although if you want to access your MySQL server from a machine within your LAN you still need to adjust these settings.