php-general Digest 30 Nov 2005 14:19:38 -0000 Issue 3824

2005-11-30 Thread php-general-digest-help
php-general Digest 30 Nov 2005 14:19:38 - Issue 3824 Topics (messages 226612 through 226638): checkboxes 226612 by: blackwater dev 226618 by: Matt Monaco 226624 by: Curt Zirzow url vs dirname(__FILE__) 226613 by: Chris 226616 by: Chris Shiflett help

[PHP] GD2 Question

2005-11-30 Thread Karuna
Hi. Is possible to calculate the filesize of image that will result from using imagejpeg without actually writing to disk? Thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] GD2 Question

2005-11-30 Thread Jochem Maas
Karuna wrote: Hi. Is possible to calculate the filesize of image that will result from using imagejpeg without actually writing to disk? Thanks :) something like (although its not very efficient, I think): ob_start(); image_jpeg($im); // $im is an GD resource $data = ob_get_contents();

[PHP] Re: help avoid multiple login

2005-11-30 Thread Mark Rees
the normal way of doing session 'closing' is by way of 'garbage collection' - every now and then a script/process/function is run that 'closes' any sessions which are (according to your criteria) inactive. php has stuff built it that will do this for you to a degree. - Is there a way I

Re: [PHP] Re: help avoid multiple login

2005-11-30 Thread Jochem Maas
Mark Rees wrote: the normal way of doing session 'closing' is by way of 'garbage collection' - every now and then a script/process/function is run that 'closes' any sessions which are (according to your criteria) inactive. php has stuff built it that will do this for you to a degree. -

[PHP] imap_mail_move

2005-11-30 Thread Georgi Ivanov
Hi , I'm trying to move some mail from one dir to another: $mbox=imap_open(...); imap_mail_move($mbox,2,INBOX,Sent) or die (imap_last_error()); I get this error : error in imap command received by server . I'm not sure what this error means. Any suggestions? Thanks in advance. -- PHP General

Re: [PHP] MVC platform choice.

2005-11-30 Thread Fabiano Ricci
Have a look at http://znf.zeronotice.com/ this framework is young but very good and easy to use. It's written in PHP5 and supports also PDO. On Wednesday 30 November 2005 12:04, Gregory Machin wrote: Hi.. Any body recomend a good MVC platform that is easy to work with, and build on... I'm

Re: [PHP] Howto search in SQL for a specific character?

2005-11-30 Thread Jesús Fernández
$sql = SELECT nameOfPedigree FROM tbpedigrees WHERE nameOfPedigree like '\'%' ; Maybe this could work... -- El único error real es aquel en el que no hemos aprendido nada.

Re: [PHP] Howto search in SQL for a specific character?

2005-11-30 Thread Ciprian Constantinescu
The ' character has to be escaped. Try using \' Gustav Wiberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I'm sorry but this didn't work either? If I replaced the ' with for example an a it worked /G - Original Message - From: Stephen Johnson [EMAIL PROTECTED]

[PHP] Re: How do i display a neat table of returned mysql data?

2005-11-30 Thread Ciprian Constantinescu
First of all this is not automatic. You can do this with a foreach loop. If you want nice presentations, you might as well try http://smarty.php.net Dave Carrera [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi List, I have some mysql table data that i would like to display back

Re: [PHP] GD2 Question

2005-11-30 Thread Ciprian Constantinescu
Not efficient, because the actual size on the disk depends on the filesystem. I don't think you can find out before writing it to the disk Jochem Maas [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Karuna wrote: Hi. Is possible to calculate the filesize of image that will result

Re: [PHP] GD2 Question

2005-11-30 Thread Jochem Maas
Ciprian Constantinescu wrote: Not efficient, because the actual size on the disk depends on the filesystem. I don't think you can find out before writing it to the disk excuse me but: 1. the OP asked for the size of the file, not the number of bytes it takes up on disk (which are eaten up in

RE: [PHP] Howto search in SQL for a specific character?

