Re: [PHP] How to download a multi-part file at the server side?

2013-11-02 Thread Aziz Saleh
On Sat, Nov 2, 2013 at 1:03 PM, Ajay Garg ajaygargn...@gmail.com wrote: Hi all. 1. I could have the proper $_FILES[userfile][name] been echoed back, by replacing ContentBody cbFile = new FileBody(file, image/png); with

Re: [PHP] I am puzzled. Error on one site, no error on the other

2013-10-26 Thread Aziz Saleh
On Fri, Oct 25, 2013 at 8:27 PM, Stephen stephe...@rogers.com wrote: Problem Situation I have two web sites on the same shared host. They share code for the control panel. When executed for one site I get a warning (reproducible always), but on the other there is no warning. One my home

Re: [PHP] date time problem

2013-10-06 Thread Aziz Saleh
Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you will need to manually convert those seconds to what you desire (minutes = seconds / 60), (hours = minutes / 60), etc.. Aziz On Sun, Oct 6, 2013 at 7:07 PM, Farzan Dalaee farzan.dal...@gmail.comwrote: Its

Re: [PHP] date time problem

2013-10-06 Thread Aziz Saleh
question why am i getting an hour value in this case? jg On Oct 6, 2013, at 7:14 PM, Aziz Saleh azizsa...@gmail.com wrote: Jim, The date method takes in a timestamp (not seconds away). You have the seconds, you will need to manually convert those seconds to what you desire (minutes

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-10-01 Thread Aziz Saleh
:04 PM, Aziz Saleh azizsa...@gmail.com wrote: No Problem, the issue is that you referring to the invalid post element $bucket_name as opposed to the correct on bucket_name. *$bucket_name = $_POST['$bucket_name'];* Should be *$bucket_name = $_POST['bucket_name'];* Aziz On Sun, Sep 29

Re: [PHP] Algorithm Help

2013-10-01 Thread Aziz Saleh
DB or flatfile? I would create a matrix of all kids crossed with every kid. Everytime a kid is put in a home with another kid, ++ that index. When dispatching kids, sort by index ASC. Aziz On Tue, Oct 1, 2013 at 3:01 PM, John Meyer johnme...@pueblocomputing.comwrote: On 10/1/2013 12:51 PM,

Re: [PHP] Switch Statement

2013-09-29 Thread Aziz Saleh
What is the output? On Sun, Sep 29, 2013 at 1:34 AM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: On 09/28/2013 10:53 PM, Aziz Saleh wrote: Ethan, can you do a var_dump instead of print_r. It might be that next_step has spaces in it causing the switch to not match. Aziz

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Aziz Saleh
Hi Tim, Is the call working? Does it actually get deleted? This could just be an issue (which I see alot) where developers do not check for variables or preset them before usage, causing those notices to come up (pretty harmless most of the times). Aziz On Sun, Sep 29, 2013 at 12:30 PM, Tim

Re: [PHP] delete S3 bucket with AWS PHP SDK

2013-09-29 Thread Aziz Saleh
) #4 /var/www/awssdk/delete_bucket.php(72): AmazonS3-deleteObject(Array) #5 {main} thrown in /var/www/awssdk/services/s3.class.php on line 548 I hope that clarifies my situation a bit. Sorry for not providing that sooner! Thanks Tim On Sun, Sep 29, 2013 at 1:09 PM, Aziz Saleh azizsa

Re: [PHP] Switch Statement

2013-09-28 Thread Aziz Saleh
Ethan, can you do a var_dump instead of print_r. It might be that next_step has spaces in it causing the switch to not match. Aziz On Sat, Sep 28, 2013 at 10:33 PM, Ethan Rosenberg erosenb...@hygeiabiomedical.com wrote: Dear List - I have a working program. I made one change in a switch

Re: [PHP] Sending PHP mail with Authentication

2013-09-25 Thread Aziz Saleh
Usually if I am using a framework I would use the SMTP library associated with it. If it doesn't have one, I use phpmailer, fast and easy to setup: http://phpmailer.worxware.com/index.php?pg=examplebsmtp Aziz On Wed, Sep 25, 2013 at 4:11 PM, dealTek deal...@gmail.com wrote: Hi All, Semi

Re: [PHP] Problem with mbstring.internal_encoding, mcrypt and php-fpm

2013-09-23 Thread Aziz Saleh
Hristo, Try changing the php.ini config: mbstring.func_overload 0 See if that helps your issue, more on what it does: http://php.net/manual/en/mbstring.overload.php Aziz On Mon, Sep 23, 2013 at 8:23 AM, Condor con...@stz-bg.com wrote: Hello, from two days I have strange problem with

Re: [PHP] No MIME-Type in imap_fetch_overview()

2013-09-23 Thread Aziz Saleh
What Niklaus wishes for is a way to detect if an email message contains an attachment by just reading the headers (correct me if I am wrong). This isn't really a PHP issue. In any language you can't really figure out if an email has an attachment by just looking at the headers, you need to check

Re: [PHP] Friday's Question

2013-09-20 Thread Aziz Saleh
Haha, like your product usage chart Tedd, Age: 31 Mousepad: Webster New Dictionary of Synonyms, too lazy of having to go to Microcenter and buy one! Aziz On Fri, Sep 20, 2013 at 12:58 PM, Larry Martell la...@software-horizons.com wrote: On Fri, Sep 20, 2013 at 10:51 AM, Tedd Sperling

Re: [PHP] Apache's PHP handlers

2013-09-19 Thread Aziz Saleh
The best way to handle file uploads is to: 1) Store the filename somewhere in the DB, rename the file to a random string without extension and store the mapping in the DB as well. 2) When sending the file, set the header content to the filename and output the content of the file via PHP (ex: by

Re: [PHP] Static methods vs. plain functions

2013-09-19 Thread Aziz Saleh
I think that it would be more elegant if you are already in a OOP to keep the flow and stick to OOP. It just doesn't make sense to me in an environment that uses OOP to have functions laying around. Personally I like to group similar functionality together in their own objects, this way I can