Re: [PHP] Random Unique ID

2007-03-23 Thread Németh Zoltán
2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: As for efficiency, that's probably not even worth mentioning in this case. why not? you would use 2 sql queries

[PHP] How to get class constants with there value?

2007-03-23 Thread Mathijs
Hello there, I use PHP5, and i wanted to know if there is an option to extract class constants with there name and value without using Refelection. Now i need to create a reflection of the class to get the info. Is there something like get_class_variables for constants?? Thx in advanced.

[PHP] Re: Question after php5

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: Hi everyone, I decided I would spend the extra time and install separate copies of apache and php5. All went successfully, I thought. Apache starts and runs on 8080, I get pages. But not php pages. I added a php.conf file which is included in httpd.conf, I just copied

Re: [PHP] Question before upgrading to 5

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: I'll think about it.. We only use php for intranet applications I create, so the server is basically dead at nights, which is when I do most of my work. I have worked like that in the past - at some point I decided that going to bed when I was tired rather then

[PHP] getting a variable from a file

2007-03-23 Thread Ross
I am using a script to generate a sitemap. It displays the page names (mypage.php) but I want it to display the titles. The page heads and title are generated dynamically so the line below does not work if(preg_match('title(.+)/title'i, $f, $matches)){ However all the paged titles are stored

[PHP] Keep-Alive problem

2007-03-23 Thread Julien Allali
Hy, I've a problem with a keep-alive connection. I've describe it in http://bugs.php.net/bug.php?id=40895 but it seems to not be a bug. The problem is simple: My browser calls the same page twice with a keep-alive connection. The first time, I answer quickly but i have some stuff to do so

[PHP] Re: getting a variable from a file

2007-03-23 Thread Ross
In answer to my own question if(preg_match('pageTitle=\(.+)\'i, $f, $matches)){ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Random Unique ID

2007-03-23 Thread Robert Cummings
On Fri, 2007-03-23 at 09:15 +0100, Németh Zoltán wrote: // method 2 $time = microtime(TRUE); for ($i = 1; $i = 5000; $i++) { $done = FALSE; while (!$done) { $id = md5((microtime(TRUE) * (rand(1,1000) / 100))); $sql = INSERT INTO idtest (id,cnt)

Re: [PHP] Random Unique ID

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 08.13-kor Robert Cummings ezt írta: On Fri, 2007-03-23 at 09:15 +0100, Németh Zoltán wrote: // method 2 $time = microtime(TRUE); for ($i = 1; $i = 5000; $i++) { $done = FALSE; while (!$done) { $id = md5((microtime(TRUE) *

[PHP] Remove child nodes with SimpleXMLelement

2007-03-23 Thread Mikey
Hi NG! I was wondering if anyone had any experience of removing nodes with SimpleXMLElement? I can't seem to find a corresponding method in the docs and I was wondering if I should just unset() the elements in question? Thanks! mikey -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] close session when browser is closed

2007-03-23 Thread Edward Vermillion
On Mar 22, 2007, at 11:52 PM, Travis Doherty wrote: Juergen Wind wrote: Travis Doherty wrote: By default the session cookie expires when the browseris closed. this is not always true: f.e. FF requires *all* open windows to be closed to forget that session. Personally I think this

Re: [PHP] Keep-Alive problem

2007-03-23 Thread Jon Anderson
Julien Allali wrote: Then, the second call is blocked until the first call is entirely done. Now, If I explicitly ask the browser for closing the connection: snip all work fine. I believe the reason for this is specifically because of the connection to one apache process. Since apache prefork

[PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, Let me explain what I¹m trying to do. Unfortunately it¹s not a very simple Add/Update transaction. Basically I gather records from multiple mySQL tables and add them to a DBF (dbase) database. I wrote a code which was able to accomplish this without any problems and the add_records goes

Re: [PHP] Passing variables

2007-03-23 Thread Tijnema !
On 3/23/07, Chris [EMAIL PROTECTED] wrote: Tijnema ! wrote: On 3/22/07, Jeff [EMAIL PROTECTED] wrote: I want to thank you all for clearing me up on setting the register_globals to ON issue!! I have refrained from doing so and my code is running great with the $_GET. I am having NO trouble

[PHP] POST a variable

2007-03-23 Thread Dan Shirah
Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request; $max_result=mssql_query($maximum);

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/23/07, Mario Guenterberg [EMAIL PROTECTED] wrote: On Fri, Mar 23, 2007 at 12:24:45AM -0500, Travis Doherty wrote: After multiple runs I see that the for pre-increment loop is fastest. Note that the while loop with a post-increment runs once more than with a pre-increment. Everytime I

Re: [PHP] Permissions issue on share

2007-03-23 Thread Tijnema !
On 3/23/07, Jim Lucas [EMAIL PROTECTED] wrote: Rahul Sitaram Johari wrote: Ave, I¹m not sure if anyone here is going to be able to help, but I¹ve run into a permissions snag. I have Apache Web Server running on Mac OS X with PHP. I have a folder on a windows machine mounted on my Mac OS X

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

Re: [PHP] Integer question

2007-03-23 Thread Tijnema !
On 3/23/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, March 22, 2007 2:33 pm, Tijnema ! wrote: 2). How do you handle numbers that large, while maintaining precision. keep them as strings - and/or use a 64bit machine? a 64bit machine would make the number larger, not unlimited :)

Re: [PHP] Creating an FTP account on the fly from PHP

2007-03-23 Thread Tijnema !
On 3/23/07, Travis Doherty [EMAIL PROTECTED] wrote: PHP Fusebox wrote: I built a CMS that lets a super user create and manage basic users (among lots of other things). I want basic users to get an FTP account that is automatically associated with their website user account, and managed from

Re: [PHP] Add New Records Only!

2007-03-23 Thread clive
you could do a serialized md5 of sum of the more unique columns from your db abd use that as a unique identifier for the row. Then you would need to compare this 'key' before doing a insert. Also keeping a log of the date and time of the last operation would help as then you only need to

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() So, to come out with a comparable function with pretty reliable results, I follow this process: 1. User

RE: [PHP] POST a variable

2007-03-23 Thread Edward Kay
-Original Message- From: Németh Zoltán [mailto:[EMAIL PROTECTED] 2007. 03. 23, péntek keltezéssel 10.45-kor Dan Shirah ezt írta: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly

[PHP] Re: close session when browser is closed

2007-03-23 Thread Colin Guthrie
Edward Vermillion wrote: Personally I think this does make sense. I fully expect the browser to maintain cookies Until it is closed -- If I have closed one tab that had set a cookie, re-opening that URL in a new window/tab should still cause the browser to send in my cookie. Ouch! That

[PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text']; $len = strlen($minitxt); if ($len 235) { $len = 235; } else { $len =

Re: [PHP] POST a variable

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 11.07-kor Dan Shirah ezt írta: The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() you wrote something earlier as far as I

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Tijnema !
On 3/23/07, Dwayne Heronimo [EMAIL PROTECTED] wrote: Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text']; $len = strlen($minitxt);

Re: [PHP] Add New Records Only!

2007-03-23 Thread Mark
Rahul Sitaram Johari wrote: As far as I can see, there is probably only three ways to do this: One: Make sure your dbase system contains unique primary key capability, and use it to avoid duplicates. Two: query for the row, if it isn't there insert it. (You'll have to deal with concurrency with

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Flavien CHANTELOT
-Message d'origine- De : Tijnema ! [mailto:[EMAIL PROTECTED] Envoyé : vendredi 23 mars 2007 16:26 À : Dwayne Heronimo Cc : php-general@lists.php.net Objet : Re: [PHP] preview string with strlen PHP (help) On 3/23/07, Dwayne Heronimo [EMAIL PROTECTED] wrote: Dear All, I am very new

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
Do a 'select @@identity', it will give you the last record id. The gap in between steps 3 and 4, brief as it may seem, is enough to get you in trouble. Satyam - Original Message - From: Dan Shirah [EMAIL PROTECTED] To: Németh Zoltán [EMAIL PROTECTED] Cc: php-general

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Edward Kay
-Original Message- From: Dwayne Heronimo [mailto:[EMAIL PROTECTED] Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text'];

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Jochem Maas
Dwayne Heronimo wrote: Dear All, I am very new to programming. I want to make a preview text that would display only a part of the text that is a text field in a database. //Begin Make preview string $minitxt = $row_show_cat['text']; $len = strlen($minitxt); if ($len 235) {

[PHP] High quality image resizing

2007-03-23 Thread Markus Fischer
Hi, I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the expectations of our designers. I've done my tests with PHP4 and

Re: [PHP] Re: Keep the PHP list ON TOPIC!

2007-03-23 Thread Jochem Maas
Myron Turner wrote: Jochem Maas wrote: Myron Turner wrote: Jochem Maas wrote: I would have made a similar comment - but I have soap stuck between my teeth atm :-P Just use a little of that saliva that you've been wasting on spitballs. ;-) ok - I'm all soaped up now

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
Dear all, hmm.. sorry the $previewstext thing was a typo in my mail. But yes it is working but it will only display the first record of the recordset. I have like a list for items with short text in a page and of course made a query to make the database variables available. Which where the

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 16.55-kor Dwayne Heronimo ezt írta: Dear all, hmm.. sorry the $previewstext thing was a typo in my mail. But yes it is working but it will only display the first record of the recordset. I have like a list for items with short text in a page and of

RE: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Flavien CHANTELOT
In your function there is at the end before the return statement: $previewtext = $whowcatvar; First $whowcatvar isn't defined. So it could be an answer. And I think u need to delete this line. -Message d'origine- De : Dwayne Heronimo [mailto:[EMAIL PROTECTED] Envoyé : vendredi 23 mars

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, Three: Insert everything and remove duplicates later. Out of the suggested options, this option is sounding the most sane attainable on my end. I don't have a complete grip on how to accomplish this, but certainly sounds feasible. Let me look at ways to achieve this. Thanks! On 3/23/07

[PHP] Re: High quality image resizing

2007-03-23 Thread Al
I'd be surprised if Imagemagick won't do the job. It has a terrific amount of tools; but there is a bit of a learning curve. Suggest visiting the IM forums and asking for help. Also, try resizing some images here http://studio.webbyland.com/MagickStudio/scripts/MagickStudio.cgi I use php

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Dwayne Heronimo
YES this works thank nemeth: ?php function previewString($showcatvar) { $minitxt = $showcatvar; $len = strlen($minitxt); if ($len 235) { $len = 235; } else { $len = $len; } $newstring = substr($minitxt,0,$len); $previewtext = $newstring; return $previewtext; } ? and to

Re: [PHP] Add New Records Only!

2007-03-23 Thread Satyam
Delete from table where id = (select min(id) from table group by field1, field2 ,... having count(id) 1) Id is the unique primary key, fieldn are the fields that can be duplicated. Each time this runs it will remove one occurence of the all duplicated records. You'd have to run it several

[PHP] php support

2007-03-23 Thread Richard Dunne
Can anyone tell me where to get support for this? php5 undefined function pg_connect() Is there a specific mailig list fro users? Thanks, Richard Dunne Expecting? Get great news right away with email

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
Richard Dunne wrote: Can anyone tell me where to get support for this? Here php5 undefined function pg_connect() postgresql was not built into your version of PHP. Perhaps post which platform your run on, and other information like using a pre-canned binary or are building for source.

Re: [PHP] Add New Records Only!

2007-03-23 Thread markw
Ave, Three: Insert everything and remove duplicates later. Out of the suggested options, this option is sounding the most sane attainable on my end. I don't have a complete grip on how to accomplish this, but certainly sounds feasible. Let me look at ways to achieve this. Thanks! I'm

RE: [PHP] php support

2007-03-23 Thread Jake McHenry
Look at phpinfo(), you probably don't have PQSql support installed... Jake -Original Message- From: Richard Dunne [mailto:[EMAIL PROTECTED] Sent: Friday, March 23, 2007 1:31 PM To: php-general@lists.php.net Subject: [PHP] php support Can anyone tell me where to get support for

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, It's definitely not live data, so that is not a problem at all. But I'm not sure I understand your method very well. I do understand getting data from both the existing DBF and the multiple mySQL tables into a temporary mySQL table. But if I do go ahead and do that, I guess I could write a

Re: [PHP] Name Capitalization

2007-03-23 Thread Paul Novitski
At 3/21/2007 04:57 AM, Shafiq Rehman wrote: Some problems are universal and we cannot fix them in computer science. I think it's better to educate/guide your visitors about such names that they write in correct capitalization In this case, the OP has an existing list of names he wants to

RE: [PHP] Add New Records Only!

2007-03-23 Thread Brad Fuller
Rahul wrote: Ave, It's definitely not live data, so that is not a problem at all. But I'm not sure I understand your method very well. I do understand getting data from both the existing DBF and the multiple mySQL tables into a temporary mySQL table. But if I do go ahead and do that, I

RE: [PHP] Amazon AWS + SimpleXML

2007-03-23 Thread Brad Fuller
-Original Message- From: Myron Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 10:24 AM To: Brad Fuller Cc: php-general@lists.php.net Subject: Re: [PHP] Amazon AWS + SimpleXML Brad Fuller wrote: Hey guys, I'm having trouble trying to parse XML results from an

Re: [PHP] php support

2007-03-23 Thread Brad Bonkoski
Richard Dunne wrote: Tried that. PHP Warning: PHP Startup:Unable to load dynamic library './php_pgsql.dll' The specified module could not be found. Fatal Error: Call to undefined function pg_connect() Read here for some info: http://www.sitepoint.com/article/use-postgresql-php-windows/3 Not

Re: [PHP] Add New Records Only!

2007-03-23 Thread Rahul Sitaram Johari
Ave, A better solution would be to add a column in the MySQL table, maybe call it processed with a default value of 0, and update this value to 1 with each row inserted. Then you are only querying records where processed=0. Of course this will not work if you cannot modify the MySQL table.

[PHP] Re: Random Unique ID

2007-03-23 Thread ccspencer
Robert Cummings writes: Bleh, you can solve this with at most 2 queries. Thanks. That is a bit different than what I was thinking about but it might work for my purposes. Thanks also to all the other people who made suggestions. It appears to me that ther are 3 distinct approaches. 1)

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
Sorry, I was more tailoring my question to the syntax of my query. It wasn't displaying anything for my echo. I've changed it to this now: $get_max = SELECT scope_identity(); $max_result = mssql_query($get_max) or die(mssql_error()); $max_id = mssql_fetch_row($max_result); echo $max_id;

Re: [PHP] POST a variable

2007-03-23 Thread Satyam
It seems to me @@identity should sufice, and it certainly does not need to be any 'new' function, since it had been there for quite a while. My feeling is that those added functions might be used for elaborate stored procedures, where you might be dealing with multiple tables or some fancy

[PHP] Another SimpleXMLElement question...

2007-03-23 Thread Mikey
If at first you don't succeed... Our production environment is running on an old version of PHP 5.0 and cannot be easily updated. My problem is that I have developed code against a new version and it has the SimpleXMLElement::addChild() function, but this is not present on the older version

Re: [PHP] POST a variable

2007-03-23 Thread Dan Shirah
Ah, got it. Thanks a lot for the help Satyam! On 3/23/07, Satyam [EMAIL PROTECTED] wrote: It seems to me @@identity should sufice, and it certainly does not need to be any 'new' function, since it had been there for quite a while. My feeling is that those added functions might be used for

Re: [PHP] Random Unique ID

2007-03-23 Thread tedd
At 9:15 AM +0100 3/23/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: As for efficiency, that's probably not even worth mentioning in this

Re: [PHP] Re: Random Unique ID

2007-03-23 Thread Satyam
I'm sorry if I am repeating something that has been said, but in the comments to: http://es2.php.net/manual/en/function.uniqid.php there is a little piece of code that generates UUID as per RFC 4122, and those get as unique as they come. MySql has a UUID() function and so do any database

RE: [PHP] IP to City detection

2007-03-23 Thread William Lovaton
Hi, Thanks to all of you who helped me out. I think this one is the best option for now, it even has an API for PHP 4 and another one for PHP 5. PHP 4: http://www.maxmind.com/download/geoip/api/php/ PHP 5: http://pear.php.net/package/Net_GeoIP/ Cheers, -William El mié, 21-03-2007 a las

Re: [PHP] Add New Records Only!

2007-03-23 Thread Mark
Rahul Sitaram Johari wrote: Ave, It's definitely not live data, so that is not a problem at all. But I'm not sure I understand your method very well. I do understand getting data from both the existing DBF and the multiple mySQL tables into a temporary mySQL table. But if I do go ahead

[PHP] Re: How to get class constants with there value?

2007-03-23 Thread Mikey
Mathijs wrote: Hello there, I use PHP5, and i wanted to know if there is an option to extract class constants with there name and value without using Refelection. Now i need to create a reflection of the class to get the info. Is there something like get_class_variables for constants?? Thx

Re: [PHP] Random Unique ID

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 15.13-kor tedd ezt írta: At 9:15 AM +0100 3/23/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 12.58-kor tedd ezt írta: At 4:53 PM +0100 3/22/07, Németh Zoltán wrote: 2007. 03. 22, csütörtök keltezéssel 11.42-kor tedd ezt írta: As for

[PHP] Re: Download tracker/counter

2007-03-23 Thread Mikey
Robert Wolfe wrote: [snip] 1) Allow the downloads of said files. readfile() is your friend here, although you will need to search around for the right HTTP headers to send as well. 2) Count the number of time a file has been downloaded. You could either look into creating a

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Németh Zoltán
2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that's why my mailbox is set to display 'Németh Zoltán' but

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Tijnema !
On 3/23/07, Németh Zoltán [EMAIL PROTECTED] wrote: 2007. 03. 23, péntek keltezéssel 17.30-kor Dwayne Heronimo ezt írta: YES this works thank nemeth: your welcome but please call me Zoltán ;) (my first name is Zoltán. in Hungary we write names the opposite order than anywhere else ;) so that's

Re: [PHP] References challenge with PHP4

2007-03-23 Thread Jochem Maas
Martin Alterisio wrote: 2007/3/20, Jochem Maas [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Robert Cummings wrote: On Tue, 2007-03-20 at 11:52 +0100, Jochem Maas wrote: ok, I tried it in a whole number of variations - no joy. you should use php5 if you want

[PHP] Re: How to get class constants with there value?

2007-03-23 Thread Steve
Doesn't that destroy the entire reason for having variables within a class in the first place? Why not set them as private and use accessors and mutators to mess with their values? If you aren't going to use those, why not just create global variables and functions? You basically lose your

Re: [PHP] POST a variable

2007-03-23 Thread Børge Holen
On Friday 23 March 2007 15:45, Dan Shirah wrote: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

[PHP] Re: High quality image resizing

2007-03-23 Thread Markus Fischer
Hi, Al wrote: Suggest visiting the IM forums and asking for help. Also, try resizing some images here http://studio.webbyland.com/MagickStudio/scripts/MagickStudio.cgi thanks for the hints, I'll give them a try. I use php exec() for my work. Same here. I know there are PHP libraries out

[PHP] Alternatives to PHPLib for authentication, session management, etc

2007-03-23 Thread Mark R. Cervarich
Hi. Been using PHP since the 2.0 days, and been using PHPLib since 2000 as the main method of user authentication (logging in/out during same session), and simultaneously use it to give the users who are logged in different permissions. Since PHPLib has long ago stopped (at least in my

[PHP] Configure question

2007-03-23 Thread Jake McHenry
I searched the archives... Haven't seen an answer to this yet Does anyone know why Virtual Directory Support is enabled on windows, but disabled on unix? And what exactly is it? I know I can enable it by --enable-maintainer-zts, but it says in configure that it is Thread Safety for code

RE: [PHP] Alternatives to PHPLib for authentication, session management, etc

2007-03-23 Thread Jake McHenry
If it still works, then why switch? I wrote my own auth routines Phplib was last released last summer? That's not TOO old http://phplib.sourceforge.net/ Jake Hi. Been using PHP since the 2.0 days, and been using PHPLib since 2000 as the main method of user authentication

Re: [PHP] php support

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 12:31 pm, Richard Dunne wrote: Can anyone tell me where to get support for this? php5 undefined function pg_connect() Is there a specific mailig list fro users? It means you did not correctly compile/install the PostgreSQL extension to php. If you compiled from source,

Re: [PHP] High quality image resizing

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:18 am, Dwayne Heronimo wrote: function previewString($showcatvar) { $minitxt = $showcatvar; $len = strlen($minitxt); if ($len 235) { $len = 235; } else { $len = $len; } Take out this whole else block -- Assigning a variable to itself is just

Re: [PHP] preview string with strlen PHP (help)

2007-03-23 Thread Richard Lynch
You don't need a function to do something repeatedly. You need some kind of loop, such as 'while', 'for' or 'foreach' Try working through a PHP / MySQL tutorial, as it will cover this. On Fri, March 23, 2007 10:55 am, Dwayne Heronimo wrote: Dear all, hmm.. sorry the $previewstext thing was a

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 9:45 am, Dan Shirah wrote: Okay, I feel like the correct answer to this is about 2mm back in my grey matter. 1. I have a query that pulls the last row number when a newly inserted record is added: $maximum=SELECT MAX(payment_id) FROM payment_request;

Re: [PHP] POST a variable

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 10:07 am, Dan Shirah wrote: The reason I have to use it as I posted is because I am using Microsoft SQL server instead of MySQL. And I haven't found a php function for MSSQL that works the same as mysql_insert_id() I guarantee that there is a way to do it in MSSQL,

Re: [PHP] Configure question

2007-03-23 Thread Jochem Maas
Jake McHenry wrote: I searched the archives... Haven't seen an answer to this yet Does anyone know why Virtual Directory Support is enabled on windows, but disabled on unix? And what exactly is it? I know I can enable it by --enable-maintainer-zts, but it says in configure that it is

Re: [PHP] Add New Records Only!

2007-03-23 Thread Richard Lynch
If the table is small, you could maybe do: delete from foo where id in (select b.id from foo as a, foo as b where a.id b.id and a.field1 = b.field1 and a.field2 = b.field2 and ...) Another option would be to just create a UNIQUE INDEX on the fields you think should be unique, and then your

Re: [PHP] getting a variable from a file

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 5:47 am, Ross wrote: I am using a script to generate a sitemap. It displays the page names (mypage.php) but I want it to display the titles. The page heads and title are generated dynamically so the line below does not work if(preg_match('title(.+)/title'i, $f,

Re: [PHP] Creating an FTP account on the fly from PHP

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 5:20 pm, PHP Fusebox wrote: I built a CMS that lets a super user create and manage basic users (among lots of other things). I want basic users to get an FTP account that is automatically associated with their website user account, and managed from my add/edit user form.

Re: [PHP] High quality image resizing

2007-03-23 Thread Markus Fischer
Richard Lynch wrote: Perhaps you could run GIMP from the command line to get it to re-size... Thanks .. very interesting idea. I'll see if I can make this feasable. Having the server running without X may be problematic .. not impossible, but probably hard. You should also consider what

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: On 3/22/07, Jon Anderson [EMAIL PROTECTED] wrote: Your test isn't exactly fair. The for loop has no statements in it, and the while loop has one. Your tests show while as approx 7% faster, while a modified test shows an approximate 30% speed

[PHP] usage of flock

2007-03-23 Thread Yvan Strahm
Hello All, I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop ( server or php crash-down). So i put a job_controller in crontab to check regularly if the

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Tijnema !
On 3/24/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: On 3/22/07, Jon Anderson [EMAIL PROTECTED] wrote: Your test isn't exactly fair. The for loop has no statements in it, and the while loop has one. Your tests show while as approx 7% faster,

Re: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
No, you can't load both PHP4 and PHP5 into the same Apache as Modules. You can run one as CGI. You can use proxy_server in one to shuttle requests to a different Apache pool. On Thu, March 22, 2007 12:07 am, Jake McHenry wrote: Hi everyone, I just got done going through all my configure

RE: [PHP] Question before upgrading to 5

2007-03-23 Thread Richard Lynch
On Thu, March 22, 2007 6:23 am, Jake McHenry wrote: Sorry about the delivery and read requests.. I was tired and forgot to turn them off for the list.. alternatively you can search for 'Rasmus' and 'ProxyPass' in the list archive and use Rasmus' rather cool ProxyPass solution to

Re: [PHP] Check a string does not contain invalid characters

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 11:15 pm, John Comerford wrote: I want to accept a character string which I will use as a unique user id. I want to check the string to ensure the user has not typed characters that I consider to be invalid as part of a user id. I was thinking of doing something along

Re: [PHP] Passing variables

2007-03-23 Thread Richard Lynch
example.com?char_id=43char=Bilbo There is nothing about _ and (int) at all. And, technically, you should use an HTML Entity on the in your HTML output, so it turns into amp; On Wed, March 21, 2007 9:49 pm, Jeff wrote: I want to thank you all for clearing me up on setting the

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Robert Cummings
On Sat, 2007-03-24 at 01:54 +0100, Tijnema ! wrote: On 3/24/07, Richard Lynch [EMAIL PROTECTED] wrote: On Thu, March 22, 2007 5:14 pm, Tijnema ! wrote: On 3/22/07, Jon Anderson [EMAIL PROTECTED] wrote: Your test isn't exactly fair. The for loop has no statements in it, and the while

Re: [PHP] High quality image resizing

2007-03-23 Thread Edward Vermillion
On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the

Re: [PHP] usage of flock

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop ( server or php crash-down). So i put a job_controller

Re: [PHP] close session when browser is closed

2007-03-23 Thread Richard Lynch
If you set the session timeout to 0, then it dies when the browser is quit. On Wed, March 21, 2007 12:37 pm, Alain Roger wrote: Hi, I would like to know what is the best solution for my problem. When a user is connected to a https page and a session is open, if user close his browser, the

Re: [PHP] Performance: While or For loop

2007-03-23 Thread Richard Lynch
On Fri, March 23, 2007 7:54 pm, Tijnema ! wrote: On 3/24/07, Richard Lynch [EMAIL PROTECTED] wrote: Folks: How often do you use a loop of any kind in PHP with enough iterations that this is even significant? Write the code that makes sense. Optimize the biggest bottleneck until

RE: [PHP] Job Opportunity

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 2:09 pm, Warren Vail wrote: Too bad we have to constrain our messages to fit the threading algorithm of your list server. Another case of where man becomes servant to the machine? If one replies to a message, and changes the Subject there are, in most sane systems,

RE: [PHP] High quality image resizing

2007-03-23 Thread Jake McHenry
On Fri, March 23, 2007 10:57 am, Markus Fischer wrote: I'm searching for a high quality image resizing facility to be used within PHP in an Unix/Linux environment. Probably everyone will now answer: imagecopyresampled() However, the quality of that functionality doesn't match the

Re: [PHP] Random Unique ID

2007-03-23 Thread Richard Lynch
Use auto_increment. It's not random, but you should never show it to the end user anyway, so who cares? Another option is to use http://php.net/uniqid and you can create a UNIQUE INDEX on the column and simply check mysql_errno() to see if it's 1023 (or is it 2023?) when you insert to see if you

Re: [PHP] Re: Random Unique ID

2007-03-23 Thread Richard Lynch
On Wed, March 21, 2007 5:40 pm, [EMAIL PROTECTED] wrote: Thanks. Yes, I check for errors. But there are other types of errors so I'd need to verify that it is a duplicate key error and, in my ignorance, I have not yet figured out how to do that programatically. I worry about getting into an

Re: [PHP] read only texbox to html with php

2007-03-23 Thread Richard Lynch
The fact that you are using stripslashes tells me that something is very very very wrong somewhere... For output to the textarea, just htmlentities should be sufficient. Emailing HTML enhanced newsletter will reduce the number of people who actually read the dang thing, you know. On Wed, March

  1   2   >