2005-11-30 Thread Albert
Gustav Wiberg wrote: $v1 = chr(39); //39 is apostrofe $sql = SELECT nameOfPedigree FROM tbpedigrees WHERE SUBSTR(nameOfPedigree,0,1) = $v1; Why doesn't this work? I want the sql to select all nameOfPedigree - fields where the first character is apostrofe (') Here is what I

[PHP] FW: Merging two images (GD PNG)

2005-11-30 Thread Albert
I have two images which I want to overlay on each other. Image1 is a satellite image. Image2 is contains the statistical data we collected. It has a transparent background and should be overlaid on top of the satellite image. Both are in PNG format. My current code: ? $dataImage =

Re: [PHP] FW: Merging two images (GD PNG)

2005-11-30 Thread Jochem Maas
imagecreatetruecolor() is probably what your after: http://php.net/imagecreatetruecolor Albert wrote: I have two images which I want to overlay on each other. Image1 is a satellite image. Image2 is contains the statistical data we collected. It has a transparent background and should be

Re: [PHP] MVC platform choice.

2005-11-30 Thread Greg Donald
On Wed, 30 Nov 2005, Gregory Machin wrote: Hi.. Any body recomend a good MVC platform that is easy to work with, and build on... I'm looking at cakephp, solar, php on trax.. Anything better out there. Rubyonrails: http://www.rubyonrails.com/ It's certainly better than any PHP MVC framework

Re: [PHP] checkboxes

2005-11-30 Thread Brent Baisley
Excellent response. You should always be expecting certain data. So if no checkboxes are checked, your code should realize that since it was expecting the data and none was submitted. The lazy way is much easier to code, but it is actually fairly efficient. You are only hitting the database

[PHP] PHP on Mobile Devices(Pocket PC specifically)

2005-11-30 Thread Kilbride, James
Does anybody know of a way to run PHP files on a windows mobile device(Pocket PC 2003)? Optimally I'd like to run it under a web server running on the mobile device itself but barring that I'll take some form of command line I guess. Realize that the mobile device will NOT be running any active

RE: [PHP] FW: Merging two images (GD PNG)

2005-11-30 Thread Albert
Jochem Maas wrote: imagecreatetruecolor() is probably what your after: http://php.net/imagecreatetruecolor Albert wrote: Notes: 1. When using imagecreatetruecolor the images turn black I did try imagecreatetruecolor() but then the images turn black. Albert -- PHP General Mailing List

[PHP] XSS via curl

2005-11-30 Thread Sandy Keathley
My company uses a home-grown formmail script for clients groan, and someone is using curl to inject HTTP headers and spam email addresses, and turn it into an open relay. Yes, I know the right answer is to not use a formmail, but I don't make the rules here. Is there a way to detect that a

Re: [PHP] PHP on Mobile Devices(Pocket PC specifically)

2005-11-30 Thread Jason Wong
On Wednesday 30 November 2005 22:48, Kilbride, James wrote: Does anybody know of a way to run PHP files on a windows mobile device(Pocket PC 2003)? Optimally I'd like to run it under a web server running on the mobile device itself but barring that I'll take some form of command line I guess.

Re: [PHP] XSS via curl

2005-11-30 Thread Jochem Maas
Sandy Keathley wrote: My company uses a home-grown formmail script for clients groan, and someone is using curl to inject HTTP headers and spam email addresses, and turn it into an open relay. Yes, I know 1. cut out the ability for the poster (form submitter) to determine who is addressed.

Re: [PHP] XSS via curl

2005-11-30 Thread Chris Shiflett
Sandy Keathley wrote: My company uses a home-grown formmail script for clients groan, and someone is using curl to inject HTTP headers and spam email addresses, and turn it into an open relay. Yes, I know the right answer is to not use a formmail, but I don't make the rules here. Is there a way

[PHP] Lowest PHP version to work with MySQL 4.1.x

