[PHP] PHP Program as Daemon

2003-11-23 Thread Nigel Jones
I would like to know how to run a PHP Program as a Daemon on my Linux Box. What I am planing to make is a Server that will make use of the Wonderful sockets _ Nigel Jones [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Certificate failure for (IMAP)

2003-11-23 Thread QT
Dear Jason, I am using following code; require classes.php; $u = $_GET['u']; $p = $_GET['p']; $uex = explode(@, $u); $u = $uex[0]; $domain = $uex[1]; require vars.php; $MainSettings = new GlobalInit(); $TransIDEnabled = $MainSettings-INIGet('session.use_trans_sid'); session_start(); if

Re: [PHP] Why MySql doesn't free space when erasing BLOB fields?

2003-11-23 Thread Marek Kilimajer
OPTIMIZE TABLE tbl_name M wrote: Hello, sorry this mysql question here, but I cant't answer this one. I have database with BLOB fields to hold pictures (60-90 kb each). Actually I am erasing these BLOB fields (move '' into and update rcord) to free some space from my DB, but space is not

Re: [PHP] Certificate failure for (IMAP)

2003-11-23 Thread QT
Dear Jason, I try your advise which is imap open sample like follows and I get; Warning: imap_open(): Couldn't open stream {mail.smsavantaj.com:110/pop3 $mbox = imap_open ({mail.test.com:110}, [EMAIL PROTECTED], 1234); echo ph1Mailboxes/h1\n; $folders = imap_listmailbox ($mbox,

[PHP] Detecting Server API (CGI or Apache) at runtime?

2003-11-23 Thread Richard Cyganiak
Hi all, is there a way to tell at runtime if PHP is running as an Apache module or through CGI? phpinfo() shows this piece of information (Server API on the first page). But is it available as a server variable or a constant or whatever? I want to know this because I want to set the HTTP status

[PHP] file paths and binaries

2003-11-23 Thread Anthony Ritter
Greetings all, I'm looking for a tutorial or some assistance in explaning how store and then open and read a binary file using php/mysql. I've got a few tutorials about storing the binary data _within_ a mysql table from Kevin Yank, phpbuilder, etc. but I've heard that it's sometime better to

[PHP] is it safe to store username and password for mysql connection in session variables?

2003-11-23 Thread anders thoresson
Hi, In the ini-files for my php-projects, I store various settings. Two of them is username and password for my mysql-connections. Is it safe to load these two into session variables when a user logs in to my application? Or is it better to access the ini-file each time a mysql-connection

[PHP] A loop for the hours in a working day

2003-11-23 Thread Shaun
Hi, I need a loop that will print the hours in a day separated by every fifteen minutes between 0700 and 1900 e.g. 07:00 07:15 07:30 07:45 08:00 08:15 ... 19:00 How could I do this? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

php-general Digest 23 Nov 2003 15:34:15 -0000 Issue 2432

2003-11-23 Thread php-general-digest-help
php-general Digest 23 Nov 2003 15:34:15 - Issue 2432 Topics (messages 170697 through 170718): Re: Execute programs 170697 by: Eric Wood Re: $_GET String Edit 170698 by: Chris Shiflett 170699 by: Jed R. Brubaker 170701 by: Chris Shiflett ldap_search()

[PHP] Re: is it safe to store username and password for mysql connection in session variables?

2003-11-23 Thread Comex
[EMAIL PROTECTED] Anders Thoresson: Hi, In the ini-files for my php-projects, I store various settings. Two of them is username and password for my mysql-connections. Is it safe to load these two into session variables when a user logs in to my application? Or is it better to access the

[PHP] A Tricky Time Calculation

2003-11-23 Thread Shaun
Hi, Given the time range: 09:15 - 17:30 how can I tell how many 15 minute intervals occur between these two times? Obviously here I can work it out, but I need a calculation that will perform the maths for any two time ranges... Thanks for your help -- PHP General Mailing List

[PHP] Re: A loop for the hours in a working day

2003-11-23 Thread Shaun
Sorry, worked it out, here it is if anyone needs it :) $minutes = array(00, 15, 30, 45); $hours = array(07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19); for ($x = 0; $x 13; $x++ ) { for ($y = 0; $y 4; $y++ ) { echo tr td.$hours[$x].'.'.$minutes[$y]./td /tr; } }

