For the Love of My Country

Andy Moore's web-development blog: HTML, CSS, JavaScript, Flash (subscribe)
quicklinks: html codes | w3 schools (CSS) | colour codes | archives
blogging at: Star Studded Super Step on politics, abortion, freedom...
Warning: Cannot modify header information...
Tuesday, February 23, 2010, 10:40 PM  0 Comments
Was able to access my Wordpress website, but couldn't get into the admin panel. The browser returned this PHP error:

Warning: Cannot modify header information - headers already sent by (output started at /home/myaccount/public_html/...

Here's how I fixed it, looked at the offending file - wp-config.php, and saw that there were two empty lines beneath ?>. PHP apparently doesn't like empty space outside of its markup, so I deleted them, uploaded the file, and she's away and laughing.

Labels:

Mediawiki Permissions
Sunday, January 24, 2010, 4:51 PM  0 Comments
Mediawiki is the PHP/MySQL engine that runs wikis such as Wikipedia. I am an admin on a wiki and needed to change user permissions such that registered users would have usual editing rights (talk, main, etc), but that anonymous users would only have permission to edit the talk (discussion) pages. This is so that - while everyone has the ability to contribute, only registered users may contribute to the articles themselves - we wished to set it up this way to avoid abuse of the wiki.

Anyway, was hacking round for ages in LocalSettings.php, trying to change $wgGroupPermissions. Finally figured out that I was attacking this from the wrong angle. The thing is, if you set $wgGroupPermissions['*']['edit'] = true;, you automatically overide other restrictions placed on anonymous users (* means all users, including anonymous users). However if you set $wgGroupPermissions['*']['edit'] = false;, all you end up doing is completely removing all rights held by anonymous users.

I found the answer to my problem at the Mediawiki Users Forum, and found it to be pretty darn straight forward after a little bit of playing round with it. Comment here or at the forum if you need further assistance.

Labels: ,

PHP Contact Page Script with Attachments
Thursday, January 14, 2010, 9:06 PM  0 Comments
Here's an excellent, highly-customizable, pretty simple and intuitive PHP script. It integrates reCaptcha very nicely, and has a whole host of additional fields such as password, attachment, and check-lists which can be included. highly recommended

Labels: ,

PHP Form with File Upload
Friday, March 27, 2009, 3:15 PM  0 Comments
Stumbled upon this excellent, functional and free form generator.
http://phpfmg.sourceforge.net/

Here's what I did with it.

It's a really straight-forward process to make your form. They include a small one-line credit at the bottom.

5/5 stars for this little stunner!

keywords: php form upload picture, upload attachment, upload file, php form submit picuture, submit file, submit attachment, form generator, free

Labels: , ,

Archives: \April 2007/\June 2007/\September 2007/\August 2008/\September 2008/\October 2008/\December 2008/\February 2009/\March 2009/\May 2009/\July 2009/\August 2009/\September 2009/\October 2009/\November 2009/\December 2009/\January 2010/\February 2010/\March 2010/\August 2010/\September 2010/\December 2010/