Category Archives: Web Dev (PHP, MySQL, jQuery, etc.)

Here you’ll find stuff I have to say about web development stuff, including PHP, MySQL, jQuery, JS, HTML, CSS and anything else I feel I can write down…. mainly stuff for me to remember in the future, but some soul may find useful!

Remove Scrollbars From any Div with CSS

Recently I’m seeing quite a few people asking how to remove scrollbars from their page, both vertical and horizontal scrollbars. What I’m going to explain isn’t just for removing scrollbars but can also be used to make them appear permanently.

Install MySQL 5.5 From Source (Load Data Local Infile Issues?)

Install MySQL from sourceWhy?…. LOAD DATA LOCAL INFILE?

I recently updated my home machine to Ubuntu 12.04 and found MySQL 5.5 installed as default. As happy as I was to have the latest stable MySQL server, I was a bit gutted to find that LOAD DATA LOCAL was disabled as default, due to security issues. These issues may be valid but this is my local environment and I’ve got projects that require it so thought I’d waste utilize some free time fixing it.

Install Lamp Server on Ubuntu

Install LAMP server ubuntu

Install LAMP Server – Ubuntu: The command we’re all after….

Install LAMP Server on Ubuntu?

A few complex packages but all (bar linux!) can be installed with one command and then following the on-screen instructions:

(NOTE: All the commands here need to be typed into a terminal, open one by pressing Ctrl+Alt+T.)

Where is php.ini located in Ubuntu?

Where is php.ini file?

This is a question I have been asked a few times recently. Depending on what system you are running, php.ini could have different locations. But where is php.ini hidden?

Find php.ini

Firstly, it’s not hidden, it’s a configuration script which determines the settings of your PHP installation. There are few ways to find where the php.ini file.

PHP time limit – extend script running time

Some scripts require some time to execute, and they might reach your PHP time limit.

Fatal error

If PHP time limit is too short for your script, you will see this error:

Fatal error: Maximum execution time of N seconds exceeded in /path/to/script.php on line N

PHP memory limit – increase memory allocation

Sometimes, when executing a script with a strong memory usage, we might reach the PHP memory limit.

Fatal Error

This is what we can see when that moment happens:

Fatal error: Allowed memory size of a certain amount bytes exhausted (tried to allocate another amount bytes) in /path/to/script.php