[PHP] php daemon

2003-11-23 Thread Jon Hill
I have just been trying to work out the behaviour of running a php programm from BASH. If i execute ./my_program.php /var/log/mylog 21 and then terminate the controlling terminal I get a background process which has no controlling terminal, a parent process id of 1 and the process becomes a

[PHP] xml parser und bestehende variablen - multilinguale app

2003-11-23 Thread Merlin
Hallo zusammen, ich möchte gerne meine bestehende app in mehreren Sprachen anbieten. Dazu habe ich mir ein xml parser package installiert welches in der Lage ist aus xml dateien inhalte einzufügen. Zum Bsp sieht das xml file so aus: enexample/en debeispiel/de Das funktioniert so weit. Das

Re: [PHP] Re: A loop for the hours in a working day

2003-11-23 Thread Kelly Hallman
On Sun, 23 Nov 2003, Shaun wrote: Sorry, worked it out, here it is if anyone needs it :) $minutes = array(00, 15, 30, 45); $hours = array(07, 08, 09, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19); for ($x = 0; $x 13; $x++ ) { for ($y = 0; $y 4; $y++ ) { echo

Re: [PHP] ldap_search() question

2003-11-23 Thread Kelly Hallman
On Sat, 22 Nov 2003, Schechter, Ricky wrote: Do I use ldap_search to authenticate users in LDAP? I can successfully search the LDAP and retrieve user's data based on a search criteria like (cn=something). If I use (password=somepass) or (userPassword=somepass) in the search criteria it comes

[PHP] Re: function that appends dollar symbol

2003-11-23 Thread zerof
Please, see: http://www.php.net/manual/en/function.localeconv.php and http://www.php.net/manual/en/function.setlocale.php - zerof - Joffrey Leevy [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] The money_format function does not do it for me. Is there a simple php

[PHP] Advice: GET vs. POST vs. SESSION

2003-11-23 Thread Jed R. Brubaker
I was hoping that some of you would be able to give me some advice. I have started creating a web application that makes heavy use of URL GET variables in order to solve a problem that I have had with POST in the past - namely, having to refresh the document and repost the variables when you use

Re: [PHP] Advice: GET vs. POST vs. SESSION

2003-11-23 Thread Robert Cummings
On Sun, 2003-11-23 at 14:27, Jed R. Brubaker wrote: I was hoping that some of you would be able to give me some advice. I have started creating a web application that makes heavy use of URL GET variables in order to solve a problem that I have had with POST in the past - namely, having to

Re: [PHP] Re: A loop for the hours in a working day

2003-11-23 Thread David Otton
On Sun, 23 Nov 2003 10:49:58 -0800 (PST), you wrote: That works, but it's a little unweildy.. especially if you want to change the range later (changing the array may not be so bad, but then you've got to figure out how many iterations your loops must do, etc). How about something like this:

[PHP] Re: PHP Encoders

2003-11-23 Thread Ira Baxter
Jerry [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have always been a little bit reluctant to use obfuscators since the source code does not actually disappear and it should not be too difficult to find the correct patterns and algorythms to map and restore the scrambled code.

[PHP] PHP with Java extension

2003-11-23 Thread Panos Konstantinidis
Hello, I am completely new to PHP and due to some disparate components in our system I am trying to integrate PHP with Java. I have followed the instructions in the README file (under the ext/java folder in the PHP bundle) but I have hit a snag two days now. I have done several changes in my

[PHP] secure query string before sending it to mysql

2003-11-23 Thread anders thoresson
Hi, I'm working on a database class of my own. I've got the following method: /** * query() performs a query on the selected database */ function query($dbQuery) { if (is_string($dbQuery)) $this-dbQuery =

Re: [PHP] A Tricky Time Calculation

2003-11-23 Thread Eugene Lee
On Sun, Nov 23, 2003 at 03:42:58PM -, Shaun wrote: : : Given the time range: 09:15 - 17:30 how can I tell how many 15 minute : intervals occur between these two times? Obviously here I can work it out, : but I need a calculation that will perform the maths for any two time : ranges...

Re: [PHP] xml parser und bestehende variablen - multilinguale app

2003-11-23 Thread Evan Nemerson
How are you parsing the XML? If you read the values into a PHP variable, and you're confident in the contents of the string, you could use eval()... Also, preg_replace_callback() may be useful. If you provide a bit more example, it may be more easy to help. In any case, I think your variable

[PHP] basic auth question

2003-11-23 Thread Dennis Gearon
Please CC me, I am on digest -- If I have a directory like: $HOME/www/ (document root) It has a auth section in the .htaccess file $HOME/www/.htaccess another directory like: $HOME/www/want_to_be_public/ How can I defeat the auth section in the

[PHP] String returned from forms and such

2003-11-23 Thread Robin Kopetzky
Good afternoon. I'm having a problem handling strings with spaces being passed from a form by HREF to a PHP program. Example: A HREF=buttons.php?state_name=New Mexicobutton code/A When the 'New Mexico' gets to phpinfo, it says the string is 'New+Mexico' and that's not what I need. I used

Re: [PHP] String returned from forms and such

2003-11-23 Thread David Otton
On Sun, 23 Nov 2003 15:19:23 -0700, you wrote: When the 'New Mexico' gets to phpinfo, it says the string is 'New+Mexico' and that's not what I need. I used htmlspecialchars to add the %20 to the string but didn't get it. What am I doing wrong or missing?? That sounds like the behaviour of

[PHP] basic auth question

2003-11-23 Thread Dennis Gearon
Please CC me, I am on digest -- If I have a directory like: $HOME/www/ (document root) It has a auth section in the .htaccess file $HOME/www/.htaccess another directory like: $HOME/www/want_to_be_public/ How can I defeat the auth section in the

[PHP] basic auth question

2003-11-23 Thread Dennis Gearon
Please CC me, I am on digest -- If I have a directory like: $HOME/www/ (document root) It has a auth section in the .htaccess file $HOME/www/.htaccess another directory like: $HOME/www/want_to_be_public/ How can I defeat the auth section in the

[PHP] User/Pwd Management Package?

2003-11-23 Thread Jonathan Rosenberg
Friends, I'm interesting in finding a PHP package that implements functions for managing user names passwords controlling access to specific parts of a site. Of course, free is best. But cheap is good. And, even not-so-cheap is fine, as long as it provides good functionality. Any pointers

[PHP] Re: User/Pwd Management Package?

2003-11-23 Thread Al
There are a number of open-source PEAR packages that can help you manage usernames, passwords, and user preferences. Check out: http://pear.php.net/packages.php?catpid=1catname=Authentication Hope it helps, Al Jonathan Rosenberg [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

[PHP] String Manip. - Chop Equivalent

2003-11-23 Thread Jed R. Brubaker
Does PHP have an equivalent to PERL's chop - that is, a way to get rid of the last character in a string? Hello World to Hello Worl Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] SQLITE

2003-11-23 Thread Curt Zirzow
* Thus wrote Bronislav Kluèka ([EMAIL PROTECTED]): Hi, I've got questions: I've got sqlite like PHP module (under windows). I tried this: a)execute script 1 (selecting from some table), it tooks 2 minutes b)execute script 2 , it tooks 3 minutes c)execute them both at the

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Terence
Jed R. Brubaker wrote: Does PHP have an equivalent to PERL's chop - that is, a way to get rid of the last character in a string? Hello World to Hello Worl Thanks in advance. this might work, haven't tested it... second param is optional function chop($strSubject, $intWastage = 1) { $strRes = ;

[PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Al
From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php): $string = substr($string, 0, -1); Al Jed R. Brubaker [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Does PHP have an equivalent to PERL's chop - that is, a way to get rid of the last character in a string?

[PHP] ldap_search() question

2003-11-23 Thread Daniel Baird
Schechter, Ricky [EMAIL PROTECTED] wrote: Do I use ldap_search to authenticate users in LDAP? I can successfully search the LDAP and retrieve user's data based on a search criteria like (cn=something). If I use (password=somepass) or (userPassword=somepass) in the search criteria it comes back

[PHP] preg_replace() issue

2003-11-23 Thread Darkstar
1) function filter() { if($this-post['a'] == savenews) { $this-post['summary'] = preg_replace(!\[url\](.*)\[/url\]!,a href=\\\1\\\1/a, $this-post['summary']); } --- 2) global $nwedst; $nwedst = str_replace(br\n, '', $dat-summary); nwedst = preg_replace(!\a

Re: [PHP] Re: String Manip. - Chop Equivalent

2003-11-23 Thread Robert Cummings
On Sun, 2003-11-23 at 20:02, Al wrote: From the PHP Manual notes (http://us2.php.net/manual/en/function.chop.php): $string = substr($string, 0, -1); You'd be better off with: $string = substr( $string, 0, -1 ); to avoid unnecessary interpolation overhead. Cheers, Rob. --

[PHP] PHP to get mail headers

2003-11-23 Thread Scott St. John
I run a small ISP and am looking at ways to automate grabbing the headers from email. I currently copy all email to a BSD box, then use Pine in header mode to get the IP addresses from which I build my spam filters. A search did not yield much in what I am trying to do: 1)Open the mailbox

[PHP] download from mysql script

2003-11-23 Thread Anthony Ritter
I'm trying to receive data from a mysql database through php. Using the command line at mysql listed below gives me a result set. I am able to connect to the database through php, however, when using the following script, I receive no data when the data is in the table called pictures in the db

Re: [PHP] A loop for the hours in a working day

2003-11-23 Thread Justin French
On Monday, November 24, 2003, at 02:34 AM, Shaun wrote: Hi, I need a loop that will print the hours in a day separated by every fifteen minutes between 0700 and 1900 e.g. 07:00 07:15 07:30 07:45 08:00 08:15 ... 19:00 How could I do this? ? $start = 7; $end = 19; $h = $start; while($h = $end)

Re: [PHP] is it safe to store username and password for mysql connection in session variables?

2003-11-23 Thread Justin French
On Monday, November 24, 2003, at 01:54 AM, anders thoresson wrote: Is it safe to load these two into session variables when a user logs in to my application? Or is it better to access the ini-file each time a mysql-connection is needed? I include the file with unames and passwords as needed.

Re: [PHP] Re: A loop for the hours in a working day

2003-11-23 Thread Kelly Hallman
On Sun, 23 Nov 2003, David Otton wrote: How about something like this: $hstart = 7; $hend = 19; $interval = 15; for($h=$hstart; $h $hend; $h++) { for($m=0; $m 60; $m += $interval) { echo sprintf(%d:%02d,$h,$m); } } Couple of suggestions on top: replace echo sprintf with a simple

[PHP] Re: PHP to get mail headers

2003-11-23 Thread Al
Scott St. John [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] A search did not yield much in what I am trying to do: 1)Open the mailbox and extract the Received, From and Subject headers. 2)Drop those into a database that I can manage from the browser. There are two PEAR packages

