php-general Digest 4 Jun 2009 13:22:19 -0000 Issue 6158
php-general Digest 4 Jun 2009 13:22:19 - Issue 6158 Topics (messages 293581 through 293597): Re: Best Encryption Algorithm 293581 by: Luke how to manage permissions for file uploader 293582 by: Lamp Lists 293587 by: Al 293588 by: Phpster Re: Query Regarding a Player 293583 by: Eddie Drapkin 293584 by: Ashley Sheridan Re: forms problem 293585 by: PJ 293586 by: PJ 293589 by: Shawn McKenzie 293590 by: Andrew Ballard 293597 by: Al Re: Zebra Striped Table Example 293591 by: Raymond Irving 293595 by: Ashley Sheridan PHP HELP 293592 by: tRace DOliveira Timestamps and strftime 293593 by: John Comerford 293594 by: Mayer, Jonathan 293596 by: John Comerford Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- 2009/6/3 Andrew Ballard aball...@gmail.com On Wed, Jun 3, 2009 at 4:17 PM, Paul M Foster pa...@quillandmouse.com wrote: On Wed, Jun 03, 2009 at 07:57:32PM +0100, Ashley Sheridan wrote: snip A single-phase Caesar cypher is by far the best. It worked for Julias Caesar, and damn it, it will work for us! ROT13 FTW! Paul -- Paul M. Foster ROT26 - because it's twice as strong! :-P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I was once working with a very problematic partner that kept changing data in our database, so I rot13d all the data and told him it was some advanced encryption and he never worked it out :) -- Luke Slater :O) ---End Message--- ---BeginMessage--- to upload an image for a photo gallery (my own code) I have to have permission for the directory images 0777. but having permission for a directory 0777 is REALLY bad idea, isn't it? I'm owner of the directory (lamp:lamp images). what to do to set my code has permission to upload an image into the images directory and have permissions on the directory 0755? I googled for file uploader scripts and classes to se how they handle it but I can't see that part. just file/size/type validation and moving uploaded file to final destination. thanks. -LL ---End Message--- ---BeginMessage--- Lamp Lists wrote: to upload an image for a photo gallery (my own code) I have to have permission for the directory images 0777. but having permission for a directory 0777 is REALLY bad idea, isn't it? I'm owner of the directory (lamp:lamp images). what to do to set my code has permission to upload an image into the images directory and have permissions on the directory 0755? I googled for file uploader scripts and classes to se how they handle it but I can't see that part. just file/size/type validation and moving uploaded file to final destination. thanks. -LL A simple way is have your program create the dir, instead of you doing it with ftp or a file manager on the sever. Then your scripts will own the dir. ---End Message--- ---BeginMessage--- This is fairly simple to do as an http upload. With the folder above the web root, it less if an issue since general users can't gain access, a script can do all the interaction needed. Plus you can chown the permissions with php Bastien Sent from my iPod On Jun 3, 2009, at 17:24, Lamp Lists lamp.li...@yahoo.com wrote: to upload an image for a photo gallery (my own code) I have to have permission for the directory images 0777. but having permission for a directory 0777 is REALLY bad idea, isn't it? I'm owner of the directory (lamp:lamp images). what to do to set my code has permission to upload an image into the images directory and have permissions on the directory 0755? I googled for file uploader scripts and classes to se how they handle it but I can't see that part. just file/size/type validation and moving uploaded file to final destination. thanks. -LL ---End Message--- ---BeginMessage--- But it's client side software and you can't rely on it existing for general use. On Wed, Jun 3, 2009 at 2:52 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2009-06-03 at 09:18 -0500, haliphax wrote: On Wed, Jun 3, 2009 at 8:14 AM, Hemant Patel hemant.develo...@gmail.com wrote: Hi All, I hope you all are doing great.We are developing a application on our end and we got a problem with a Audio/Vedio player.As flash player is working well with client side but it has limitation of file formats like it can run .flv file format only.If we go for media player then it won't run on Linux Server. Now i want to develop a player which can run any file format at client
[PHP] Timestamps and strftime
Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows: foreach ($stmt-fetchall(PDO::FETCH_ASSOC) as $row) { echo strftime(%j,$row['UpdateDate']); } but it returns the following error: PHP Notice: A non well formed numeric value encountered... I understand that this is because strftime is expecting a numeric value and that ,$row['UpdateDate'] is a character but I am not sure how to resolve the issue. Any help would be apprecaited. TIA, JC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Timestamps and strftime
Off the top of my head, would strtotime work? ie strftime(%j,strtotime($row['UpdateDate'])) -Original Message- From: John Comerford [mailto:jo...@optionsystems.com.au] Sent: 04 June 2009 07:10 To: php-general@lists.php.net Subject: [PHP] Timestamps and strftime Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows: foreach ($stmt-fetchall(PDO::FETCH_ASSOC) as $row) { echo strftime(%j,$row['UpdateDate']); } but it returns the following error: PHP Notice: A non well formed numeric value encountered... I understand that this is because strftime is expecting a numeric value and that ,$row['UpdateDate'] is a character but I am not sure how to resolve the issue. Any help would be apprecaited. TIA, JC -- 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] Zebra Striped Table Example
On Wed, 2009-06-03 at 21:58 -0700, Raymond Irving wrote: Hi Ashley, Thanks for the feedback. See my comments below: Doesn't work in the majority of browsers out there at the moment. I've tested it in IE7, FF3, Safari3 and Opera9. Which Browsers have you tested it in? For striped tables, you're still better off using server-side code to apply a class to every other row of the table. Pure CSS solutions are not ready The zebra example was created using server-side code (Raxan PDI) and can be made to use CSS classes if you so desire: $page['table tr:even']-addCSS('row-color'); $page-reply(); The above example will generate html tags that can be rendered in all html browsers. The Raxan Framework is very flexible enough to allow developers to create just about anything they want. I would recommend that you download the framework and give the examples a try to see how easy it is to create both Ajax and Non-Ajax webpages. If you have any questions feel free to drop me a line or post a comment inside the forum. __ Raymond Irving Quickly build and maintain PHP Ajax application Raxan PDI - http://raxanpdi.com I tested in Firefox 2, just showed a plain vanilla table, with no row colours at all. My guess is, it won't work with IE6 either. These are the two browsers most common at the moment (as far as my stats go) Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Timestamps and strftime
Thanks Jonathan, Thats exactly what I needed. I appreciate the help, JC Mayer, Jonathan wrote: Off the top of my head, would strtotime work? ie strftime(%j,strtotime($row['UpdateDate'])) -Original Message- From: John Comerford [mailto:jo...@optionsystems.com.au] Sent: 04 June 2009 07:10 To: php-general@lists.php.net Subject: [PHP] Timestamps and strftime Hi, I am having a problem trying to use a date that I take from a MySQL database. The field is defined as a timestamp in the database. I extract it using PDO and I am trying to use the value with strftime as follows: foreach ($stmt-fetchall(PDO::FETCH_ASSOC) as $row) { echo strftime(%j,$row['UpdateDate']); } but it returns the following error: PHP Notice: A non well formed numeric value encountered... I understand that this is because strftime is expecting a numeric value and that ,$row['UpdateDate'] is a character but I am not sure how to resolve the issue. Any help would be apprecaited. TIA, JC -- Option Systems Pty. Ltd. 53 Waverley Road, Malvern East, VIC 3145 PO Box 7, Caulfield East, VIC 3145 Phone: 03 9571 0100 Fax: 03 9571 0500 The information in this e-mail is confidential and is intended solely for the addressee. Any views or opinions presented are solely those of the author and do not necessarily represent those of Option Systems Pty.Ltd. If you are not the intended recipient, please delete this message and contact the sender. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: forms problem
PJ wrote: The code: ...snip div id=loginbox form name=login method=post action=? echo $_SERVER['PHP_SELF'] ? h2accegrave;s client br /input type=text name=title value=? echo $user; ? size=10 /br / mot de passe br /input type=text name=title value=? echo $passwd; ? size=10 /br / input class=submit name=submit type=submit value= entrez /br //h2 h2a href=inscription.php Inscription /a/h2 /form /div snip... PROBLEM 1: On Firefox3, the first input (accès client) does not accept any input, does not show the cursor; the second input (mot de passe) works fine. PROBLEM 2: The form does not appear on IE 6 Running FreeBSD 7.1, apache22, php 5, using sessions, CSS Am I doing something wrong? Always W3C validate html and CSS . Use Firefox's Web Developer extension. It's super. It would have shown you the problems in minutes, see the forms selections. I also use the HTML Validator extension. Leave it active and as you develop and test your resultant html code, it'll check your pages on the fly. When you see the red circle, with a cross, click the circle and get an error report in detail. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms problem
Andrew Ballard wrote: On Wed, Jun 3, 2009 at 7:13 PM, PJ af.gour...@videotron.ca wrote: Tom Chubb wrote: 2009/6/3 PJ af.gour...@videotron.ca: The code: ...snip div id=loginbox     form name=login method=post action=? echo $_SERVER['PHP_SELF'] ?       h2accegrave;s client br /input type=text name=title value=? echo $user; ? size=10 /br /       mot de passe br /input type=text name=title value=? echo $passwd; ? size=10 /br /       input class=submit name=submit type=submit value=    entrez   /br //h2       h2a href=inscription.php Inscription /a/h2     /form   /div snip... PROBLEM 1: On Firefox3, the first input (accès client) does not accept any input, does not show the cursor; the second input (mot de passe) works fine. PROBLEM 2: The form does not appear on IE 6 Running FreeBSD 7.1, apache22, php 5, using sessions, CSS Am I doing something wrong? -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com  http://www.ptahhotep.com  http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I think the first problem is because both your inputs are defined as title. Does that change anything in the functionanlity? If so, how? Bastien says it works in IE8; here it does not in IE6. :-) I'm not sure about functionanlity, but it definitely changes the functionality. ;-) It means that regardless of whether someone is able to enter a value in the field you have labeled accès client, your PHP page will never see it because it will look at the value from the field you have labeled mot de passe, even if it is left blank. And that is true regardless of which browser they are using. In some scripting platform other than PHP, or if you process the raw post data yourself it could be different, but in PHP the variable $_POST['title'] will only have one value in it, and it will be the last one passed by the form. (In this case, mot de passe.) Andrew Thanks Andrew, I hadn't gotten that far and had not thought about that... it's a wake-up call for me. Glad to learn that. PJ -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forms problem
Shawn McKenzie wrote: PJ wrote: AngeloZanetti wrote: Shawn McKenzie wrote: PJ wrote: PROBLEM 1 solved: errant divs removed; strange that they were inhibiting entry of data into form field? PROBLEM 2 not resolved: but the form was off the page and clipped in upper right hand corner. What can be done to get it to show correctly? Remove the link to any stylesheets that you're using and see what it looks like. Where is your source code / form so we can see what is going on? http://www.Elemental.co.za http://www.Elemental.co.za http://www.wapit.co.za http://www.wapit.co.za The code: ...snip div id=loginbox form name=login method=post action=? echo $_SERVER['PHP_SELF'] ? h2accegrave;s client br /input type=text name=title value=? echo $user; ? size=10 /br / mot de passe br /input type=text name=title value=? echo $passwd; ? size=10 /br / input class=submit name=submit type=submit value= entrez /br //h2 h2a href=inscription.php Inscription /a/h2 /form /div snip... I had posted this earlier... just before finding the blockage for the input in PROBLEM 1, though I don't know why some stray divs would cause that. Based on the fact that you said things were off the page and clipped in the upper right hand corner, I thought that you had a style that may have positioned the div or the form or something. If you disable all styles, whether in the head of the document or via an external stylesheet, then that should show the form on the page as it should. I think I didn't explain correctly; It does not appear on the page(IE 6) as it should does in Firefox3. The form is displayed but off-screen on startup; The page is set for a width of 1025px but the display is probably about 900px so the form is just off-screen to the right. But it is clipped in the middle and all you see is the password and submit fields. I suspect that the guilty party here is the CSS - I have the top margin set to -100px in order to position it where I want it. I guess, I have to find another way to position it. :-( -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to manage permissions for file uploader
From: Phpster phps...@gmail.com To: Lamp Lists lamp.li...@yahoo.com Cc: php-general@lists.php.net php-general@lists.php.net Sent: Wednesday, June 3, 2009 8:30:05 PM Subject: Re: [PHP] how to manage permissions for file uploader This is fairly simple to do as an http upload. With the folder above the web root, it less if an issue since general users can't gain access, a script can do all the interaction needed. Plus you can chown the permissions with php Bastien Sent from my iPod On Jun 3, 2009, at 17:24, Lamp Lists lamp.li...@yahoo.com wrote: to upload an image for a photo gallery (my own code) I have to have permission for the directory images 0777. but having permission for a directory 0777 is REALLY bad idea, isn't it? I'm owner of the directory (lamp:lamp images). what to do to set my code has permission to upload an image into the images directory and have permissions on the directory 0755? I googled for file uploader scripts and classes to se how they handle it but I can't see that part. just file/size/type validation and moving uploaded file to final destination. thanks. -LL Right. I did it for very first time. Now, I changed the hosting and directory is already full with images. What now? Create by php new one and then move by php images to new folder?
Re: [PHP] Not a regular file?
On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion tmil...@springfi.gannett.com wrote: I've never encountered this error: Warning: ftp_put() [function.ftp-put]: /httpdocs/Announcements/photos/obitsTest/: Not a regular file in /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 There was a problem while uploading 659428.jpg 658626 Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Not a regular file?
Wrap some debug code in the loop: echo I want to upload $file. Is it a file? . is_file($file) . br/; See what that says. -Original Message- From: haliphax [mailto:halip...@gmail.com] Sent: Thursday, June 04, 2009 10:23 AM To: php-general@lists.php.net Subject: Re: [PHP] Not a regular file? On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion tmil...@springfi.gannett.com wrote: I've never encountered this error: Warning: ftp_put() [function.ftp-put]: /httpdocs/Announcements/photos/obitsTest/: Not a regular file in /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 There was a problem while uploading 659428.jpg 658626 Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- 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] Not a regular file?
Here is my code for the ftp_put $conn_id = ftp_connect($ftp_server);$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);$FilePath = http://localhost:/HarrisAutomate/output/WebImagesHiRes/$ImageName;; $remote_path = /httpdocs/Announcements/photos/obitsTest/; set_time_limit(120);ftp_pasv($conn_id, true);// upload a file if (ftp_put($conn_id, $remote_path, $FilePath, FTP_BINARY)) { echo successfully uploaded $ImageName\n;} else { echo There was a problem while uploading $ImageName\n;} // close the connection ftp_close($conn_id); Since it is passing a full path I don't know how it can be only going to the directory? On 6/4/09 9:22 AM, haliphax halip...@gmail.com wrote: On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion tmil...@springfi.gannett.com wrote: I've never encountered this error: Warning: ftp_put() [function.ftp-put]: /httpdocs/Announcements/photos/obitsTest/: Not a regular file in /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 There was a problem while uploading 659428.jpg 658626 Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- 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] Not a regular file?
Likewise, do some debug output. echo I'm going to upload $FilePath to $remote_path.; Make sure it looks sane, maybe your variables aren't what you think they are... You can also use is_file() on http:// locations, AFAIK. -Original Message- From: Miller, Terion [mailto:tmil...@springfi.gannett.com] Sent: Thursday, June 04, 2009 10:32 AM To: haliphax; PHP-General List Subject: Re: [PHP] Not a regular file? Here is my code for the ftp_put $conn_id = ftp_connect($ftp_server);$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);$FilePath = http://localhost:/HarrisAutomate/output/WebImagesHiRes/$ImageName;; $remote_path = /httpdocs/Announcements/photos/obitsTest/; set_time_limit(120);ftp_pasv($conn_id, true);// upload a fileif (ftp_put($conn_id, $remote_path, $FilePath, FTP_BINARY)) {echo successfully uploaded $ImageName\n;} else { echo There was a problem while uploading $ImageName\n;} // close the connection ftp_close($conn_id); Since it is passing a full path I don't know how it can be only going to the directory? On 6/4/09 9:22 AM, haliphax halip...@gmail.com wrote: On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion tmil...@springfi.gannett.com wrote: I've never encountered this error: Warning: ftp_put() [function.ftp-put]: /httpdocs/Announcements/photos/obitsTest/: Not a regular file in /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 There was a problem while uploading 659428.jpg 658626 Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- 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 General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to manage permissions for file uploader
But, if I move the directory a level up, not accessable from outside - how can read the image since it's not accessable fro outside? I can't inlcude() the image? You need to do something simmaler to reading files stored in a database, which is described here: http://www.php-mysql-tutorial.com/wikis/mysql-tutorials/uploading-files-to-mysql-database.aspx bit instead of reading the data from the DB, read if from the file using fopen() and fread(). you may need to read the file in chunks to prevent running out of RAM, depending on how big the spasific file is. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not a regular file?
I´m not sure, nut I think you cant put a file into a ftp server using http, you must use the $_SERVER[DOCUMENT_ROOT] to get the file you want to put. -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br Miller, Terion tmil...@springfi.gannett.com escreveu na mensagem news:c64d4509.2be0%kmille...@springfi.gannett.com... Here is my code for the ftp_put $conn_id = ftp_connect($ftp_server);$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);$FilePath = http://localhost:/HarrisAutomate/output/WebImagesHiRes/$ImageName;; $remote_path = /httpdocs/Announcements/photos/obitsTest/; set_time_limit(120);ftp_pasv($conn_id, true);// upload a fileif (ftp_put($conn_id, $remote_path, $FilePath, FTP_BINARY)) {echo successfully uploaded $ImageName\n;} else { echo There was a problem while uploading n;} // close the connection ftp_close($conn_id); Since it is passing a full path I don't know how it can be only going to the directory? On 6/4/09 9:22 AM, haliphax halip...@gmail.com wrote: On Thu, Jun 4, 2009 at 9:07 AM, Miller, Terion tmil...@springfi.gannett.com wrote: I've never encountered this error: Warning: ftp_put() [function.ftp-put]: /httpdocs/Announcements/photos/obitsTest/: Not a regular file in /Applications/MAMP/htdocs/HarrisAutomate/ObitsTester.php on line 149 There was a problem while uploading 659428.jpg 658626 Can't find much info on how to correct it, anyone seen this? http://www.lmgtfy.com/?q=php+%22not+a+regular+file%22 Apparently, it's not actually a file in the first place. Just a guess--but most all incidents of ftp_put throwing this error that I've found in web searches point to someone using it on a directory/etc. -- // Todd -- 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] Re: forms problem
Al wrote: I also use the HTML Validator extension. Leave it active and as you develop and test your resultant html code, it'll check your pages on the fly. When you see the red circle, with a cross, click the circle and get an error report in detail. Hey wow - that's nifty. I've got some pages that require login to access, so validate by URL doesn't work, I have to cut and paste the source. That extension makes validating those pages a lot easier :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Not a regular file? (RESOLVED)
Issue is resolved, all I needed to do was put $ImageName on the remote path too duhlol $remote_path = /httpdocs/Announcements/photos/obitsTest/$ImageName; On 6/4/09 9:35 AM, kyle.smith kyle.sm...@inforonics.com wrote: echo I'm going to upload $FilePath to $remote_path.; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: forms problem
Michael A. Peters wrote: Al wrote: I also use the HTML Validator extension. Leave it active and as you develop and test your resultant html code, it'll check your pages on the fly. When you see the red circle, with a cross, click the circle and get an error report in detail. Hey wow - that's nifty. I've got some pages that require login to access, so validate by URL doesn't work, I have to cut and paste the source. That extension makes validating those pages a lot easier :) Also W3C validate. I've found both miss things the other one finds. E.g., FF HTML validate catches irregular fieldset tags that the W3C validator doesn't. HTML validate reports warnings for arbitrary, but legit, CSS selectors e.g., div status=good. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: forms problem
Al wrote: Michael A. Peters wrote: Al wrote: I also use the HTML Validator extension. Leave it active and as you develop and test your resultant html code, it'll check your pages on the fly. When you see the red circle, with a cross, click the circle and get an error report in detail. Hey wow - that's nifty. I've got some pages that require login to access, so validate by URL doesn't work, I have to cut and paste the source. That extension makes validating those pages a lot easier :) Also W3C validate. I've found both miss things the other one finds. E.g., FF HTML validate catches irregular fieldset tags that the W3C validator doesn't. HTML validate reports warnings for arbitrary, but legit, CSS selectors e.g., div status=good. I'm using the SGML parser since my site sends xhtml to firefox - it looks like the SGML parser is same code base as W3C. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
On Tue, May 26, 2009 at 4:36 PM, Michael A. Peters mpet...@mac.com wrote: kranthi wrote: seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion Thanks! I found that for xhtml I had to use following DOCTYPE to get it to validate: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; [ !ATTLIST form autocomplete CDATA #IMPLIED ] From what I gather though did not try, sent with improper text/html mime type, browsers add a bogus ] to top of output, declaring an ATTLIST should only be done if sent as application/xhtml+xml I still have to check and see how opera reacts to that (IE gets html version of my pages so it won't get that anyway, I can't test safari) html won't validate with that attribute, but that's OK I guess. Maybe it will in html 5 (I don't know) but that's not even stable yet. I'd prefer it to be at the input level rather than form level, the problem (and I think it is a firefox bug) is that it assumes an input before a password the same form as a password is a login name. I *might* actually be able to just move the password field above the e-mail change and fix it. But the autocomplete='off' is very useful to me for another form where users add GPS coordinates, which are from within shasta county and thus all very close, unless the records are for identical coordinates they'll never be the same and if they are identical, using the autocomplete feature risks a mistake of selecting the wrong one thus resulting in bogus data. I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML The discussion is primarily centered around banks using it to prevent browsers from remembering your login credentials for their web sites, and the idea that the user should ultimately remain in control of the browser and that a website should not be able to assert control against the user's wishes (in this case by preventing the user from using the form manager or password manager to store the information). Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Andrew Ballard wrote: On Tue, May 26, 2009 at 4:36 PM, Michael A. Peters mpet...@mac.com wrote: kranthi wrote: seems more of a firefox question than a PHP question... just replace form id=formemail method=post action=UserPrefs with form id=formemail method=post action=UserPrefs autocomplete=off https://developer.mozilla.org/en/How_to_Turn_Off_form_Autocompletion Thanks! I found that for xhtml I had to use following DOCTYPE to get it to validate: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd; [ !ATTLIST form autocomplete CDATA #IMPLIED ] From what I gather though did not try, sent with improper text/html mime type, browsers add a bogus ] to top of output, declaring an ATTLIST should only be done if sent as application/xhtml+xml I still have to check and see how opera reacts to that (IE gets html version of my pages so it won't get that anyway, I can't test safari) html won't validate with that attribute, but that's OK I guess. Maybe it will in html 5 (I don't know) but that's not even stable yet. I'd prefer it to be at the input level rather than form level, the problem (and I think it is a firefox bug) is that it assumes an input before a password the same form as a password is a login name. I *might* actually be able to just move the password field above the e-mail change and fix it. But the autocomplete='off' is very useful to me for another form where users add GPS coordinates, which are from within shasta county and thus all very close, unless the records are for identical coordinates they'll never be the same and if they are identical, using the autocomplete feature risks a mistake of selecting the wrong one thus resulting in bogus data. I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML The discussion is primarily centered around banks using it to prevent browsers from remembering your login credentials for their web sites, and the idea that the user should ultimately remain in control of the browser and that a website should not be able to assert control against the user's wishes (in this case by preventing the user from using the form manager or password manager to store the information). Andrew I have no problem with browsers giving users an option to disable it. I have no problem with browsers ignoring anything that is not defined in the DTD - though technically the way I did it, that attribute is defined in the DTD. All a bank needs to do is provide a custom DTD and they can have it. Browsers that refuse to autocomplete don't get certified and thus won't work with the bank, many bank web sites are very picky about what a browser must to before they'll certify it and allow it at their bank. Several years ago I was stuck needing to install binary Netscape 7 in Linux - same code base as Mozilla 1 - because Mozilla 1 wasn't certified at my bank, Netscape 7 was. Yes, you can fake browser strings and get around it, but only a few people will. Microsoft won't yank autocomplete=off out of their browser, and FireFox won't want IE to to be the only browser that works with banks. Users who really don't want it could probably use a firefox extension that ignores the attribute if they really want autocomplete in their bank forms. In my case I want it turned off because FireFox does the wrong thing. It should look at the input name attribute before auto-completing, but it doesn't - it assumes a password field means the field before it is a login field. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] URL injection
Hi Can anyone help me handel this URL injection ? https://www.xxx.co.uk/register.php;| grep 123 I want to detect it and header back to my index page. It's quite urgent Thanks for help M.
Re: [PHP] html and password management
Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
On Thu, Jun 4, 2009 at 12:33 PM, Michael A. Peters mpet...@mac.com wrote: Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. I wasn't really taking a position on the issue. I just thought it worth noting that there seems to be a contingent that wants to remove the attribute. From what I read, they have already conceded to language that says a user-agent may choose to implement it, but is not required to do so. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] formatting - design question
This may not be strictly php but I think is may be relevant. Were I to use a different css file for every page (that is slightly different), would that affect performance? It seems to me that might be a way of simplifying and certainly speeding up development (design-wise, anyway) when using css. A different css file for different pages would certainly make it a breeze to design a page; otherwise it is hell to try to put all formatting in one file - it even tends to get fairly bloated and difficult to follow your own shadow. -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] html and password management
From: Andrew Ballard On Thu, Jun 4, 2009 at 12:33 PM, Michael A. Peters mpet...@mac.com wrote: Andrew Ballard wrote: I just thought I'd toss this out there. Do you know that there is an effort to remove browser support this attribute (or at least give the user a browser configuration option to ignore it)? http://article.gmane.org/gmane.org.w3c.whatwg.discuss/3054 This article discusses some of the issues involved. https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_us ing_XHTML That page says: When writing HTML, such authors should declare and validate against a custom doctype including the autocomplete attribute (example HTML document). However, there is currently no way to trigger the same user agent functionality with an attribute in XHTML. This constitutes an unnecessary obstacle to the adoption of XML-based markup. That page is wrong. It took me 10 minutes in google to find a way to do it in xhtml and have the xhtml validate. And I didn't have to use a custom DTD. Only thing I had to do is send the application/xhtml+xml header - which I already send, as that's the proper way to serve xhtml 1.1. I wasn't really taking a position on the issue. I just thought it worth noting that there seems to be a contingent that wants to remove the attribute. From what I read, they have already conceded to language that says a user-agent may choose to implement it, but is not required to do so. There is nothing to remove. It is a proprietary extension and not likely to ever be accepted as part of the W3C standards. As such, it won't be in any W3C DTD, but will always require a custom DTD be supplied locally. Each browser supplier must decide whether to support it or leave it out. From my viewpoint, the bigger need is to educate administrators of publicly available computers to disable autocomplete in the browser configuration. If they would do that, when you go to the workstation in the library, you can't see the credentials of the last user, and the next user won't be able to retrieve yours. Bob McConnell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL injection
2009/6/4 Morris morris...@gmail.com: Hi Can anyone help me handel this URL injection ? https://www.xxx.co.uk/register.php;| grep 123 I want to detect it and header back to my index page. It's quite urgent What the smeg is register.php doing that makes it execute that?? Show us the code. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
On Thu, Jun 4, 2009 at 12:54 PM, PJ af.gour...@videotron.ca wrote: This may not be strictly php but I think is may be relevant. Were I to use a different css file for every page (that is slightly different), would that affect performance? It seems to me that might be a way of simplifying and certainly speeding up development (design-wise, anyway) when using css. A different css file for different pages would certainly make it a breeze to design a page; otherwise it is hell to try to put all formatting in one file - it even tends to get fairly bloated and difficult to follow your own shadow. -- Hervé Kempf: Pour sauver la plančte, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php It might be simpler during development, but YSlow! recommends putting them in as few pages as is practical so the browser has fewer resources to fetch and can make better use of caching. It won't affect the speed of your PHP pages, but it should speed up the overall download time of your pages from the end-user's perspective. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] html and password management
Bob McConnell wrote: From my viewpoint, the bigger need is to educate administrators of publicly available computers to disable autocomplete in the browser configuration. If they would do that, when you go to the workstation in the library, you can't see the credentials of the last user, and the next user won't be able to retrieve yours. It's not just public workstations. It's your baby sitter's boyfriend who comes over after she has put your little ones to bed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
Andrew Ballard wrote: On Thu, Jun 4, 2009 at 12:54 PM, PJ af.gour...@videotron.ca wrote: This may not be strictly php but I think is may be relevant. Were I to use a different css file for every page (that is slightly different), would that affect performance? It seems to me that might be a way of simplifying and certainly speeding up development (design-wise, anyway) when using css. A different css file for different pages would certainly make it a breeze to design a page; otherwise it is hell to try to put all formatting in one file - it even tends to get fairly bloated and difficult to follow your own shadow. -- Hervé Kempf: Pour sauver la plančte, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php It might be simpler during development, but YSlow! recommends putting them in as few pages as is practical so the browser has fewer resources to fetch and can make better use of caching. It won't affect the speed of your PHP pages, but it should speed up the overall download time of your pages from the end-user's perspective. Andrew I would have one main file that holds common styles and then if you need one, a page specific style sheet. You can even add all styles to the first and then override them in the second. This is how they were intended to be used. Also, most times the style sheets will be cached by the browser so only the first page load should matter. /* style sheet 1 */ .someclass { color: red; } /* style sheet 2 */ .someclass { color: blue } someclass will be blue. /* style sheet 1 */ .someclass { color: red; } /* style sheet 2 */ .someclass { color: blue; background-color: yellow; } /* style sheet 1 */ .someclass { color: red; } /* style sheet 3 */ .someclass { color: blue; background-color: white; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
From my experience I tend to use a difference ID for the body tag, for instance body id='homepage' and then format it in my CSS using ID reference: #homepage .classname { color: blue; } This way you can use a default format for all the pages and create minor (or major) changes in the theme in no time :) I would also suggest to attach the CSS filename reference at the head tag the update time of the file, so that the browser will automatically update the cache of the CSS whenever you decide to edit it. Just my 2 cents ;) -- Nitsan On Thu, Jun 4, 2009 at 7:20 PM, Shawn McKenzie nos...@mckenzies.net wrote: Andrew Ballard wrote: On Thu, Jun 4, 2009 at 12:54 PM, PJ af.gour...@videotron.ca wrote: This may not be strictly php but I think is may be relevant. Were I to use a different css file for every page (that is slightly different), would that affect performance? It seems to me that might be a way of simplifying and certainly speeding up development (design-wise, anyway) when using css. A different css file for different pages would certainly make it a breeze to design a page; otherwise it is hell to try to put all formatting in one file - it even tends to get fairly bloated and difficult to follow your own shadow. -- Hervé Kempf: Pour sauver la plančte, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php It might be simpler during development, but YSlow! recommends putting them in as few pages as is practical so the browser has fewer resources to fetch and can make better use of caching. It won't affect the speed of your PHP pages, but it should speed up the overall download time of your pages from the end-user's perspective. Andrew I would have one main file that holds common styles and then if you need one, a page specific style sheet. You can even add all styles to the first and then override them in the second. This is how they were intended to be used. Also, most times the style sheets will be cached by the browser so only the first page load should matter. /* style sheet 1 */ .someclass { color: red; } /* style sheet 2 */ .someclass { color: blue } someclass will be blue. /* style sheet 1 */ .someclass { color: red; } /* style sheet 2 */ .someclass { color: blue; background-color: yellow; } /* style sheet 1 */ .someclass { color: red; } /* style sheet 3 */ .someclass { color: blue; background-color: white; } -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
Nitsan Bin-Nun wrote: From my experience I tend to use a difference ID for the body tag, for instance body id='homepage' and then format it in my CSS using ID reference: #homepage .classname { color: blue; } This way you can use a default format for all the pages and create minor (or major) changes in the theme in no time :) I would also suggest to attach the CSS filename reference at the head tag the update time of the file, so that the browser will automatically update the cache of the CSS whenever you decide to edit it. Just my 2 cents ;) Oh, I think it's worth a lot more than that. I just installed IE 8 just to have it for verification. It's no better than IE 6. I never use them personally. But how do you produce interesting web pages to look well on both without making stupid compromises. What looks well on Firefox, looks like MSshit on IE. -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zebra Striped Table Example
At 8:10 AM -0700 6/1/09, Raymond Irving wrote: Hello, There are many different ways and techniques that we can use to add alternate colors to table rows. Here's another solution that's very simple and straight forward. For example: $page['table tr:even']-css('background:#eee'); Check out the full example code at http://raxanpdi.com/zebra-striped-table.html Best regards, __ Raymond Irving Raymond: A little late to reply, but your example doesn't work for me. However, this does: http://webbytedd.com/b/color-rows/ Cheers, 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
[PHP] webpage has expired remedies
Hello, Could someone suggest the steps needed to troubleshoot the webpage has expired issue in IE. I have a self-posting php form which queries and writes to a pgsql database. Occasionally, when an input is entered, the form never loads and I get this error instead. I do want to make clear that this has nothing to do with using the back button on the browser, as most instances of this error do. I also cannot reliably reproduce this error on IE. Sometimes it occurs several times on a specific input, but the next minute the same exact input is processed without any issues. It does seem to be associated with especially onerous queries that take the (gis) database a while to process, but sometimes even quick queries cause it. Also, as I mentioned, this only occurs on IE, not on firefox or safari. Feels almost as some kind of a timeout that IE responds to, but I don't know much about these things and would appreciate any guidance. Best regards, --Ed Bukhman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
At 2:08 PM -0400 6/4/09, PJ wrote: Nitsan Bin-Nun wrote: From my experience I tend to use a difference ID for the body tag, for instance body id='homepage' and then format it in my CSS using ID reference: #homepage .classname { color: blue; } This way you can use a default format for all the pages and create minor (or major) changes in the theme in no time :) I would also suggest to attach the CSS filename reference at the head tag the update time of the file, so that the browser will automatically update the cache of the CSS whenever you decide to edit it. Just my 2 cents ;) Oh, I think it's worth a lot more than that. I just installed IE 8 just to have it for verification. It's no better than IE 6. I never use them personally. But how do you produce interesting web pages to look well on both without making stupid compromises. What looks well on Firefox, looks like MSshit on IE. The way you do it is to keep it simple. If you use a different style sheet for every page, then not only does that cause more load times, but it confuses the Hell out of things, in my opinion. Style sheets are meant simplify things so decide on how you want things to look uniformly throughout your site and then stick with it. There's really no good reason to keep changing things throughout a site. Cheers, 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] URL injection
Hi The register.php has only a form ?php form name=registerUser action=register.php method=post input type=text name=username size=10 / input type=submit value=send / /form ? Does this help ? Thanks for reply 2009/6/4 Stuart stut...@gmail.com 2009/6/4 Morris morris...@gmail.com: Hi Can anyone help me handel this URL injection ? https://www.xxx.co.uk/register.php;| grep 123 I want to detect it and header back to my index page. It's quite urgent What the smeg is register.php doing that makes it execute that?? Show us the code. -Stuart -- http://stut.net/
Re: [PHP] URL injection
2009/6/4 Morris morris...@gmail.com: Hi The register.php has only a form ?php form name=registerUser action=register.php method=post input type=text name=username size=10 / input type=submit value=send / /form ? Does this help ? 1) That is not valid PHP code. 2) Even if it were there's nothing in there that would be exploitable through the URL you sent in your first email. -Stuart -- http://stut.net/ 2009/6/4 Stuart stut...@gmail.com 2009/6/4 Morris morris...@gmail.com: Hi Can anyone help me handel this URL injection ? https://www.xxx.co.uk/register.php;| grep 123 I want to detect it and header back to my index page. It's quite urgent What the smeg is register.php doing that makes it execute that?? Show us the code. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] URL injection
Is there more to the register.php file that we're not seeing? It has to have some sort of action... On Thu, Jun 4, 2009 at 3:28 PM, Stuart stut...@gmail.com wrote: 2009/6/4 Morris morris...@gmail.com: Hi The register.php has only a form ?php form name=registerUser action=register.php method=post input type=text name=username size=10 / input type=submit value=send / /form ? Does this help ? 1) That is not valid PHP code. 2) Even if it were there's nothing in there that would be exploitable through the URL you sent in your first email. -Stuart -- http://stut.net/ 2009/6/4 Stuart stut...@gmail.com 2009/6/4 Morris morris...@gmail.com: Hi Can anyone help me handel this URL injection ? https://www.xxx.co.uk/register.php;| grep 123 I want to detect it and header back to my index page. It's quite urgent What the smeg is register.php doing that makes it execute that?? Show us the code. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Graphing Libraries...?
Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
At 3:58 PM -0400 6/4/09, PJ wrote: tedd wrote: Style sheets are meant simplify things so decide on how you want things to look uniformly throughout your site and then stick with it. There's really no good reason to keep changing things throughout a site. Cheers, tedd Maybe I'm just too complicated. ;-) I do try to keep it simple. But then, little things creep in, like a login box on the index page which mucks up all the other pages. Then there is a recipe page which is totally different, yet to keep is stylistically continuous it uses a similar layout to the other pages but different. The same for the main recipe page, and the same for the portraits of producers - all the pages are different yet remain within a cohesive style. CSS gets super bloated and almost unamageable. Most sites are very repetitive; mine tend to be provocative or semthing like that. I really don't see an ooption. Although, Nitsan's body tags sound promising. I'll have to try that; maybe the solution is to do a series of definitions unique just fo certain pages. :-) That's simply an example of not thinking things out before you write the code. First you figure out a layout, then you populate it. You don't pick a layout, populate it and then change the layout. That leads to a lackluster and lack of thought site. Cheers, 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] PHP Graphing Libraries...?
li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? JpGraph? Gary -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] https setup
Can't find anything on G or web - but I probably didn't try hard enough. I am unable to set my virtual hosts to handle https. I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf files are set up correctly but directing a sensitive user information page to an HTTPS page returns an error of not found. The virtual hosts works fine, except for HTTPS. This is on my intranet for local developing. TIA -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Listening on host:port - Windows
I'm running my test server on Windows XP SP3 and have been successfully running PHP 5 for some time using: php-cgi.exe -b 127.0.0.1:1 My live server is running on PHP 4.4 and that gives an incompatibility risk in problem solving. So I've removed PHP 5 on my test server and have installed PHP 4.4.9 but I can't find how I set host and port in php. Running php -v has confirmed that this is the cgi-fcgi version. I'm sure it's simple but I'm being driven nuts. TIA, John
Re: [PHP] PHP Graphing Libraries...?
On Jun 4, 2009, at 4:35 PM, Gary Smith wrote: JpGraph? Gary Thanks Gary. I've actually been looking at both JpGraph (http://www.aditus.nu/jpgraph/ ) and XML/SWF Charts (http://www.maani.us/xml_charts/index.php). However, JpGraphs is one of those that suffers from horrendous documentation, and neither seems to allow X-independent graphing for multiple entities on the same graph. For instance, I can't give one entity its own array of x,y coordinates and provide another entity with an entirely different set of x,y coordinates. I must create a new graph for each and every entity. My current task is an electrical one. I'm writing an app to plot KWH values at specific increments. However, the increments are unique to each particular event. I can't make my X-axis uniform because not every event records data at every second. And I, of course, can't haphazardly insert 0 values to accommodate spacing as that falsifies the data. So I need to be able to plot (KWH, TIME) for multiple entities on the same graph. However, as I said, neither of those packages seem to accommodate this in a straightforward manner. Thoughts? Thanks, Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Graphing Libraries...?
li...@mgreg.com wrote in message news:4fcc2030-9483-49d9-962c-1849a0987...@mgreg.com... | Hi All, | | I'm currently looking for a quality (preferably open source) PHP | graphing library that will allow me to create various graphs and plot | points. I've seen several that do some amazing things, but cost a | fortune -- others are either limited, lack documentation, or don't | allow plotting of points for multiple entities within the same graph. | | Can anyone make any quality suggestions? | | Best, | Michael http://www.celeste.cn/PHP-GNUPlot/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webpage has expired remedies
On Thu, Jun 4, 2009 at 2:14 PM, Ed Bukhman eb...@yahoo.com wrote: Hello, Could someone suggest the steps needed to troubleshoot the webpage has expired issue in IE. I have a self-posting php form which queries and writes to a pgsql database. Occasionally, when an input is entered, the form never loads and I get this error instead. I do want to make clear that this has nothing to do with using the back button on the browser, as most instances of this error do. I also cannot reliably reproduce this error on IE. Sometimes it occurs several times on a specific input, but the next minute the same exact input is processed without any issues. It does seem to be associated with especially onerous queries that take the (gis) database a while to process, but sometimes even quick queries cause it. Also, as I mentioned, this only occurs on IE, not on firefox or safari. Feels almost as some kind of a timeout that IE responds to, but I don't know much about these things and would appreciate any guidance. Best regards, --Ed Bukhman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php post redirect get, PRG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] webpage has expired remedies
Thank you, but this would involve the target (get) page having a bunch of stuff in the URL, no? I would like to avoid this if possible, not least because it would allow people to go directly to the get page the next time, and this would be problematic for my application. Is there a different way (that avoids the GET method)? --Ed Bukhman Eric Butera eric.but...@gmail.com wrote in message news:6a8639eb0906041557n71e8b671ycafc72fd9c9ba...@mail.gmail.com... On Thu, Jun 4, 2009 at 2:14 PM, Ed Bukhman eb...@yahoo.com wrote: Hello, Could someone suggest the steps needed to troubleshoot the webpage has expired issue in IE. I have a self-posting php form which queries and writes to a pgsql database. Occasionally, when an input is entered, the form never loads and I get this error instead. I do want to make clear that this has nothing to do with using the back button on the browser, as most instances of this error do. I also cannot reliably reproduce this error on IE. Sometimes it occurs several times on a specific input, but the next minute the same exact input is processed without any issues. It does seem to be associated with especially onerous queries that take the (gis) database a while to process, but sometimes even quick queries cause it. Also, as I mentioned, this only occurs on IE, not on firefox or safari. Feels almost as some kind of a timeout that IE responds to, but I don't know much about these things and would appreciate any guidance. Best regards, --Ed Bukhman -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php post redirect get, PRG -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Zebra Striped Table Example
I've just tested it in FireFox 2.0.0.20 and IE6 and it works just fine. I can toggle the stipes by clicking on the Toggle Stripes hyperlink. See the attached snapshots PS. I think I'll just update the example to show the zebra stripes by default as that might be the reason why it appears to not be working at all. Best regards, __ Raymond Irving --- On Thu, 6/4/09, Ashley Sheridan a...@ashleysheridan.co.uk wrote: From: Ashley Sheridan a...@ashleysheridan.co.uk Subject: Re: [PHP] Zebra Striped Table Example To: Raymond Irving xwis...@yahoo.com Cc: 'PHP-General List' php-general@lists.php.net Date: Thursday, June 4, 2009, 3:06 AM On Wed, 2009-06-03 at 21:58 -0700, I tested in Firefox 2, just showed a plain vanilla table, with no row colours at all. My guess is, it won't work with IE6 either. These are the two browsers most common at the moment (as far as my stats go) Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
On Thu, Jun 04, 2009 at 01:50:28PM -0700, Michael A. Peters wrote: li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael gnuplot may be what you want - but it doesn't have php bindings as far as I know, so you'll have to call it via a system call. I use Gnuplot every week to graph the statistics of my business. It's extremely flexible, and will output not only to graphics formats, but to PDF format, if I'm not mistaken. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
Paul M Foster wrote: On Thu, Jun 04, 2009 at 01:50:28PM -0700, Michael A. Peters wrote: li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael gnuplot may be what you want - but it doesn't have php bindings as far as I know, so you'll have to call it via a system call. I use Gnuplot every week to graph the statistics of my business. It's extremely flexible, and will output not only to graphics formats, but to PDF format, if I'm not mistaken. I know for a fact it outputs to postscript, as I've used that with TeX before, so it probably does pdf as well (and if not - pdf is just a ps2pdf away). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php