Re: [PHP] Couple of questions

2002-10-26 Thread Jason Wong
On Friday 25 October 2002 02:04, Chris Boget wrote: 1) Does anyone know of a JS mailing list that actually has a good amount of traffic (receives more than 10 email messages a day)? Dunno google - javascript weenie -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source

Re: [PHP] ldap_add problem

2002-10-26 Thread Stig Venaas
On Thu, Oct 24, 2002 at 04:37:56PM -0400, GC wrote: Hi, I wrote a simple page that tries to enter a string into a LDAP server. I get the following error: Warning: LDAP: add operation could not be completed. in /var/www/html/user/adduser_p.php on line 65 Where in my log files can I go to

[PHP] parsing conundrum

2002-10-26 Thread Peter Harkins
If you know what recursion is and like a challege, here's a puzzle to keep you up nights. If not, you'll probably just want to mutter to yourself what a poor, unlucky bastard and pass on by. I'm parsing some data files into a PHP array and am stumped. I'm at a loss for how to do

[PHP] mysql_fetch_row options

2002-10-26 Thread James Taylor
There's got to be a better way to go about this: I am constantly doing mysql queries where I am doing a count(), so a sample query would be like this: select count(*) from database. I'm expecting only ONE value back exactly, and that's the count results. However, to get this data into a

Re: [PHP] mysql_fetch_row options

2002-10-26 Thread Tom Rogers
Hi, Saturday, October 26, 2002, 8:23:23 PM, you wrote: JT There's got to be a better way to go about this: I am constantly doing mysql JT queries where I am doing JT a count(), so a sample query would be like this: select count(*) from JT database. I'm expecting only JT ONE value back exactly,

Re: [PHP] mysql_fetch_row options

2002-10-26 Thread Jason Wong
On Saturday 26 October 2002 18:23, James Taylor wrote: There's got to be a better way to go about this: I am constantly doing mysql queries where I am doing a count(), so a sample query would be like this: select count(*) from database. I'm expecting only ONE value back exactly, and that's

RE: [PHP] Re: PHP Session register variable not always restored with contents

2002-10-26 Thread Victor Soroka
On Thu, 24 Oct 2002 21:26:30 +, John W. Holmes wrote: What is supposed to be in the session? Maybe these users are just denying cookies? Maybe... But my php compiled with --use-trans-sid and use this feature. In the session i store account, access timestamp etc... P.S. And 10% of traffic

[PHP] script language=php???

2002-10-26 Thread Jason Porembski
Hey folks. I am attempting to run PHP code with script language=php and it doesn't work. Any ideas as to why and how I can fix that? Also what is the best way to run a snippet of PHP code in an ASP page? Thanks in advance. Jason Gluten Mifflin Porembski http://www.world-gaming.com -- PHP

Re: [PHP] script language=php???

2002-10-26 Thread John Nichel
Does it work when you do it like this ?php some code; some more code; ? Jason Porembski wrote: Hey folks. I am attempting to run PHP code with script language=php and it doesn't work. Any ideas as to why and how I can fix that? Also what is the best way to run a snippet of PHP code in

[PHP] passthru problems generating WAVs with mpg123

2002-10-26 Thread soren
I've written a little script for VoiceXML applications to generate a WAV from an MP3 on demand: #file wavwrapper.php ? header('Content-Type: audio/wav'); $filename = $_GET['filename']; $mp3dir=/var/www/mp3s/; $playercmd=/usr/local/bin/mpg123 -m -w - -q -4 --8bit; passthru($playercmd

php-general Digest 26 Oct 2002 16:54:49 -0000 Issue 1667

2002-10-26 Thread php-general-digest-help
php-general Digest 26 Oct 2002 16:54:49 - Issue 1667 Topics (messages 121513 through 121528): ftp_problem - ... php_network_getaddresses: getaddrinfo failed: ... 121513 by: vic 121514 by: John Nichel 121515 by: vic 121516 by: John Nichel 121517 by:

Re: [PHP] passthru problems generating WAVs with mpg123

2002-10-26 Thread Justin French
I'm SURE you've got a good reason, but why are you wanting to generate a WAV on demand? The loss in file quality occurs going from WAV MP3, so then later going back to WAV would only result in a bigger file size, with ZERO benefit in audio quality. Just asking :) Justin on 26/10/02 4:53 PM,