[PHP] Duplicate Images

2003-11-23 Thread Erin
Hi All, Please give me a hand with this, ive been trying to do this for the best part of today but i have got no where! I have two arrays both have 161 elements, each has a list of filenames on my server (images) now the idea here is to take the image name from array 1 copy it and re-name it

[PHP] when to use \n in forms

2003-11-23 Thread Joffrey Leevy
Hi: Can someone shed some light on this please? To me when doing a form in php using \n or not using \n makes no difference. I still get the form in my browser to work. For instance, ?php echoform action='processform_2b.php' method='post'\n select name='animal'\n

php-general Digest 24 Nov 2003 03:41:07 -0000 Issue 2433

2003-11-23 Thread php-general-digest-help
php-general Digest 24 Nov 2003 03:41:07 - Issue 2433 Topics (messages 170719 through 170756): Re: is it safe to store username and password for mysql connection in session variables? 170719 by: Comex 170752 by: Justin French A Tricky Time Calculation 170720 by:

Re: [PHP] Duplicate Images

2003-11-23 Thread John Nichel
Erin wrote: Hi All, Please give me a hand with this, ive been trying to do this for the best part of today but i have got no where! I have two arrays both have 161 elements, each has a list of filenames on my server (images) now the idea here is to take the image name from array 1 copy it and

