Hello everyone,
Many of you may be familiar with references in PHP. Now i read
somewhere in the PHP manual that creating references can take longer
than copies. PHP5+ also seems to reference a bit different thant PHP4
did.
Here is some working example code:
huge_array = array();
f
On Wed, 2008-07-23 at 10:07 +0200, Yeti wrote:
> Hello everyone,
>
> Many of you may be familiar with references in PHP. Now i read
> somewhere in the PHP manual that creating references can take longer
> than copies. PHP5+ also seems to reference a bit different thant PHP4
> did.
> Here is some w
The general rules of thumb are --> don't use references unless you
actually *want* a reference. And don't use references for performance
reasons.
Under PHP 4, it's generally been recommended to use a reference
operator when creating objects.
$obj =& new Object();
PHP uses refe
On 23-Jul-08, at 1:19 AM, Ted Wood wrote:
So PHP waits until a copy is actually needed before it makes one.
Explicitly making copies incurs overhead because of the concept of
"reference counting". So again, don't use references for performance
reasons.
That should've been: Explicitly
Hi,
I would be very grateful if someone could point out some ways how to do
the following:
I have an SVN server but I need to add some extra to commit message
which PHP will get and use(for example use the parameters from commit
message to change data on mysql database... (if commit message
On 7/23/08, Raido <[EMAIL PROTECTED]> wrote:
> I have an SVN server but I need to add some extra to commit message which
> PHP will get and use(for example use the parameters from commit message to
> change data on mysql database... (if commit messages first line has
> character *, then run sql q
Hey there,
I have a range of records that represent different faults and different
symptoms that I want to pull out of the database, and to find the
records that are the closest within each range.
I am currently doing it with a barrage of if statements, but I am sure
that this could be done
Thank You for that fast reply.
PECL was something that I din't know about. But I'll dig in with Your
examples and also PECL and try to find most simple but well-working
solution.
Also sorry for Return Receipt, turned that off.
mike wrote:
On 7/23/08, Raido <[EMAIL PROTECTED]> wrote:
I
Aslan wrote:
Hey there,
I have a range of records that represent different faults and different
symptoms that I want to pull out of the database, and to find the
records that are the closest within each range.
I am currently doing it with a barrage of if statements, but I am sure
that this
I'm getting a lot of bogus requsts in the form of
"index.php?id=http://64.15.67.17/~babysona/logo.jpg?";, sometimes more than a
hundred a day per domain. The php script catches it, logs the request, sends
an email report and replies with "access denied", but it takes processing
which I'd rather not
On Wed, Jul 23, 2008 at 8:22 AM, Raido <[EMAIL PROTECTED]> wrote:
>
> 1) Is it even possible to get commit messages text with php ? Since I can't
> find the file where commit messages are.
Just a quick answer to this: in your directory of your project
repo, go into the hooks/ subdirectory. In
On Wed, Jul 23, 2008 at 12:10 PM, <[EMAIL PROTECTED]> wrote:
> Yes, sorry. I have a database that records ip of attacks on a customer
> server, what I like to do get a count so that I can see what subnet is
> doing the major of the attacks.
>
> select ip from ipslimit 10;
> +-+
Arno Kuhl wrote:
> Is there a
> way for apache to catch these requests before passing it to php? Is it
> more efficient for apache to handle this than php?
2 x yes. I think you could probably use and ban all
access with "Deny from all".
/Per Jessen, Zürich
--
PHP General Mailing List (http:
I just want to point out that public IPs are no longer given out as
Class A, B, and C networks, but based on CIDR. You can use rwhois to
figure out who has use of a certain subnet and what the range of it is.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
D
On Wed, 2008-07-23 at 01:21 -0700, Ted Wood wrote:
> On 23-Jul-08, at 1:19 AM, Ted Wood wrote:
> >
> > So PHP waits until a copy is actually needed before it makes one.
> > Explicitly making copies incurs overhead because of the concept of
> > "reference counting". So again, don't use reference
Can anyone point me in the right direction? I know I am missing something
simple, but I can't place my hands on it.
$myCalTime = act_getCalendarDays($config, $myMonth, $myYear);
foreach($myCalTime as $calTime => $calArrayTime){
$calArray[] = $calArrayTime['day']."=>array('NULL','linked-day
"
Hi all,
I have a set of php scripts that handle the browsing and download of
file from the server.
it has worked fine for a long time on a server linux, now I have got
to migrate those scripts also on a windows server, and something very
strange is happening:
the download process hangs
I want to be able to do a getenv('SYMFONY_HOME'); or any env var that I've
setup in my /etc/bashrc for everyone. But apache obviously doesn't have a
shell, so it doesn't know about these. only the stuff in $_ENV.
What I want to know is how can I read env vars like ANT_HOME, JAVA_HOME,
etc.. in p
Don't put the array definitions in quotes:
Should be either:
foreach($myCalTime as $calTime => $calArrayTime){
$calArray[$calArrayTime['day']] = array('NULL','linked-day
'.strtolower($calArrayTime['reason']),$calArrayTime['day']);
}
or
foreach($myCalTime as $calTime => $calArrayTime){
The array($calArrayTime. is actually another string. I am mainly trying to
get the values for ['day']['0'], ['reason']['0'] etc all on the same line.
Sorry for not being clearer.
>>> Micah Gersten <[EMAIL PROTECTED]> 7/23/2008 2:50 PM >>>
Don't put the array definitions in quotes:
Should be
On Wed, 2008-07-23 at 13:52 -0500, Chris Ditty wrote:
> Can anyone point me in the right direction? I know I am missing something
> simple, but I can't place my hands on it.
>
> $myCalTime = act_getCalendarDays($config, $myMonth, $myYear);
>
> foreach($myCalTime as $calTime => $calArrayTime){
>
I'm still confused. What do you mean by same line?
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Chris Ditty wrote:
> The array($calArrayTime. is actually another string. I am mainly trying
> to get the values for ['day']['0'], ['reason']['0'] etc al
Nice catch, I missed that.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Jason Norwood-Young wrote:
> On Wed, 2008-07-23 at 13:52 -0500, Chris Ditty wrote:
>
>> Can anyone point me in the right direction? I know I am missing something
>> simple, but I c
I actually got it. Seeing Micah's code made me think.
Thanks for helping. Much appreciated.
>>> Micah Gersten <[EMAIL PROTECTED]> 7/23/2008 3:06 PM >>>
Nice catch, I missed that.
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
Jason Norwood-Young wrote:
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
In both PHP 4 and PHP 5, this would be an internal reference:
$a = $b;
until $b is changed.
The only exception is with Object handling under PHP 4, which had
flawed reference handling.
So, the rule remains -- don't use references for performance reasons
-- use them if you need references
Hey,
For ranges you can also use "Between" in the mysql queries.
SELECT * FROM table WHERE Type= "Attainable" AND Min LIKE $var can be
written as
Select * from table where between min and max
Just remember that "between" acts a bit wierd with dates or else Jim's
solution would be perfect for yo
Here's the info on the "weirdness" of between:
http://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#operator_between
Thank you,
Micah Gersten
onShore Networks
Internal Developer
http://www.onshore.com
VamVan wrote:
> Hey,
>
> For ranges you can also use "Between" in the mysql querie
Arno Kuhl wrote:
I'm getting a lot of bogus requsts in the form of
"index.php?id=http://64.15.67.17/~babysona/logo.jpg?";, sometimes more than a
hundred a day per domain. The php script catches it, logs the request, sends
an email report and replies with "access denied", but it takes processing
w
Hello,
I understand what you are trying to do. But as a web developer it is never a
good practice to have a insert query and page to display the record in the
same page. This way you will never add the redundant data whenever the page
is refreshed.
So from my experience I would suggest you do thi
On 7/23/08, Giulio Mastrosanti <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have a set of php scripts that handle the browsing and download of file
> from the server.
>
> it has worked fine for a long time on a server linux, now I have got to
> migrate those scripts also on a windows server, and some
On 7/23/08, mindspin311 <[EMAIL PROTECTED]> wrote:
>
> I want to be able to do a getenv('SYMFONY_HOME'); or any env var that I've
> setup in my /etc/bashrc for everyone. But apache obviously doesn't have a
> shell, so it doesn't know about these. only the stuff in $_ENV.
>
> What I want to know is
Spam detection software, running on the system "magi.magidesign.com", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
postmaster for details.
Co
Spam detection software, running on the system "magi.magidesign.com", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
postmaster for details.
Co
I have a module originally written for PHP-Nuke that I have ported to
CPG-Nuke/DragonFlyCMS.
In PHP4, the page I'm displaying works fine.
In PHP5, it doesn't.
The following link is a screenshot of the page using PHP4:
http://nukeleaguedf.winsto.net/working-php4.jpg
And a screenshot from PHP5:
h
On Wed, Jul 23, 2008 at 10:45 PM, <[EMAIL PROTECTED]> wrote:
>
> I have a module originally written for PHP-Nuke that I have ported to
> CPG-Nuke/DragonFlyCMS.
>
> In PHP4, the page I'm displaying works fine.
> In PHP5, it doesn't.
>
> The following link is a screenshot of the page using PHP4:
> h
>
> thats a decent bit of code to pick through, jeff. glancing at index.txt,
> the code looks pretty straight forward, and by that i mean that it doesnt
> look like theres anything that shouldnt work in php5.
>
> if i were to guess, i would suspect an environmental issue. you should
> ensure tha
On Wed, Jul 23, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote:
>
> >
> > thats a decent bit of code to pick through, jeff. glancing at index.txt,
> > the code looks pretty straight forward, and by that i mean that it doesnt
> > look like theres anything that shouldnt work in php5.
> >
> > if i were
On Thu, Jul 24, 2008 at 12:07 AM, Nathan Nobbe <[EMAIL PROTECTED]>wrote:
> On Wed, Jul 23, 2008 at 11:43 PM, <[EMAIL PROTECTED]> wrote:
>
>>
>> >
>> > thats a decent bit of code to pick through, jeff. glancing at
>> index.txt,
>> > the code looks pretty straight forward, and by that i mean that i
hi,
I hope this is the right group for this type of problem:
I am using hash_hmac to provide me with a sha1 encoded hash string. The
problem is as follows:
$hash = hash_hmac('sha1',
'030B6A05696E657400C54601C60001550187360603773500018707060373796E63000187340603687474703A2F2F772E73796E632E63
40 matches
Mail list logo