Re: [PHP] Question: Sorting through table headers?
Parham Doustdar wrote: Hello there, I've been asked to create something like the tables you usually see, where the headers are actually links and when you click the links, the table gets sorted based on the header. Are there any classes that you know of that would do the job? My current idea is to return an array of the colomn which contains the data you want to sort on (like 'name') then sort the array and do something like: [code] for (i = 0; i length(array); i++) mysql_query(select * from table where 'name' = ${aray[i]}); [/code] Any better algorithms anyone? Thanks! My suggestion would be to have the client do it. http://www.js-vault.us/iscripts/007.html I use it on a number of different pages. -- Jim Lucas Some men are born to greatness, some achieve greatness, and some have greatness thrust upon them. Twelfth Night, Act II, Scene V by William Shakespeare -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Fixing the path
-Original Message- From: Rico Secada [mailto:coolz...@it.dk] Some time ago I developed a small web application that a bunch of users has installed. I have always used the DOCUMENT_ROOT for my includes, but the other day I installed the application in a subdirectory, and as you've guessed a lot of the includes didn't work. I have been reading up on the subject of absolute vs. relative paths etc. And on the subject of defining your own document root. I need the application to be as user friendly as possible, and I would like to avoid having users enter path details in the configuration. What is the best way to solve this problem? Rico. -- Who are your users? Can users download the script and run it on their own servers? If so there shouldn't be a problem asking them to set a path in a config file because presumably the users would know something about servers and paths, and presumably they'll know enough to create the directory and copy the files there in the first place. If you have an install process you can pick up the current directory from system globals and write it to the path setting in the config file. You might need two different absolute paths, one for includes and one for urls. Cheers Arno -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 13, 2009, at 8:50 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 9:38 PM, Phred White phpl...@planetphred.com wrote: On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 8:29 PM, Phred White phpl...@planetphred.com wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White phpl...@planetphred.com wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to google on this, and I've been through it. I was hoping some hard core, tireless, php programmer just knew the answer. With high anxiety, Phred I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) Dang! You are exactly right - that isn't what I wanted to hear! : ( But better to know now, then when my timeline is already used up. Did you write your own flash based solution, or use an canned one? Thanks, Phred I actually wound up using swfupload because of a friend's recommendation and also because there's a nifty jQuery plugin for it. The project's main site: http://swfupload.org The jQuery plugin I'm using: http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ The *only* issue I could find with a flash based uploader (I don't regard flash installation as an issue because we're a video based site and well, if you're using our site to watch videos...) was there's an as-of-yet unresolved bug in linux flash clients that locks a browser until upload is completed. Adobe's bug tracker seems to be down for me at the moment, but if you really want the bug, let me know offlist and I'll supply it later. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hey Eddie: One more question... I have an existing form that provides other data that need to be linked to the file upload. It looks like swfupload, just uploads all by its lonesome. I also need the javascript form validator to be triggered before any uploading occurs. Is this possible? You don't have to tell me how (though I wouldn't mind a few clues). I just want to know if it will meet my needs once i dig in. Thanks That should all be possible. I'd take a look at http://demo.swfupload.org/v220/featuresdemo/index.php as that has most of that happening on the page and you can bootleg some of their example code :) Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Question: Sorting through table headers?
Jim Lucas wrote: Parham Doustdar wrote: Hello there, I've been asked to create something like the tables you usually see, where the headers are actually links and when you click the links, the table gets sorted based on the header. Are there any classes that you know of that would do the job? My current idea is to return an array of the colomn which contains the data you want to sort on (like 'name') then sort the array and do something like: [code] for (i = 0; i length(array); i++) mysql_query(select * from table where 'name' = ${aray[i]}); [/code] Any better algorithms anyone? Thanks! My suggestion would be to have the client do it. http://www.js-vault.us/iscripts/007.html I use it on a number of different pages. This could be done clientside if you intend to show all data. If you want to implement paging too, you have to do it on the server though. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Question: Sorting through table headers?
What you are trying to do is ridiculously easy, and something which I accomplished years ago. Basically every column heading needs to be output as a hyperlink which repeats the current page with the addition of orderby=column_name in the URL. This information appears in the $_GET array, so you just repeat the previous sql query with the addition of an ORDER BY clause. This assumes that you have already taken care of caching the query and paginating the results. You cannot do this in a separate class as it requires action in both the presentation (UI) and data access layers, and a single class is not allowed to operate in more than one layer. -- Tony Marston http://www.tonymarston.net http://www.radicore.org Parham Doustdar parha...@gmail.com wrote in message news:77.26.26879.9b9ad...@pb1.pair.com... Hello there, I've been asked to create something like the tables you usually see, where the headers are actually links and when you click the links, the table gets sorted based on the header. Are there any classes that you know of that would do the job? My current idea is to return an array of the colomn which contains the data you want to sort on (like 'name') then sort the array and do something like: [code] for (i = 0; i length(array); i++) mysql_query(select * from table where 'name' = ${aray[i]}); [/code] Any better algorithms anyone? Thanks! -- --- Contact info: Skype: parham-d MSN: fire_lizard16 at hotmail dot com GoogleTalk: parha...@gmail.com Twitter: PD90 email: parham90 at GMail dot com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server name that the user agent used
On 9/13/09 10:24 PM, Tommy Pham tommy...@yahoo.com wrote: --- On Sun, 9/13/09, Tom Worster f...@thefsb.org wrote: From: Tom Worster f...@thefsb.org Subject: [PHP] server name that the user agent used To: PHP General List php-general@lists.php.net Date: Sunday, September 13, 2009, 8:21 PM when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server? Did you see what comes up with php_info() for $_SERVER[SERVER_NAME] or $_SERVER[HTTP_HOST] ? SERVER_NAME returns whatever apache has as the vhost's configured server name. the php manual says of HTTP_HOST: Contents of the Host: header from the current request, if there is one. in which the last 4 words are a little off-putting. but: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 i much more encouraging. the field is mandatory and should have what i'm looking for. it's absence is cause for a 400. casual testing (with a modern non-ie browser) seems to bear this out. so i'll try using that with fallback to my current techniques if i don't find a good value in HTTP_HOST. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Mon, Sep 14, 2009 at 5:39 AM, Phred White phpl...@planetphred.com wrote: Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. Phred Honestly, uploading files that large over HTTP is probably a bad idea, as some very important protocol features to support those filesizes (resuming, pausing, etc.) are missing, even with a flash solution and I'd look into the viability of something like FTP instead. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] APC - Upload progress problem. apc
I am not sure why you ended up with Flash, but here there is a good old example with APC: http://webreflection.blogspot.com/2007/10/upload-progress-bar-with-php5-apc-and.html Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: oorza...@gmail.com Date: Mon, 14 Sep 2009 04:39:26 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
Re: [PHP] APC - Upload progress problem. apc
On 9/14/09 5:39 AM, Phred White phpl...@planetphred.com wrote: On Sep 13, 2009, at 8:50 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 9:38 PM, Phred White phpl...@planetphred.com wrote: On Sep 13, 2009, at 7:34 PM, Eddie Drapkin wrote: On Sun, Sep 13, 2009 at 8:29 PM, Phred White phpl...@planetphred.com wrote: On Sep 11, 2009, at 1:17 PM, Eddie Drapkin wrote: On Fri, Sep 11, 2009 at 1:02 PM, Phred White phpl...@planetphred.com wrote: Hey folks.. Anybody ever use APC to show upload progress? It sounds really cool, but apc_fetch always returns false a value for uploads. I can apc_add something and fetch it, but not for uploads : ( (set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch) There is little info to google on this, and I've been through it. I was hoping some hard core, tireless, php programmer just knew the answer. With high anxiety, Phred I recently had to do roughly the same thing (visual upload progress) and I had done some research into APC. What I learned was that the upload tracking didn't work with FastCGI (which would have prevented our switch to nginx, but not a deal breaker) and what broke the deal, though, was the fact that APC's upload progress is apparently not thread safe, so if person A is uploading a file and person B starts an upload, you get a silent failure. Which brings me to another point, it seems to silently fail. Ultimately, I went with a flash based solution because the APC solution had way too many problems to be really useful. It's a nice thought, but I wouldn't recommend it. I know this isn't exactly what you wanted, but I had a similar experience and thought I would share :) Dang! You are exactly right - that isn't what I wanted to hear! : ( But better to know now, then when my timeline is already used up. Did you write your own flash based solution, or use an canned one? Thanks, Phred I actually wound up using swfupload because of a friend's recommendation and also because there's a nifty jQuery plugin for it. The project's main site: http://swfupload.org The jQuery plugin I'm using: http://blogs.bigfish.tv/adam/2009/06/14/swfupload-jquery-plugin/ The *only* issue I could find with a flash based uploader (I don't regard flash installation as an issue because we're a video based site and well, if you're using our site to watch videos...) was there's an as-of-yet unresolved bug in linux flash clients that locks a browser until upload is completed. Adobe's bug tracker seems to be down for me at the moment, but if you really want the bug, let me know offlist and I'll supply it later. :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hey Eddie: One more question... I have an existing form that provides other data that need to be linked to the file upload. It looks like swfupload, just uploads all by its lonesome. I also need the javascript form validator to be triggered before any uploading occurs. Is this possible? You don't have to tell me how (though I wouldn't mind a few clues). I just want to know if it will meet my needs once i dig in. Thanks That should all be possible. I'd take a look at http://demo.swfupload.org/v220/featuresdemo/index.php as that has most of that happening on the page and you can bootleg some of their example code :) Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file_put_contents problem
I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? -Andres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Noe that the debuger chapter is closed, and you actually did create a error tracker helper and try to return them client side, I can understand that you are frustrated by the poor php layer and support regarding exception handling, but on this point as a lot of people answer you we are doing that server side, if you are developing in a MVC environment you don't need the view to debug your model. Best, On Mon, Sep 14, 2009 at 9:13 AM, mm w 0xcafef...@gmail.com wrote: Hello Andrea, I did not mean to hurt you, my point was: beeing a Jerk when it's ending in void conflicts with people, if you don't like their comments, just don't answer to people. For my concern, a program cannot be debuged by itself (especially with a scripting language, we almost did a joke by saying that too), to debug you need real debug symbols exposed and catchable the only to have them: you must have a php-zen-debug build, unfortunately it is not an optional feature to run the interpreter in this mode, you can only have it at compile time, thing that is impossible to predicate and have due the different platform support extensions, secondable, what you are doing is not a debuger, it's a run-time error tracker, to make a debuger you need to run a session of the interpreter (exposing real debug symbols) into your own exception handler program e.g a debuger, debuging php-script using php-script is a non-sense, beside this it could be done using DTrace unfortunately not available on every OS. Best On Sun, Sep 13, 2009 at 1:49 PM, Andrea Giammarchi an_...@hotmail.com wrote: Hello Andrea, I am developing with PHP since now 12 years (did a couple stuff in Zend Core), and was one of a few guy using and sharing about php when it was only an THE Apache mode in the world C++ CGI, I am not Zend Certified, I won't :), anyway those things make me smarter or give me the truth or the right to be a jerk?, Which part is jerk, people starting replying without even looking for 1 minute the project page? People saying: what's wrong with set_error_handler, ignoring it does not catch all errors? Or people saying: if nobody did before it means it should not be done, as if the programming world and all ideas ended years ago? I wrote my skills summary just to tell you: hey guys, I am not the last arrived here, so do not threat me as a noob please, OK? I prefer answers such: I am using this other program, application, strategy, and I do not need it rather then people writing unrelated stuff or linking pages that perfectly represent the Formaldehyde scenario but they did not even spend a minute to read what Formaldehyde is so proud of theirself and their intuition ... right? They confirmed they did not read, so WTF? I was expecting somebody that develop massive Ajax application, not a link with 3 pages and zero point about the reply. you came here to claim that you were right not to discuss, what did you expect?, if you want to discuss we can, but I can tell you I don't share your points at all, it is not my way to code in scripting language. back to silence. Best I never discuss if I do not know what I am discussing about, this is my only point. Best See all the ways you can stay connected to friends and family -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file_put_contents problem
On Mon, Sep 14, 2009 at 4:19 PM, Andres Gonzalez and...@packetstorm.comwrote: I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? Hmmm. Hard to say. This works for me: $contents = 'Testing contents'; var_dump(file_put_contents(APPLICATION_PATH . '/../data/test.txt', $contents)); Outputs: Int 16 and creates the file test.txt, and writes 'Testing contents' to the file. -Andres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
Hello Andrea, I did not mean to hurt you, my point was: beeing a Jerk when it's ending in void conflicts with people, if you don't like their comments, just don't answer to people. For my concern, a program cannot be debuged by itself (especially with a scripting language, we almost did a joke by saying that too), to debug you need real debug symbols exposed and catchable the only to have them: you must have a php-zen-debug build, unfortunately it is not an optional feature to run the interpreter in this mode, you can only have it at compile time, thing that is impossible to predicate and have due the different platform support extensions, secondable, what you are doing is not a debuger, it's a run-time error tracker, to make a debuger you need to run a session of the interpreter (exposing real debug symbols) into your own exception handler program e.g a debuger, debuging php-script using php-script is a non-sense, beside this it could be done using DTrace unfortunately not available on every OS. Best On Sun, Sep 13, 2009 at 1:49 PM, Andrea Giammarchi an_...@hotmail.com wrote: Hello Andrea, I am developing with PHP since now 12 years (did a couple stuff in Zend Core), and was one of a few guy using and sharing about php when it was only an THE Apache mode in the world C++ CGI, I am not Zend Certified, I won't :), anyway those things make me smarter or give me the truth or the right to be a jerk?, Which part is jerk, people starting replying without even looking for 1 minute the project page? People saying: what's wrong with set_error_handler, ignoring it does not catch all errors? Or people saying: if nobody did before it means it should not be done, as if the programming world and all ideas ended years ago? I wrote my skills summary just to tell you: hey guys, I am not the last arrived here, so do not threat me as a noob please, OK? I prefer answers such: I am using this other program, application, strategy, and I do not need it rather then people writing unrelated stuff or linking pages that perfectly represent the Formaldehyde scenario but they did not even spend a minute to read what Formaldehyde is so proud of theirself and their intuition ... right? They confirmed they did not read, so WTF? I was expecting somebody that develop massive Ajax application, not a link with 3 pages and zero point about the reply. you came here to claim that you were right not to discuss, what did you expect?, if you want to discuss we can, but I can tell you I don't share your points at all, it is not my way to code in scripting language. back to silence. Best I never discuss if I do not know what I am discussing about, this is my only point. Best See all the ways you can stay connected to friends and family -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: file_put_contents problem
This is on a Ubuntu 9.04 box. I did not try to open the file but just listing out the directory gives the size and it is 0. If I try to cat out the contents, there is nothing (I guess that does an open on it) -Andres Ralph Deffke wrote: it would be interesting on what os u are working as well. did u try to open the file? on windows often a file is reported as 0 bytes as of failing the refresh in explorer. ralph_def...@yahoo.de Andres Gonzalez and...@packetstorm.com wrote in message news:4aae510e.8030...@packetstorm.com... I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? -Andres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: file_put_contents problem
it would be interesting on what os u are working as well. did u try to open the file? on windows often a file is reported as 0 bytes as of failing the refresh in explorer. ralph_def...@yahoo.de Andres Gonzalez and...@packetstorm.com wrote in message news:4aae510e.8030...@packetstorm.com... I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? -Andres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
Hey Andrea: Ahhh yes, I've come full circle. I STARTED with php-apc. I really wanted an all-PHP solution, but apc_fetch() ALWAYS returns false a value for uploads. I can apc_add() something and apc_fetch it... but not for uploads : ( The apc.php summary page they supply that sows all the caching stats, shows upload is enabled, but no other info about upload. It seems like the upload is never being communicated to APC. (my set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch, no FastCGI) If I can get APC to do its basic thing, then I have the rest figured out (though I am going to look at your solution in more detail, thx). Unfortunately, I just don't know how to debug APC. No errors are generated - the problem is totally opaque to me. I looked at your link, and it looks great, perhaps you have some insight into my narrow APC problem. One other thing, Eddie was talking about APC not being thread-safe. I have heard this before, but also heard it refuted. Do you have any insight on this? I am going insane, so any help you can toss my way would be most merciful. Thanks, Phred On Sep 14, 2009, at 8:45 AM, Andrea Giammarchi wrote: I am not sure why you ended up with Flash, but here there is a good old example with APC: http://webreflection.blogspot.com/2007/10/upload-progress-bar-with-php5-apc-and.html Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: oorza...@gmail.com Date: Mon, 14 Sep 2009 04:39:26 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file_put_contents problem
thank you for your responses. This appears to be a CodeIgniter problem because everything of course works fine from a command line script. I will post a question on their forum. Thanks again. -Andres Jim Lucas wrote: Andres Gonzalez wrote: I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? -Andres We will need to see a little more code before we can make assumptions. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file_put_contents problem
Andres Gonzalez wrote: I have read in the contents of a file using file_get_contents. I can verify that the data has actually been read in by echoing its contents. But then if I do this: $ret = file_put_contents(/tmp/bla, $bk); The return value gives the correct size of string $bk, and the file /tmp/bla is created in /tmp, but the length is 0. Why are not the contents written to the file? -Andres We will need to see a little more code before we can make assumptions. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] APC - Upload progress problem. apc
truly old alternative: http://www.devpro.it/upload_progress/ CC: php-general@lists.php.net From: phpl...@planetphred.com To: an_...@hotmail.com Subject: Re: [PHP] APC - Upload progress problem. apc Date: Mon, 14 Sep 2009 10:54:21 -0500 Hey Andrea: Ahhh yes, I've come full circle. I STARTED with php-apc. I really wanted an all-PHP solution, but apc_fetch() ALWAYS returns false a value for uploads. I can apc_add() something and apc_fetch it... but not for uploads : ( The apc.php summary page they supply that sows all the caching stats, shows upload is enabled, but no other info about upload. It seems like the upload is never being communicated to APC. (my set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch, no FastCGI) If I can get APC to do its basic thing, then I have the rest figured out (though I am going to look at your solution in more detail, thx). Unfortunately, I just don't know how to debug APC. No errors are generated - the problem is totally opaque to me. I looked at your link, and it looks great, perhaps you have some insight into my narrow APC problem. One other thing, Eddie was talking about APC not being thread-safe. I have heard this before, but also heard it refuted. Do you have any insight on this? I am going insane, so any help you can toss my way would be most merciful. Thanks, Phred On Sep 14, 2009, at 8:45 AM, Andrea Giammarchi wrote: I am not sure why you ended up with Flash, but here there is a good old example with APC: http://webreflection.blogspot.com/2007/10/upload-progress-bar-with-php5-apc-and.html Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: oorza...@gmail.com Date: Mon, 14 Sep 2009 04:39:26 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc Bummer... It looked so promising, but on Macs, Flash has to load the entire file into memory to upload! R. So, it isn't viable for big files (Gig +) if you need it to be cross platform. So now I am looking at perl of all things! If you have any ideas let me know. thanks for all your help so far. Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
Re: [PHP] PHP GURU NEEDED
Is telecommuting acceptable? Doesn't say one way or the other. Jim Lucas Jerome Botbol wrote: Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP GURU NEEDED
You would need to work in-house and employed as a full time member of staff. We would consider using a freelancer but they would have to be accessible to come to our officers in North London to work on the project. Thanks Jerome -Original Message- From: Jim Lucas [mailto:li...@cmsws.com] Sent: 14 September 2009 18:44 To: Jerome Botbol Cc: php-general@lists.php.net Subject: Re: [PHP] PHP GURU NEEDED Is telecommuting acceptable? Doesn't say one way or the other. Jim Lucas Jerome Botbol wrote: Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server name that the user agent used
On 9/14/09 9:03 AM, Tom Worster f...@thefsb.org wrote: On 9/13/09 10:24 PM, Tommy Pham tommy...@yahoo.com wrote: --- On Sun, 9/13/09, Tom Worster f...@thefsb.org wrote: From: Tom Worster f...@thefsb.org Subject: [PHP] server name that the user agent used To: PHP General List php-general@lists.php.net Date: Sunday, September 13, 2009, 8:21 PM when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server? Did you see what comes up with php_info() for $_SERVER[SERVER_NAME] or $_SERVER[HTTP_HOST] ? SERVER_NAME returns whatever apache has as the vhost's configured server name. the php manual says of HTTP_HOST: Contents of the Host: header from the current request, if there is one. in which the last 4 words are a little off-putting. but: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 i much more encouraging. the field is mandatory and should have what i'm looking for. it's absence is cause for a 400. casual testing (with a modern non-ie browser) seems to bear this out. so i'll try using that with fallback to my current techniques if i don't find a good value in HTTP_HOST. extra info: the Host: header isn't in HTTP/1.0, hence those off-putting 4 words, i guess. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server name that the user agent used
Tom Worster wrote: On 9/13/09 10:24 PM, Tommy Pham tommy...@yahoo.com wrote: --- On Sun, 9/13/09, Tom Worster f...@thefsb.org wrote: From: Tom Worster f...@thefsb.org Subject: [PHP] server name that the user agent used To: PHP General List php-general@lists.php.net Date: Sunday, September 13, 2009, 8:21 PM when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server? Did you see what comes up with php_info() for $_SERVER[SERVER_NAME] or $_SERVER[HTTP_HOST] ? SERVER_NAME returns whatever apache has as the vhost's configured server name. the php manual says of HTTP_HOST: Contents of the Host: header from the current request, if there is one. in which the last 4 words are a little off-putting. but: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 i much more encouraging. the field is mandatory and should have what i'm looking for. it's absence is cause for a 400. casual testing (with a modern non-ie browser) seems to bear this out. so i'll try using that with fallback to my current techniques if i don't find a good value in HTTP_HOST. The reason that it might not be available is that PHP is not always running in a web context. $_SERVER['HOST_NAME'] would have no meaning, for instance, in the CLI SAPI. However, if running under a web SAPI, and if the web server provides the info, PHP will pass it on to its scripts. Regards, Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 14, 2009, at 9:15 AM, Tom Worster wrote: with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. Thanks Tom, for weighing in. Having js poll a script on the server is kind of what APC was about, and perl as well. Are you saying I could use PHP on the server side to do this? It seems almost obvious, but no one mentions it any where on the web, so a expected there was some fundamental limitation without APC. Do you have any idea what this script might look like? Is it possible to get the temp file name before the upload is completed so that its size can be monitored? If it is, it is just too dang simple! ...but I'd take it for sure. Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] APC - Upload progress problem. apc
The concept of my last link is this: the instant before you do the upload you ask PHP to scan the tmp folder, or the folder used to upload files (often the tmp) and you snap number of files, then the upload starts, and it will create a temp file with a PHP predefined prefix, you array_diff the snap with the current file list and you get the file that the user is uploading. At that point if you are lucky the input=file field will give you access to its fileSize, and you have everything to create a progress bar: the polled incremental tmp file size in the server, plus the total in the client, a bit of transitions/effects and that's it. This method is not ideal, generally speaking, because it could easily suffer concurrency between multiple users. I did not know Flash player had to put the entire file in memory, it sounds truly silly for scalability reasons, are you absolutely sure about this? About APC you need to enable it and so far I had no problems with files up to 350 Mb , I wonder why 1Gb should be a problem. Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: f...@thefsb.org Date: Mon, 14 Sep 2009 13:16:13 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc On Sep 14, 2009, at 9:15 AM, Tom Worster wrote: with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. Thanks Tom, for weighing in. Having js poll a script on the server is kind of what APC was about, and perl as well. Are you saying I could use PHP on the server side to do this? It seems almost obvious, but no one mentions it any where on the web, so a expected there was some fundamental limitation without APC. Do you have any idea what this script might look like? Is it possible to get the temp file name before the upload is completed so that its size can be monitored? If it is, it is just too dang simple! ...but I'd take it for sure. Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
RE: [PHP] PHP GURU NEEDED
You are looking for me than, cool! Date: Mon, 14 Sep 2009 18:38:17 +0100 From: jer...@cyber-duck.co.uk To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
RE: [PHP] PHP GURU NEEDED
I guess I got instantly fired with than rather than then ... nevermind From: an_...@hotmail.com To: jer...@cyber-duck.co.uk; php-general@lists.php.net Date: Mon, 14 Sep 2009 20:56:59 +0200 Subject: RE: [PHP] PHP GURU NEEDED You are looking for me than, cool! Date: Mon, 14 Sep 2009 18:38:17 +0100 From: jer...@cyber-duck.co.uk To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
Re: [PHP] PHP GURU NEEDED
On Mon, Sep 14, 2009 at 08:56:59PM +0200, Andrea Giammarchi wrote: You are looking for me than, cool! I can vouch for the fact that Andrea believes he's all that. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
Hello Andrea, I think it was not the main reason, I am living in California and still do a lot of careless mistakes and English native people don't blame me for that, there are able to understand as well as, you are able to understand when people are doing such mistakes in your native language, I think the main problem is the shape: Hello guys I am superman others are just crap don't listen to them, you can be a good a coder, but you know people are people, you need somehow to discuss with them, creating a relationship based on trust. Best, On Mon, Sep 14, 2009 at 12:09 PM, Andrea Giammarchi an_...@hotmail.com wrote: I guess I got instantly fired with than rather than then ... nevermind From: an_...@hotmail.com To: jer...@cyber-duck.co.uk; php-general@lists.php.net Date: Mon, 14 Sep 2009 20:56:59 +0200 Subject: RE: [PHP] PHP GURU NEEDED You are looking for me than, cool! Date: Mon, 14 Sep 2009 18:38:17 +0100 From: jer...@cyber-duck.co.uk To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Question: Sorting through table headers?
Tony Marston wrote: You cannot do this in a separate class as it requires action in both the presentation (UI) and data access layers, and a single class is not allowed to operate in more than one layer. You can, but you shouldn't if you want to write your classes according to the MVC pattern. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server name that the user agent used
On 9/14/09 2:11 PM, Lars Torben Wilson tor...@php.net wrote: Tom Worster wrote: On 9/13/09 10:24 PM, Tommy Pham tommy...@yahoo.com wrote: --- On Sun, 9/13/09, Tom Worster f...@thefsb.org wrote: From: Tom Worster f...@thefsb.org Subject: [PHP] server name that the user agent used To: PHP General List php-general@lists.php.net Date: Sunday, September 13, 2009, 8:21 PM when using apache with one vhost that responds to a few different hostnames, e.g. domain.org, y.domain.org, x.domain.org, let's say the vhost's server name is y.domain.org and the other two are aliases, is there a way in php to know which of these was used by the user agent to address the server? Did you see what comes up with php_info() for $_SERVER[SERVER_NAME] or $_SERVER[HTTP_HOST] ? SERVER_NAME returns whatever apache has as the vhost's configured server name. the php manual says of HTTP_HOST: Contents of the Host: header from the current request, if there is one. in which the last 4 words are a little off-putting. but: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.23 i much more encouraging. the field is mandatory and should have what i'm looking for. it's absence is cause for a 400. casual testing (with a modern non-ie browser) seems to bear this out. so i'll try using that with fallback to my current techniques if i don't find a good value in HTTP_HOST. The reason that it might not be available is that PHP is not always running in a web context. $_SERVER['HOST_NAME'] would have no meaning, for instance, in the CLI SAPI. However, if running under a web SAPI, and if the web server provides the info, PHP will pass it on to its scripts. and, for the record, in the web environment there's cause for caution using either HTTP_HOST or, if UseCanonicalName is off or you can't be sure of its value, SERVER_NAME: http://shiflett.org/blog/2006/mar/server-name-versus-http-host in my current app, i should be able to match for acceptable values and fall back to defaults on failure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
Hello, Jerome I would like to apologize because this kind of behavior is not a good point for the image of the community, folks please, if your are interested in this position, just send your resume and your references to Jerome, without forgetting to activate your verbose mode. Best, On Mon, Sep 14, 2009 at 12:18 PM, mm w 0xcafef...@gmail.com wrote: Hello Andrea, I think it was not the main reason, I am living in California and still do a lot of careless mistakes and English native people don't blame me for that, there are able to understand as well as, you are able to understand when people are doing such mistakes in your native language, I think the main problem is the shape: Hello guys I am superman others are just crap don't listen to them, you can be a good a coder, but you know people are people, you need somehow to discuss with them, creating a relationship based on trust. Best, On Mon, Sep 14, 2009 at 12:09 PM, Andrea Giammarchi an_...@hotmail.com wrote: I guess I got instantly fired with than rather than then ... nevermind From: an_...@hotmail.com To: jer...@cyber-duck.co.uk; php-general@lists.php.net Date: Mon, 14 Sep 2009 20:56:59 +0200 Subject: RE: [PHP] PHP GURU NEEDED You are looking for me than, cool! Date: Mon, 14 Sep 2009 18:38:17 +0100 From: jer...@cyber-duck.co.uk To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
On Mon, Sep 14, 2009 at 15:50, mm w 0xcafef...@gmail.com wrote: Hello, Jerome I would like to apologize because this kind of behavior is not a good point for the image of the community, folks please, if your are interested in this position, just send your resume and your references to Jerome, without forgetting to activate your verbose mode. Which part, exactly, do you think is not a good point for the image of the community? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
Hello Daniel How Andrea showed up, seriously you can be a good coder but you cannot be without a minimum of social skills and education, I have the feeling to be a Circus. Best, On Mon, Sep 14, 2009 at 12:52 PM, Daniel Brown danbr...@php.net wrote: On Mon, Sep 14, 2009 at 15:50, mm w 0xcafef...@gmail.com wrote: Hello, Jerome I would like to apologize because this kind of behavior is not a good point for the image of the community, folks please, if your are interested in this position, just send your resume and your references to Jerome, without forgetting to activate your verbose mode. Which part, exactly, do you think is not a good point for the image of the community? -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Question: Sorting through table headers?
On Mon, Sep 14, 2009 at 3:29 PM, Marcus Gnaß gona...@gmx.de wrote: Tony Marston wrote: You cannot do this in a separate class as it requires action in both the presentation (UI) and data access layers, and a single class is not allowed to operate in more than one layer. You can, but you shouldn't if you want to write your classes according to the MVC pattern. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Why not send the data as XML and let the client handle it? Sorting and the filtering are relatively simple to implement in JS -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Question: Sorting through table headers?
On Mon, Sep 14, 2009 at 3:57 PM, Bastien Koert phps...@gmail.com wrote: On Mon, Sep 14, 2009 at 3:29 PM, Marcus Gnaß gona...@gmx.de wrote: Tony Marston wrote: You cannot do this in a separate class as it requires action in both the presentation (UI) and data access layers, and a single class is not allowed to operate in more than one layer. You can, but you shouldn't if you want to write your classes according to the MVC pattern. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Why not send the data as XML and let the client handle it? Sorting and the filtering are relatively simple to implement in JS -- Bastien Cat, the other other white meat Make that send ALL the data -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
On Mon, Sep 14, 2009 at 15:56, mm w 0xcafef...@gmail.com wrote: Hello Daniel How Andrea showed up, seriously you can be a good coder but you cannot be without a minimum of social skills and education, I have the feeling to be a Circus. Honestly, my opinion is more in how your public down-dressing of one of your peers reflects upon yourself. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
Hello Daniel, I am not scared about my reputation, I am just ashamed to welcome someone like this, I just want to remember to everyone that we are in a tough economic situation, and when someone is coming with an interesting offer, you cannot be a troll , and yes somehow I don't want to be linked to such behaviors and it doesn't reflecting the community, imagine one day you just land in a place and the first guy you meet is a crazy one, you just say wooo! there, there are just crazy people. Best, On Mon, Sep 14, 2009 at 12:58 PM, Daniel Brown danbr...@php.net wrote: On Mon, Sep 14, 2009 at 15:56, mm w 0xcafef...@gmail.com wrote: Hello Daniel How Andrea showed up, seriously you can be a good coder but you cannot be without a minimum of social skills and education, I have the feeling to be a Circus. Honestly, my opinion is more in how your public down-dressing of one of your peers reflects upon yourself. -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Check out our great hosting and dedicated server deals at http://twitter.com/pilotpig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP GURU NEEDED
Hello Mike, sure like everyone I like sometimes to troll, I don't want to be the moral warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
Andrea: I see. That is a cool idea, but you are right, concurrency could definitely be a problem. That's what APC is supposed to solve because it tags the file with a unique ID. But I can't get that sucker to return the value to me! If I could get APC to work I would be done. I also started looking at trying to grab the temp file, . $_FILES['video_file']['tmp_name'], and then keep checking its size on the server, but I don't think I can get the temp name from php until it is uploaded. Do you know if that is possible? One other thing, I looked at a canned media management web app ($875 US) that will do this uploading, and it doesn't require APC, so there definitely is some way to do this with basic PHP. Thanks, Phred On Sep 14, 2009, at 1:55 PM, Andrea Giammarchi wrote: The concept of my last link is this: the instant before you do the upload you ask PHP to scan the tmp folder, or the folder used to upload files (often the tmp) and you snap number of files, then the upload starts, and it will create a temp file with a PHP predefined prefix, you array_diff the snap with the current file list and you get the file that the user is uploading. At that point if you are lucky the input=file field will give you access to its fileSize, and you have everything to create a progress bar: the polled incremental tmp file size in the server, plus the total in the client, a bit of transitions/effects and that's it. This method is not ideal, generally speaking, because it could easily suffer concurrency between multiple users. I did not know Flash player had to put the entire file in memory, it sounds truly silly for scalability reasons, are you absolutely sure about this? About APC you need to enable it and so far I had no problems with files up to 350 Mb , I wonder why 1Gb should be a problem. Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: f...@thefsb.org Date: Mon, 14 Sep 2009 13:16:13 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc On Sep 14, 2009, at 9:15 AM, Tom Worster wrote: with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. Thanks Tom, for weighing in. Having js poll a script on the server is kind of what APC was about, and perl as well. Are you saying I could use PHP on the server side to do this? It seems almost obvious, but no one mentions it any where on the web, so a expected there was some fundamental limitation without APC. Do you have any idea what this script might look like? Is it possible to get the temp file name before the upload is completed so that its size can be monitored? If it is, it is just too dang simple! ...but I'd take it for sure. Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Mon, Sep 14, 2009 at 2:21 PM, Phred White phpl...@planetphred.comwrote: Andrea: I see. That is a cool idea, but you are right, concurrency could definitely be a problem. That's what APC is supposed to solve because it tags the file with a unique ID. But I can't get that sucker to return the value to me! If I could get APC to work I would be done. I also started looking at trying to grab the temp file, .$_FILES['video_file']['tmp_name'], and then keep checking its size on the server, but I don't think I can get the temp name from php until it is uploaded. Do you know if that is possible? One other thing, I looked at a canned media management web app ($875 US) that will do this uploading, and it doesn't require APC, so there definitely is some way to do this with basic PHP. Pread, just hopping in the thread again, so excuse me if this has been covered, but have you gone over you environment settings thoroughly? one of the key values for the upload feature to work is, apc.rfc1867 which needs to be set to 1 or On. also, the php version needs to be at least = 5.2. not sure on the concurrency issues, but thats something that could easily be verified w/ a test once youve got it running. -nathan
Re: [PHP] PHP GURU NEEDED
Who's trolling? I simply and succinctly stated that you don't fully understand the psychological demographics of IT industry employees. And frankly, you've done far more to disrupt this thread by riding in on your high and mighty horse than I did in my 3 word comment. Mr. Botbol is a big boy who can sift through the chaff without your help. Now, so as to not derail things any further, I will summarily STFU. I suggest you do the same. On Mon, Sep 14, 2009 at 2:19 PM, mm w 0xcafef...@gmail.com wrote: Hello Mike, sure like everyone I like sometimes to troll, I don't want to be the moral warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP GURU NEEDED
Ah ah ah ... guys, you made my days, I cannot believe you are all ready to blame somebody else here I was obviously joking, I did not know php general list was a recruiter place and I've never read announcement in upper case here but seriously, you guys are so funny to try to force your supremacy even over jokes and that was obviously a joke, I am full time employee engineer here but one thing for sure: I am your excuse to expose ASAP your ego, your skills, and specially you is the second time in two days that blame me replying in such I feel cool way ... that's too funny. Best Regards, I won't reply recruiters anymore here, I promise (ROTFL) P.S. for Paul, indeed, that is pretty much my cv: http://www.3site.eu/ but still, I am not interested, cheers Date: Mon, 14 Sep 2009 12:18:22 -0700 From: 0xcafef...@gmail.com To: php-general@lists.php.net Subject: Re: [PHP] PHP GURU NEEDED Hello Andrea, I think it was not the main reason, I am living in California and still do a lot of careless mistakes and English native people don't blame me for that, there are able to understand as well as, you are able to understand when people are doing such mistakes in your native language, I think the main problem is the shape: Hello guys I am superman others are just crap don't listen to them, you can be a good a coder, but you know people are people, you need somehow to discuss with them, creating a relationship based on trust. Best, On Mon, Sep 14, 2009 at 12:09 PM, Andrea Giammarchi an_...@hotmail.com wrote: I guess I got instantly fired with than rather than then ... nevermind From: an_...@hotmail.com To: jer...@cyber-duck.co.uk; php-general@lists.php.net Date: Mon, 14 Sep 2009 20:56:59 +0200 Subject: RE: [PHP] PHP GURU NEEDED You are looking for me than, cool! Date: Mon, 14 Sep 2009 18:38:17 +0100 From: jer...@cyber-duck.co.uk To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our award-winning, London based digital agency, specialising in interactive media. The coding role will focus on high backend and frontend programming to create the next generation Web 2.0 / User Generated social portals. Exposure to working with wireframes and flow of control documents is highly advantageous. As a PHP developer you should be able to work under pressure and in a larger team. Excellent XHTML, and CSS are skills required. Strong Knowledge of JavaScript is required. Essential Skills required: * MVC guru * XHTML development / CSS skills * Top PHP 5 / MySQL skills * Mootools / jQuery experience * JavaScript (AJAX skills are required) * Apache / Linux configurations (excellent) * Strong understanding of BI principles With offices based in borehamwood this is an excellent opportunity to work for a company that is focused on generating tangible results that are meaningful for businesses. Please emails CV's to j...@cyber-duck.co.uk mailto:j...@cyber-duck.co.uk (reference PHP-Meet-03) Cyber-Duck does not work with recruitment consultants. This is not a Recruitment Agent Job, this is real opening at Cyber-Duck, no headache, come for an interview today if you are a PHP CSS guru Thanks Jerome Botbol Operations Manager | Cyber-Duck Ltd _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1 _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
RE: [PHP] PHP GURU NEEDED
Wht is exactly your problem? If I am that bad I have simply removed myself from the list of possible candidates, if I ever had a chance. Keep blaming other feeling the ruler here does not put you in a better position than a troll. I am sorry for the original message 'cause I thought recruiters where not allowed here (in jQuery dev, dojo, chrome, others, I have never seen recruiter inside ML) But if you behave like that all the time I would consider you an element with over-reaction problems, not truly a good team player. I live this post and sorry again to original authors. Best Regards Date: Mon, 14 Sep 2009 13:19:19 -0700 From: 0xcafef...@gmail.com To: linuxmanmi...@gmail.com CC: php-general@lists.php.net Subject: Re: [PHP] PHP GURU NEEDED Hello Mike, sure like everyone I like sometimes to troll, I don't want to be the moral warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Share your memories online with anyone you want. http://www.microsoft.com/middleeast/windows/windowslive/products/photos-share.aspx?tab=1
RE: [PHP] APC - Upload progress problem. apc
Can you write here how you configured APC? In my old test I had to set apc.rfc1867 = On and if you grab the zip: http://www.3site.eu/examples/APCQuery.zip tell me what is exactly wrong (I tried ages ago though, I am using other strategies right now: http://code.google.com/p/noswfupload/ - not suitable for 1Gb of files though) About trying to grab info via PHP ... there is a little problem, that page will be executed only after the file has been sent, so obviously you'll never be able to know size, error, tmp_name, before the file has benn fully stored in the tmp or specific folder, got the problem? Regards CC: f...@thefsb.org; php-general@lists.php.net From: phpl...@planetphred.com To: an_...@hotmail.com Subject: Re: [PHP] APC - Upload progress problem. apc Date: Mon, 14 Sep 2009 15:21:40 -0500 Andrea: I see. That is a cool idea, but you are right, concurrency could definitely be a problem. That's what APC is supposed to solve because it tags the file with a unique ID. But I can't get that sucker to return the value to me! If I could get APC to work I would be done. I also started looking at trying to grab the temp file, . $_FILES['video_file']['tmp_name'], and then keep checking its size on the server, but I don't think I can get the temp name from php until it is uploaded. Do you know if that is possible? One other thing, I looked at a canned media management web app ($875 US) that will do this uploading, and it doesn't require APC, so there definitely is some way to do this with basic PHP. Thanks, Phred On Sep 14, 2009, at 1:55 PM, Andrea Giammarchi wrote: The concept of my last link is this: the instant before you do the upload you ask PHP to scan the tmp folder, or the folder used to upload files (often the tmp) and you snap number of files, then the upload starts, and it will create a temp file with a PHP predefined prefix, you array_diff the snap with the current file list and you get the file that the user is uploading. At that point if you are lucky the input=file field will give you access to its fileSize, and you have everything to create a progress bar: the polled incremental tmp file size in the server, plus the total in the client, a bit of transitions/effects and that's it. This method is not ideal, generally speaking, because it could easily suffer concurrency between multiple users. I did not know Flash player had to put the entire file in memory, it sounds truly silly for scalability reasons, are you absolutely sure about this? About APC you need to enable it and so far I had no problems with files up to 350 Mb , I wonder why 1Gb should be a problem. Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: f...@thefsb.org Date: Mon, 14 Sep 2009 13:16:13 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc On Sep 14, 2009, at 9:15 AM, Tom Worster wrote: with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. Thanks Tom, for weighing in. Having js poll a script on the server is kind of what APC was about, and perl as well. Are you saying I could use PHP on the server side to do this? It seems almost obvious, but no one mentions it any where on the web, so a expected there was some fundamental limitation without APC. Do you have any idea what this script might look like? Is it possible to get the temp file name before the upload is completed so that its size can be monitored? If it is, it is just too dang simple! ...but I'd take it for sure. Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
Re: [PHP] PHP GURU NEEDED
Dear Mikey Mouse you are the only one to thing so, and here the only guy who is riding a Donkey is you, I have no problem with Andrea is a smart guy, but just said it's kind of not a good point to troll when a recruiter is looking for someone and I am sorry I did not say you were trolling secondable I have 2 decates of coding behind me and also recruiting people for a well known huge company so if I don't fully understand the psychological demographics... yes and unfortunately is not something to be proud and certainly not excuse and a way to look for, before suggesting something to someone you need skills that you don't seem to have and even able to acquire. Best, On Mon, Sep 14, 2009 at 1:37 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: Who's trolling? I simply and succinctly stated that you don't fully understand the psychological demographics of IT industry employees. And frankly, you've done far more to disrupt this thread by riding in on your high and mighty horse than I did in my 3 word comment. Mr. Botbol is a big boy who can sift through the chaff without your help. Now, so as to not derail things any further, I will summarily STFU. I suggest you do the same. On Mon, Sep 14, 2009 at 2:19 PM, mm w 0xcafef...@gmail.com wrote: Hello Mike, sure like everyone I like sometimes to troll, I don't want to be the moral warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP GURU NEEDED
I'm not trolling, but I am really curious who and why someone thought Cyber-Duck was a good name (and theme) to use?!? Seriously? Personally, I wouldn't work for a company with such a silly name. Is there some hidden meaning or is this a personal joke between the founders? I really am curious. http://www.cyber-duck.co.uk is even silly with animated duck-people. And I think you need to use more buzzwords and acronyms here We produce brands and award winning user centered websites with superior web 2.0 technologies. We conduct online marketing to drive traffic and generate conversions. and Cyber-Duck's ethos is that every interaction should have a meaningful purpose. For our clients this means that we focus on generating tangible results that are meaningful for businesses. For website users that means that we focus on generating a positive experience that will entice them to buy your product, sign up to your newsletter, comment on your blog or distribute your video to their contacts. Perhaps this page will help: http://www.robietherobot.com/buzzword.htm Also, why do you have (http://www.cyber-duck.co.uk/#duck%281%29) : 1 director 3 managers 3 designers 1 programmer -- ONE?!? Sounds like a lot of chiefs and not enough indians. OMFG! They all use duck caricatures. If the name wasn't a deterrent, this thought alone would be. I will concede that the History duck - manduck is clever. :-) *sigh* -Original Message- From: Jerome Botbol [mailto:jer...@cyber-duck.co.uk] Sent: Monday, September 14, 2009 10:38 AM To: php-general@lists.php.net Subject: [PHP] PHP GURU NEEDED Hi All, Cyber-Duck are looking for a highly motivated PHP / CSS Guru to join our blah blah blah... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP GURU NEEDED
I have already said I am sorry and I explained the reason I replied in such joking way. Now, I am sure you can understand, since you say you use this ML for recruitment as well, that it would be nice to leave this subject as clear as possible. I would even suggest authors to create a new post where I will not reply at all, and hopefully you neither, so 90% of noise will be removed. Regards Date: Mon, 14 Sep 2009 14:43:01 -0700 From: 0xcafef...@gmail.com To: linuxmanmi...@gmail.com CC: php-general@lists.php.net Subject: Re: [PHP] PHP GURU NEEDED Dear Mikey Mouse you are the only one to thing so, and here the only guy who is riding a Donkey is you, I have no problem with Andrea is a smart guy, but just said it's kind of not a good point to troll when a recruiter is looking for someone and I am sorry I did not say you were trolling secondable I have 2 decates of coding behind me and also recruiting people for a well known huge company so if I don't fully understand the psychological demographics... yes and unfortunately is not something to be proud and certainly not excuse and a way to look for, before suggesting something to someone you need skills that you don't seem to have and even able to acquire. Best, On Mon, Sep 14, 2009 at 1:37 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: Who's trolling? I simply and succinctly stated that you don't fully understand the psychological demographics of IT industry employees. And frankly, you've done far more to disrupt this thread by riding in on your high and mighty horse than I did in my 3 word comment. Mr. Botbol is a big boy who can sift through the chaff without your help. Now, so as to not derail things any further, I will summarily STFU. I suggest you do the same. On Mon, Sep 14, 2009 at 2:19 PM, mm w 0xcafef...@gmail.com wrote: Hello Mike, sure like everyone I like sometimes to troll, I don't want to be the moral warrior guy there, but when you are clever there is a time and a place to troll not when people offers job, developers like to argue this is a fact, but you have to know when it's to right time. Best, On Mon, Sep 14, 2009 at 1:10 PM, LinuxManMikeC linuxmanmi...@gmail.com wrote: On Mon, Sep 14, 2009 at 1:56 PM, mm w 0xcafef...@gmail.com wrote: you can be a good coder but you cannot be without a minimum of social skills and education You'd be surprised... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/
[PHP] php.ini in cgi vs php.ini in cli
In the php configurations directories /etc/php5, there are 2 subdirectories, one for cgi and one for cli. There is a php.ini file in each of these directories. What would cause a difference of behavior in these 2 environments with the php.ini exactly the same in each directory?? I have a command line script that consequently uses the cli version. This script works just fine in that it can access API function in modules that are loaded via cli/php.ini However, when executing in the cgi environment, I get a call to undefined function error even though my 2 php.ini files are exactly the same. Any idea what is causing this? thanks, -Andres -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
At 7:28 AM +0200 9/14/09, J DeBord wrote: In all fairness Tedd, your example is a bit of a joke. Send some JSON back and forth, do some database queries, and use a webservice all at the same time. Your AJAX calls won't be so simple then. Okay, so my work is a joke. Been there, done that before and will do it again. However, I offered it as an example as someone on this list using ajax, which if you will read the thread, you will see that he asked the question if anyone used ajax. I replied with my joke. Sorry that my example doesn't live up to your expectations. But then again, you really don't know what my example does, do you? Sure, you see the ajax side of it, but that's really all you see, isn't that right? Maybe it has some other redeeming properties that you have failed to consider? While it's a joke, in all fairness, it does work. -snip- Charles is a great tool when doing Flash and Flex remoting, and AJAX. I have the impression that Andrea's tool is perhaps doing something similar, but taking it a step further. Maybe not everyone's cup of tea, but I think it is difficult to write off as useless. If you really want to be fair about this -- how about you show me where me where I said his debugger was useless? You claimed I did, so in all fairness you should be able to prove it. In fact, how about you showing me anywhere where I said anything negative about his debugger? That would be fair, right? Also while you are at it, how about reading the entire thread and see how I came involved in the first place. After all, we all want to be be fair about this, right? In all fairness, I think if someone followed this thread and saw the sequence of events, a fair minded individual might come away with a different perspective and claims than you did. Sometimes I wonder why I try to help people in the first place. tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Sep 14, 2009, at 3:30 PM, Nathan Nobbe wrote: On Mon, Sep 14, 2009 at 2:21 PM, Phred White phpl...@planetphred.com wrote: Andrea: I see. That is a cool idea, but you are right, concurrency could definitely be a problem. That's what APC is supposed to solve because it tags the file with a unique ID. But I can't get that sucker to return the value to me! If I could get APC to work I would be done. I also started looking at trying to grab the temp file, . $_FILES['video_file']['tmp_name'], and then keep checking its size on the server, but I don't think I can get the temp name from php until it is uploaded. Do you know if that is possible? One other thing, I looked at a canned media management web app ($875 US) that will do this uploading, and it doesn't require APC, so there definitely is some way to do this with basic PHP. Pread, just hopping in the thread again, so excuse me if this has been covered, but have you gone over you environment settings thoroughly? one of the key values for the upload feature to work is, apc.rfc1867 which needs to be set to 1 or On. also, the php version needs to be at least = 5.2. not sure on the concurrency issues, but thats something that could easily be verified w/ a test once youve got it running. -nathan thanks for jumpin in Nathan. The water's fine! (Except for the sharks : ) I have in my php.ini: apc.rfc1867 = On apc.rfc1867_freq = 10K The latter is because i read somewhere that some OS configs don't like the default of 0. APC has a file, apc.php, that sows all the stats for apc, and it says file upload is on and it is caching files quite nicely, though I don't care too much about that right now. my set-up: php-apc 3.0.19, Apache2, php 5.2.10, no suhosin patch, no FastCGI - the latter two items i have heard cause problems with APC also, so they are not part of my config. Phred
Re: [PHP] APC - Upload progress problem. apc
Andrea: I have in my php.ini: apc.rfc1867 = On apc.rfc1867_freq = 10K The apc.php diagnostic/report page says it is on. It just returns false. I will look at your zip file and see if something jumps out. Thanks, Phred On Sep 14, 2009, at 4:04 PM, Andrea Giammarchi wrote: Can you write here how you configured APC? In my old test I had to set apc.rfc1867 = On and if you grab the zip: http://www.3site.eu/examples/APCQuery.zip tell me what is exactly wrong (I tried ages ago though, I am using other strategies right now:http://code.google.com/p/noswfupload/ - not suitable for 1Gb of files though) About trying to grab info via PHP ... there is a little problem, that page will be executed only after the file has been sent, so obviously you'll never be able to know size, error, tmp_name, before the file has benn fully stored in the tmp or specific folder, got the problem? Regards CC: f...@thefsb.org; php-general@lists.php.net From: phpl...@planetphred.com To: an_...@hotmail.com Subject: Re: [PHP] APC - Upload progress problem. apc Date: Mon, 14 Sep 2009 15:21:40 -0500 Andrea: I see. That is a cool idea, but you are right, concurrency could definitely be a problem. That's what APC is supposed to solve because it tags the file with a unique ID. But I can't get that sucker to return the value to me! If I could get APC to work I would be done. I also started looking at trying to grab the temp file, . $_FILES['video_file']['tmp_name'], and then keep checking its size on the server, but I don't think I can get the temp name from php until it is uploaded. Do you know if that is possible? One other thing, I looked at a canned media management web app ($875 US) that will do this uploading, and it doesn't require APC, so there definitely is some way to do this with basic PHP. Thanks, Phred On Sep 14, 2009, at 1:55 PM, Andrea Giammarchi wrote: The concept of my last link is this: the instant before you do the upload you ask PHP to scan the tmp folder, or the folder used to upload files (often the tmp) and you snap number of files, then the upload starts, and it will create a temp file with a PHP predefined prefix, you array_diff the snap with the current file list and you get the file that the user is uploading. At that point if you are lucky the input=file field will give you access to its fileSize, and you have everything to create a progress bar: the polled incremental tmp file size in the server, plus the total in the client, a bit of transitions/effects and that's it. This method is not ideal, generally speaking, because it could easily suffer concurrency between multiple users. I did not know Flash player had to put the entire file in memory, it sounds truly silly for scalability reasons, are you absolutely sure about this? About APC you need to enable it and so far I had no problems with files up to 350 Mb , I wonder why 1Gb should be a problem. Regards CC: php-general@lists.php.net From: phpl...@planetphred.com To: f...@thefsb.org Date: Mon, 14 Sep 2009 13:16:13 -0500 Subject: Re: [PHP] APC - Upload progress problem. apc On Sep 14, 2009, at 9:15 AM, Tom Worster wrote: with files that big, perhaps could write client js that polls a script on the server that simply returns the file size(s)? if you want a thermometer, use the number to resize a colored div. Thanks Tom, for weighing in. Having js poll a script on the server is kind of what APC was about, and perl as well. Are you saying I could use PHP on the server side to do this? It seems almost obvious, but no one mentions it any where on the web, so a expected there was some fundamental limitation without APC. Do you have any idea what this script might look like? Is it possible to get the temp file name before the upload is completed so that its size can be monitored? If it is, it is just too dang simple! ...but I'd take it for sure. Thanks, Phred -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ More than messages–check out the rest of the Windows Live™. http://www.microsoft.com/windows/windowslive/ check out the rest of the Windows Live™. More than mail–Windows Live™ goes way beyond your inbox. More than messages
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
While it's a joke, in all fairness, it does work. only because you debugged before server side responses, and now, as I have said, you have an alternative to speed up that process. Finally, Formaldehyde JS had a typo so only today I realized it and I uploaded the version 1.01 of Formaldehyde for JavaScript so right now and only if you have 5 minutes, you can properly test the project having expected results (before was the same except the typo, now it should be OK) _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
RE: [PHP] RE: [Formaldehyde] The Most Basic Ajax - PHP Error Debugger
While it's a joke, in all fairness, it does work. only because you debugged before server side responses, and now, as I have said, you have an alternative to speed up that process. Finally, Formaldehyde JS had a typo so only today I realized it and I uploaded the version 1.01 of Formaldehyde for JavaScript so right now and only if you have 5 minutes, you can properly test the project having expected results (before was the same except the typo, now it should be OK) _ With Windows Live, you can organize, edit, and share your photos. http://www.microsoft.com/middleeast/windows/windowslive/products/photo-gallery-edit.aspx
Re: [PHP] php.ini in cgi vs php.ini in cli
On Mon, 14 Sep 2009 18:21:11 -0400 Andres Gonzalez and...@packetstorm.com wrote: In the php configurations directories /etc/php5, there are 2 subdirectories, one for cgi and one for cli. There is a php.ini file in each of these directories. What would cause a difference of behavior in these 2 environments with the php.ini exactly the same in each directory?? I have a command line script that consequently uses the cli version. This script works just fine in that it can access API function in modules that are loaded via cli/php.ini However, when executing in the cgi environment, I get a call to undefined function error even though my 2 php.ini files are exactly the same. Any idea what is causing this? thanks, -Andres Hi Andres, When asking this kind of question, it would be very helpful if you would tell us *which* function raised this error. My first thought is that you tried to call a function which was compiled in to the CLI version but not the CGI. What does phpinfo() show when run under each? Torben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] APC - Upload progress problem. apc
On Mon, Sep 14, 2009 at 4:50 PM, Phred White phpl...@planetphred.comwrote: Andrea: I have in my php.ini: apc.rfc1867 = On apc.rfc1867_freq = 10K The apc.php diagnostic/report page says it is on. It just returns false. I will look at your zip file and see if something jumps out. what about your other apc.rfc1867 settings? are you posting the correct field to the server to tell apc to start tracking, and also are you grabbing the correct value when trying to determine the status in your progress tracking script? by default, your form needs an input like, input type=hidden name=APC_UPLOAD_PROGRESS id=progress_key value=?php echo $id?/ then in the progress checking script you will need something like, ?php if(isset($_GET['progress_key'])) { $status = apc_fetch('upload_'.$_GET['progress_key']); echo $status['current']/$status['total']*100; } ? the names of these variables depend upon apc.rfc1867_name and apc.rfc1867_prefix respectively. take a look at this article, it was really helpful, http://www.ibm.com/developerworks/opensource/library/os-php-v525/ also, to get going fast, dont bother w/ the progress script yet. just focus on getting apc to start tracking the progress. you can use the stock apc.php script from the distro and upload a large file; this will give you time to check in apc.php. -nathan
Re: [PHP] Creating alphanumeric id for a table
If I follow you correctly, is the scenario below possible.?? Let's say there are 2 users accessing the app at the same time (user A and B). Here's the sequnce of operation... 1. user A insert into table (get id = 1 from auto increment value) 2. user B insert into table (get id = 2 from auto increment value) 3. user A get value from $id = LAST_INSERT_ID() (id = 2) 4. user B get value from $id = LAST_INSERT_ID() (id =2) 5. user A update table where id = 2 6. user B update table where id = 2 in the scenario above, the row with id = 1 doesn't get his file number (fin) while the row with id = 2 gets the value for his file number twice... How can we make sure that those 3 processes are atomic operation (insert table - get id from LAST_INSERT_ID() - update table) ?? Thanks.. tedd-2 wrote: For example, I would use (not tested): // code to create a record (i.e., INSERT INTO your_table (whatever) VALUES ('$whatever') ) $id = LAST_INSERT_ID(); The above statement finds the last record added to the database (the index of the record) and then I would create my application-number and store it in that record -- like so: // code to create the application-number (i.e., $application-number = 'AAA' . $id; ) $query = UPDATE your_table SET application_number = '$application_number' WHERE id = '$id' ; $result = mysql_query($query) or die('Error, query failed'); That way you should not have any duplications and you have application-numbers (as you want )that are tied to the auto-numbering of the table's index. HTH's tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/Creating-alphanumeric-id-for-a-table-tp25391939p25447945.html Sent from the PHP - General mailing list archive at Nabble.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Creating alphanumeric id for a table
1. user A insert into table (get id = 1 from auto increment value) 2. user B insert into table (get id = 2 from auto increment value) 3. user A get value from $id = LAST_INSERT_ID() (id = 2) 4. user B get value from $id = LAST_INSERT_ID() (id =2) [8] How can we make sure that those 3 processes are atomic operation (insert table - get id from LAST_INSERT_ID() - update table) ?? From the MySQL 5.0 manual (20.9.10.3): For LAST_INSERT_ID(), the most recently generated ID is maintained in the server on a per-connection basis. It is not changed by another client. ... Using LAST_INSERT_ID() and AUTO_INCREMENT columns simultaneously from multiple clients is perfectly valid. Each client will receive the last inserted ID for the last statement /that/ client executed. http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php