Thanks everybody, looks like I was going down a blind alley, we can just
run stuff from cron.
Ben
On 6 November 2012 17:50, Jim Lucas li...@cmsws.com wrote:
On 11/06/2012 05:03 AM, Ben Edwards wrote:
Not sure if this was some type of joke but came across it a while ago. We
have some PHP
.
Ben
--
*Ben Edwards - Freelance Filmmaker, Bristol, UK
*http://www.funkytwig.com - View my show-reel and production services
http://www.icontactvideo.org - iContact Video Network - Community Video
Group
http://bristol.mirocommunity.org/ - Bristol Community Channel
http://bristol.mirocommunity.org
is joined to p. So swap em around if I misunderstood.
iPhone 4. It rocks!
On Nov 21, 2010, at 1:37 AM, Simcha Younger sim...@syounger.com wrote:
On Sat, 20 Nov 2010 13:54:29 -0700
Ben Miller biprel...@gmail.com wrote:
Hi,
I'm building a website for a client in which I need to compare
DISTINCT(criteria_id) and then run through each $selected_product
to make sure each has a criteria_value with a matching criteria_id,
eliminating any criteria where the number of criteria_values
count($selected_product), but this seems pretty inefficient.
Thanks in advance for any help.
Ben Miller
/opendir
function with PHP?
Thanks in advance.
Ben
it could be that the person whom you tried email has reached the quota
on their inbox. It's also possible that the person you tried emailing
gave you a fake email address and it's also possible that your domain
might be hosted on a cheap hosting account with a company that has been
known for
message -
From: Ben Brentlinger b...@benbrent.com
Date: Mon, Nov 1, 2010 08:29
Subject: [PHP] Fwd: Mail delivery failed: returning message to sender
To: php-general@lists.php.net
it could be that the person whom you tried email has reached the quota
on their inbox. It's also possible
myself than to take a
college class on php.
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
thanks for your help. I just retested my code and even though it didn't
work, I found the reason it wasn't working was because I had an unneeded
space between the if and the rest of the if statement.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
someone had responded with the isset
if(isset($_POST['reallife']))
{
print_r($_POST);
}
Richard L. Buskirk
-Original Message-
From: Ben Brentlinger [mailto:b...@benbrent.com]
Sent: Sunday, October 31, 2010 8:26 AM
To: php-general@lists.php.net
Subject: Re: [PHP] questions about
not checked. I'm wanting to send an email to the site admin
with the information given by the person who filled out the form that
contains the checkbox.
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
a php script to send the data in an email.
On 10/30/2010 22:28, ad...@buskirkgraphics.com wrote:
input type=checkbox name=test
If check it will submit the value of 'on'
So
If($_POST['test'] == on')
{
Do this
}else{
Do this
}
Richard L. Buskirk
-Original Message-
From: Ben Brentlinger
functions to sort and display only the first 5.
Is there any easier way to get this done with a single query - something
like SELECT AVG(rating) WHERE product_id=DISTINCT(product_id)? = I tried
that - it didn't work. Would greatly appreciate any advice. Thanks,
Ben
--
PHP General Mailing List (http
-Original Message-
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Friday, July 02, 2010 2:43 PM
To: b...@tottd.com
Cc: php-general@lists.php.net
Subject: Re: [PHP] SELECT AVG(rating)
On Fri, 2010-07-02 at 14:32 -0600, Ben Miller wrote:
Hi - I have a MySQL table full
the
session_start function? So do I still need to call session_regenerate_id for
security purposes when an end user has entered the correct login credentials
- would this be necessary since you cant set a session ID via the URL?
Thanks,
Ben.
into OOP
quite a bit and understand the concept of it, and want to take it further.
Any recommendations appreciated :).
Thanks,
Ben.
if this something that I
can handle with just PHP, or if I'm going to need to adopt a third party
Ajax app or something like that? Any thoughts or even a point in the right
direction would be greatly appreciated. Thanks,
Ben
Hi,
I want to be able to create a function that acts as an insert mysql function
that accepts specific parameters for the fields and the values I want to
insert into those respective fields and I know I'll need to use associative
arrays to complete this task when passing values to the function,
a hidden input containing
PHPSESSID, or do I need to pass each key=value pair that _SESSION contains
at www. and reset them as _SESSION vars at secure.
https://secure.mydomain.com ?
Thanks in advance,
Ben
/script_that_calls_function.php
Hope the question is clear. Thanks,
Ben
Hi,
I've been learning about object oriented programming for the past few weeks
and I've understood it pretty well, but I have one question. Usually with
PHP scripts I make, all the functionality for a specific page is in the
actual PHP file, and I'd use PHP functions in a separate directory
value?
Thanks in advance.
Ben
a
clientSide language like javascript for this, but was wondering if maybe
there was a PHP addon or something like that for downloading content to the
user's PC. Thanks in advance.
Ben
their
drive into a USB port and present the info on the road, regardless of
connection to the internet.
Ben
-Original Message-
From: Roberto [mailto:prof...@gmail.com]
Sent: Friday, December 11, 2009 11:58 AM
To: Ben Miller
Cc: php-general@lists.php.net
Subject: Re: [PHP] Backup to local drive
Hi
a)
(preferred) run the presentation via an autoplay command or b) open the
presentation.html file.
Ben
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: Friday, December 11, 2009 2:25 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local
, December 11, 2009 2:39 PM
To: Ben Miller
Cc: 'Roberto'; php-general@lists.php.net
Subject: RE: [PHP] Backup to local drive
On Fri, 2009-12-11 at 14:36 -0700, Ben Miller wrote:
Too much reliance on the user knowing how to extract the files to the flash
drive – need something that does it all
I happen to have grabbed this function from php.net a while back, and
have been using it since:
// by fr600 at hotmail dot com at http://us2.php.net/getenv
function getip()
{
if(getenv('HTTP_CLIENT_IP') strcasecmp(getenv('HTTP_CLIENT_IP'),
'unknown'))
$ip = getenv('HTTP_CLIENT_IP');
On my site I have a web form for users to upload graphics, however there
are constraints on the size allowed. Recently, a user has been having
problems, because the code is reporting the wrong size - a size too
small to be allowed! They sent me a copy of the image so I could
confirm the
Ashley Sheridan wrote:
On Sun, 2009-11-15 at 15:07 -0500, Ben wrote:
On my site I have a web form for users to upload graphics, however there
are constraints on the size allowed. Recently, a user has been having
problems, because the code is reporting the wrong size - a size too
small
Chris Payne wrote:
Hi everyone,
I'm not sure of the correct formula for this, if I have a file - just
for example, that is 10245458756 bytes long and the download speed is
60KB a second, what formula would I use to calculate how many
seconds/minutes/hours it would take to download the file?
Ashley Sheridan wrote:
On Sun, 2009-11-15 at 16:25 -0500, Ben wrote:
Ashley Sheridan wrote:
On Sun, 2009-11-15 at 15:07 -0500, Ben wrote:
On my site I have a web form for users to upload graphics, however there
are constraints on the size allowed. Recently, a user has been having
problems
Jay,
What function do you have? Thanks to everyone for their feedback.
Best,
Ben
On Wed, Oct 28, 2009 at 9:17 AM, Jay Blanchard jblanch...@pocket.comwrote:
[snip]If your solution requires you to create hundreds of forms, which
could
take months to code, you need to take another look
Anyone know of a way to can take Mysql tables/fields from phpMyAdmin or .sql
file and quickly make into HTML forms?
Does anyone have a quick way of converting tables into forms?
--
**
The content of this e-mail message and any attachments are
confidential and may be legally privileged, intended solely for the
addressee. If you are not the
I am trying to take MySQL tables and use the table structure to create
HTML/PHP forms in as few steps as possible for further development. I
have a project that has hundreds of tables and requires hundreds of
forms to be created and don't want to do so field by field by hand.
Thanks,
Ben
on there. At any
rate it will then pass FILTER_VALIDATE_INT, but the value's not going
to be what you expect. You can see it happening here:
http://codepad.org/tw2qlpC1
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
or a 9 in it; you'll end up
with plain old 0 (presumably because PHP's internal attempt to convert
from octal, fails):
http://codepad.org/KBUgAZWJ
Which, of course, leads to the apparent-false discussed above.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
particular string (0342352) will only
fail FILTER_VALIDATE_INT in the filter's default configuration; set
the ALLOW_OCTAL flag and it will pass:
http://codepad.org/RNE5LZMr
You'll still end up with an unexpected value in your final variable, though.
Ben
--
PHP General Mailing List (http
the original code above, it looks like the OP was
misunderstanding the use of filter_var() and expecting it to return a
boolean.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of the clearer articles that
came up on the first page of results, when I ran that search:
http://www.andypemberton.com/engineering/the-post-redirect-get-pattern/
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Can someone PLEASE explain why the developers of PHP chose this seemingly
whacky logic?
It mimicks C.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
Are you thinking it would be more intuitive if that operator departed
from its normal behavior in this one special case?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Oct 2, 2009 at 2:37 PM, Ben Dunlap bdun...@agentintellect.com wrote:
My issue is that I see no reason to do the ASSIGNMENT FIRST and THEN
INCREMENT.
That's just counter intuitive. In the case of $foo = $num++, everything to
the right of the = should be computed FIRST and THEN handed
ambiguous. Like Daevid
said, academic at this point -- but it might shed light on some
compiler-design decisions that I don't have the vocabulary for.
OTOH it could just a be a unique case with unpredictable results.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
-of-view. A 307 is going to cause
many browsers to pop up a confirmation dialog, which will freak some
users out -- and will break people's flow a lot more than would a
smoothly-executed two-stage submit.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
/manual/en/function.fgetcsv.php
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
I attempted to use the same functions as FPDI/FPDF, but they did not
work in TCPDF.
Which functions did you use in FPDF?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
and more users use
subwindows to have concurrent sessions, does anybody know how they handle ip
changes? I'm not.
What specific situation do you have in mind in which a browser would
even be aware of an IP change on the client side? Maybe there are
common cases I'm not thinking of.
Ben
--
PHP
this variable $item with $i?
$var = item$i;
echo $$var;
Note the two dollar-signs in the second line.
I wonder if a basic array would make for easier-to-read code, though:
$items = array( test );
$i = 0;
echo $items[$i];
Ben
--
PHP General Mailing List (http://www.php.net
want to escape
HTML-characters in the message for security purposes. I suppose you
could call str_replace() after htmlspecialchars(), instead of before
it as you currently do.
OTOH, why not just send your email as plain text, instead of HTML?
Thanks,
Ben
--
PHP General Mailing List (http
it (although that approach is debatable).
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
if ... you have
output_buffering option enabled in the php configuration.
Which is probably the case on the OP's local machine, and would
explain why the code doesn't fail for him there.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, but to
forget about pixel-perfect. But I tend to go light on Javascript in
general, so it's not that big of a deal usually.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
what you're currently using will
include it. I guess 3.1.1 is still in beta but I'd personally go for
beta over a custom build, at least on a first pass.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Microsoft will stop releasing
security updates for IE6. It's hard to tell exactly, but right now it
seems like that may happen next July:
http://support.microsoft.com/gp/lifesupsps/#Internet_Explorer
At that point I would consider IE6 broke.
Ben
--
PHP General Mailing List (http://www.php.net
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
() and AUTO_INCREMENT columns
simultaneously from multiple clients is perfectly valid. Each client
will receive the last inserted ID for the last statement /that/ client
executed.
http://dev.mysql.com/doc/refman/5.0/en/getting-unique-id.html
Ben
--
PHP General Mailing List (http://www.php.net
as I was authenticated.
Dumb mistake? Sure. Easy to make? Probably more so than one would like to think.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, or suspect are
solid because of the authors involved. I'm sure there are several
other good ones also.
http://codeigniter.com/
http://framework.zend.com/
http://www.solarphp.com/
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
at existing frameworks, seeing how
they're structured, reviewing some of their code, etc., is still
likely to be valuable.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
it does do session management). Solar and ZF do seem
to have their own auth/access-control, though.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, immediately after inserting a row, there are different ways to
do this depending on how you're connecting to MySQL.
PDO, for example, has a method called lastInsertId():
http://us2.php.net/manual/en/pdo.lastinsertid.php
And the mysql_* family of functions has mysql_insert_id(), etc.
Ben
--
PHP General
was in third-party code --
and it seems to me that making your own code robust enough to handle
failures in third-party libraries (as you just did) is a really fruitful use
of your time; fixing the library itself, maybe not so much. I guess it
depends on how it all affects your end users.
Ben
for the user (bad imho, as it relies on
Javascript)
I think any AJAX-based approached would run into the same difficulty,
because each AJAX call is a separate HTTP request from the one that
originally loaded the page (and from every other AJAX call).
Ben
--
PHP General Mailing List (http
of
representing some non-printable character? It would surprise me if
mcrypt_ecb() used the . character as its pad, but maybe it does.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
that ended in .local were affected.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
');
} catch (PDOException $e) {
// verify that error occurred because sqlite3 is not supported
try {
$dbh = new PDO('sqlite2:$db_file');
} catch (PDOException $e) {
// bail out gracefully
}
}
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit
$dbh = new PDO('sqlite:$db_file');
[8]
$dbh = new PDO('sqlite2:$db_file');
But with double-quotes, not single-quotes. ;-)
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, close, and disconnect even apply in this case, since
it's a UDP socket?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$map = ms_newMapObj($mapfile);
The command creates a new mapscript object.
And PHP is hanging somewhere inside that constructor? Is this in a web
context or a command-line context? Or both?
creeping away from PHP so maybe I should leave it at that.
Ben
REGEXP '^0.?7.?A.?B.?C.?D.?9.?8$'
I think just stripping the alphanumeric characters would end up being
more flexible, though.
-Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
, but that's not how the OP characterized
the problem. The OP talked about search strings where multiple
characters had been omitted from different parts of the product id.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
-object in /var/www/html/magento/app/Mage.php on line 644
Sounds like your version of Magento isn't compatible with PHP 5.3 (and
perhaps less-recent releases also?).
Is there a newer version of Magento available?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
this problem, or at least some part of
it, into a regex-based solution, but I don't think it's a natural fit.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
What I would do for UK PHP events :-(
Something like this perhaps?
http://conference.phpnw.org.uk/phpnw09/
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
sophisticated ways to achieve the same concept, perhaps
using the Reflection API. I suspect it also needs some refining to
handle protected methods. But it might be a start.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
interface -- and
even then, pre-existing methods in those pre-existing classes would
not actually be affected. So those would have to be modified also.
But maybe I'm totally missing something?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
/wiki/Levenshtein_distance
PHP has a levenshtein function but you'll have to figure out a way to
use it efficiently with your data set. Or, if Levenshtein isn't quite
right for your needs, the article above might at least point you in a
useful direction.
Ben
--
PHP General Mailing List (http
,
unfortunately, is not as simple as toggling a configuration variable.
Yes -- and I always look askance at shared-hosting providers who rely
on safe_mode and call it a security measure. Then when I'm done
looking askance, I take my business elsewhere.
Ben
--
PHP General Mailing List (http://www.php.net
aside to another window.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Which format should I used for log file? *.log or *.txt?
Doesn't matter to PHP -- but you do need to provide a local path, not a URL.
[http://domain.com/log/logfile.*] or
No...
[C:\some_path\domain.com\log\logfile.*] or just
Yes!
Ben
--
PHP General Mailing List (http://www.php.net
I was surprised when no one recommended this:
if ($_SERVER['REQUEST_METHOD'] == 'POST')
So now I'm wondering if there's a pitfall to this method that I'm not
aware of...
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
knees and I've
stopped touching $_POST or $_GET directly since I discovered it.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
of the Technical Staff. These folks were very good at what
they did, but again, not interested in, or perhaps not suited for,
management.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
simply reject the
RCPT TO command with a 5xx error. This avoids backscatter but also
lets well-behaved clients know that the destination address is
invalid. AFAIK this is how Rackspace Email works (if you don't have a
catch-all address configured).
Ben
--
PHP General Mailing List (http://www.php.net
of spam is sent in this manner -- and and how much, on
the other hand, comes from a direct SMTP conversation between a
malicious client and the MX server of the recipient's domain.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
operation, but maybe I'm mistaken about that.
Of course source IP isn't a reliable unique-ID, for the opposite
reason also: forward proxies, NAT, etc., make it pretty likely that
several users will come to the site from the same IP. So you'd end up
incorrectly refusing legitimate votes.
Ben
--
PHP
a bunch of users when something
changes.
In this mechanism, does a role differ significantly from a group?
I have to admin a CRM system that has both roles /and/ groups, and it
always seems a bit excessive. But maybe there's some benefit to roles,
as such, that I'm not seeing.
Thanks, Ben
--
PHP
as a system administrator, to be both easy to
grasp and extremely flexible/powerful.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
filter_input(), with the FILTER_VALIDATE_EMAIL
filter, to get at the 'emailid' parameter:
http://us3.php.net/manual/en/function.filter-input.php
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there a simple to way to compare two strings with case insensitivity so
that the following will return true?
$foo = Arnold;
$bar = arnold;
If($foo == $bar) {
}
Thanks.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
need?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
missing some variables? Does it seem to happen on any page, or only
certain ones?
Thanks,
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
reliable than mysql_real_escape_string():
http://en.wikipedia.org/wiki/SQL_injection#Parameterized_statements
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
wondering if you could borrow from anti-CSRF techniques to
solve it (assuming, again, that it really needs to be solved).
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
look like
comments to someone not familiar with PDO and named parameters.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
.
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
definitely be interested to hear how others on the list approach
this problem.
And that's only one part of the equation, if you're on a
shared-hosting platform. Are you, or do you have your own server?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net
with .php in its name as a generic text file rather than
handling it correctly. I'd rather just have the file outside of
DocumentRoot and avoid that risk entirely. But again, maybe that's
just unproductive paranoia?
Ben
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http
1 - 100 of 1215 matches
Mail list logo