Uncategorized
Sep 1st, 2010
http://bugs.php.net/bug.php?id=20720&edit=1 - looks like an issue I just got with garbage collection and php
Fatal error: Uncaught exception 'Zend_Session_Exception' with message 'Zend_Session::start() - /var/www/__common/library/Zend/Session.php(Line:480): Error #8 session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) Array' in /var/www/__common/library/Zend/Session.php on line 493
Zend_Session_Exception: Zend_Session::start() - /var/www/__common/library/Zend/Session.php(Line:480): Error #8 session_start(): ps_files_cleanup_dir: opendir(/var/lib/php5) failed: Permission denied (13) Array in /var/www/__common/library/Zend/Session.php on line 493
Call Stack:
0.0000 329288 1. {main}() /var/www/tripvera.com/public/index.php:0
0.0091 502476 2. Zend_Application->bootstrap() /var/www/tripvera.com/public/index.php:36
0.0091 502520 3. Zend_Application_Bootstrap_BootstrapAbstract->bootstrap() /var/www/__common/library/Zend/Application.php:355
0.0091 502520 4. Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap() /var/www/__common/library/Zend/Application/Bootstrap/BootstrapAbstract.php:582
0.0109 562116 5. Zend_Application_Bootstrap_BootstrapAbstract->_executeResource() /var/www/__common/library/Zend/Application/Bootstrap/BootstrapAbstract.php:618
0.0109 562300 6. Bootstrap->_initRole() /var/www/__common/library/Zend/Application/Bootstrap/BootstrapAbstract.php:665
0.0111 566352 7. Zend_Auth->hasIdentity() /var/www/tripvera.com/application/Bootstrap.php:27
0.0111 566352 8. Zend_Auth->getStorage() /var/www/__common/library/Zend/Auth.php:141
0.0116 614732 9. Zend_Auth_Storage_Session->__construct() /var/www/__common/library/Zend/Auth.php:91
0.0116 615164 10. Zend_Session_Namespace->__construct() /var/www/__common/library/Zend/Auth/Storage/Session.php:87
0.0116 615252 11. Zend_Session::start() /var/www/__common/library/Zend/Session/Namespace.p
Posted In: Uncategorized |
No Comments
Aug 18th, 2010
Quite the coincidence... I happen to be working on a form for uploading large files, and an
article on Sitepoint pops up in my RSS feeds describing some of the settings to use. Besides the point that a lot of those settings mentioned in the article can not be set using ini_set (check
php.net for which directives can be used with ini_set), there is also an issue I just ran into. If you set both your
upload_max_filesize and
post_max_size the same number, you may be in for a surprise when someone tries to upload too large of a file.
What's the surprise? Your form variables will not be available in the php script processing the upload, or at least that is what's happening to me. Since the
post_max_size has been exceeded, $_POST is empty. This is a problem if you need variables from the form/$_POST to do a redirect or take some other action. Setting your
post_max_size above the
upload_max_filesize doesn't seem to help either. It looks like you need to stick the variables you absolutely need in the url and use $_GET to ensure you reliably have them.
Posted In: Uncategorized, PHP |
No Comments
Jan 8th, 2010
I received a new monitor for xmas and wanted to set up dual display (twinview) for Ubuntu 9.10. I already had the proprietary Nvidia drivers install, and it was very easy to get the dual monitors up and running. However, I always got this error when trying to save the configuration: Can't parse /etc/X11/xorg.conf. And upon restarting, only one screen would show and I would have to set it up again.
Even when I launched Nvidia with sudo (
sudo nvidia-settings), I still got this error on the command line:
VALIDATION ERROR: Data incomplete in file /etc/X11/xorg.conf.
Undefined Device "(null)" referenced by Screen "Default Screen".
I moved
/etc/X11/xorg.conf to a new filename, ran
sudo nvidia-settings and was able to save as new xorg.conf file and now I have both monitors on start up. Also looks like you can simply
edit the existing xorg.conf file and you will be able to save your settings.
Posted In: Uncategorized, Ubuntu |
No Comments
Dec 19th, 2009
It seems like every time I upgrade Kubuntu, my sound doesn't work anymore. I guess "doesn't work" isn't the right term. It seems that the output is muted. If I type pavucontrol into the command line and then go to output devices on the volume control window that pops up, the Internal Audio Analog Stereo is muted. I don't know why the pulse audio volume control is defaulting to that setting every time I upgrade, but I fiddled around with my sound settings a couple of years ago when I was having issues and that's likely the culprit. I think I need to do a fresh install one of these days....
Posted In: Uncategorized, Ubuntu |
No Comments
Oct 16th, 2009
I am new to MooTools and was using MooTools 1.2.3 to submit a form via Ajax - pretty standard stuff. When trying to put in callbacks for onSuccess,onRequest, etc... I kept getting JavaScript errors (b.lastIndexOf is not a function). Looks like you need to use set() function first, then call send(). MooTools must have been updated, because there are a lot of examples on the intraweb that do not do this, but work in my browser. To add to my confustion, you can call send() on the form without set first as long as you don't pass an object with callbacks as a parameter in send().
This works
window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.send();
})
});
This does not work
window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.send({onComplete:function(){alert('this');}});
})
});
This works with callbacks
window.addEvent('domready', function() {
$('myForm').addEvent('submit',function(event) {
event.preventDefault();
this.set('send',{onComplete:function(){
alert('this');
}
}).send();
})
});
Anyways, after a day of playing with MooTools, I have say I am impressed. Not sure why, but I think this is my favorite framework. I can't say I have much experience with JS frameworks, and my JavaScript is pretty bad these days, but I am impressed with MooTools so far.
Posted In: Uncategorized, JavaScript |
No Comments
Apr 3rd, 2009
I can't claim to be a hard core gamer. I grew up with an Atari, Nintendo, Sega and then Playstation in college. But ever since graduating college, I have rarely played games. With the exception of Rock Band, which I played occasionally at my former employer - nothing like sneaking a few songs in during work! In my current job, I deal with a lot of gaming companies and it is amazing to see what is in the pipelines these days. The graphics and textures are so realistic, its hard to envision what gaming will be like in 10 years. Producing a game is like making a block buster movie - it takes a lot of time and money to develop, without knowing whether the games will be successful.
I have thought about playing some computer games, like World or Warcraft. I see you can buy accounts from people with characters already built up, which given my limited spare time I can see the appeal. But doesn't that defeat the purpose of the game?
Wow key codes over at Buy MMO Accounts are going for $29.99 for a two month period, which seems pretty reasonable to me. Of course I probably need to get a better computer if I were to play a lot...
Posted In: Uncategorized |
No Comments
Apr 3rd, 2009
I have a dedicated server running a bunch of sites, but recently I needed to set up a site for a friend and didn't want to put it on my server. I find recommending a hosting company is sometimes preferable over using my server. That way, when SPAM starts getting into the email account, or some other unaviodable issue crops up, I am not the one dealing with it! It has been awhile since I compared simple plans on hosting companies, but
web hosting choice has a nice list, and boy are prices cheap these days. I remember when $9.99 a month was dirt cheap, now under $5 is common! The budget hosting section of their site lists all the hosts under $5, with one at $2.95.
There is a lot of talk about Amazon EC2 and other cloud providers, like Mosso and Slicehost, but if you just have a small, simple site, these are overkill. Especially EC2, as it is not trivial to get an instance up and running, and get everything in order, like S3 and Elastic Block Store. Amazon is building out their web interface to control the the services, but it is still pretty basic. Mosso looks interesting, and I may have to investigate that more.
Posted In: Uncategorized |
7 comments
Dec 23rd, 2008
Here is Seattle we are having a cold spell, which has allowed about 6" of snow to accumulate where I live, with upwards of 12" in other neighborhoods. Not a lot considering what I used to deal with in Vermont, but no plows, no sand/salt on the road, lots of hills and drivers unaccustomed to snow makes for treacherous driving. Anyways, I had placed an order with Amazon, and they just sent me an email notifying me that my order may be delayed by a day due to the weather. I don't know many online stores that would have done that. It isn't a huge deal, but it goes to show you how Amazon makes buying online so easy.
Posted In: Uncategorized |
No Comments
Dec 7th, 2008
I was looking through some very old code of mine and saw the hoops I jumped through to format a MySQL date field into something a little more friendly. It wasn't pretty, involving explode() among other things. Being more familiar with PHP now, I thought it would be nice to post a snippet of code. It takes a start date and an end date and returns just one date (in the format you specify per PHP
date format, or a default one if you don't pass in the parameter) if the dates are the same, or the two dates with a dash in between if they are different. Nothing crazy here, and it could be improved by say adding an optional parameter to determine the separator when the dates don't match, or allowing the end date to be null, etc.. I think this will work in PHP4 too.
[php]
function mysqlDateFormat($startDate,$endDate,$format = 'M jS')
{
if($startDate == $endDate) {
return date($format,strtotime($startDate));
}
return date($format,strtotime($startDate)) . ' - ' . date($format,strtotime($startDate));;
}
[/php]
Posted In: Uncategorized, PHP |
No Comments
Nov 19th, 2008
Amazon has released their CDN offering,
CloudFront. Some interesting notes:
- Eight POPs in the US, four in Europe and two in Asia.
- Pricing is different across regions - i.e. Asia is more expensive than the US - and charged by GB's delivered and GET requests.
- Origin must be S3, although the way the documentation reads and is structured, sounds like they could allow your own origin in the future
- Works on a pull model. I.e. when a user requests the object from CloudFront, if CloudFront doesn't have it in cache, it will go to S3 to grab object, serve object to user and cache it.
- Objects expire in 24 hours by default, although Amazon somewhat honors Expires/Cache-Control Headers as long as they don't go below 24 hours
- Amazon is using LRU (Least Recently Used) to evict objects. I.e. the photo of your cat that gets viewed once every 20 hours may get removed from cache when more popular objects fill up the cache
- No way to purge or invalidate objects in cache on CloudFront - Amazon recommends using filename versioning to overcome this limitation
- You can CNAME your hostname to CloudFront
It is a very, very basic CDN offering and I am interested to see the level of uptake. Since Amazon requires a person to use S3, it will also be interesting to see the true
cost of using S3 combined with CloudFront, compared with using another CDN vendor and your own origin infrastructure.
Posted In: Uncategorized |
No Comments
Nov 14th, 2008
I have spent over an hour trying to get a simple page using Dojo's lightbox and no luck. I am more of a jQuery fan, but thought I would give Dojo a try since it is coupled with Zend Framework now. I tried adding the script and css tags manually to the page, not through Zend Framework, but for the life of me could not get it to work. Not sure what the deal is. Searching, I came to
this page on Dojo, where it doesn't even work. In the comments it says this example is outdated and points to another page that didn't help at all. I'm pretty frustrated right now, so I'll have to try again on a clear head. Maybe trying to use the CDN instead of downloading the files is causing the problems? Man, jQuery's thickbox was painless to get up and running, may have stick with that...
Posted In: Uncategorized, JavaScript |
2 comments
Jul 17th, 2008
Posted In: Uncategorized, How To |
1 comment
Apr 24th, 2008
An article talks about the opening up of Yahoo, both its embrace of open source and the company’s desire to open its platform to 3rd party developers. I have seen a lot of good things come out of Yahoo in the past couple of years, from
Yahoo Site Explorer to
Yahoo Pipes to Yahoo’s contributions to PHP, especially Unicode support in PHP 6.
The
Search Monkey initiative looks very promising, and gives developers a lot of latitude in how they present their sites in the search results. Of course it will require individual users downloading your customizations, but for websites with dedicated users who also use Yahoo, I would think it would be fairly easy to get people to install your app.
I am interested to see what else Yahoo has up its sleeves. Sounds like the MS acquisition ballyhoo hasn’t stopped innovation at Yahoo; in fact, it may have done the opposite, as Yahoo sees the need to rapidly launch new products and increase the amount eyesballs and time spent on their site.
Posted In: Uncategorized, Online Advertising |
No Comments
Mar 29th, 2008
Over on usability guru
Jakon Nielsen's blog, he throws out a statistic that 24% of users in a recent study couldn't navigate to google to perform a search - they either went to a different search engine or just failed. How you fail at that task is beyond me. Do you look at the browser, throw up your hands, and scream "I don't know how to use the damn thing!!".
I generally try not to be critical of non-tech savvy people, as I spend way too much time online and its only normal that things that make perfect sense to me can baffle other people. A couple of years ago a friend handed me a socket wrench when I asked for help on my car. He was amazed that I had no idea what to do with it - but hey, I had never done any work on a car engine, let alone even change the oil. It's all perspective I guess. The scary thing about the study is this quote "Also, for this round of research we're deliberately recruiting above-average users, so the success rate across all Internet users is probably lower than our finding." If 24% of above average users can't navigate to Google, then my perception of the web is way out of wack with the general population. I would have guessed in 1% to 2% range...
Posted In: Uncategorized |
No Comments
Feb 23rd, 2008
The database was upgraded to MS SQL 9 and required me to use 2005 SQL Server Management Studio instead of Enterprise Manager. While trying to import a .csv file, I ran into a number of errors and spent awhile trying to figure out what the problem was. If you get a similar error, the problems seems (I say seem, because I am not a database guy and am simply guessing. Further exacerbating the problem is my extremely limited use of MS SQL) to be that the import tool isn’t allocating enough room for the strings going into certain columns. I.e it looks at the first 100 rows to determine how much space a typical field needs, and if a value goes way over that, it truncates the string and errors. This is the error message I got:
Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "ClickThroughURLValue" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)
I tried to alter the values in the destination table, but that didn’t help at all. It turns out; you need to alter the OutputColumnWidth on the first screen. Since space and performance weren’t an issue for me, I just made the nvarchar quadruple the size it needed to be, so it could accommodate the random large string. One of the problems with the tool is it will error and fail on the insert when it encounters too big of a value, rather than just truncating and logging. This doesn’t seem like a huge issue, until you have a 15 gig .csv with over 4 million rows and it errors after 2 hours of importing… Below is a screenshot showing where the change needs to be made. Doing this will also alter the size of the column in the destination table and prevented the error for me.
Posted In: Uncategorized |
No Comments
Feb 9th, 2008
I have been having major problems with Adobe Acrobat 7.0 and Windows Vista. I bought Acrobat almost a year ago, paying close to $500, and have consistently had problems with the software saying it needs to be activated even though I have already activated it numerous times. I worked with their lousy customer support when I first got it, trying to figure out what the problem was, and nothing ever worked. I use it infrequently, so I put up with the annoying messages and dealt with having to close it and restart it every 5 minutes.
After almost 8 months of not using it, I started using it again for a project. It kept having activation issues and I dutifully called tech support again, figuring they must have a solution now. After my activation failed over the phone with the automated system, the tech support person told me I either need to install on Windows XP or pay $150 to upgrade to Acrobat 8. I couldn't believe it - Adobe isn't going to make their product work with Vista, even though Vista had already launched and was in use when only Acrobat 7 was available. It's not like I want a super old version of Adobe to work with Vista. I had my Vista machine when I purchased Acrobat 7, I didn't have the fucking option to purchase Acrobat 8. And there was no indication their product wouldn't work with Vista.
So Adobe, excuse my french, but fuck you. That's ridiculous. I'll encourage everyone I know not to buy your products if they can help it. Expect some posts on how to accomplish common tasks with non-adobe products.
Posted In: Uncategorized, home office |
No Comments
Jan 18th, 2008
Yahoo has announced they will support OpenID, which I think is great. There are some
security concernswith OpenID, but I think the benefits outweigh the risks. I probably wouldn't use OpenID in the near term for my online banking, but for the myriad of online accounts I have that don't have sensitive data, OpenID is great.
Posted In: Uncategorized |
No Comments
Nov 22nd, 2007
In March,
I wrote about Firefox's woeful performance with some javascript heavy sites. I am happy to say, Firefox is performing much better on these sites now that I have upgraded to Gutsy Gibson and Firefox was upgraded. This contrasts with the fact that Firefox seems to be crashing a lot more on windows these days, especially Vista.
Posted In: Uncategorized, firefox, Ubuntu |
No Comments
Oct 17th, 2007
Emails have been coming through touting the new capabilities in Live Search and at our division meeting, the VP said internal tests had shown live as relevant, if not more relevant than Google. There were some eyebrows raised at that comment, but he
did say this was the first time Microsoft’s internal tests had found this.
I was skeptical, but decided to start using Live as my default search and so far I have been impressed. I wouldn't say it is noticeably better than Google, but it sure does the trick and I can honestly say it is as good. I have tried to use different search engines in the past (usually Ask or Yahoo) and found I always ended up going back to Google as some searches in the "other" engines didn't give me the results I needed. But so far, Live has been giving me what I need - the relevancy is definitely much improved.
Posted In: Uncategorized |
No Comments
Oct 30th, 2006
I have been having problems accessing my Gmail account this morning. Mostly, I haven't been able to bring up the webpage to login. I did log in and send a couple of emails before it went down again. I have another email account, so it isn't that big of a deal. In fact, I kind of like it in a perverse sort of way - knowing the the omnipresent Google has problems with their website and web applications. Although I don't think a client would accept that as an excuse if one of my applications goes down...
One area of concern is how much of your information is stored with Google, or any other company. As more and more applications and data move to the Internet, service outages become a big deal. Not being able to make a purchase from Amazon for a couple of hours typically doesn't halt your day. But not having access to email, your calendar and contacts can make life difficult. Even though Gmail is a free service, people expect it to work and rely on it for communication.
Update: Gmail is working fine and now other sites are not coming up. I guess it must be my internet connection or something else strange. I can't ping a couple of sites or bring them up in either IE or Firefox, although the vast majority of other sites come up without a problem. I logged into a server in California and routed my web browser through that, and the sites are coming up fine. My girlfriend can see them at work in Seattle, so something is amiss with my connection and not the websites. If it persists, I'll have to call Speakeasy and find out what the problem is.
Posted In: Uncategorized |
4 comments
Oct 5th, 2006
I found a web page today that talks about syncing your contacts and calendar (via the lightning extension) through the use of extra folders on an IMAP email account. I installed the
lightning extension and the
synckolab extension and tried to get going but ran into the same error on both windows and linux - Mailaccount “not foundâ€. Lightning is a fairly new extension and the Sync Kolab page says it was just made to work with Lightning – apparently there is more work to be done...
I guess I'll look at
Google Calendar, although I still need to figure out a way to sync my contacts. Maybe I should just install
SugarCRM and use one of the extensions for
Thunderbird. Probably overkill for my needs, but it might be the best option.
Posted In: Uncategorized |
1 comment