Unexpected ‘function’ (T_FUNCTION) on line 1

Were you presented with the following PHP error after uploading a WordPress theme to a web server using FileZilla ftp client? If you open the file that’s mentioned in the error locally you won’t find anything unusual. The key is to download the same file from your server and open it. Is all the code …

Continue reading

XMLRPC and ini_set disabled warning in WordPress

If you wish to use the WordPress JetPack plugin on your WP website you must verify your WordPress.com account before any of the JetPack features are enabled and usable. To verify your WordPress.com account, JetPack uses the WordPress xmlrpc.php file located at yourdomain.com/xmlrpc.php. When you attempt verification you might encounter the following error: Warning: ini_set() …

Continue reading

How to create your own WordPress shortcodes

What is a WordPress shortcode? Shortcodes are a part of WordPress since WordPress 2.5. Shortcodes represent just that, short pieces of code developed to be inserted anywhere on a WordPress website in place of repetitive content. What does a WordPress shortcode look like? A WordPress shortcode is represented by a descriptive string inside square brackets …

Continue reading

Call to undefined function curl_init()?

If you encounter the following error when calling the php function curl_init the PHP curl extension is most likely not enabled on your server. Call to undefined function curl_init() In order to continue coding, you need to enable the PHP curl extension. To do so you need to edit the server’s php.ini file and uncomment …

Continue reading

How To Export Query Results in PHPMyAdmin

If, like myself, you often use the excellent phpmyadmin opensource software to access your mysql server, here is a quick way you can export the results of a mysql query into common formats like CSV, sql, zip using the phpmyadmin interface. In phpmyadmin run your query. Once you are presented with the query results, scroll …

Continue reading

How To Validate A CheckBox ASP.NET Control

If you attempt to use a RequiredFieldValidator with a CheckBox control, you will get a runtime error that says something like “Control {your checkbox control id} referenced by the ControlToValidate property of {id of your validator control} cannot be validated”. If you want to require an ASP.NET CheckBox control be checked when a form is …

Continue reading