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
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
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();
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
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.
-
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
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
$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.
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]
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
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
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
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
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 =
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
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
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
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
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
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
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.
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.
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
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
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
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
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
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 |
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
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
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
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:
-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
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
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
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
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
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
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:
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
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
[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
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...
--
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
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'])){
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
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
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
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 =
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
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
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
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
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,
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
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,
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);
}
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
58 matches
Mail list logo