php-general Digest 3 Jan 2006 17:45:50 -0000 Issue 3885

2006-01-03 Thread php-general-digest-help

php-general Digest 3 Jan 2006 17:45:50 - Issue 3885

Topics (messages 228103 through 228123):

Re: Upload with process meter
228103 by: Mattias Segerdahl
228105 by: Michael Hulse

MySQL update killed my login...
228104 by: William Stokes
228106 by: M
228107 by: William Stokes

Re: Strange Right-Shift Problem
228108 by: Jochem Maas

Re: fread problem
228109 by: Mario de Frutos Dieguez

forms
228110 by: Mark
228111 by: Jay Blanchard
228112 by: Silvio Porcellana [tradeOver]

Re: A curl question
228113 by: ray.hauge.americanstudentloan.com
228117 by: tedd

Problems requesting page
228114 by: PHP Superman
228118 by: M

Re: watermark png on jpg
228115 by: tedd
228116 by: Libit

Any Senior PHP/MySQL Developers in the Los Angeles area?
228119 by: Beau Gould

are these db stats normal?
228120 by: James Tu

Re: PHPMailer inserting unwanted spaces
228121 by: René Fournier
228123 by: Manuel Lemos

LAMP Jobs Yahoo Group
228122 by: Beau Gould

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
---BeginMessage---
Martin,

There is no native support in php for this today. That said, it's not
impossible to do. There are two different approaches you can take. The easy
one, is to use PDoru's patch at http://pdoru.from.ro/

The second one, which I experimented with the other week, is to set the
wrong enctype, receive the file yourself and use a dhtml technique to keep
track off the upload.
http://se.php.net/manual/sv/function.apache-request-headers.php gives you
the content-length to start with, all you need to do, is to work with the
raw post data yourself. You could even use curl to locally post it into
$_FILES once you've received it.

What I'm saying is, it's possible, but it's really ugly.

-Ursprungligt meddelande-
Från: Martin Zvarík [mailto:[EMAIL PROTECTED] 
Skickat: den 2 januari 2006 22:30
Till: php-general@lists.php.net
Ämne: [PHP] Upload with process meter

Hi,

is it possible to upload a file and see the process of uploading (before 
the file is uploaded, there is something showing from 0% to 100%) using 
PHP and Javascript ? I saw some applications in Perl and mostly in JAVA, 
but I also found out something about some extension for PHP, but i think 
it wasn't complete at that time.

Thanks for sharing your knowledge about this... :)

Martin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
---End Message---
---BeginMessage---

On Jan 2, 2006, at 1:30 PM, Martin Zvarík wrote:
is it possible to upload a file and see the process of uploading 
(before the file is uploaded, there is something showing from 0% to 
100%) using PHP and Javascript ?


My main dig with using PHP[0] is that (AFAIK) there is no good way to 
give the user some feedback in terms of percentage uploaded.


I would suggest that you look-into AJAX[1] and/or Flash8[2]. F8 now has 
file upload capabilities - and both will allow for you to give the user 
feedback, letting them know (among other things) how long they have to 
wait. I am personally very impressed by F8, the example I give[2][3] is 
pretty darn cool!


(Read the comments also:)
[0] http://us2.php.net/manual/en/features.file-upload.php
[0] http://us2.php.net/manual/en/function.is-uploaded-file.php
[0] http://us2.php.net/manual/en/function.move-uploaded-file.php
(Just did a google search, these were the first I found.:)
[1] http://encodable.com/tech/ajaxupload/
[1] http://www.devpro.it/upload_progress/
[2] http://www.tink.ws/blog/filereference-example/
[3] http://snipurl.com/l8n5

Hth,
Micky
---End Message---
---BeginMessage---
Hello,

My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure 
which was OK yesterday. Any ideas how to start to debug this?

The login updates 2 fields in users table row where username and password 
macthes. This is the code:


if (!$query = mysql_query(update tbl_users set sess_id='$sess_id', 
sess_id_start='$date'
where md5(usr_name)='$usr_name' and password=PASSWORD('$password') 
,$connection))
{
header(Location: http://www.domain.net/loginscreen.php;);
exit;
}
else
{
Do Login and stuff...

This worked until today. I called the ISP and they confirmed that there was 
a database update yesterday.

-Will
---End Message---
---BeginMessage---
It seems the upgrade was from Mysql 4.0. PASSWORD() function changed 
between 4.0 and 4.1, it uses longer hashes now. You can still use 
OLD_PASSWORD() function instead.


William Stokes wrote:

Hello,

My ISP updated their MySQL DB to 5.0.18 and that killed my login procedure 
which was OK yesterday. Any ideas how to start to debug this?


The 

php-general Digest 4 Jan 2006 05:57:54 -0000 Issue 3886

2006-01-03 Thread php-general-digest-help

php-general Digest 4 Jan 2006 05:57:54 - Issue 3886

Topics (messages 228124 through 228138):

Problems with session data.
228124 by: Duffy, Scott E

mysqli bind_param and store_result don't work well together
228125 by: anirudh dutt

admin variables in CGI version
228126 by: Tim Traver

Problems with sessions .. qualified/non-qualified domain names
228127 by: Kall, Bruce A.

Curl Question
228128 by: Ray Hauge
228129 by: Manuel Lemos
228132 by: Ray Hauge

date processing needed in form
228130 by: Sue
228131 by: Jim Moseby
228133 by: Manuel Lemos
228135 by: Jerry Kita

imagecopyresampled() is same quality of imagecopyresized()
228134 by: Christopher Mobarek

Re: PHP MySQL
228136 by: toylet

Some Help with AD
228137 by: Dean Ericson

Re: HAPPY NEW YEAR!!
228138 by: Lam Cheuk Hin

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
php-general@lists.php.net


--
---BeginMessage---
I thought I was using session data and variables correctly, but I am
having some issues. I am using it to create a login but if I have
another user on a different machine my session data gets changed to who
last logged in. I had changed so it used https but changed it back and
it still seems to be doing the same. Is there something maybe I missed
in the php.ini file? Can it not be used this way? Do I have to uses
cookies?



Any help/suggestions would be appreciated.


Scott Duffy
---End Message---
---BeginMessage---
hi
the subject is pretty much what the problem is.

if i use
$st1 = $sql-stmt_init(); // $sql is a mysqli obj/conn
$st1-prepare(select `num` from `activity` where `id` = ?);
$st1-bind_param('s', $myid);
$myid = '3f6d017d3e728b057bcc082a7db75a57'; // forcing value to check
$st1-execute();
$st1-store_result();
$st1-bind_result($rz);
$st1-fetch();
echo rows: {$st1-num_rows}, ;
echo num: $rz;

gives rows: 0, num: 0

but if i use this prepare instead (without the bind_param and value inserted)
$st1-prepare(select `num` from `activity` where `id` =
'3f6d017d3e728b057bcc082a7db75a57');
i get rows: 1, num: 7 (the correct result)

if i use $st1 = $sql-prepare... instead of stmt_init(), the results
are identical. is this a bug with bind_param or is it supposed to this
way?

also, if i use an sql var in the prepare/bind case as
$st1-prepare(select @ck_num:=`num` from `activity` where `id` = ?);
var_dump($rz) is NULL; otherwise it's int(7)

any ideas?

anirudh

--
]#
Anirudh Dutt


...pilot of the storm who leaves no trace
like thoughts inside a dream
---End Message---
---BeginMessage---

Hi all,

ok, when using the CGI binary for PHP execution, is there a way to send 
it environment variables to set the admin values like you can in mod_php ???


For instance, when using the apache module, you might do something like 
this :


php_admin_value session.save_path /some/path

I know that you can have it loaded in a local php.ini file within the 
directory of the executed script, but I don't want to have to put a 
php.ini file if I am setting values on the fly...


I tried setting the environment variable, and it shows up in php_info as 
an env variable, but how can I get it to actually be set ???


Anyone ???

Thanks,

Tim.
---End Message---
---BeginMessage---
I have diagnosed a problem with sessions I am having.  I'm don't believe 
it's necessarily a PHP problem, but I thought someone must have seen 
this before.


The first thing I do is a

session_start()

and then determine if (using session variables) whether the user has 
logged in successfully using a password and their session has not timed 
out (to some value I keep track of, not the php.ini variables). Anyway, 
if I come in to my site using a fully qualified domain name such as


http://mysubsite.mycompany.com/index.php

and start a session and then have the user log in, I then pass them 
along to:


http://mysubsite/index.php

internal to my organization (using the non-qualified domain name).  But 
this starts a different session than the one they came in as, so this 
user now has two different sessions, the one that determined they needed 
to log in on (using the fully qualified domain name) and the second 
session that was started after they logged in (using the non-qualified 
name).


I see this problem when you set your default browser 'home' page to be

http://mysubsite.mycompany.com/index.php

and attempt to use that.  Every time you click on that (after you've 
logged in initially and haven't timed out) you go immediately to a login 
window since that session is still around and was never logged in.


If my default browser home page is:

http://mysubsite/index.php

you then get into the session that was started after you log in.

The reason I think