Bharath Bhushan lohray | 26 Jan 2002 09:13
Picon
Favicon

MySQL query time

Is there a way to find the time that mySQL took to perform a query.
like the one shown when you perform it on the console mode....(0.09 sec or
so)

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Brendon Gearin | 5 Jan 2002 13:20

RE: exec() not exec-ing?

Could you just get the php script to send the commands to schedule it as a
task to run via cron etc  in say 1 minute into the future... that command
would be done quickly.. and the server could continue..

i did something similar when i used NT/ASP.

But i'm just a php newbie so i could be lost..

cheers

Brendon

-----Original Message-----
From: gilrain [mailto:gilrain <at> lunarpolicy.net]
Sent: Saturday, January 04, 2003 8:04 PM
To: php-general <at> lists.php.net
Subject: Re: [PHP] exec() not exec-ing?

> I'm back to square one, if I can't run that
> script without the browser waiting on it to finish...

For instance, is there a way for my PHP script to log into my shell account
and *then* send the command? Since I can execute the script, but PHP can't,
this would solve the problem -- if it's possible.

gilrain

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
(Continue reading)

Bobby Patel | 6 Jan 2002 06:55
Favicon

emulate full post wth redirect

Hello, I want to emulate a POST request to Paypal. Originally a POST request
is sent from the user (through a form) and the user is redirected to
paypal's site. Now, what I want to do is to emulate a POST request (so that
the surfer can't see some of the hidden fields of the form) and to deter
tampering. (If they could see all the fields, they could just create their
own form , and just change the amount).

Possible solution:
fsockopen to emulate POST, but that doesn;t redirect the user,  using header
will direct the user to the paypal site, but then I have to use a GET
request and then once again variables are visible and modifiable.

Desired solution:
a PHP script (toPaypal.php, say) that is called when a surfer wants to buy
something for a product for $5 , say.
The Product form will direct to the toPaypal.php script that creates a POST
request and sends the request and the surefer to Paypal.

Any ideas? or did I just make this confusing? One solution I guess is to
just double check the total amount credited to the merchant account matches
the product. But then I ask this question out of curosity.

--

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

ruusvuu | 1 Jan 2002 01:39

RE: Week Number

Wouldn't the 53rd week be the first week of the following year! :-)

> If you are using MySQL you can use the MySQL function SELECT
> WEEK('2001-12-30'); it would return 53 for the 53rd week.
> 
> Hope this helps...Ben
> 
> -----Original Message-----
> From: Matt Palermo [mailto:mpalermo <at> vt.edu]
> Sent: Friday, May 02, 2003 10:01 PM
> To: php-general <at> lists.php.net
> Subject: [PHP] Week Number
> 
> 
> Does anyone know if there is a function where I can feed it the day,
> month, and year parameters, and it will give me the week number of the
> year (like week 1-52)?  Please let me know.  Thanks.
> 
> Matt
> 
> 
> -- 
> 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
(Continue reading)

Jarratt Ingram | 23 Jan 2002 17:27
Picon

sessions not registering inside a function.

Hello All, 

I have created a login system, which works as expected on php 4.2. When
i was asked to move it onto an older server using 4.0.6, the system
stopped registering sessions.

main page: 
<? session_start();
   include('PROC_Login.php');	
   login($username,$password);

PROC_Login.php: 

function login($username, $password){
	global $HTTP_SESSION_VARS;
	
	// validate user ...

	session_register('AuthUser');
	$HTTP_SESSION_VARS['AuthUser'] = $username;
	
	do some other stuff ..

	}

This code was modified to backdate it to version 4.0.6, and now it wont
register the session. Is it because its inside the function, or to do
with the older version of php?  

If i move it out of the function the session gets registered correctly.
(Continue reading)

Jarratt Ingram | 23 Jan 2002 17:59
Picon

Re: sessions not registering inside a function.

Thank you John, 

I did manage to get it working by calling global $AuthUser after i ran
the function on the main page and it seems to have resolved the issue. 

have a good weekend 
J

On Fri, 2004-01-23 at 16:38, John W. Holmes wrote:
> From: "Jarratt Ingram" <jarratt <at> easily.co.uk>
> 
> > I have created a login system, which works as expected on php 4.2. When
> > i was asked to move it onto an older server using 4.0.6, the system
> > stopped registering sessions.
> >
> > main page:
> > <? session_start();
> >
> > function login($username, $password){
> > global $HTTP_SESSION_VARS;
> > session_register('AuthUser');
> > $HTTP_SESSION_VARS['AuthUser'] = $username;
> >
> > This code was modified to backdate it to version 4.0.6, and now it wont
> > register the session. Is it because its inside the function, or to do
> > with the older version of php?
> >
> > If i move it out of the function the session gets registered correctly.
> 
> I think you're registering a variable that only has a scope within the
(Continue reading)


Gmane