Re: [PHP] when to use \n in forms

2003-11-23 Thread John Nichel
Joffrey Leevy wrote: Hi: Can someone shed some light on this please? To me when doing a form in php using \n or not using \n makes no difference. I still get the form in my browser to work. For instance, ?php echoform action='processform_2b.php' method='post'\n select

RE: [PHP] when to use \n in forms

2003-11-23 Thread Nigel Jones
No Diff, Plus i think that HTML is wrong Use: OPTION value='cat'cat/OPTION OPTION value='dog'dog/OPTION OPTION value='rat'rat/OPTION Just for that HTML standards sake :P _ Nigel Jones [EMAIL PROTECTED] -Original Message-

Re: [PHP] when to use \n in forms

2003-11-23 Thread John Nichel
Nigel Jones wrote: No Diff, Plus i think that HTML is wrong Use: OPTION value='cat'cat/OPTION OPTION value='dog'dog/OPTION OPTION value='rat'rat/OPTION Just for that HTML standards sake :P Most (if not all) browsers of today with handle it fine without

[PHP] Setting counter in variable name within foreach loop

2003-11-23 Thread Jake McHenry
Is this possible? I've been messing with this for about an hour now, searching on google for about half hour. Here is what I want to do: foreach ($array as $key = $value) { $value = explode(|, $value); $counter = 0; if ($value[7] == Yes) { $counter++; $date_$counter = $value[1];