2005-11-30 Thread AmirBehzad Eslami
Hi List, I have noted that some versions of PHP are unable to work with MySQL 4.1.x. 1) Should I upgrade to PHP 5? 2) What is the lowest PHP version which works fine with MySQL 4.1.x? Regards, Behzad P.S. I don't use Improved MySQL extension in PHP. I just need MySQL 4.1.x for multi-byte

RE: [PHP] PHP on Mobile Devices(Pocket PC specifically)

2005-11-30 Thread Kilbride, James
The problem with this suggestion, unless people know of a good solution, is that I need a ruggedized mobile system with built in 2d bar code scanner that will treat the bar code data as keyboard entry so the user, in the web browser, basically has the curser in the right form field, scans the bar

Re: [PHP] FW: Merging two images (GD PNG)

2005-11-30 Thread Jochem Maas
Albert wrote: Jochem Maas wrote: imagecreatetruecolor() is probably what your after: http://php.net/imagecreatetruecolor Albert wrote: Notes: 1. When using imagecreatetruecolor the images turn black I did try imagecreatetruecolor() but then the images turn black. shit missed that

Re: [PHP] FW: Merging two images (GD PNG)

2005-11-30 Thread Jochem Maas
Albert wrote: Jochem Maas wrote: imagecreatetruecolor() is probably what your after: http://php.net/imagecreatetruecolor Albert wrote: Notes: 1. When using imagecreatetruecolor the images turn black I did try imagecreatetruecolor() but then the images turn black. the output image

Re: [PHP] XSS via curl

2005-11-30 Thread Silvio Porcellana [tradeOver]
Sandy Keathley wrote: Is there a way to detect that a script is being accessed by curl, and not by a browser? ENV ($_SERVER) variables won't work, as those can be forged. Use a CAPTCHA test: http://en.wikipedia.org/wiki/Captcha HTH, cheers! Silvio -- tradeOver |

Re: [PHP] Schroedinger's Bug - may require exorcism...

2005-11-30 Thread tg-php
What to do next? I'd check to see if your page is being inadvertantly called twice (I've seen this happen when people used frames.. or like someone else mentioned, doing a double include() or sometimes redirecting back to itself via header())... anything that could possibly re-initiate the

Re: [PHP] php related segmentation fault with Apache 2.0.55

