[PHP] Photo upload framework/library for PHP
Hi all, Can anyone suggest a photo upload/framework type library I can incorporate seamlessly into a PHP project I'm working on? I'd like for users to have an elegant UI to upload photos of their vehicles into my application. Mutli-file and progress bars would be a plus. I'm looking to integrate this code using the Code Igniter framework. Thanks all for any suggestions. - sf
[PHP] Dealing with auto-increment in MySQL
How're you folks dealing with records that are auto incremented in MySQL after a delete is made? I've noticed the only way to get a sequential order back is to truncate the table completely. Do you use logic in your code to find a missing ID and insert new records based on that? Or do you just ignore it, let mysql handle the numbering and go on with your lives? Just curious. Thanks! - sf
[PHP] Handling profile view counters
Hi all, I'm contemplating on a proper way of handling a counter for profile views on my auto dealership website. I'm currently confused with the type of algorithm to approach this with. Say a user has a registered session, and views profile a). I can increment the counter for that vehicle. The user can then surf vehicles b,c,dN etc and I'll increment the counter. However, if the same session tries to visit profile a,b,c,d should I not increment the counter? How would you all do it? Any examples with code would be very insightful and appreciated. Thank you kindly. - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Professional inquiry for you freelancers
Hi all, Going to cut it short and to the point. Do most of you freelancers get by with enough work that does not require front-end UI/design? Do you find it easier to get more work when you're strengths in design are just as creative as your programming capabilities? These are questions I'm entertaining myself with as I teach myself more design work. I love my full-time job doing development/system administration, and I can attest to a lack of design skills. However I am efficient with CSS/XHTML and can create layouts np. I do also enjoy creating buttons and tabs when I have the time for my own work with Photoshop CS3, but that's one aspect of the web I don't see myself ever getting paid for, professionally. Basically what I'm asking is, am I going to be end up being a jack of all trades, master of none, if I continue pursuing design AND development? Is there plenty of work out there for folks who just stick to development? Thanks for your humble opinions. Appreciate the feedback! Cheers, - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Professional inquiry for you freelancers
Wow, I fire off an e-mail before I hit the sack and wake up with several great feedback! No worries on the quality of humbleness, Daniel. ;-) Overall, I do enjoy design. Heck, I wish I had more of a creative mind and the logical programming mind at times. I just want to make sure I'm not cutting myself short in the long run by limiting my coding capabilities because of time I'm investing hours on end into a copy of Photoshop that my company has picked up for me. I really do appreciate the feedback. I'm going to run with it and see how it goes. Cheers all, - sf On 12/6/07, Daniel Brown <[EMAIL PROTECTED]> wrote: > On Dec 6, 2007 3:23 AM, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Steve Finkelstein wrote: > > > Thanks for your humble opinions. Appreciate the feedback! > > > > humble? > > People on this list are anything BUT humble, Steve. > > Now, as for my own petty opinion > > I always tell new clients that people are either expertly creative > or technical, and that I'm very much the latter, but not the former. > I can't design to save my ass. I can put the HTML code together, but > I may as well be colorblind when it comes to a good combination. I'm > just not good at coming up with a nice, clean layout so I > generally have a friend, my pre-wife (who does some design work), or > someone I know from online do the design part, if even only in > PhotoShop, then I integrate it with my code. Less hassle for me, > overall, so I can focus on providing excellent code (see, no one here > is humble!), without having it look like chewed-up and spit-out food > that someone realized they didn't like just a bit too late. > > -- > Daniel P. Brown > [Phone Numbers Go Here!] > [They're Hidden From View!] > > If at first you don't succeed, stick to what you know best so that you > can make enough money to pay someone else to do it for you. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Incorporating a PHP/MySQL based search
Hey folks, One area I lack experience in is writting a solution to index/search on a site. Would anyone be kind enough and point me in the right direction as far as any books which discuss some simple solutions or articles/blogs on the web? Clearly I'm not looking for anything as complex as Google's engine, ;-) but would love just to be able to understand/incorporate a decent level of search capabilities. Cheers all, - sf
[PHP] Advice with some code
Hi all, I'm having a brain freeze with some simple code that I wrote and now trying to refactor. I have a block of code that looks like this: public function backup() { $fname = "$this->dbName.sql.$this->zip"; $this->cmd = "mysqldump -Q -u $this->dbUser -p$this->dbPass $this->dbName 2>&1 > {$this->dest}/{$this->dbName}.{$this->lastId}.sql"; $res = shell_exec("$this->cmd"); error_log("First res: ".$res); if(!$res) { $this->cmd = ($this->zip==="bz2") ? "bzip2 {$this->dest}/{$this->dbName}.{$this->lastId}.sql 2>&1" : "gzip {$this->dest}/{$this->dbName}.{$this->lastId}.sql 2>&1"; $res = shell_exec("$this->cmd"); error_log("second error: ".$res); return !$res; } return FALSE; } Now instead of that FALSE, is there a way I can pass FALSE with a particular error message? This is because on the other end I have code that looks like this: if($mysqlDump->backup()) { $success = array('success' => '1'); $sqlres = mysql_query($sql, $link) or die(json_message('error',mysql_error())); shell_exec('/usr/bin/touch /tmp/build_transfer'); mysql_close($link); return '(' . json_encode($success) . ')'; } else { $fail = array('fail' => $res); return '(' . json_encode($fail) . ')'; } I'd ultimately like to be able to deliver a failure message from the return value...and properly catch that message so I can send it back in JSON format to the client browser to report what the error is. Think I should approach this with some try{..} catch code? Am I overlooking something really simple? :-) Thanks for your advice.
[PHP] Heritage web solutions
Hi everyone, I was curious if anyone has had the opportunity to work with or for heritage web solutions? If so, would you be able to share your two cents with any experience with them? Thanks! - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Incorporating a PHP/MySQL based search
Thanks Tedd... looks like a promising link. I'll take a look! On 12/12/07, tedd <[EMAIL PROTECTED]> wrote: > > At 5:36 PM -0500 12/8/07, Steve Finkelstein wrote: > >Hey folks, > > > >One area I lack experience in is writting a solution to index/search on a > >site. Would anyone be kind enough and point me in the right direction as > far > >as any books which discuss some simple solutions or articles/blogs on the > >web? Clearly I'm not looking for anything as complex as Google's engine, > ;-) > >but would love just to be able to understand/incorporate a decent level > of > >search capabilities. > > > >Cheers all, > > > >- sf > > > Steve: > > If you don't want to do it yourself , try this: > > http://sperling.com/examples/search/ > > It's very simple to do. > > Cheers, > > tedd > -- > --- > http://sperling.com http://ancientstones.com http://earthstones.com >
[PHP] iphone.facebook.com PHP inquiry
Hi folks, Probably the most impressive application I've run into for the iPhone has to be Facebook's implementation. I'm looking for ways to improve my application to be as responsive as theirs. Unfortunately it has quite a way to go. Does anyone know how this form of 'routing' works? For instance the home page for iphone.facebook.com looks something like: http://iphone.facebook.com/#home.php then if you click on profile it'll route you to something that looks like http://iphone.facebook.com/#profile.php?id= Is this actually 'leaving' the page and requesting profile.php? I'm completely confused with the hash mark in front of the PHP file and the mechanics behind this style. It seems to be extremely well implemented though and I'd like to learn more about it. I'm having a ton of issues with my application now where Ajax calls randomly do not get sent to the server. I haven't figured out why, maybe mobile safari is caching request URLs. But I'm looking to rebuild parts of the architecture to get it to work, and would love to understand the mechanism being used above. Does anyone know what is going on with the browser and HTTP requests with the methodology listed above? Any further reading? Thanks! - sf
Re: [PHP] iphone.facebook.com PHP inquiry
Thanks for the reply Mike. I suppose ultimately I'd need to dig into the JavaScript (hopefully it's not compressed) to figure out the PHP routing. I believe re-writing my application with the framework would be quite extensive and just not feasible at this particular point in time, although I should consider it in the future if my application remains problematic and this is a solid solution. The concept of calling back-end code via anchor tags though is something I've never seen. - sf On 1/7/08, mike <[EMAIL PROTECTED]> wrote: > > It's probably using IUI (the iPhone UI CSS/JS that Joe Hewitt created, > now being maintained at http://code.google.com/p/iui/) which allows > you to request the page to be loaded via AJAX based on how you setup > the link. > > this will load via AJAX > > this will load like a normal page > link > > This is how I *believe* it works, I just implemented IUI partially on > a site at work a few days ago and the final thing for me to work out > the kinks is whether or not to load certain pages using the AJAX > method (and show the cute little "loading" circle thing) or reload the > entire page. > > Remember it's all just Javascript trickery with CSS that works great > on Safari browsers (and works almost identical actually now in > Firefox...) > > It's very easy to implement, I had some initial confusion too how it > routes the requests but I think I figured it out there ^^ > > > > On 1/7/08, Steve Finkelstein <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > Probably the most impressive application I've run into for the iPhone > has to > > be Facebook's implementation. I'm looking for ways to improve my > application > > to be as responsive as theirs. Unfortunately it has quite a way to go. > Does > > anyone know how this form of 'routing' works? > > > > For instance the home page for iphone.facebook.com looks something like: > > > > http://iphone.facebook.com/#home.php > > > > then if you click on profile it'll route you to something that looks > like > > > > http://iphone.facebook.com/#profile.php?id= > > > > Is this actually 'leaving' the page and requesting profile.php? I'm > > completely confused with the hash mark in front of the PHP file and the > > mechanics behind this style. It seems to be extremely well implemented > > though and I'd like to learn more about it. I'm having a ton of issues > with > > my application now where Ajax calls randomly do not get sent to the > server. > > I haven't figured out why, maybe mobile safari is caching request URLs. > But > > I'm looking to rebuild parts of the architecture to get it to work, and > > would love to understand the mechanism being used above. > > > > Does anyone know what is going on with the browser and HTTP requests > with > > the methodology listed above? Any further reading? > > > > Thanks! > > > > - sf > > >
[PHP] Storing user ID in a cookie security precautions
Hi folks, I just completed my first reading of Advanced PHP Programming by George Schlossnagle and was very impressed and thankful for the wealth of information with examples provided by George. With that said, there is a chapter dedicated to Authentication using client-side cookies and encrypting a user id amongst other meta data using mcrypt. My question to the community is -- I'd like to try something similar to this approach for an application I'm working on. Although I'm a bit concerned as in the event of XSS or something of that nature, what if a userid a compromised and manipulated? Is it unlikely with George's encryption algorithms? I figured it would be redundant to store the user ID in a $_SESSION as well as I need a variable to pop the user id into for my queries. Anyhow, the class is certainly a welcome addition as far as I'm concerned.. but at the same time I'm paranoid someone figuring out the encryption on a cookie, manipulating it with an arbitrary user id, and then being able to have complete authorization to another users data. Thank you for your $.02! /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Anyone jump from Studio 5.5.x -> Zend Eclipse?
Hi all, I've tried googling around to find some blogs with decent information on whether Zend Eclipse is mature enough to make the jump over from 5.5.x just yet. Admittedly, I've dropped Zend Studio as of late and been writing all of my code in TextMate -- but at the end of the day when a project is complex enough, Zend Studio is much more powerful than TextMate with all of its features and remote debugging capabilities. Anyhow, I'm curious if it's worth it to check out Zend Eclipse yet. We're a team of about 5-6 developers and I've been getting asked by a few colleagues if I've tried it out yet since I'm usually the one to try out the newer technologies. I'd love to hear some feedback. Thanks! /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Weird Zend IDE Issue
Hi all, I know this isn't a forum for Zend IDE, but since there's probably a decent population here using it, I figured I'd ask away. I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that all left brackets, (eg: [ ) are not showing up in the code editor. I have a screenshot of it here: http://catalyst.httpd.org/zend.png Has anyone ever experienced anything similar? Thank you, /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Weird Zend IDE Issue
I've tried both restarting the IDE and changing font type + size in my preferences however this does not seem to render any effect on the code editor. Mind if I ask where you are changing the font so that we are on the same page? Thanks, /sf On 3/3/08, Jochem Maas <[EMAIL PROTECTED]> wrote: > Steve Finkelstein schreef: > > Hi all, > > > > I know this isn't a forum for Zend IDE, but since there's probably a > > decent population here using it, I figured I'd ask away. > > > > I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that > > all left brackets, (eg: [ ) are not showing up in the code editor. I > > have a screenshot of it here: http://catalyst.httpd.org/zend.png > > > > Has anyone ever experienced anything similar? > > yes. choose a different font - at least that worked for me (you might > have to fiddle with font-size too). > > > > > Thank you, > > > > /sf > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Weird Zend IDE Issue
Samy is correct. I'm able to replicate this on 3 different monitors. Also, as far as changing the Editor Font and Size in the IDE -- I need to figure out what's setting this to a read-only property. I can't change the Editor Font or size at this point in time. /sf On 3/3/08, Samuel Vogel <[EMAIL PROTECTED]> wrote: > Richard Lynch schrieb: > > > On Sun, March 2, 2008 11:07 pm, Steve Finkelstein wrote: > > > >> Hi all, > >> > >> I know this isn't a forum for Zend IDE, but since there's probably a > >> decent population here using it, I figured I'd ask away. > >> > >> I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that > >> all left brackets, (eg: [ ) are not showing up in the code editor. I > >> have a screenshot of it here: http://catalyst.httpd.org/zend.png > >> > >> Has anyone ever experienced anything similar? > >> > > > > Looks to me like your monitor needs adjusting, and it's just not > > showing that column of pixels. > > > > Dink around with the little buttons on your monitor. > > > > You could also try a different font with a fatter [ symbol if it lets > > you choose font. Or even just bump the font size up by point. > > > > > If it would be a problem caused by the monitor, then the screenshot > would show the brackets! > > so long, > Samy > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Weird Zend IDE Issue
It required creating my own 'Custom Profile' which allowed me to manipulate the Font and/or Size. As soon as I modified those, it worked fine. Thanks for the assistance all. Pain in the butt issue! /sf On 3/3/08, Sancar Saran <[EMAIL PROTECTED]> wrote: > On Monday 03 March 2008 07:07:18 Steve Finkelstein wrote: > > Hi all, > > > > I know this isn't a forum for Zend IDE, but since there's probably a > > decent population here using it, I figured I'd ask away. > > > > I'm using 5.5.1 Professional on Mac OSX 10.5.2. My issue here is that > > all left brackets, (eg: [ ) are not showing up in the code editor. I > > have a screenshot of it here: http://catalyst.httpd.org/zend.png > > > > Has anyone ever experienced anything similar? > > > > Thank you, > > > > /sf > > > Hello, > > My bet was, problem on highlight syntax. > > Please copy paste the text another editor if [ was there you may ecounter > syntax higlighting error > > Regards > > > Sancar > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP CLI neat errors!
So, I use a Mac to develop with. I used to host Zend Core on my box, until I switched to the MAMP PRO framework. Unfortunately somewhere in between, this lovely issue started occuring with my CLI binary of PHP: foo:~ sf$ php -l dyld: NSLinkModule() error dyld: Symbol not found: _zend_extensions Referenced from: /usr/local/Zend/Core/lib/zend/ZendExtensionManager.so Expected in: flat namespace Trace/BPT trap I could recompile PHP because if I'm reading this properly, some dynamically shared libraries aren't loading. Before I do that though, was curious if anyone ever faced the same dilemma before. Cheers! /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Using SVN w/ Zend Studio for Eclipse
Hey all, Apologies ahead of time if this isn't the appropriate forum for my inquiry. I'm evaluating Zend Studio for Eclipse and it's certainly making some features that I'd hope would be trivial, extremely onerous. I'm simply trying to take an existing project which I started in TextMate and import it into ZS for Eclipse with Subversion controls attached to the project. I do not want to copy the project into a new directory as the existing directory is where Apache's DocumentRoot is set. And although that's simple to change, I really don't think any IDE should mandate where I set my project's directory on the filesystem. Also, if I try to create a new project from an SVN Repository, it doesn't allow me to select what directory I want the code checked out in. Otherwise I'd just cringe and let it overwrite what's in my existing document root, since that's all versioned code anyhow. If I just create a new project, and import the directory of the code base (which is under version control already), it doesn't pick up the subversion controls in the IDE itself. If any of you have run into similar frustrations, I'd love to hear it. So far I've spent the better part of the evening fiddling with extremely rudimentary features which no IDE in any programming environment I've ever worked with has imposed on me. Perhaps this thing isn't ready for mainstream yet, or perhaps I'm missing something obvious. Thanks for any insight. /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] help with multi dimensional arrays
Might I suggest using an IDE to develop your code in. It would be able to spot simple oversights such as syntax errors. I personally use Zend Studio, however if you aren't looking to invest in a license, there are plenty of open source solutions out there. Cheers, - sf James Lockie wrote: > Paul Novitski wrote: >> >>> Looks like you are missing a comma on line 3. >>> >>> James Lockie wrote: I get a syntax error on strlen. $newTypes = array(); $newTypes[0] = array(); $newTypes[0][0] = "Starting with" $newTypes[0][1] = strlen( $newTypes[0][0] ); >> >> >> Missing semicolon; >> >> Paul > Argh, that is the worst error. :-( > The error messages in PHP suck. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web Application Design Literature
Hello - I'm looking for recommendations on literature which will give me ideas on best practices for design and implementation of web applications, with if possible, PHP as its core reference language. Syntax has never been the challenge for me, like for most, it's always been the most practical and intelligent way to break up an application and focus on how to putting it all together for reusability and maintaining the application. Anyhow, suggestions are appreciated. Cheers! - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP tailing a log
Hi all, Does PHP happen to have something similar to Perl's File::Tail -> http://search.cpan.org/~mgrabnar/File-Tail-0.99.3/Tail.pm? I'm looking to be able to tail a file on the server side and somehow figure out how to use AJAX to keep the file consistently updated through to the client. Any suggestions would be appreciated. Thanks, - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Symfony versus CakePHP?
All, I'm terribly sorry if this is a redundant inquiry. I'm a rather inexperienced developer who's catching on quickly, and looking for a framework to build out a project I've been assigned. I'm more of a read a book and try things out type of learner. My question to those with more experience, what exactly is the difference between CakePHP and Symfony? I'm looking into both of them for a potential framework to make robust and scalable code. They both seem to try to obtain the same goals with their project, however Symfony has text written about it, etc. Anyway, thank you for any insight. - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Strategy when working with designer(s)?
Hi all, This is more of a conceptual based inquiry. I'm currently working on some projects which require me to build system 'X' prior to any (X)HTML/CSS/graphics are available to me. A lot of the time, I just garble up default tables/forms/images to replace what the designer will be ultimately adjusting. It's certainly a lot simpler to have someone come to you with the CSS/HTML and then building on top of that. I was curious how do you folks who strictly do development and not designing, strategically work with a designer in this fashion? Do you have a skeleton you follow or preload some existing templates and then code around that? If there's even a book which focuses on such concepts, I'd be more than happy to purchase and read it. Thank you kindly for any insight. - sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] XHTML/CSS templates for developers
Hi all, I was curious if anyone could provide some insight on tools which allow developers who strictly focus on server-side programming and not UI, to quickly implement XHTML/HTML templates with proper div placement. Drag and drop would be preferable. I'm currently working on a project which no design was thrown at me. I have since hired a designer who's going to take everything I hand to him and CSS it and add the right touches to it to make it a deliverable project. Other than that, I'd like to spend the least amount of time designing, but have the layout prepared for my designer so he can integrate his work with ease. Thank you kindly for any insight. - sf
[PHP] include_path issue
Hi all, I have rudimentary application which has an index.php that looks like this: ini_set( 'display_errors', true ); require_once'include/Model.php'; Immediately after that include/Model.php is processed, Model.php consists of this: require_once 'DB/DataObject.php'; This causes Zend Studio IDE to spit out the following: Compile Error: /Applications/MAMP/htdocs/meduser/include/Model.php line 3 - require_once() [function.require]: Failed opening required 'DB/DataObject.php' (include_path='/Applications/Zend/ZendStudio-5.5.0 /bin/ZendFramework/library') I'm currently -not- listing an include_path of /Applications/Zend/ZendStudio-5.5.0/bin/ZendFramework/library anywhere in the scripts. phpinfo() reports the following as my include_path, which is correct: .:/Applications/MAMP/bin/php5/lib/php If I create test.php and pop in require_once 'DB/DataObject.php', all works well. Does anyone know if this can be a Zend IDE induced error? Any suggestions? Thanks! - sf
[PHP] Code Igniter for 'novices' ?
Hi all, This isn't a 'which framework is better than the other' question. I'm a novice developer and I'm looking to conform to an MVC model for my applications. I was wondering if anyone would be kind enough and has used code igniter, to respond to me and let me know their thoughts on it, and if it's a good framework to work with as a novice. I eventually hope to learn the core values and build my own robust framework. Thanks :-)
[PHP] Communicated-Key/Token for SOAP Authentication
Hi all, I'm working on a relatively straight forward Web API that'll have a SOAP presence. The most secure way of going about doing authentication would be undoubtedly client-certificate authentication. I have been able to implement such a service straight forward as there is plenty of documentation out there covering how to do so. I have some clients who're reluctant to manage client certificates at this point in time, and do prefer a communicated-key authentication, very similar to what Amazon and a few of the other big boys do. I'm having a bit of a difficult time coming up with multiple solutions as to how to properly implement this for my service besides stuffing a random hash into my database and making them send it to me over SSL through their message payload. I can then compare the hash against what's in the database + their IP, or something else. Would anyone be able to suggest some algorithm for the way I'm handling the tokens that's more secure and less "brute-forcible" than the methodology I described above? My objective in this exercise is not to only authenticate who's sending me the SOAP envelope, but also to ensure that whatever token/key system I implement is not open for very simple brute force. If they're able to knock down my brick house, I have other problems --- but I definitely want to build that brick foundation. Suggestions, web articles, books etc., are all welcome! Thank you for any advice from you avid web service gurus. /sf -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php