alanstorm | 10 years ago | on: PCRE Heap Overflow in Regex Processing Lets Users Execute Arbitrary Code
alanstorm's comments
alanstorm | 11 years ago | on: Lumen – A micro-framework by Laravel
Yes and no. The PHP language and run-time continue to value backwards compatibility and, ultimately, a PHP application is still just a collection of PHP files sitting on a web server somewhere. If you want to work like it's 2006 you can.
However -- Modern PHP (Laravel included) bring a few winkles to the table and most deployments will have extra complications for folks expecting to just "FTP a file" (also, I hope you meant SFTP a file (-:)
For example, Laravel (similar to rails) has migrations for creating and updating your database schema. You don't need to use migrations, but if you do your deployment becomes a bit more complicated.
Also -- although PHP namespaces have come a long way, they're still not up-to-par with (or, in PHP group-speak "have different goals than") ruby or python's module system. The Composer packaging system has stepped in to fill this gap, but this means a modern PHP deployment needs to
1. Generate composer autoload cache files 2. Fetch, download and install any updated composer packages (i.e. third party libraries)
Again, there's nothing stopping you from working locally and SFTPing or rsyncing all your local files (composer packages/autoload files included) to the server, but most teams develop a more formal deployment process than that.
How you host your PHP application is going to effect how you deploy. There's still many, many PHP hosting companies offering `mod_php` based hosting, but there's also a large number of projects who use a Fast-CGI/FPM approach (either with Apache or nginx). The difference in process models brings a different in the unix permissions model, and that often means there's extra steps needed to ensure file based cache system can write to their storage engines.
And speaking of caching, 20% of any "serious" PHP developer's time is spent sorting out the various framework level caching systems, as well as PHP based opt-code caching. I mention this here mainly to point out that some sort of cache refresh and/or warming is common in signifigant/long-standing PHP systems.
Deployment's still easier in PHP than in other frameworks, but if you're expect a wild west "just edit files on the server and you're good to go", expect push-back from your modern, professional, PHP developers :)
alanstorm | 12 years ago | on: oDesk to merge with Elance
Pay: $10
alanstorm | 13 years ago | on: The Cult Of Positive Attitude and Always Saying Yes
alanstorm | 13 years ago | on: Freelancers: High quality projects. Prompt payment.
Just my two cents here (with the caveat I could be talking out of my behind since I don't know these people), but I'd discourage anyone considering a career in freelance design/development from using these sorts of services.
The hardest part of making a long term go at this sort of work is learning how to sell yourself and having the hard discussions about business, money, and commitments. Using these sorts of services rob you of that experience, and your working relationship ends up being more employee than independent, but without the hard fought protections employees deserve.
What these services promise you is high quality projects, and an escrow service for getting paid. You can, and should, set these sorts of protections yourself. If you are going to try out these sorts of services as training wheels, be sure to carefully read anything they have you sign, and make sure it could never be used to impact your future, 100% independent career.
alanstorm | 14 years ago | on: So You Think You Can Freelance?
There's far too many things a potential client may not be telling you about the project, and it's incredibly hard for the independent freelancer to do enough business development, or for the client to do enough vetting, to know which random internet person is trustworthy. This is especially true when you're just starting out.
A one week sprint that solves a small, immediate need the client has will keep the project manageable, and protects both the freelancer and the client from a potentially bad situation. Worse case scenario, one of you is out a week's work. Best case scenario, after a few sprints a rapport and trust develops, and you can start providing your clients with estimates for larger pieces of work, knowing they'll be treated as estimates and not fixed bids.
Don't eliminate the appearance of uncertainty when you're legitimacy uncertain. That's bad communication. If a client needs solid estimates out of the gate they don't need an independent freelancer. They need a full-service agency.
alanstorm | 14 years ago | on: Hack your way through Stripe's Capture the Flag
alanstorm | 14 years ago | on: I Wasn't Paid
alanstorm | 14 years ago | on: Diveintohtml5 lives
I doubt (but obviously don't know) Mark wanted to excise his work from human memory, he just didn't want the personal responsibility of maintaining those resources/participating in their development as a leader. That's the wish worth respecting.
alanstorm | 14 years ago | on: Ask HN: How do you get over the pain of refund requests?
If this is a subscription service, automate the refund process such that you can you can send a single email with a link that will let them provide feedback, cancel their service, and refund their money.
If you're selling software bits consider a serial number system that will allow you to remotely disable people who have requested refunds. Also, keep your refund policy but stop advertising it. This way you prevent bottom feeders from even knowing it's an option. If you notice this is costing you more sales than you gain, go back to advertising it and re-read paragraph one.
alanstorm | 14 years ago | on: 535 ways to reload the page with JavaScript
1. Browser based Javascript provides a location object for managing and accessing the current browser location, and this location object is available as a global variable.
2. Browser based Javascript also provides a special case in the interpreter/processer/etc., where setting the location object equal to itself will reload the current page. This is also true for certain properties of the location object (href)
3a. There is also a more conventional reload method on the location object which accepts either a location object or string href. Also, many of the "go to this URL methods" exposed to Javascript will interpret "go to the url I'm at" as a request to reload the page. Many of these methods will accepts a location object, or a string representation of a URL as a paramater.
3b. location.href is a string representation of a URL
3. There are many ways to access global variables in Javascript. There are many ways to assign a value in javascript. There are many ways to call a method in javascript.
4. All of the above can be combined into lots (likely more than the 535) of ways to achieve the same thing.
alanstorm | 15 years ago | on: Fuel - A simple and flexible PHP Web Framework
alanstorm | 15 years ago | on: Fuel - A simple and flexible PHP Web Framework
alanstorm | 15 years ago | on: Why the Nitro JavaScript Engine Isn’t Available to Other iOS Apps
alanstorm | 15 years ago | on: The Walled Garden Has Won
alanstorm | 15 years ago | on: Xcode now costs US$ 4.99
Apple's leveraging the work they put into building the App Store infrastructure (and business deals with credit card companies) to do something a lot of other companies couldn't (make something that was free cost something again without too much fallout).
alanstorm | 15 years ago | on: Crawl Bank Accounts with the Ghost of Wesabe
alanstorm | 15 years ago | on: Interview with Richard Stallman
alanstorm | 15 years ago | on: Co-Founders: Your Idea is Worthless. Show Your Chops
alanstorm | 15 years ago | on: Always pay your web developers
Until PCRE or PHP release a patch for this, you remain vulnerable. You'd want to defend against this at the web server level -- think `MOD_SECURITY` rules that scan requests, look for known "bad" regular expressions, and then stop that request from reaching the PHP application. If you have a good hosting company hopefully they're already doing this for you.