[PHP] Re: upload files

2002-10-26 Thread Chad Cotton
I just wrote a file upload script and all the information that I needed was here in the manual: http://www.php.net/manual/en/features.file-upload.php There were a couple of common pitfalls that it points out, which you should check. Make sure you've defined the various configuration variables

[PHP] PHP Manual Book

2002-10-26 Thread Stephen
Hello, I was just wondering if the entire PHP manual at php.net was published into a book or not. I was going to print it out once but it turned out to be about 1000+ pages... Thanks, Stephen Craton http://www.melchior.us http://php.melchior.us

[PHP] Re: mysql_fetch_row options

2002-10-26 Thread Monty
I use the following function to do this... function countRecords($query, $dbcon=0) { if ($dbcon==0) { $ dbcon = connDbase(); } $query = SELECT COUNT(*) .$query; $res = mysql_query($query, $ dbcon); // Query DB. return mysql_result($res, 0, count(*)); } Here's how it's used:

[PHP] Re: parsing conundrum

2002-10-26 Thread Monty
I'm not attempting to solve this puzzle, but, regarding the output from print_r(), try this for nicely formatted output: echo pre; print_r($myarray); echo /pre; Looks much better. Monty From: [EMAIL PROTECTED] (Peter Harkins) Newsgroups: php.general Date: Sat, 26 Oct 2002 02:37:51 -0700

Re: [PHP] extract($_POST)

2002-10-26 Thread Monty
Well, one way you can avoid similar things to happen is, you can do something like, say, create a user that can only SELECT. If the user can only SELECT then it cannot DELETE. This is a great suggestion from Rick. I already use this method. I have several MySQL users set up for various

Re: [PHP] extract($_POST)

2002-10-26 Thread Monty
Rick Emery wrote: You can still use extract($_POST). It is as safe/vulernable as $_POST['isAdmin']. In either case, use only variables that you know are yours and be certain these contain values which you believe to be safe. For instance, if you expect a variable called $firstname to

[PHP] Mail Delivery errors when posting here ???

2002-10-26 Thread Monty
For some reason I get the following e-mail every time I make a post here recently and not sure why: --- This message was created automatically by mail delivery software (Exim). A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The

[PHP] Problem with session and register_globals=off

2002-10-26 Thread Alexandre
Hello, When I try the code below and register_globals=On, its work fine, the counter variable is incremented each time that I load the page, but, when register_globals=Off, its does not work, the counter variable is save just in first time and never more. ?php session_start(); // register a

[PHP] Problem wih Session and register_globals

2002-10-26 Thread Jacques Marques
Hello, When I try the code below and register_globals=On, its work fine, the counter variable is incremented each time that I load the page, but, when register_globals=Off, its does not work, the counter variable is save just in first time and never more. ?php session_start(); // register a

Re: [PHP] PHP Manual Book

2002-10-26 Thread Jason Wong
On Sunday 27 October 2002 02:45, Stephen wrote: Hello, I was just wondering if the entire PHP manual at php.net was published into a book or not. I was going to print it out once but it turned out to be about 1000+ pages... It would be out of date as soon as it's published and before it even

[PHP] Problem with Session and register_globals

2002-10-26 Thread Jacques Marques
Hello, When I try the code bellow with register_globals=On, it work was expected, the counter variable is incremented each time that I load the page, but, when I try with register_globals=Off, it doesn´t work, the counter variable is incremented just in the first time, the session variable is not

RE: [PHP] Best way to set global params for entire site??

2002-10-26 Thread Lance Lovette
If you are not running PHP under a Windows platform the most efficient way to solve your problem is with a PHP extension I developed. It handles constants and provides a type of persistent variable too. It has been immensely useful for my projects. http://pwee.sourceforge.net/ Lance

RE: [PHP] script language=php???

2002-10-26 Thread John W. Holmes
You can't have both. Either the script is parsed by PHP or it's parsed by ASP. ---John Holmes... -Original Message- From: Jason Porembski [mailto:jporembs;optonline.net] Sent: Friday, October 25, 2002 11:30 PM To: [EMAIL PROTECTED] Subject: [PHP] script language=php??? Hey

RE: [PHP] Problem with session and register_globals=off

2002-10-26 Thread John W. Holmes
$counter is not related to the session at all with register_globals OFF. Use $HTTP_SESSION_VARS['count']++; ---John Holmes... -Original Message- From: Alexandre [mailto:alexandre;cmsmedical.com.br] Sent: Saturday, October 26, 2002 2:42 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem

Re: [PHP] script language=php???

2002-10-26 Thread John Nichel
So if you have... ?php some code; some more code; ? and % asp junk; m$ junk; % it your server will parse both the php and asp code? Jason Porembski wrote: Yes it does. But I need the php to work in an ASP page =( - Original Message - From: John Nichel [EMAIL PROTECTED] To:

[PHP] Getting the From: admin@site.com to work

2002-10-26 Thread Andre Dubuc
Perhaps some kind guru can spare me some time. I've tried to get the From: field pre-filled for a registration/confirmation email that I send out. I've managed to get the To: ' field working great, but no matter where I stick the 'From:' code, it doesn't send the email. Any ideas what I'm

RE: [PHP] extract($_POST)

2002-10-26 Thread John W. Holmes
You can still use extract($_POST). It is as safe/vulernable as $_POST['isAdmin']. In either case, use only variables that you know are yours and be certain these contain values which you believe to be safe. For instance, if you expect a variable called $firstname to contain a name to

RE: [PHP] Getting the From: admin@site.com to work

2002-10-26 Thread John W. Holmes
[snip] if(@mail($to, $from, $subject, $message)) Go back to the manual. The parameters for mail are mail(to,subject,message,headers). You have to pass the From: address in the headers. $to = [EMAIL PROTECTED]; $subject = Your email; $message = Your email is good; $headers = From: [EMAIL

Re: [PHP] Getting the From: admin@site.com to work

2002-10-26 Thread John Nichel
http://www.php.net/manual/en/function.mail.php if(@mail($to, $from, $subject, $message)) There is no 'from' field. This must be put in the headers. Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the From: field pre-filled for a

Re: [PHP] Getting the From: admin@site.com to work

2002-10-26 Thread Andre Dubuc
Thanks John, I had the maual in front of me, but I didn't understand that you had to put the 'From:' stuff in a 'header'. That's why it wasn't working. I presumed (wrongly again) that 'headers' were optional, and I got sidetracked by the success of the To: field. Thanks for clearing that up.

[PHP] Re: Getting the From: admin@site.com to work

2002-10-26 Thread Monty
Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the From: field pre-filled for a registration/confirmation email that I send out. To add to John's reply, here's how to do a multi-parameter Header. Also note the \r\n at the end of each of these lines. If

Re: [PHP] Getting the From: admin@site.com to work

2002-10-26 Thread David McInnis
You need to build your header and include that in your mail() call: $lc_headers = From: $lc_from_name $lc_from_email\n; $lc_headers .= X-Sender: $lc_sender\n; $lc_headers .= X-Mailer: PHP\n; // mailer $lc_headers .= Return-Path: $lc_return\n; // Return path for errors $lc_headers .=

Re: [PHP] extract($_POST)

2002-10-26 Thread Monty
John W. Holmes wrote: Then make sure $name has all single quotes escaped within it. If all of them are escaped, then it's just a string and can't do any harm. If they aren't escaped, then the user can break out of your own SQL and put their own. I'm confused about when I should escape

Re: [PHP] Re: Getting the From: admin@site.com to work

2002-10-26 Thread dwalker
How would you then build into the headers an 'invisible' BCC (blind carbon copy)? -Original Message- From: Monty [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Saturday, October 26, 2002 3:53 PM Subject: [PHP] Re: Getting the From: [EMAIL PROTECTED] to work Andre

Re: [PHP] Getting the From: admin@site.com to work

2002-10-26 Thread John Nichel
Add this to the header string... Bcc: [EMAIL PROTECTED]\r\n; Andre Dubuc wrote: Perhaps some kind guru can spare me some time. I've tried to get the From: field pre-filled for a registration/confirmation email that I send out. I've managed to get the To: ' field working great, but no

RE: [PHP] extract($_POST)

2002-10-26 Thread John W. Holmes
I'm confused about when I should escape single or double quotes. Should all quotes be stored as \ or \' in a database as well? Escape both, just use addslashes. The key here is that if you are inserting a variable into a string (which is all a query is), then you want to make sure that the

Re: [PHP] extract($_POST)

2002-10-26 Thread Monty
John W. Holmes wrote: Then make sure $id is a number. You can use is_int, or (int), or whatever. It appears that any numeric values passed via the URL (..?param=10001) are automatically treated as strings. If I pass ?param=1001 to the following script... $type = ''; if

[PHP] blogger with ODBC support?

2002-10-26 Thread jaxon
hi, does anyone know of a blogger with ODBC support? cheers, jaxon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] extract($_POST)

2002-10-26 Thread John W. Holmes
Then make sure $id is a number. You can use is_int, or (int), or whatever. It appears that any numeric values passed via the URL (..?param=10001) are automatically treated as strings. If I pass ?param=1001 to the following script... So turn it into an integer. $param =

Re: [PHP] php and databases

2002-10-26 Thread Andrew Hill
Or, more simply - set up an ODBC DSN on the Windows box to the MySQL database, and simply link the tables into Access. Best regards, Andrew Hill Director of Technology Evangelism - OpenLink Software Universal Data Access and the Virtuoso Universal Server

[PHP] Referral Site...

2002-10-26 Thread Ken Kirtley
I'm new to PHP and so this may be something of a newbie question. My bad if it is. I've spent a week now looking for information on capturing the referral site with php so that I can store it with some session information. If any of you have any idea how to accomplish this I would greatly

RE: [PHP] Referral Site...

2002-10-26 Thread eNetwizard Developers Team
$HTTP_REFERER $_SERVER[HTTP_REFERER] Samuel | http://enetwizard.net -Original Message- From: Ken Kirtley [mailto:kdkirtley;earthlink.net] Sent: Saturday, October 26, 2002 5:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Referral Site... I'm new to PHP and so this may be something of a

[PHP] Re: Referral Site...

2002-10-26 Thread Monty
Ken Kirtley wrote: I'm new to PHP and so this may be something of a newbie question. My bad if it is. I've spent a week now looking for information on capturing the referral site with php so that I can store it with some session information. If any of you have any idea how to accomplish

[PHP] Question!

2002-10-26 Thread Trasca Ion-Catalin
If I have a php file who calls another php file which change some letters on the first file, why my php code on the first file won't work anymore? I hope I was explicit enough in my question. -- Trasca Ion-Catalin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] extract($_POST)

2002-10-26 Thread Monty
John W. Holmes wrote: Bottom line is that you want to use addslashes() or magic_quotes_gpc() on any variable you're going to insert into a query string. If you're inserting a variable that should be a number, make sure it is one. If I have magic quotes turned on, do I still need to worry

RE: [PHP] script language=php???

2002-10-26 Thread Jason Porembski
Ok then without asp how do I get script language=php to work? I checked out a PHP book today and it did mention running PHP scripts that way, without a .php extension. -Original Message- From: John W. Holmes [mailto:holmes072000;charter.net] Sent: Saturday, October 26, 2002 4:28 PM To:

[PHP] Flash / PHP Question

2002-10-26 Thread Stephen
I'm tyring to follow a DevArticle tutorial on creating a online users script in flash. Problem is, I can't find where the actions properties are to enter things like this: loadVariablesNum(count.php?RND=+random(999), 0); Please help!! I'm using Flash MX, same as the tutorial. I've also posted

RE: [PHP] extract($_POST)

2002-10-26 Thread John W. Holmes
Bottom line is that you want to use addslashes() or magic_quotes_gpc() on any variable you're going to insert into a query string. If you're inserting a variable that should be a number, make sure it is one. If I have magic quotes turned on, do I still need to worry about using

RE: [PHP] script language=php???

2002-10-26 Thread John W. Holmes
Ok then without asp how do I get script language=php to work? I checked out a PHP book today and it did mention running PHP scripts that way, without a .php extension. No, it still has to have a .php extension, or an extension that your web server recognizes as PHP. The extension is the only

Re: [PHP] Question!

2002-10-26 Thread Justin French
That's impossible to answer!! My guess is that the few letters you change affect the way the script runs, so it's probably causing an error. Without seeing *WHAT* you change, I can only guess. Justin on 27/10/02 10:31 AM, Trasca Ion-Catalin ([EMAIL PROTECTED]) wrote: If I have a php file

Re: [PHP] extract($_POST)

2002-10-26 Thread @ Edwin
Or, You can use this: http://www.php.net/manual/en/function.is-numeric.php - E John W. Holmes [EMAIL PROTECTED] wrote: Then make sure $id is a number. You can use is_int, or (int), or whatever. It appears that any numeric values passed via the URL (..?param=10001) are

[PHP] Sessions Sessions. Lovely Sessions.

2002-10-26 Thread Mohamed S.
Ok. I've had to wrestle with some peculiar issues with my sessions... 1) If at any point, I give my session a name different than the default using session_name('XYZ'), my session won't be created. Is there a limit to the number of characters a session name can have? Capitalization? ANYTHING?

Re: [PHP] Flash / PHP Question

2002-10-26 Thread @ Edwin
Hello, I'm afraid that your question is more of a How can I use Flash MX? question. Maybe you should get a good book about Flash MX or just google for some more other tutorials... - E Stephen [EMAIL PROTECTED] wrote: I'm tyring to follow a DevArticle tutorial on creating a online users

[PHP] predifined functions

2002-10-26 Thread DaRk--ObJeCtS
alright i wanna know where i could see the source of predifened functions like session_register. Thx. -- Dark |++| Darkobjects.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] script language=php???

2002-10-26 Thread Chris Garaffa
On Saturday, October 26, 2002, at 09:45 PM, John W. Holmes wrote: Ok then without asp how do I get script language=php to work? I checked out a PHP book today and it did mention running PHP scripts that way, without a .php extension. No, it still has to have a .php extension, or an extension

Re: [PHP] predifined functions

2002-10-26 Thread Jason Wong
On Sunday 27 October 2002 10:40, DaRk--ObJeCtS wrote: alright i wanna know where i could see the source of predifened functions like session_register. Thx. the manual? -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting *

Re: [PHP] predifined functions

2002-10-26 Thread Justin French
on 27/10/02 2:31 PM, Jason Wong ([EMAIL PROTECTED]) wrote: On Sunday 27 October 2002 10:40, DaRk--ObJeCtS wrote: alright i wanna know where i could see the source of predifened functions like session_register. Thx. the manual? errr, no the SOURCE... download it from php.net... did around,

php-general Digest 27 Oct 2002 05:26:21 -0000 Issue 1668

2002-10-26 Thread php-general-digest-help
php-general Digest 27 Oct 2002 05:26:21 - Issue 1668 Topics (messages 121529 through 121576): Re: passthru problems generating WAVs with mpg123 121529 by: Justin French Re: upload files 121530 by: Chad Cotton PHP Manual Book 121531 by: Stephen 121539 by:

[PHP] Mac OS X EI TEXTAREA Problem

2002-10-26 Thread Dan Tappin
I am setting a MySQL update page where a user is provided a HTML form to update with data auto poulated from a MySQL database via PHP. All the form element work except for TEXTAREA. No matter what encoding I use (htmlspecial, htmlentities etc) I get the browser displaying garbeld text. Example:

[PHP] Trouble with switch statements

2002-10-26 Thread Edward Kehoe
Ok...I just recently installed Apache1 and PHP 4.2.3 on my computer and I've configured everything. However, I can't seem to get my switch statements to accept variable values from the address bar. So if I type in: http://www.my-site.com/index.php?select=1 It displays the text in the default

RE: [PHP] Trouble with switch statements

2002-10-26 Thread Thoenen, Peter Mr. EPS
switch($_GET['select']){ case 1: .. -Peter -Original Message- From: Edward Kehoe [mailto:emkehoe;learn.senecac.on.ca] Sent: Friday, October 25, 2002 19:47 To: [EMAIL PROTECTED] Subject: [PHP] Trouble with switch statements Ok...I just recently installed Apache1 and

Re: [PHP] Trouble with switch statements

2002-10-26 Thread eNetwizard Developers Team
Use $_GET[select] for the switch statement Some of the people on this list would even recommend you make another variable first, such as $userselect = $_GET[select] and use $userselect as your switch statement, though I think it pointless. Or turn register_globals on in the php.ini file (not