PHP/MySQL
Rails 3 – PHP Style Global Variables, $_SESSION, $_GET, $_POST in the models, and everywhere.
PHP Globals in Rails 3 So, as part of my slow descent into hell for even showing this stuff, I thought I would make a quick and dirty post about getting PHP like globals into your models in Rails. I wrote a longer article about globals in the model in rails which you can check [...]
Posted in: Computer Science, PHP Tutorials, PHP/MySQL, Ruby on Rails, Ruby on Rails, Tips and Tricks, Topics, Tutorials | No Comments »
Apache2/MySQL on Ubuntu Configuration
Once you’ve installed apache2 and mysql on your server, you might want to try these configuration changes to make it perform a bit better: In /etc/mysql/my.cnf key_buffer = 16K max_allowed_packet = 1M thread_stack = 64K table_cache = 4 sort_buffer = 64K net_buffer_length = 2K And in Apache2′s config, /etc/apache2/apache2.conf, find the section for MPM prefork [...]
Posted in: General Computing, Linux, MySQL, PHP/MySQL, Tips and Tricks, Topics, Tutorials, Writings | No Comments »
Love Ruby, Hate Rails, but still use it — or Ruby vs PHP
Okay, that title was a bit extreme, I don’t really hate Rails. I don’t get why people feel the need to be so completely polarized about a framework, or a language. It’s either the best thing since sliced bread, or the worst, and nowhere in between. Still, most developers who aren’t Ruby purists, can tend [...]
Tags: PHP, RoR, Ruby, Ruby on R
Posted in: Computer Science, PHP/MySQL, Ruby on Rails, Topics, Web Design, Writings | 6 Comments »
Spree Commerce, eBay Trading API, and the eBay Accelerator Toolkit from Intradesys EbatNs
In this bit, I talk about using the EbatNs SDK for the eBay Trading API, to list items from your Spree Commerce store, or really any rails application. Filled with production code examples from an honest to god real live and working spree site that interfaces with the eBay trading API to Add, Revise, and End items, on ebay when they sell in your store, or on your store when they sell on eBay.
Tags: eBay, HowTo, PHP, Programming
Posted in: eBay, PHP Tutorials, PHP/MySQL, Tips and Tricks, Web Design | No Comments »
SOAP APIs R Klunky or How to waste bandwidth for no good reason
The fact that SOAP is still around is, to be honest, absolutely beyond my comprehension. No serious effort seems to have been put into something like JSONRPC. Still, when it comes to some API calls, SOAP is pretty darn good, but this here is one example of it being used as just a waste. I [...]
Tags: eBay, Rant, RoR, Ruby on Rails, Spree Commerce
Posted in: PHP/MySQL, Ruby on Rails, Ruby on Rails, Tips and Tricks, Topics, Web Design | No Comments »
HowTo Knock it off with crazy MYSQL queries and the qTranslate plugin unistall
We’ve all done it. Either we learn some tricks in MYSQL, or read a cool post about some obscure programming trick you can do with SQL and decide to try it in a pinch on a live database. Just don’t do it. 9 times out of 10 you have access to SSH, and PHP, and [...]
Posted in: Computer Science, MySQL, PHP Tutorials, PHP/MySQL, Tips and Tricks, Topics | No Comments »
HowTo html input find/replace regex
Whenever I make a form, it’s a bit of a hassle to add in the php support. That is, if the page gets reloaded of sent back, we want to insure that all the valid data that was entered before is maintained. And easy way to do this is: Here is an easy way, tested [...]
Tags: HowTo
Posted in: PHP, PHP Tutorials, PHP/MySQL | No Comments »
Firefox Content Encoding Error, PHP Website
I looked around online, and couldn’t find any solutions to this problem, so here is one possibility for you. I have a client with an intranet website with a custom MVC framework in PHP. In one of the controller actions, there was an echo statement. Normally, this shouldn’t really affect it, i.e. when you start [...]
Tags: HowTo, PHP, Programming
Posted in: PHP/MySQL, Topics, Web Design | No Comments »
Simple PHP closure/lamda/anonymous function usage.
This is a fun little example of the new Closure features in php. ?View Code PHPclass TArray { public $pMembers = array(); public $pCurrentIndex = 0; public function __construct() { $args = func_get_args(); if (empty($args)) return; if (count($args) == 1) $args = $args[0]; foreach ($args as $arg) array_push($this->pMembers,$arg); } public function push() { $args = [...]
Tags: HowTo, PHP, Programming
Posted in: OOP, PHP Tutorials, PHP/MySQL, Topics | No Comments »
