[PHP-DB] PHP Max execution time

2004-07-15 Thread Lisi
I am running a script (called through a browser) that checks entries in a table one at a time. As the table has grown, the script takes longer to run than is allowed - 30 seconds. Two questions: 1) I am on a virtual host so I'm not sure I have access to php.ini, but can I change this using .hta

Re: [PHP-DB] PHP Max execution time

2004-07-15 Thread Micah Stevens
Just use the set_time_limit function. You can go more than 30 seconds.. Unless you're in safe mode or something weird.. -Micah On Thursday 15 July 2004 02:03 am, Lisi wrote: > I am running a script (called through a browser) that checks entries in a > table one at a time. As the table has gr

RE: [PHP-DB] PHP Max execution time

2004-07-15 Thread Ed Lazor
Check out the ini_set command in PHP. It'll let you set this option from within your specific script. > -Original Message- > I am running a script (called through a browser) that checks entries in a > table one at a time. As the table has grown, the script takes longer to > run > than is

Re: [PHP-DB] PHP Max execution time

2004-07-15 Thread zareef ahmed
Hi, You can use set_time_limit(0) to disable max execution time limit. You can set it to more than 30 seconds too. ini_set("max_execution_time","300"); will also work. zareef ahmed --- Lisi <[EMAIL PROTECTED]> wrote: > I am running a script (called through a browser) > that checks entries in a

Re: Re[2]: [PHP-DB] Table locking

2004-07-15 Thread emre erdogan
Hi... I want to say some words about the "Table Locking" problem. I had a problem something like this one, I find solution for this by locking only the item that will updated. I added two areas one that has a value 0 or 1 giving it is currently used by someone, and second time it is started to us

Re: Re[2]: [PHP-DB] Table locking

2004-07-15 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, Emre Erdogan wrote: > Hi... > > I want to say some words about the "Table Locking" problem. > > I had a problem something like this one, I find solution for this by locking > only the item that will updated. I added two areas one that has a value 0 or > 1 giving it

Re: [PHP-DB] PHP Max execution time

2004-07-15 Thread John W. Holmes
Lisi wrote: I am running a script (called through a browser) that checks entries in a table one at a time. As the table has grown, the script takes longer to run than is allowed - 30 seconds. Two questions: 1) I am on a virtual host so I'm not sure I have access to php.ini, but can I change thi

Re: [PHP-DB] Debian & mssql_init

2004-07-15 Thread Robert Twitty
The problem is caused by the fact that the sybase extension was installed instead of the mssql extension. The sybase extension supports some of the mssql functions via aliasing. Unfortunately, mssql_init() is not supported by the sybase ext. You basically have only 2 options: 1. Rebuild PHP with

Re: [PHP-DB] Mysql and rollbacks

2004-07-15 Thread Neil Smith [MVP, Digital media]
Yeah sure ... UK Linux.net do PostGreSQL as well as MySQL on their servers. http://www.uklinux.net The postgres support has transactions as somebody mentioned although theres no reason why you can't use both databases depending on your requirements, lets say if the transaction requirement is s

Re: [PHP-DB] Re: Hold System

2004-07-15 Thread Peter Westergaard
> In the example of Bob, Mary and Barbara that I gave in my last post. If > Bob cancels his hold and I reset date_held for mary to the current date, > so that she has adiquite time to place her student. If I do that this > will put Barbara into the #1 position because she has now put a hold > bef

[PHP-DB] Re: PHP Max execution time

2004-07-15 Thread Peter Westergaard
"Lisi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am running a script (called through a browser) that checks entries in a > table one at a time. As the table has grown, the script takes longer to run > than is allowed - 30 seconds. Of course, I have to ask... is there absolut

RE: [PHP-DB] Re: Hold System

