Re: [PHP] JPG Slide show

2005-10-22 Thread John Taylor-Johnston
... out there, I'll eat my hat. :-) Get your false teeth out and glue them on. I defy you to find one that works. Was it a php3 thing where "= " meant "echo "? I saw this in a number of scripts where folks were still using I've spent 2-3 hours trying to get a number (I can name them) of gale

Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-22 Thread Dan Trainor
Richard Lynch wrote: On Sat, October 22, 2005 11:25 pm, Dan Trainor wrote: Anyone know if it's possible to use auto_prepend_file to force the appending of a file to the request, regardless of what kind of document is generated? I can see this being a problem if the document was a picture or a

Re: [PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 11:25 pm, Dan Trainor wrote: > Anyone know if it's possible to use auto_prepend_file to force the > appending of a file to the request, regardless of what kind of > document > is generated? > > I can see this being a problem if the document was a picture or a > video > or s

[PHP] Forcing auto_prepend_file to work regardless of what document was accessed

2005-10-22 Thread Dan Trainor
Hello, all - Anyone know if it's possible to use auto_prepend_file to force the appending of a file to the request, regardless of what kind of document is generated? I can see this being a problem if the document was a picture or a video or some such - but is thre a hidden argument list to a

Re: [PHP] Re: Inserting NULL Integer Values

2005-10-22 Thread Richard Lynch
On Tue, October 18, 2005 2:15 pm, Shaun wrote: > Thanks for your replies, rather than check each vaule by name I am > trying to > produce a more dynamic solution: > > foreach ($_POST as $key => $value) { > if ($value == '') { > $_POST[$key] == 'NULL'; If you actually have == in this line, th

[PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread Manuel Lemos
Hello, on 10/22/2005 12:58 AM Richard Lynch said the following: Checking MX records is not reliable at all. I agree that it is less useful today, but it still help catches many domain name typos. ... would it not make sense for there to be a BUILT-IN PHP function of a TRUE email syntacti

Re: [PHP] White background with imagecreatetruecolor()

2005-10-22 Thread Richard Lynch
On Tue, October 18, 2005 2:21 pm, John Nichel wrote: > I'm diving into the gd functions for the first time, and I'm having a > problem creating a white background for an image when using > imagecreatetruecolor(). The manual says that this function will > create > a _black_ image, but looking at im

Re[2]: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-22 Thread Leif Gregory
Hello Richard, Saturday, October 22, 2005, 6:37:14 PM, you wrote: > Otherwise, it's compiled into the DLL and you are stuck. > A Windoze "shortcut" WILL NOT WORK One of the easiest ways to ensure you're using the php.ini file you want is to create the following registry key: HKEY_LOCAL_MACHINE\

Re: [PHP] Submit/Validate triggering problem.

2005-10-22 Thread Richard Lynch
On Fri, October 21, 2005 10:51 am, Uros Dukanac wrote: > I can make "workaround" by checking the value of $Filter (is it "A" or > "B") to > determine which button sent a request (see "Workaround code" after > "Original > code"), but it looks "dirty" to me, and I'm wondering why to do that It's pre

Re: [PHP] Processing two post values

2005-10-22 Thread Minuk Choi
...not quite sure what you're asking. Are you asking for help on how to process these variables? I wrote this off the top of my head... meaning that I did not test it... since I don't know if this was what you were asking... I just fiddled with it. Add this code and tell me if it prints out

Re: [PHP] Declaring vars as INT ?

2005-10-22 Thread Richard Lynch
On Fri, October 21, 2005 2:39 pm, Chris Knipe wrote: > Function DoSomething($Blah) { > $Blah = (int) $Blah; > return $Blah > } > > $Blah, cannot be larger than 2147483647, and sometimes, I get negative > integers back from the above function. > > This is with PHP 4.4.0 on FreeBSD 5.4-STABLE. C

Re: [PHP] Memory Leak?

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 9:24 pm, [EMAIL PROTECTED] wrote: > Sucks that you don't have more control over the incoming data. Just for the record, for when the source of this data reads this thread. I am ECSTATIC to have this data, period. :-) I know we'll work out a viable solution in time, even

Re: [PHP] Memory Leak?

2005-10-22 Thread tg-php
One other thing to keep in mind. Connecting to a database and disconnecting takes some amount of time. If you do it in batches of 10, 100, whatever then make sure you only connect and disconnect once or else you won't have any time savings at all (and will burden the server unnecessarily). Su

Re: [PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 2:32 pm, James Benson wrote: > It would be nice to have a php function valid_email or something but > until then i suppose we just make do with what is available, for what > I > need I use the following:- > > eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" > ."@"."([a-z0-9]+([\.-][a-

Re: [PHP] PHP on Windows 2003 Server

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 9:49 am, Tomás Liendo wrote: > Hi, I have enough experience working with PHP on Windows XP over IIS, > but > now I need to work on Windows Server 2003, algo with IIS. > I installed PHP (With the installer that I downloaded from > www.php.net) but > it doesn't work. When I t

Re: [PHP] XML-RPC Error:-32300:transport error - could not open socket

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 10:19 am, Dan McCullough wrote: > I'm having any issue finding out why this is happening and how to fix > it. Is it a permissions problem between php and the server or > something else? > Help Go to the command line/shell or even, gak, MS-DOS, and type: telnet XYZ 32000

Re: [PHP] JPG Slide show

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 11:15 am, John Taylor-Johnston wrote: > Found this on one of my favourite tech show sites: > http://www.flickr.com/photos/globalhermit/sets/1134389/show/ > Is there something in PHP I can script or find toproduce a slide show > of > the contents of a Linux directory? (Baby

Re: [PHP] Dynamically Loading Plugins

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 5:56 pm, Todd Nine wrote: > I have need to dynamically load some classes. I have created an > abstract class that defines a function. Note that I'm using PHP 4 so > abstract is not enforced. 3rd party plugins will then implement this > interface. Users will upload their plu

Re: [PHP] Re: file_exists()

2005-10-22 Thread Jonny Bergström
On 10/23/05, Oliver Grätz <[EMAIL PROTECTED]> wrote: > > I believe that the problem is not Windows being unable to look fpr unicode > files but PHP being unable to put th unicode string correctly in the command > line you are trying to execute. Check this by doing "exec('echo > >test.txt'.$path);"

Re: [PHP] Calling PostgreSQL & MySQL Stored Procedures

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 12:55 pm, Colin Shreffler wrote: > Can any one please tell me how you call a stored procedure in either > PostgreSQL or MySQL from php? WILD GUESS: $query = "call silly_sproc()"; mysql_query($query, $connection) or die(mysql_error($connection)); pg_exec($connection, $quer

Re: [PHP] Processing two post values

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 7:14 pm, Shaun wrote: > For each room I need to insert the values to the database, however I > cant > think of a way to do this. All one can do with php is a foreach on the > $_POST values whereas I need to process two at a time i.e. one insert > of the > x and y values per

Re: [PHP] Memory Leak?

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 5:04 pm, [EMAIL PROTECTED] wrote: > Does it make a difference if instead of one record at a time, you pull > 10, 20, 100... might speed up your process a little and if it > doesn't use any more memory, then why not? I could make a buffer of N lines and read them, I guess

Re: [PHP] Processing two post values

2005-10-22 Thread tg-php
Depending on your requirements, I think add one room at a time. For instance, your property sheet comes up initially with "No rooms configured". Then have a SELECT/OPTION pulldown for type: Bedroom Bathroom Living Room Garage Dining Room Kitchen etc... Then have an X and Y input box. You could

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

2005-10-22 Thread Dan Trainor
Richard Lynch wrote: You USED to be able to do that by putting http://username:[EMAIL PROTECTED] but then Microsoft, in its infinite wisdom, decided that was a "security risk" and stopped supporting it. AFAIK, there's no way to SET the USER/PASS from server to browser... H. You could may

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 7:14 pm, Eric Butera wrote: > On 10/22/05, Jochem Maas <[EMAIL PROTECTED]> wrote: >> >> John Nichel wrote: >> > Jay Blanchard wrote: >> > >> >> [snip] >> >> >> >>> I just noticed that extension_dir in phpinfo is c:\php4 THAT >> AIN'T >> >>> RIGHT! >> >>> Why is PHP not load

Re: [PHP] Re: file_exists()

2005-10-22 Thread Richard Lynch
On Sat, October 22, 2005 7:12 pm, Jonny Bergström wrote: > Good idea yes. But apparantly Windows couldn't do it either. :-( > > function file_exists_windows($path) { > exec('dir ' . $path, $output, $return_status); > return $return_status == 0 ? true : false; // Windows dir will return > 0 when > s

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

2005-10-22 Thread Richard Lynch
You USED to be able to do that by putting http://username:[EMAIL PROTECTED] but then Microsoft, in its infinite wisdom, decided that was a "security risk" and stopped supporting it. AFAIK, there's no way to SET the USER/PASS from server to browser... H. You could maybe use cURL to login, t

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-22 Thread Eric Butera
On 10/22/05, Jochem Maas <[EMAIL PROTECTED]> wrote: > > John Nichel wrote: > > Jay Blanchard wrote: > > > >> [snip] > >> > >>> I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T > >>> RIGHT! > >>> Why is PHP not loading the proper ini file? This is probably the > >>> source of > >>>

Re: [PHP] Re: file_exists()

2005-10-22 Thread Jonny Bergström
Good idea yes. But apparantly Windows couldn't do it either. :-( function file_exists_windows($path) { exec('dir ' . $path, $output, $return_status); return $return_status == 0 ? true : false; // Windows dir will return 0 when something was found } It works with "normal" ascii file names, but oth

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

2005-10-22 Thread Dan Trainor
Robert Cummings wrote: On Sat, 2005-10-22 at 19:28, Dan Trainor wrote: Hello, all - I'm trying to think of how this might be possible, but I can't seem to come up with anything. I'd like to make a login form of sorts, which would enable a user to authenticate against. A simple HTML form,

Re: [PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 19:28, Dan Trainor wrote: > Hello, all - > > I'm trying to think of how this might be possible, but I can't seem to > come up with anything. > > I'd like to make a login form of sorts, which would enable a user to > authenticate against. A simple HTML form, with a PHP bac

Re: [PHP] Re: file_exists()

2005-10-22 Thread Oliver Grätz
Robert Cummings schrieb: > You could try execing a shell command to give you the answer. I don't > know if it'll work, but worth a shot if you're in a bind. Yep, good idea. Use the native code of the OS ofr listing the file (dir, ls...) and parse the result. OLLi "Manche sagen, Compu

[PHP] Using PHP-based form authentication, circumventing existing Apache .htaccess "require valid-user"

2005-10-22 Thread Dan Trainor
Hello, all - I'm trying to think of how this might be possible, but I can't seem to come up with anything. I'd like to make a login form of sorts, which would enable a user to authenticate against. A simple HTML form, with a PHP back-end, where a user enters a username and password. If thi

Re: [PHP] Re: file_exists()

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 19:19, Oliver Grätz wrote: > Jonny Bergström schrieb: > > Hi > > > > file_exists('字.gif') always returns false. > > > > Can anyone help me find out a way to make it work also for these kind of > > filenames? > > > Unicode filenames can't be properly handled up to now for al

[PHP] Re: file_exists()

2005-10-22 Thread Oliver Grätz
Jonny Bergström schrieb: > Hi > > file_exists('字.gif') always returns false. > > Can anyone help me find out a way to make it work also for these kind of > filenames? > Unicode filenames can't be properly handled up to now for all I know. Perhaps waiting for PHP6 might be your only solution. OL

Re: [PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Robert Cummings wrote: On Sat, 2005-10-22 at 18:21, John Taylor-Johnston wrote: Robert Cummings wrote: On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted i

Re: [PHP] WWW-Authenticate

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 18:21, John Taylor-Johnston wrote: > Robert Cummings wrote: > > >On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: > > > > > >>Does anyone see anything wrong with my code below? It works in other > >>files, on other servers. I copied and pasted it exactly? > >>It wo

[PHP] Dynamically Loading Plugins

2005-10-22 Thread Todd Nine
Hi all. I have need to dynamically load some classes. I have created an abstract class that defines a function. Note that I'm using PHP 4 so abstract is not enforced. 3rd party plugins will then implement this interface. Users will upload their plugins via a web interface. After I save the php clas

Re: [PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Robert Cummings wrote: On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted it exactly? It won't recognise the user name or password. Does Authenticate work on all servers?

Re: [PHP] Memory Leak?

2005-10-22 Thread Jasper Bryant-Greene
On Sat, 2005-10-22 at 16:36 -0500, Richard Lynch wrote: > I've written a script to munge and import 108,000+ records. [snip] > http://l-i-e.com/feedbaby/memory_leak.htm It looks fine to me, but you might like to try accumulating the records say up to 100 at a time and then doing extended INSERTs (

Re: [PHP] WWW-Authenticate

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 17:59, John Taylor-Johnston wrote: > Does anyone see anything wrong with my code below? It works in other > files, on other servers. I copied and pasted it exactly? > It won't recognise the user name or password. Does Authenticate work on > all servers? Here is my phpinfo if

Re: [PHP] Memory Leak?

2005-10-22 Thread Robert Cummings
On Sat, 2005-10-22 at 17:36, Richard Lynch wrote: > I've written a script to munge and import 108,000+ records. > > To avoid spiking the server, I'm sleep()ing 1 second for each record. > > So it takes 30+ hours to run, so what? > > This data changes "daily" but not really much more often than t

Re: [PHP] Memory Leak?

2005-10-22 Thread tg-php
Because of the way it spikes and maintains, I'm guess that this is normal behavior, but we'll see what the real experts have to say. In theory, if you allow a process 100MB of memory and it thinks it might need some stuff again later, it's likely to cache for faster reuse of that data later. B

[PHP] WWW-Authenticate

2005-10-22 Thread John Taylor-Johnston
Does anyone see anything wrong with my code below? It works in other files, on other servers. I copied and pasted it exactly? It won't recognise the user name or password. Does Authenticate work on all servers? Here is my phpinfo if that helps?! http://www.royalarchmasonsofquebec.com/phpinfo.php

[PHP] Memory Leak?

2005-10-22 Thread Richard Lynch
I've written a script to munge and import 108,000+ records. To avoid spiking the server, I'm sleep()ing 1 second for each record. So it takes 30+ hours to run, so what? This data changes "daily" but not really much more often than that, mostly. Anyway, it seems to be using an awful lot of RAM f

[PHP] looking for test code..

2005-10-22 Thread bruce
hi.. before i reinvent the wheel... i'm looking for some code that i can modify to use as a job posting app...i've been looking over google/freshmeat/sourceforge/hotscripts/etc.. my basic needs: -allow user to enter job function, for a number of fields -allow user to maintain/update/delete/ena

[PHP] Re: Email Validation built-in? RFC

2005-10-22 Thread James Benson
It would be nice to have a php function valid_email or something but until then i suppose we just make do with what is available, for what I need I use the following:- eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*" ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email) Ive never had proble

Re: [PHP] XML-RPC Error:-32300:transport error - could not open socket

2005-10-22 Thread Dan McCullough
Tried Google and the guy who created the snippet they had no helpful information about the error. On 10/22/05, Torgny Bjers <[EMAIL PROTECTED]> wrote: > Dan McCullough wrote: > > >I'm having any issue finding out why this is happening and how to fix > >it. Is it a permissions problem between php

Re: [PHP] Calling PostgreSQL & MySQL Stored Procedures

2005-10-22 Thread Colin Shreffler
One more caveat: With an without parameters would be very helpful. -c On 10/22/05 11:55 AM, "Colin Shreffler" <[EMAIL PROTECTED]> wrote: > Can any one please tell me how you call a stored procedure in either > PostgreSQL or MySQL from php? > > Cheers > -c Thank you, Colin Shreffler Principa

[PHP] Calling PostgreSQL & MySQL Stored Procedures

2005-10-22 Thread Colin Shreffler
Can any one please tell me how you call a stored procedure in either PostgreSQL or MySQL from php? Cheers -c

[PHP] JPG Slide show

2005-10-22 Thread John Taylor-Johnston
Hi, Found this on one of my favourite tech show sites: http://www.flickr.com/photos/globalhermit/sets/1134389/show/ Is there something in PHP I can script or find toproduce a slide show of the contents of a Linux directory? (Baby pictures :) ) John -- PHP General Mailing List (http://www.php.ne

Re: [PHP] XML-RPC Error:-32300:transport error - could not open socket

2005-10-22 Thread Torgny Bjers
Dan McCullough wrote: >I'm having any issue finding out why this is happening and how to fix >it. Is it a permissions problem between php and the server or >something else? >Help > Without looking up this specific error code thoroughly through Google or elsewhere, I would have to ask you to subm

[PHP] XML-RPC Error:-32300:transport error - could not open socket

2005-10-22 Thread Dan McCullough
I'm having any issue finding out why this is happening and how to fix it. Is it a permissions problem between php and the server or something else? Help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Ugh, w32 anything is making me want to drink!

2005-10-22 Thread Jochem Maas
John Nichel wrote: Jay Blanchard wrote: [snip] I just noticed that extension_dir in phpinfo is c:\php4 THAT AIN'T RIGHT! Why is PHP not loading the proper ini file? This is probably the source of my problems all along! ACK! This is what happens when you go over to the dark side. [/s

[PHP] PHP on Windows 2003 Server

2005-10-22 Thread Tom�s Liendo
Hi, I have enough experience working with PHP on Windows XP over IIS, but now I need to work on Windows Server 2003, algo with IIS. I installed PHP (With the installer that I downloaded from www.php.net) but it doesn't work. When I try to see a PHP page I receive the following message: "The ser

Re: [PHP] PHP to read news

2005-10-22 Thread Chris Lott
On 10/19/05, Steve <[EMAIL PROTECTED]> wrote: > I'm looking for some help with reading freely available news files like > this: news://newsclip.ap.org/[EMAIL PROTECTED] > . > I'm able to connect to the newsgroup with the IMAP functions just

[PHP] Html_entities o que ??

2005-10-22 Thread Reynier Perez Mira
Hola lista: Resulta que estoy tratando de crear un RSS 2.0 para mi web y estoy medio que parado por ciertas y determinadas cosillas. La primera es que las noticias las introduzco en la BDatos usando un editor WYSIWYG (TinyMCE Editor) y entonces en los campos TEXT de la tabla me sale contenido HT

Re: [PHP] Re: OOP Newbie - why does this not work?

2005-10-22 Thread Jochem Maas
Andy Pieters wrote: While the use of () or not doesn't impede the function of his code, I consider it good programming habit to always add () to the class creator. Since it is creator? you mean constructor (same difference). considered a function, you wouldn't call a function like x=function

[PHP] Re: Classes or functions

2005-10-22 Thread Oliver Grätz
I'd say it depends on the size of your project and on any plans to reuse the code. Classes are better suited for building libraries of code you use in other projects. And any large project runs into problems with function names if the programmer doesn't use a rigorous naming system (like "function

Re: [PHP] How can I count the usage of mail function in scripts?

2005-10-22 Thread Oliver Grätz
Andy Pieters schrieb: > While it *is* possible to do what you ask for, it would be worthless. > > I can write from scratch a php script that > * looks up the mx record for a given email address > * connects to the mail server looked up > * send the message. > > Since the SMTP protocol is fairly

[PHP] file_exists()

2005-10-22 Thread Jonny Bergström
Hi file_exists('字.gif') always returns false. Can anyone help me find out a way to make it work also for these kind of filenames?

Re: [PHP] Login is not working. Please help....

2005-10-22 Thread Andy Pieters
You do know your code is open for sql injection attacks. php.net search for sql injection and session spoofing HTH Andy On Friday 14 October 2005 09:25, Jochem Maas wrote: > try some code indentation to make it more readable. > > someone else pointed you to the 'user' 'name' mismatch already I