MySQL – 1305 or 1630 Error – Function does not exist

Problem: Receive either “1630: FUNCTION MAX does not exist. Check the ‘Function Name Parsing and Resolution’ section in the Reference Manual” or “1305: FUNCTION MAX does not exist”.
Solution: Remove all spaces between the function and the parenthesis or set sql_mode=’IGNORE_SPACE’;

This is causing the error:

SELECT MAX (id) as something FROM Example

This will work correctly:

SELECT MAX(id) as something FROM Example
Posted in Solutions | Tagged , , , , | 14 Comments

PHP script to convert mysql collation

Whenever you have accidentally chose a wrong collation or changed your mind afterward you may use the following script to change the collation (the character set that data are stored) automatically.

This is especially useful when for example you want to support greek characters in a forum and after you have created the database you didn’t change the collation to utf_general_ci and you proceeded by installing the forum platform. The only solution would be to remove the database, recreate it, change the collation and then reinstall the forum software. With this script you can fix the issue directly.
Continue reading

Posted in Scripts | Tagged , , , , , | Leave a comment

MySQL query is not executed, MySQL server has gone away

Problem: I was trying to make a mysql query after a function, that was taking a lot of time to load, and my query was not being executed. In addition I was receiving the error: “MySQL server has gone away”. This was caused because the mysql server was timed out and closed the connection.
Continue reading

Posted in Solutions | Tagged , , , | 4 Comments

This is Direct Marketing

Direct Marketing

Found at:
Original Source:

Posted in Funny, Marketing | 1 Comment

vbulletin 4 make bbcode [code] have syntax highlight like [php]

Goal #1: vbulletin 4 bbcode [code] have syntax highlight like [php]
Goal #2: Code wrapped in the [code] and [php] bbcodes to have Consolas as font like StackOverflow

The default [code] bbcode of vbulletin doesn't highlight the code which is wrapped inside of it. It actually is using a "pre" html tag to keep the format. The solution for this is mainly a 2 steps process:
Continue reading

Posted in Scripts, Solutions | Tagged , , , , | 24 Comments

Custom default permissions on specific folder

Goal: Any file or directory uploaded / created under a specific folder to have read, write, execute (777) permissions.

Environment: CentOS 5.5, Kernel: 2.6.18-194.17.1.el5

I was looking for a solution to have read, write, execute permissions for all since I wanted to delete files and folders from a php script and the files were created by an external application, not able to set permissions. My php script is using the unlink() function to delete the file and then the rmdir() to delete the folder.
Continue reading

Posted in Scripts, Solutions | Tagged , , , | 1 Comment

A web development blog

It has been a long time that I was thinking to start blogging, focusing on web development and other related areas.

My main goal is to write about problems and solutions that I face in my every day programming tasks in order to help others and keep track of them so it will be easily also for me to refer to them at future.

Another goal is to start communicating with other people web development issues so we can exchange knowledge, help each other and at the end improve ourselves. For this reason I also plan to publish code that I develop and that it could be useful.

There will be no specific plan for blogging like one post per week or something similar, but I will post as soon as I think something is useful.

Posted in News | Tagged , , , , | Leave a comment