php-general Digest 3 Jan 2006 17:45:50 -0000 Issue 3885
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
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
[PHP] MySQL update killed my login...
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload with process meter
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL update killed my login...
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 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL update killed my login...
Thanks! -W M [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] 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 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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Strange Right-Shift Problem
Curt Zirzow wrote: On Fri, Dec 30, 2005 at 12:34:35PM -0600, Richard Lynch wrote: On Thu, December 29, 2005 5:37 pm, Michael Gross wrote: ... If you can determine the number of bits on your system, you could use a different number from 11 on the two systems to get the answer you want. if (is_32_bit_machine()){ $y = $x 11; } else{ $y = $x 43; //11 + 32 (guess) } One hack for detecting 32-bit machine might be this: Isn't php suppose to handle all this? This seems odd to me. I don't see how php can 'handle' people assuming that integers will always be 32bits - the php code in the encryption algorythm is flawed because it assumes that all integers are 32bits and doesn't platform wordsize (terminology?) into account - how can php know that this was not the intention? Curt. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: fread problem
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Yes, sorry i forget send some example code. Here is: $xml_parser = xml_parser_create(); // usa case-folding para que estemos seguros de encontrar la etiqueta // en $map_array xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($xml_parser, startElement, endElement); xml_set_character_data_handler($xml_parser, characterData); if (!($fp = fopen($file, rb))) { die(could not open XML input); } while ($data = fread($fp, 12288)) { if (!xml_parse($xml_parser, $data, feof($fp))) { die(sprintf(XML error: %s at line %d, xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } } If i put fread($fp, 8192) i obtain the same text and if a put 4096 it cut before. - -- ** FUNDACIÓN CARTIF MARIO DE FRUTOS DIEGUEZ - Email: [EMAIL PROTECTED] División de Ingeniería del Software y Comunicaciones Parque Tecnológico de Boecillo, Parcela 205 47151 - Boecillo (Valladolid) España Tel. (34) 983.54.88.21 Fax(34) 983.54.65.21 ** Este mensaje se dirige exclusivamente a su destinatario y puede contener información CONFIDENCIAL sometida a secreto profesional o cuya divulgación esté prohibida en virtud de la legislación vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma vía y proceda a su destrucción. Nótese que el correo electrónico via Internet no permite asegurar ni la confidencialidad de los mensajes que se transmiten ni la correcta recepción de los mismos. En el caso de que el destinatario de este mensaje no consintiera la utilización del correo electrónico vía Internet, rogamos lo ponga en nuestro conocimiento de manera inmediata. *** This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by a professional privilege or whose disclosure is prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. Please note that Internet e-mail neither guarantees the confidentiality nor the proper receipt of the messages sent. If the addressee of this message does not consent to the use of Internet e-mail, please communicate it to us immediately. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDunbvbPPtxT8v/3wRAjBwAJ4kHE0cdyrvruFE3LlSGXMKFri5fwCfU7ii machwamViid/Hr8lXPrv8e8= =xyJI -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] forms
Hi can any one show me how make another form appear below another once the 1st form has been submitted. ie: name: address: country: SUBMIT then this form appears below after the submit button is clicked blah: blah: blah: SUBMIT -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] forms
[snip] Hi can any one show me how make another form appear below another once the 1st form has been submitted. [/snip] post to PHP_SELF and test for population of original form parts if('' != $_POST['name'] etc.){ echo all of the other form parts; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms
Mark wrote: Hi can any one show me how make another form appear below another once the 1st form has been submitted. [not really a PHP solution...] You can do like this: the 'SUBMIT' button of the first form only makes visible the (hidden) DIV where the second form is, and only *that* 'SUBMIT' button actually submits the form. CSS reference: http://www.w3schools.com/css/css_reference.asp HTH, cheers Silvio -- tradeOver | http://www.tradeover.net ...ready to become the King of the World? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A curl question
I haven't tried it, so I don't know if -d doesn't work with -u, but if that is the case, you could change your URL to this: curl -d what=what http://user:[EMAIL PROTECTED]/myApp.php or try this: curl -u userID:password -d what=what --url http://www.mydomain.com/myApp.php; HTH Ray Original Message Subject: RE: [PHP] A curl question From: tedd [EMAIL PROTECTED] Date: Mon, January 02, 2006 5:50 pm To: php-general@lists.php.net Ray: I would suggest using the -d (or --data) flag. That allows you to send POST data. example: exec(curl -d name=Rafael%20Sagulaphone=3320780 http://www.where.com/guest.php) Yes, I understand -d -- is there a way to use that AND to provide userID and password? Thanks. tedd For more information, check the man page for cURL and search for POST within that document. Or check out the PHP Manual for the appropriate CURL syntax with LibCURL http://us3.php.net/manual/en/function.curl-init.php I have a script that uses the exec statement (was inherited from the last guy) and I'd be interested to know if libCURL makes the script wait on that line until CURL returns the result. Sometimes when getting data from a really slow site, scripts will take a lot longer than expected (10-15 minutes). I would assume that both ways would have the same effect, but efficiency is always king ;) HTH Ray Original Message Subject: [PHP] A curl question From: tedd [EMAIL PROTECTED] Date: Mon, January 02, 2006 9:07 am To: php-general@lists.php.net Hi: I've asked this question on the [EMAIL PROTECTED] list, but replies were few and didn't address the problem. Whereas, I've seen considerable discussion of curl on this list, so here goes. I am writing a client-side application that uses curl commands to communicate with a php application. At present I can send the php application logon, password, and variables via: curl -u userID:password --url http://mydomain.com/myApp.php?what=what That works! However, I would like to send the variables hidden instead of attached to the url. So, what would the curl command be? Many thanks for any suggestions or solutions. tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems requesting page
Hey everyone, i'm on a windows box with PHP 5 on Apache 2 and I have a strange problem. When i try to access a page it seems to be blank, before it always worked but now it sudenly stopped. I am not a big computer techy but i cleared IE's cache and it still doesen't work. Source Code in IE for requested Page: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Code in requested page: ?php require_once(Include.php); Init(1); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional// http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head ?php Init(2); ? titleRegister for an account/title /head body ?php Init(3); ? form action=RegisterP.php name=Register method=post Username: input type=text name=Username / br / Password: input type=password name=Password / br / Confirm your password: input type=password name=PasswordCheck br / E-mail Address: input type=text name=EMail / br / input type=submit value=Submit /form ?php Init(4); ? /body /html
Re: [PHP] watermark png on jpg
I have png image with transparent background, and 1 jpg file. I use imageCopyMerge to paste the png image on the jpg image. the result image contain no transparent background mean the png file have white background when its suppose to be transparent what is the simple and best way to make this work. tanks in advance. :) Libit: I was working on the same thing. The following is a solution -- but, simple and best are relative. This was taken from PHP Graphics Handbook by Kent et al. ? $original=imagecreatefromjpeg(apollo.jpg); $watermark=imagecreatefrompng(xssportstransparent.png); $osx=imagesx($original); $osy=imagesy($original); $wsx=imagesx($watermark); $wsy=imagesy($watermark); imagecopy($original, $watermark, ($osx-$wsx)/2, ($osy-$wsy)/2, 0, 0, $wsx, $wsy); imagepng($original, apollo_trans.png); ? html body table trtd align=centerOrignal Image/tdtd align=centerWatermark/tdtd align=centerOrignal Image with Watermark/td/tr trtdimg src=apollo.jpg/tdtdimg src=xssportstransparent.png/tdtdimg src=apollo_trans.png/td/tr /table /body /html Demo at: http://xn--ovg.com/watermark HTH's tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] watermark png on jpg
tedd wrote: I have png image with transparent background, and 1 jpg file. I use imageCopyMerge to paste the png image on the jpg image. the result image contain no transparent background mean the png file have white background when its suppose to be transparent what is the simple and best way to make this work. tanks in advance. :) Libit: I was working on the same thing. The following is a solution -- but, simple and best are relative. This was taken from PHP Graphics Handbook by Kent et al. ? $original=imagecreatefromjpeg(apollo.jpg); $watermark=imagecreatefrompng(xssportstransparent.png); $osx=imagesx($original); $osy=imagesy($original); $wsx=imagesx($watermark); $wsy=imagesy($watermark); imagecopy($original, $watermark, ($osx-$wsx)/2, ($osy-$wsy)/2, 0, 0, $wsx, $wsy); imagepng($original, apollo_trans.png); ? html body table trtd align=centerOrignal Image/tdtd align=centerWatermark/tdtd align=centerOrignal Image with Watermark/td/tr trtdimg src=apollo.jpg/tdtdimg src=xssportstransparent.png/tdtdimg src=apollo_trans.png/td/tr /table /body /html Demo at: http://xn--ovg.com/watermark HTH's tedd thank you tedd , my original code is pretty the same. and I solved the problem using function called imagecopyresampled() the function keep the transparent background of the png file. from some sources on the net I read the its may be related to some miss support in png 24bit. but I didn't get too much to it. thanks again for taking the time to write and help me. I think this is on solution for this problem I found it the easy one. ah , one more thing, in my code I save the result image as an Jpg file. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] A curl question
I haven't tried it, so I don't know if -d doesn't work with -u, but if that is the case, you could change your URL to this: curl -d what=what http://user:[EMAIL PROTECTED]/myApp.php Ray: Bingo -- that worked ! Now I can send data to a password protected folder without having to expose the data by adding it to the end of the url. This is mondo cool. One step closer to world domination. Many thanks. tedd -- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problems requesting page
PHP Superman wrote: Hey everyone, i'm on a windows box with PHP 5 on Apache 2 and I have a strange problem. When i try to access a page it seems to be blank, before it always worked but now it sudenly stopped. I am not a big computer techy but i cleared IE's cache and it still doesen't work. you should turn display_errors on on your development box. Turn it on, or check your logs, if you log php errors Source Code in IE for requested Page: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252/HEAD BODY/BODY/HTML Code in requested page: ?php require_once(Include.php); Init(1); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional// http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head ?php Init(2); ? titleRegister for an account/title /head body ?php Init(3); ? form action=RegisterP.php name=Register method=post Username: input type=text name=Username / br / Password: input type=password name=Password / br / Confirm your password: input type=password name=PasswordCheck br / E-mail Address: input type=text name=EMail / br / input type=submit value=Submit /form ?php Init(4); ? /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Any Senior PHP/MySQL Developers in the Los Angeles area?
Any Senior PHP/MySQL Developers in the Los Angeles area looking for work? If so, send me your resume. I've got multiple clients. 70-100k range. Thank you, Beau Gould www.superiorss.com [EMAIL PROTECTED] -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 1/2/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] are these db stats normal?
I used phpMyAdmin to look at the stats for this mysql server. http://www.2-bit-toys.com/db_info/server_status.html What concerns me mainly are the stats at the top-right...'Failed attempts' and 'Aborted.' When would these situations occur? Is it normal to see these? I'm using PHP's mysql_pconnect for all my scripts. Could this be causing the failed/aborted attempts? What is not clear is if mysql_pconnect will open another connection if the current one is being used. -James -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPMailer inserting unwanted spaces
Actually, I can send the example messages but here is another description of the same problem. (So PHPMailer is inserting line breaks, not spaces—or something is...) http://sourceforge.net/tracker/index.php? func=detailaid=1267539group_id=26031atid=385708 On 30-Dec-05, at 5:37 AM, Lam Cheuk Hin wrote: Can You Write The Strings/Text? On 12/30/05, René Fournier [EMAIL PROTECTED] wrote: Has anyone encountered this? I am composing an HTML email with PHPMailer, and for some reason PHPMailer is inserted spaces periodically, which breaks the formatting. I've looked through the docs, but can only find a setting for Word Wrap (which is set to 0). ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- lch2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LAMP Jobs Yahoo Group
LAMP Jobs Yahoo Group http://groups.yahoo.com/group/LAMPjobs This group is moderated and is spam-free. Open Source Jobs Yahoo Group http://groups.yahoo.com/group/opensourcejobs This group is moderated and is spam-free. Python, Zope, and Plone Jobs http://groups.yahoo.com/group/pythonzopejobs This group is moderated and is spam-free. -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.14.11/219 - Release Date: 1/2/2006 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHPMailer inserting unwanted spaces
Hello, on 01/03/2006 03:37 PM René Fournier said the following: Actually, I can send the example messages but here is another description of the same problem. (So PHPMailer is inserting line breaks, not spaces—or something is...) http://sourceforge.net/tracker/index.php? func=detailaid=1267539group_id=26031atid=385708 This sounds like wrong body encoding problem. You may also want to try this other MIME e-mail message composing and sending class. It has been working well for many years to send HTML messages even with embedded images. Try the test_html_mail_message.php example and see if it works for you: http://www.phpclasses.org/mimemessage -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with session data.
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
[PHP] mysqli bind_param and store_result don't work well together
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] admin variables in CGI version
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. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with sessions .. qualified/non-qualified domain names
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 this issue must have come up for someone before is that almost all of my users should be able to use http://mysubsite/index.php BUT if you're coming in (from home for example), you need to come in as http://mysubsite.mycompany.com/index.php for it to find my site. Is there some way for a session to be registered to both? mysubsite.mycompany.com (using the fully qualified domain name) AND mysubsite (using the non-fully qualified domain name) Thanks, Bruce -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Curl Question
Hello everyone, I just wanted to see if anyone knew if there was any difference in performance between using curl in an exec() statement and when using the libCurl functions within PHP. Thanks, Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Curl Question
Hello, on 01/03/2006 06:52 PM Ray Hauge said the following: I just wanted to see if anyone knew if there was any difference in performance between using curl in an exec() statement and when using the libCurl functions within PHP. Executing a separate program should be a little slower as it adds some overhead before executing a request. Actually, in some cases it can be a little faster to use fsockopen instead of libcurl as it is one less library to load. You may also want to take a look at this HTTP client class that uses fsockopen everytime it is possible and only uses libcurl functions in certain cases. This class takes care of cookie handling, redirection, form posting, file uploading, etc.. http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] date processing needed in form
Hello - I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days for the month ( year?) displays. For all of our other forms, we use CGI to handle our standard forms validation, and was hoping to handle more complex validation within PHP prior to sending the entire contents of my form to our standard CGI validation routine. I know that I could use the Checkdate function once the entire date is selected, but thought there might be an easier/more efficient way of handling this and also not sure how to reference Checkdate prior to Submitting my form to the CGI routine. I also was not sure if this was something that is handled easier using Javascript? Any help/examples, etc. would be greatly appreciated! Thanks!! Sue -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] date processing needed in form
I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days for the month ( year?) displays. Since PHP is server-side, a more elegant solution could be achieved using javascript. In order to do this with PHP, your script would have to make the trip back to the server after the month was entered to calculate the valid day. JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Curl Question
Thanks for the info! Manuel Lemos wrote: Hello, on 01/03/2006 06:52 PM Ray Hauge said the following: I just wanted to see if anyone knew if there was any difference in performance between using curl in an exec() statement and when using the libCurl functions within PHP. Executing a separate program should be a little slower as it adds some overhead before executing a request. Actually, in some cases it can be a little faster to use fsockopen instead of libcurl as it is one less library to load. You may also want to take a look at this HTTP client class that uses fsockopen everytime it is possible and only uses libcurl functions in certain cases. This class takes care of cookie handling, redirection, form posting, file uploading, etc.. http://www.phpclasses.org/httpclient -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date processing needed in form
Hello, on 01/03/2006 06:41 PM Sue said the following: I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days for the month ( year?) displays. For all of our other forms, we use CGI to handle our standard forms validation, and was hoping to handle more complex validation within PHP prior to sending the entire contents of my form to our standard CGI validation routine. I know that I could use the Checkdate function once the entire date is selected, but thought there might be an easier/more efficient way of handling this and also not sure how to reference Checkdate prior to Submitting my form to the CGI routine. I also was not sure if this was something that is handled easier using Javascript? Any help/examples, etc. would be greatly appreciated! You may want to try this forms generation and validation class. It comes with a calendar date plug-in that does exactly what you want. It lets you choose a date using several text or select fields and it can validate the date that you choose using special Javascript code generated by the plug-in. If you want, it can also restrict the range of accepted dates, like since a given date or no later than another date. The plug-in class validates either on the client side with Javascript or server side with PHP. You do not need to know any Javascript to use this. http://www.phpclasses.org/formgeneration Here is a screen shot: http://www.phpclasses.org/browse/file/8245.html Here is an example page: http://www.phpclasses.org/browse/view/html/file/6799/name/test_date_input_page.html -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagecopyresampled() is same quality of imagecopyresized()
Everyone is saying that imagecopyresampled() greatly improves resizing quality due to resampling. However, I noticed that my thumbnails were very jagged and pixelated, not smooth as thumbnails should be. Even the slightly smaller images had a lot of jagged edges. The $src image is a resource of an imagecreatefromjpeg() while $dst is a resource of an imagecreatetruecolor(). Then I just imagecopyresampled() the $src to $dst. I don't think I'm doing anything wrong. Your thoughts? Thanks. -- Christopher Mobarek -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: date processing needed in form
Sue wrote: Hello - I need to create a form that allows the user to select a Month, Day and Year. I am also new to PHP and am wondering if there is a way for me to display the contents of the Select list box (for the Day) based on the Month that is selected (and Year), so that the valid number of days for the month ( year?) displays. For all of our other forms, we use CGI to handle our standard forms validation, and was hoping to handle more complex validation within PHP prior to sending the entire contents of my form to our standard CGI validation routine. I know that I could use the Checkdate function once the entire date is selected, but thought there might be an easier/more efficient way of handling this and also not sure how to reference Checkdate prior to Submitting my form to the CGI routine. I also was not sure if this was something that is handled easier using Javascript? Any help/examples, etc. would be greatly appreciated! Thanks!! Sue For what it's worth I use JavaScript for validation prior to the form being submitted. It's faster and doesn't use any network resources. If you do validity checking at the browser using JavaScript ... then when the form is submitted I'd let it go straight through to your standard forms validation program ... I wouldn't even involve PHP. -- Jerry Kita http://www.salkehatchiehuntersville.com email: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP MySQL
Here's one thought . ascii (97) is the letter a is it possible that the ascii (65) A was interpreted as lowercase thus creating a duplicate primary key? Or your DBMS doesn't make a distinction between upper or lower case. You are correct. I compiled mysql and php from source tar-ball. I dind' tknow that the default character set and collate are case-insensitive. It's fixed after I set the character set to latin1 and collate to latin1_bin in /etc/my.cnf. -- .~.Might, Courage, Vision. SINCERITY. http://www.linux-sxs.org / v \ /( _ )\ (Fedora Core 4) Linux 2.6.14-1.1653_FC4 ^ ^10:03:01 up 16 days 1:00 load average: 0.00 0.00 0.00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Some Help with AD
I have been trying with AD to traverse a tree... such as: A - Company distribution list \ B - Business Operations distribution list / \ CD- IT Operations distribution list \ E - Visual Studio's distribution list If I am in distribution list E and B is granted some sort of rights within my application ( To view a certain document or module ), how can I, using LDAP_search, traverse that tree and realize that E is a member of B and therefore I should be given the rights as well. Not only is E a member, but so is C and D and they should have the same grants as well. [EMAIL PROTECTED]
Re: [PHP] Re: HAPPY NEW YEAR!!
Happy New Year to all... ChineseT: 新年快樂 ^.^ -- lch2003 ~ Lam Cheuk Hin
[PHP] Newbie question: need to transfer directory contents from my local machine to my website
Hi all: I'm really new at PHP and will probably embarrass myself many times over asking questions that have been asked gazillions of times before, so let this serve as a blanket apology. Now, to my question. Here's what I'm trying to do. I have a simple database on my website that I wish to populate with information from various directories on my local computer. The website is running Linux; my computer is running Windows XP. Once the data are stored, I want to be able to update the information as things change on my local computer (not in real time, mind you, but at my request). I can set up the database access easily enough, and I know how to both populate and query it. What I don't know is how to obtain the information from my local computer via the website. Initially, I'd like to be able to specify the folder on my local computer to access and whether or not to process any subfolders that are found. After the data have been added, I'd like the web application to be able to access the individual folders without having to specify them again (although I'd still be able to identify new folders to include in subsequent updates). I'm not really asking for anyone to write the code for me, but I am looking for suggestions for PHP functions to use to accomplish the inspection of my local computer's folders. I'd also need to know what additional information I'd need to store in the database so that subsequent updates can be automated (i.e., do I need to somehow store my IP address?). Any help you can send my way will be greatly appreciated! Thanks in advance. Sincerely, Jon
[PHP] Comparing of string
Hello List I've got the following little code: $formCheck= $_GET['formCheck']; $SollKombination = $_SESSION['zufall']; echo $SollKombinationbr$formCheck; print gettype($formCheck); echo ---; print gettype($SollKombination); if ($SollKombination == $formCheck){ echo test; } To give you some background: This code is supposed to check if a user has tried to login via my form. Which gives me the following output: ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S string---string Everything the way it's supposed to be What I don't get is, why isn't the if statement true? Shouldn't it show test as well? Where is my mistake? I run PHP 5.1.1 on Windows. On my Win PHP 5.0 this code works proper, but not here ?!? thx JanBro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing of string
Hi JanBro: Quick guess: are the strings the same length? I've been bitten many times by string comparisons that appear to be identical but which fail due to trailing spaces, other invisible (i.e., non-printing) characters, and the like. Hope this helps. Jon - Original Message - From: janbro [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, January 03, 2006 11:22 PM Subject: [PHP] Comparing of string Hello List I've got the following little code: $formCheck= $_GET['formCheck']; $SollKombination = $_SESSION['zufall']; echo $SollKombinationbr$formCheck; print gettype($formCheck); echo ---; print gettype($SollKombination); if ($SollKombination == $formCheck){ echo test; } To give you some background: This code is supposed to check if a user has tried to login via my form. Which gives me the following output: ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S string---string Everything the way it's supposed to be What I don't get is, why isn't the if statement true? Shouldn't it show test as well? Where is my mistake? I run PHP 5.1.1 on Windows. On my Win PHP 5.0 this code works proper, but not here ?!? thx JanBro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing of string
Yep, they are of the same length. here they are: $SollKombination ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S $formCheck ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S When creating the string on the form page only visible characters were allowed. thanks but that's not it. Jon Westcot schrieb: Hi JanBro: Quick guess: are the strings the same length? I've been bitten many times by string comparisons that appear to be identical but which fail due to trailing spaces, other invisible (i.e., non-printing) characters, and the like. Hope this helps. Jon - Original Message - From: janbro [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, January 03, 2006 11:22 PM Subject: [PHP] Comparing of string Hello List I've got the following little code: $formCheck= $_GET['formCheck']; $SollKombination = $_SESSION['zufall']; echo $SollKombinationbr$formCheck; print gettype($formCheck); echo ---; print gettype($SollKombination); if ($SollKombination == $formCheck){ echo test; } To give you some background: This code is supposed to check if a user has tried to login via my form. Which gives me the following output: ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S string---string Everything the way it's supposed to be What I don't get is, why isn't the if statement true? Shouldn't it show test as well? Where is my mistake? I run PHP 5.1.1 on Windows. On my Win PHP 5.0 this code works proper, but not here ?!? thx JanBro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Comparing of string
janbro wrote: Hello List I've got the following little code: $formCheck= $_GET['formCheck']; $SollKombination = $_SESSION['zufall']; echo $SollKombinationbr$formCheck; print gettype($formCheck); echo ---; print gettype($SollKombination); if ($SollKombination == $formCheck){ echo test; } To give you some background: This code is supposed to check if a user has tried to login via my form. Which gives me the following output: ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S ZL0X~TT4PQ%0~R0OXPRUHY7E!4~W337J71V4WDDI6$GS9480XP0TNP2I$1YX75S string---string Everything the way it's supposed to be What I don't get is, why isn't the if statement true? Shouldn't it show test as well? Where is my mistake? I run PHP 5.1.1 on Windows. On my Win PHP 5.0 this code works proper, but not here ?!? thx JanBro Hey JanBro, Try replacing the if statement you have with this: if ( strcmp( trim($SollKombination), trim($formCheck) ) ) { echo test; } --- Jeremy Privett [ http://www.jeremyprivett.com ] Founder - Lead Software Developer - Hosting Systems Administrator Omega Vortex (http://www.omegavortex.com) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php