2004-07-15 Thread Justin Palmer
Hi, Thank you, Peter and all. This has been of great help. Regards, Justin Palmer -Original Message- From: Peter Westergaard [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 6:48 AM To: [EMAIL PROTECTED] Subject: Re: [PHP-DB] Re: Hold System > In the example of Bob, Mary a

[PHP-DB] Restrict account access to single user

2004-07-15 Thread veditio
We're creating a password protected mysql database accesible and searchable via a PHP front end. Because this is a revenue-based site, and users buy a password for access, we're wondering what the best php/mysql mechanism would be to allow only one person to access their account at a time. In

Re: [PHP-DB] Restrict account access to single user

2004-07-15 Thread Pablo M. Rivas
Hello veditio, You can use sessions: http://www.php.net/manual/en/ref.session.php and pay attention to: http://www.php.net/manual/en/function.session-cache-expire.php and session.use_cookies = "0" -- Best regards, Pablo -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP-DB] Re: Restrict account access to single user

2004-07-15 Thread Peter Westergaard
> In other words, how do we prevent two users from using the same password to access the same account at the same time? There are a few strategies I'd consider... each has plusses and minuses. 1) Lock to one IP. Keep a table with the most recent IP address, and the most recent access time. Any

[PHP-DB] Re: Restrict account access to single user

2004-07-15 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Because this is a revenue-based site, and users buy a password for access, we're > wondering what the best php/mysql mechanism would be to allow only one person to > access their account at a time. > In other words, how do we prevent tw

[PHP-DB] LAST_INSERT_ID?????

2004-07-15 Thread NIPP, SCOTT V (SBCSI)
OK. I know that a BUNCH of people have had this question, and I have read numerous Google threads on this, but nothing really seems to point out the resolution... I have a table with the Primary Key as an auto_increment field. Once I insert a new row of data into the table I want to dire

Re: [PHP-DB] LAST_INSERT_ID?????

2004-07-15 Thread Justin Patrin
Try the PHP funciton mysql_insert_id(). http://us3.php.net/manual/en/function.mysql-insert-id.php On Thu, 15 Jul 2004 15:16:44 -0500, NIPP, SCOTT V (SBCSI) <[EMAIL PROTECTED]> wrote: > OK. I know that a BUNCH of people have had this question, and I > have read numerous Google threads on

RE: [PHP-DB] LAST_INSERT_ID?????

2004-07-15 Thread Hutchins, Richard
Scott, I typically use PHP's mysql_insert_id() function on a result. For example, the following snippet from a function I use: $result = mysql_query($sql) or die(mysql_error()); if(!$result){ $evNew = -1;//set evID to an impossible

[PHP-DB] Re: LAST_INSERT_ID?????

2004-07-15 Thread Tim Van Wassenhove
In article <[EMAIL PROTECTED]>, Scott V Nipp wrote: > I am trying to pull the > entry number to display for the user as a "ticket number". I would > assume that I should use the LAST_INSERT_ID function for this. > Unfortunately, I am getting either failures or all zeroes for this > output. >

Re: [PHP-DB] LAST_INSERT_ID?????

2004-07-15 Thread Justin Patrin
On Thu, 15 Jul 2004 16:25:26 -0400, Hutchins, Richard <[EMAIL PROTECTED]> wrote: > Scott, > > I typically use PHP's mysql_insert_id() function on a result. For example, > the following snippet from a function I use: > > > $result = mysql_query($sql) or > die(mysql_error()

[PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Vincent Jordan
I am trying to figure out how to select the first letter of from the form field print it then append by datetime. Here is an example: $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $name = $first_name . ' ' . $last_name $rma = ?strcnt($last_name), 1 . Datetime(?) // takes

RE: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Galbreath, Mark A
Isn't there a tokenizer method? Mark -Original Message- From: Vincent Jordan [mailto:[EMAIL PROTECTED] Sent: Thursday, July 15, 2004 5:31 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Printing selected characters (strcnt?) I am trying to figure out how to select the first letter of from th

Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Matt M.
> $first_name = $_POST['first_name']; > $last_name = $_POST['last_name']; > $name = $first_name . ' ' . $last_name > $rma = ?strcnt($last_name), 1 . Datetime(?) // takes the 1st character from > $last_name and adds datetime in format of 715041200 $rma = substr ($last_name, 0 , 1).Your.Datetime;

Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread John W. Holmes
Vincent Jordan wrote: I am trying to figure out how to select the first letter of from the form field print it then append by datetime. Here is an example: $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $name = $first_name . ' ' . $last_name $rma = ?strcnt($last_name), 1 .

[PHP-DB] Ldap query problem

2004-07-15 Thread Ryan Jameson
My LDAP queries seem to have a problem with parenthesis, does anyone know how to fix this? Example... Criteria cn=Ryan Jameson* works fine returning user with cn=Ryan Jameson (MyDomain) But... Criteria cn=Ryan Jameson (MyDomain) returns nothing. :-\ <>< Ryan -- PHP Database Mailing List (ht

RE: [PHP-DB] Ldap query problem

2004-07-15 Thread Swan, Nicole
Do you have some code you can provide so we can get a better idea of what you're trying to do? My guess is that the filter isn't set up quite right (as in the base dn you're attaching to get the dn is not formatted correctly). What exactly are you trying to achieve? --Nicole ---

RE: [PHP-DB] Ldap query problem

2004-07-15 Thread Ryan Jameson \(USA\)
I found it! The parenthesis need to be escaped, which I had tried, but silly PHP went and escaped my escapes... :-\ So the criteria on the query needed to be cn=Ryan Jameson \(MyDomain\) ... I was entering the criteria via a form which PHP conveniently turned into cn=Ryan Jameson \\(MyDomain\\) wh

Re: [PHP-DB] Printing selected characters (strcnt?)

2004-07-15 Thread Matthew McNicol
Try this: // takes the 1st character from $last_name and adds // datetime in format of DDMMYYhhmm $rma = substr( $last_name, 0, 1) . date("dmyHi); See: aspn.activestate.com/ASPN/docs/PHP/function.substr.html uk2.php.net/date Vincent Jordan wrote: I am trying to figure out how to select the first

[PHP-DB] execut MS SQL stored proc

2004-07-15 Thread Damien Babilon
Hi All, To resolve my last prolem, I've switched of server, I'm now on a WIN2000 ox with PHP 4.8 and Apache 1.3, thanks for your reply Now I try to execute a Stored procedure on a mssql box. The connection is ok, ut I can't get the results. The stored procedure did'n return a recordset, it r

[PHP-DB] execut MS SQL stored proc

2004-07-15 Thread Damien Babilon
Hi All, To resolve my last prolem, I've switched of server, I'm now on a WIN2000 ox with PHP 4.8 and Apache 1.3, thanks for your reply Now I try to execute a Stored procedure on a mssql box. The connection is ok, ut I can't get the results. The stored procedure did'n return a recordset, it r

[PHP-DB] Easy reg expression problem

2004-07-15 Thread ioannes
I am trying to work out how to isolate the bit after and including the @ in an email address using php. I would be grateful if someone could point me to the expression. $email="[EMAIL PROTECTED]"; ereg("([a-zA-Z0-9])@([a-zA-Z0-9]).([a-zA-Z0-9]))", $email, $regs); print("@".$regs[1].$regs[2].$regs

Re: [PHP-DB] Re: Restrict account access to single user

2004-07-15 Thread Miles Thompson
They are all good suggestions, Tim's is probably the most sophisticated, but it's inevitable that usernames and passwords will escape. On top of this I'd add a weekly count of user logins, so that the users in effect buy a given amount of accesses each week. If you're really serious, you will h

Re: [PHP-DB] Easy reg expression problem

2004-07-15 Thread Justin Patrin
Well, I always use Perl Regexes instead of eregs. preg_match('/$(.*?)(@.*)^/', $email, $matches); $beforeAt = $matches[1]; $afterAndIncludingAt = $matches[2]; On Fri, 16 Jul 2004 00:43:46 +0100, ioannes <[EMAIL PROTECTED]> wrote: > I am trying to work out how to isolate the bit after and includin

Re: [PHP-DB] Easy reg expression problem

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 07:43, ioannes wrote: > I am trying to work out how to isolate the bit after and including the @ in > an email address using php. I would be grateful if someone could point me > to the expression. > > $email="[EMAIL PROTECTED]"; > ereg("([a-zA-Z0-9])@([a-zA-Z0-9]).([a-zA-Z0-

Re: [PHP-DB] Easy reg expression problem

2004-07-15 Thread Justin Patrin
On Fri, 16 Jul 2004 08:02:17 +0800, Jason Wong <[EMAIL PROTECTED]> wrote: > On Friday 16 July 2004 07:43, ioannes wrote: > > I am trying to work out how to isolate the bit after and including the @ in > > an email address using php. I would be grateful if someone could point me > > to the expressi

Re: [PHP-DB] Easy reg expression problem

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 08:05, Justin Patrin wrote: > > If you're simply trying to get '@email.com' then use strstr(). > > Of courseI'm just so used to pregs... Well the advantage of using a regex is that you can perform some form of validation on the address. -- Jason Wong -> Gremlins Asso

[PHP-DB] session_start

2004-07-15 Thread Steve Butzel
I have set the session.save_path (in my php.ini-recommended AND php.ini-dist file) to c:\php4\sess\tmp. I have also created those directories accordingly. However, when I try to browse a very simple .php file (see below) that includes session_start(): I am getting the following error messages: War

[PHP-DB] Re: session_start

2004-07-15 Thread Peter Westergaard
"Steve Butzel" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > It appears that Apache/PHP still thinks the session.save_path is /tmp, even > though I changed this in php.ini-recommended and php.ini-dist. **What am I > doing wrong?** Have you changed it in the version of php.ini which

Re: [PHP-DB] session_start

2004-07-15 Thread Jason Wong
On Friday 16 July 2004 08:15, Steve Butzel wrote: > It appears that Apache/PHP still thinks the session.save_path is /tmp, even > though I changed this in php.ini-recommended and php.ini-dist. **What am I > doing wrong?** Firstly, to see what your settings really are, use phpinfo(). Secondly, whe

Re: [PHP-DB] session_start

2004-07-15 Thread John W. Holmes
Jason Wong wrote: On Friday 16 July 2004 08:15, Steve Butzel wrote: It appears that Apache/PHP still thinks the session.save_path is /tmp, even though I changed this in php.ini-recommended and php.ini-dist. **What am I doing wrong?** Firstly, to see what your settings really are, use phpinfo(). Sec