RE: [PHP] when to use \n in forms

2003-11-23 Thread Nigel Jones
How I take it is the fact that most is not all, it's best if possible to do for all hence why I try to keep away from DHTML and Javascript _ Nigel Jones [EMAIL PROTECTED] -Original Message- From: John Nichel [mailto:[EMAIL PROTECTED] Sent: Monday, November 24, 2003

Re: [PHP] when to use \n in forms

2003-11-23 Thread John Nichel
Nigel Jones wrote: How I take it is the fact that most is not all, it's best if possible to do for all hence why I try to keep away from DHTML and Javascript I agree totally. Besides, I leave all that DHTML and JS to the 'Web Designers' ;) -- By-Tor.com It's all about the Rush

RE: [PHP] Setting counter in variable name within foreach loop

2003-11-23 Thread Nigel Jones
$date_$counter = $value[1]; -- this is line 33 $dest_$counter = $value[3]; $dep_$counter = $value[4]; you can't do that you'd have to do something like $mydate[$counter] = $value[1]; _ Nigel Jones [EMAIL PROTECTED] -Original Message- From: Jake

RE: [PHP] when to use \n in forms

2003-11-23 Thread Nigel Jones
Not to offend anyone BUT What the is DHTML and JS (and VB for that matter) meant to do, we can use PHP instead who needs onLoad=Gimmethedampopups() - not me anyway i Perfer not to have popups :) _ Nigel Jones [EMAIL PROTECTED] -Original Message- From: John

[PHP] Parse WebCT quiz

2003-11-23 Thread John Taylor-Johnston
Can someone help me get started? Anyone ever use WebCT? It uses quizzes, field types described here. https://online.csus.edu/web-ct/help/en/designer/quiz/quiz_transfer.html#formats Can someone help me parse them out please? I don't want to pay for WebCT. It was a GNU project gone commercial. It

[PHP] odbc_tables

2003-11-23 Thread Nicolas Gomez
This function doesn't work for me following the API, but I solve partially my problem using this: $tablelist=odbc_result_all(odbc_tables($conn)); instead of : $tablelist=odbc_tables($conn); $tablelist=odbc_result_all($tablelist); but I need to put the table names in a select field; so I need

Re: [PHP] Parse WebCT quiz

2003-11-23 Thread John Taylor-Johnston
I have done this (below) already. I suppose. I will have to explode by \n. One of my problems is that with :QUESTION:{H|T}, the question is on the next line. Exploding by \n puts my question text into the next line_field[]. Note: Multiple lines of text are permitted. Getting that variabnle