2005-11-30 Thread kristina clair
Hi again, I tried compiling and installing php 4.4.1 with Apache 2.0.54, out of curiosity (because php 4.3.10 and Apache 2.0.54 didn't give me any problems). With this combination, I still get a segmentation fault with at least one php script. The gdb backtrace is: #0 0xb7e207c1 in php_handler

Re: [PHP] Schroedinger's Bug - may require exorcism...

2005-11-30 Thread Robert Cummings
On Wed, 2005-11-30 at 11:48, [EMAIL PROTECTED] wrote: What to do next? I'd check to see if your page is being inadvertantly called twice (I've seen this happen when people used frames.. or like someone else mentioned, doing a double include() or sometimes redirecting back to itself via

[PHP] include_once behaves differently in mod_php4 vs php5-cgi

2005-11-30 Thread Toomas Aas
Hello! There's a website with a following structure index.php in the site's DocumentRoot directory (for this thread, let's call it /www) functions.php, init.php and db_connect.php in /www/library index.php includes line: include_once('library/functions.php'); functions.php includes lines:

[PHP] RE: help avoid multiple login

2005-11-30 Thread mail.pmpa
-Mensagem original- De: Jochem Maas [mailto:[EMAIL PROTECTED] the normal way of doing session 'closing' is by way of 'garbage collection' - every now and then a script/process/function is run that 'closes' any sessions which are (according to your criteria) inactive. php has stuff

[PHP] page duration tracking

2005-11-30 Thread MikeL
Is there a way to incorporate some type of time in a page to track the duration of time each individual visitor spent on a specific page with ..PHP? I know I can keep a counter with JavaScript, but I would like it to keep track in my stats file. I can track log the arrival time, but would

[PHP] Re: page duration tracking

2005-11-30 Thread Ben
MikeL said the following on 11/30/2005 11:39 AM: Is there a way to incorporate some type of time in a page to track the duration of time each individual visitor spent on a specific page with ..PHP? I know I can keep a counter with JavaScript, but I would like it to keep track in my stats

Re: [PHP] script won't work on other server

2005-11-30 Thread Peppy
Short tags are on on both servers. - Original Message - From: [EMAIL PROTECTED] To: Peppy [EMAIL PROTECTED] Sent: Wednesday, November 30, 2005 2:23 PM Subject: Re: [PHP] script won't work on other server you're using the short-tag form: ? rather than: ?php this may not

[PHP] Re: Lowest PHP version to work with MySQL 4.1.x

2005-11-30 Thread Oliver Grätz
AmirBehzad Eslami schrieb: I have noted that some versions of PHP are unable to work with MySQL 4.1.x. Would be new to me but... 1) Should I upgrade to PHP 5? Disregarding your question about databases: Yes you should. PHP5 is there since well over a year. The dev team WILL stop support for

[PHP] custom CAD directory/file browser

2005-11-30 Thread Marlin Unruh
I have hundreds of CAD drawing files in binary format. Using the strpos() function I can query embedded ASCII info from the CAD files. I display the queried info along with an anchor element to the CAD file in the web browser using a php script. Thus I can give the drawings arbitrary file

Re: [PHP] Lowest PHP version to work with MySQL 4.1.x

2005-11-30 Thread Brent Baisley
PHP4 works just fine with MySQL 4.1. You may be encountering a problem with the new password scheme in MySQL 4.1 that PHP 4 does not support. In this case, PHP4 is considered and old client. Read this part of the manual to get it working:

Re: [PHP] page duration tracking

2005-11-30 Thread Michael Crute
On 11/30/05, MikeL [EMAIL PROTECTED] wrote: Is there a way to incorporate some type of time in a page to track the duration of time each individual visitor spent on a specific page with ..PHP? I know I can keep a counter with JavaScript, but I would like it to keep track in my stats file. I

Re: [PHP] custom CAD directory/file browser

2005-11-30 Thread Leonard Burton
Greetings, I think what I need is for the php script to call itself and pass the name of the new directory so the new directory can be queried and displayed. Let me see if I got this right. You have Dir x, y, z, w. In each dir you have files 1 through n. What you want to do is loop through

RE: [PHP] custom CAD directory/file browser

2005-11-30 Thread Jay Blanchard
[snip] Can I use an anchor element to pass info back to the self same php script? If so how? I can't seem to find my way though this aspect of the project. [/snip] You can include information in the query string of the URL a href=foo.php?directory=/path/to/may/files/Click Here/a The

Re: [PHP] page duration tracking

2005-11-30 Thread Jesús Fernández
I think you could use cookies for this. When the user loads the page you can write a cookie with the timestamp and the page loaded writen on it. Then when the user request another page, load if the cookie exists and then you can calculate the time spent on a certain page... --

[PHP] shortest possible check: field is set, integer or 0

2005-11-30 Thread Chris Lott
What is the shortest possible check to ensure that a field coming from a form as a text type input is either a positive integer or 0, but that also accepts/converts 1.0 or 5.00 as input? c -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] shortest possible check: field is set, integer or 0

2005-11-30 Thread Richard Lynch
On Wed, November 30, 2005 5:10 pm, Chris Lott wrote: What is the shortest possible check to ensure that a field coming from a form as a text type input is either a positive integer or 0, but that also accepts/converts 1.0 or 5.00 as input? This might be good enough: if (isset($_POST['x'])){

Re: [PHP] shortest possible check: field is set, integer or 0

2005-11-30 Thread Ray Hauge
Richard Lynch wrote: On Wed, November 30, 2005 5:10 pm, Chris Lott wrote: What is the shortest possible check to ensure that a field coming from a form as a text type input is either a positive integer or 0, but that also accepts/converts 1.0 or 5.00 as input? This might be good

Re: [PHP] custom CAD directory/file browser

2005-11-30 Thread Marlin Unruh
Jay Blanchard wrote: [snip] Can I use an anchor element to pass info back to the self same php script? If so how? I can't seem to find my way though this aspect of the project. [/snip] You can include information in the query string of the URL a

[PHP] hi everyone

2005-11-30 Thread EasyHorpak.com
Why this list very quiet?. No one in this list. Please feel free to reply to this email if you have additional questions or concerns ชวน จุดาบุตร 01-7499093 ติดต่อลงโฆษณา อพาร์ทเมนท์, แมนชั่น, หอพัก โทร. 01-749-9093, 02-938-8301

[PHP] Using POST to pass variables

2005-11-30 Thread Todd Cary
When I have more than one button on a page, I us what I call a reentrant approach. That is the page calls itself. If the page is emailer.pgp, the the FORM tag would be form method=get action=emailer.php At the top is ?php $send= $_GET[btnSend]; // Send button pressed $cancel =

[PHP] Re: Using POST to pass variables

2005-11-30 Thread David Robley
Todd Cary wrote: When I have more than one button on a page, I us what I call a reentrant approach. That is the page calls itself. If the page is emailer.pgp, the the FORM tag would be form method=get action=emailer.php At the top is ?php $send= $_GET[btnSend]; // Send

[PHP] $_POST won't work for me

2005-11-30 Thread Fil
Ladies and Gentlemen, Thankyou for this opportunity of picking someones brains before I tear the place apart. I am just starting with PHP but have encountered an insurmountable hurdle.. I need to work through HTML form posting examples to a PHP script. ONE STEP after Hello World I

Re: [PHP] Using POST to pass variables

2005-11-30 Thread EasyHorpak.com
use $_POST[btnSend]; to use post method - Original Message - From: Todd Cary [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, December 01, 2005 11:50 AM Subject: [PHP] Using POST to pass variables When I have more than one button on a page, I us what I call a

[PHP] Re: $_POST won't work for me

2005-11-30 Thread David Robley
Fil wrote: Ladies and Gentlemen, Thankyou for this opportunity of picking someones brains before I tear the place apart. I am just starting with PHP but have encountered an insurmountable hurdle.. I need to work through HTML form posting examples to a PHP script. ONE STEP after

Re: [PHP] $_POST won't work for me

2005-11-30 Thread EasyHorpak.com
Could you let me know your OS and Webserver program. Did you use appserv for begin learn php? - Original Message - From: Fil [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Thursday, December 01, 2005 11:58 AM Subject: [PHP] $_POST won't work for me Ladies and Gentlemen,

[PHP] Re: Using POST to pass variables

2005-11-30 Thread Todd Cary
Except this passes the message in the URL. Is there a way to pass variables as a POST (not in the URL)? I have a class that creates a new socket, however on my client's shared server, the creation of sockets is not allowed. With a new socket, I am able to pass the variable information via

[PHP] Database Class Help

2005-11-30 Thread Ian Barnes
Hi, We have a database class that we want to use to connect to multiple databases at the same time using different variables. Here is part of the db class: class db { var $dbh = ; var $q = ; function db($db_host, $db_user, $db_pass, $db_name) { $this-dbh = @mysql_pconnect($db_host,

RE: [PHP] Database Class Help

2005-11-30 Thread Albert
Ian Barnes wrote: We have a database class that we want to use to connect to multiple databases at the same time using different variables. function db($db_host, $db_user, $db_pass, $db_name) { $this-dbh = @mysql_pconnect($db_host, $db_user, $db_pass); $this-select_db($db_name); }

[PHP] problem in installing php5

2005-11-30 Thread R.Vijay Daniel
Hi, I tried to install php5 in redhat7.2,but i was unable to do so. There was some problem related to libxml2. I even tried down loading the libxml2 rpm and upgraded the package.Even then some other problem occured related to libxml2. is that possible to install php5 in redhat7.2 ?. with