RE: [PHP] Resetting ID in mySQL DB

2001-11-19 Thread Thomas Edison Jr.

Jack,

Thanks a lot for you help. 
I did actually work out the logistics of the code and
it's doing fine. It's probably a solution to my
problem, there's only a couple of things though :

a) I got about 800 plus records in the table. And
there's a lot of empty or duplicate records in there
which need to be deleted. So if i individually delete
every record then i will have to run the code for each
ID individually. That would be a lot to do. That's why
i was wondering if there's a way, by which after
having deleted those empty/duplicate records, i could
just clear the entire ID field and run a code that
would generate IDs in order again...

b) How can i check when the record is sent to the DB
using PHP3 or mySQL if there's any value in the field
or not? I have put up a JavScript validation to check
for the same in the form, and yet, something's
defeating that and empty records are entering into the
DB. I don't know why really!! 

Thanks a bunch!
Cheers  Glory,
Thomas Edison jr.
--- Jack Dempsey [EMAIL PROTECTED] wrote:
 Thomas,
 
 The code i gave can't be copied directly in...you
 need to use it as a guide,
 but use your own variables...
 So, basically, whatever field you have as your id
 field, that is what you
 will put in place of what i called id_num...and the
 number 36 was just an
 example...see if this makes sense:
 
 you want to delete a record with the column ID being
 X
 'delete from table where ID=X' that would be your
 sql
 then you send another query:
 $sql = update table set ID=ID-1 where IDX;
 what this does is say ok, the numbers before the
 item you deleted will stay
 the same, but from the place you deleted on higher
 you need to decrement the
 id values by one.
 
 try this from the mysql command line on a test table
 with some fake records,
 and you should see what i mean...
 
 good luck
 jack
 
 -Original Message-
 From: Thomas Edison Jr.
 [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 12, 2001 2:09 AM
 To: Jack Dempsey
 Subject: RE: [PHP] Resetting ID in mySQL DB
 
 
 Jack,
 
 Ok i get it! Lemme just go through the code once
 more... to be exact.. the code will be :
 
 ?php
 $db = mysql_connect(localhost,dbname,pass);
 mysql_select_db(dbname,$db);
 $sql = update table set id_num=id_num-1 where id 
 36,$db;
 $result = mysql_query($sql);
 ?
 
 Or i made a mistake?
 Is there anyway i can re-write all the IDs from 1
 onwards?
 
 Thanks a Ton!
 Cheers  Glory!
 
 
 
 
 
 --- Jack Dempsey [EMAIL PROTECTED] wrote:
  say you have 100 records.
  you delete number 36.
  your db will then be
  ...
  34
  35
  37
  38
  ...
  correct?
  after a delete, you could then say:
  update table set id_num=id_num-1 where id  36
  and this would update all relevant records
 
  -Original Message-
  From: Thomas Edison Jr.
  [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 12, 2001 1:52 AM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Resetting ID in mySQL DB
 
 
  Hi,
 
  I'm facing a problem. I made a simple DB with
 simple
  adding records in DB operation. I've even put up a
  JavaScript validation of the Form from where you
 add
  info. And yet, in the display table, there are
 many
  many blank fields. I don't know how they are
  generated.
 
  The Adding of info form is at :
 

http://www.mjimm.com/index.php3?page=fanlist_add.php3
 
  The display of records is at :
  http://www.mjimm.com/fanlist_view.php3
 
  Now the Display table also Displays the ID of the
  Record. If i go in my mySQL Admnin, and delete the
  rows with blank or duplicate records.. the ID also
  is
  deleted but then is alway missing from the list.
  That
  is, if i delete Row with ID 78, the next record
  feeded
  will start from 79 and not 78. So there's gonne be
  missing ID's from Records. Which i don't want. But
  which has already happened. How can i correct it??
  I want to reset the entire IDs to reflect the true
  Number of records after i delete the Empty/Blank
  Rows
   Duplicate Record Rows!! How can i do that!
 Please
  help!
 
  Cheers  Glory,
  Thomas edison jr.
 
 
 
  =
  Rahul S. Johari (Director)
  **
  Abraxas Technologies Inc.
  Homepage : http://www.abraxastech.com
  Email : [EMAIL PROTECTED]
  Tel : 91-4546512/4522124
  ***
 
  __
  Do You Yahoo!?
  Find a job, post your resume.
  http://careers.yahoo.com
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
 
 
 
 =
 Rahul S. Johari (Director)
 **
 Abraxas Technologies Inc.
 

[PHP] Re: Valid Chars Function

2001-11-19 Thread _lallous

you can use regluar expressions, or single character scanning via for loop,

1)RegExp:
if (ereg('[^a-z0-9]', $name)) print 'error!';

2)For loop
for ($i=0;$istrlen($name)$;$i++)
if ($name[$i] == '@' || $name[$i]=='!' .. ) print 'error!';

Phantom [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Anyone know a good PHP function or script to scan a string for Valid
 Characters to make sure something that is not allow is not included in a
 form?

 $Name = #@@##@!#!@ would not be a valid alphabetical name, how do I
 scan for that in PHP?  Thanks.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Additional e-mail address in PHP script...

2001-11-19 Thread _lallous

haven't you tried to add a CC to the header?
$mailheadrs .=Cc: [EMAIL PROTECTED]\n;

Anthony Ritter [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there any way to add an *additional* e-mail address - a cc - besides
the
 one that is already in the $to variable below using the following PHP
 script?

 Thanking all in advance.
 Tony Ritter
 ..


 ?
 $msg=This e-mail is being sent from www site\n;
 $msg.=Sender's name: \t$sender_name\n;
 $msg.=Sender's e-mail:\t$sender_email\n;
 $msg.=Message:\t$message\n\n;
 $to=[EMAIL PROTECTED];
 $subject=Website Feedback;
 $mailheaders=From: My website \n;
 $mailheaders.=Reply to: $sender_email\n\n;
 mail($to,$subject,$msg,$mailheaders);
 ?







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-11-19 Thread Kraa de Simon

I checked openlinksw and the driver for Progress 9.1b is indeed available...
(for client is Linux glibc2.1 (x86) and server is UnixWare 7 (x86))

...but we are on Progress 9.1c.

When will the Progress 9.1c driver for this client/server config be
available?

Regards,

Simon.

 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: woensdag 31 oktober 2001 21:32
 To: Kraa de Simon; Php-General (E-mail)
 Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
 Please help!
 
 
 Kraa,
 
 Sorry for the confusion; we should have that component 
 available by the end
 of the week.
 
 Best regards,
 Andrew
 
 
  -Original Message-
  From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 31, 2001 2:50 PM
  To: '[EMAIL PROTECTED]'; Php-General (E-mail)
  Subject: RE: [PHP] Desperate: odbc_connect() does not work! 
 Please help!
 
 
  Hi,
 
  The problem is that a Progress 9.1c is not available at
  openlinksw.com for:
 
  Client: Linux glibc2.1 (x86)
  Server: UnixWare 7 (x86)
 
  Only Progress 8.3b is supported.
 
  So you are saying that a setting in the .ini files or some 
 environment
  variable could be missing.
 
  I will have a look at it.
 
  Thanks,
 
  Simon.
 
   -Original Message-
   From: Andrew Hill [mailto:[EMAIL PROTECTED]]
   Sent: woensdag 31 oktober 2001 20:25
   To: Kraa de Simon; Php-General (E-mail)
   Subject: RE: [PHP] Desperate: odbc_connect() does not work!
   Please help!
  
  
   Kraa,
  
   I'm not sure why the two sample apps are using different
   connection calls;
   It's not terribly relevant - both are legal.
  
   Driver manager and driver are not typically dependent on each
   other, no.
   The fact that the connection fails in odbctest is probably
   due to a missing
   parameter that iODBC wants in the DSN or the environment
   variables. You can
   look at error messages for the Merant driver - I'm not going
   to get into
   debugging it :)
  
   If you want to try OpenLink's ODBC drivers, you will find
   they work fine
   with PHP and Progress.
   I suggest you download the Multi-Tier driver from our site -
   they comes free
   with a 2 user connection.  I would also suggest that you
   compile --with-iodbc, as it is in greater use and has been
   more thoroughly
   tested with PHP.
  
   Free support is available as well if you have difficulties, at:
   http://www.openlinksw.com/support/suppindx.htm.
  
   Best regards,
   Andrew Hill
   Director of Technology Evangelism
   OpenLink Software  http://www.openlinksw.com
   Universal Data Access  Data Integration Technology Providers
  
-Original Message-
From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 31, 2001 1:59 PM
To: '[EMAIL PROTECTED]'; Php-General (E-mail)
Subject: RE: [PHP] Desperate: odbc_connect() does not work!
   Please help!
   
   
Hi Andrew,
   
I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC
   drivers and they
seem to be working fine when I try their test C program. I
   can connect to
the Progress database en retrieve data.
   
I'm using their driver manager as well (--with-custom-odbc).
   
The test C program uses:
   
SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);
   
SQLConnect is executed without problems. A connection 
 can be made.
   
When I try odbctest (from iODBC / odbcsdk) the connect fails
(same drivers,
same odbc.ini, same odbcinst.ini).
   
SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS,
   (UCHAR *) buf,
sizeof (buf), buflen, SQL_DRIVER_COMPLETE);
   
SQLDriverConnect returns -1. A connection cannot be made.
   
Why is the first program using SQLConnect() and the other
SQLDriverConnect()?
   
Are ODBC driver and ODBC driver manager dependent on each other?
   
Or can I use the iODBC driver manager and the Merant 
 ODBC drivers
together?
   
Are there alternatives to the Merant ODBC drivers?
   
I am connect a Progress 9.1c database on SCO UnixWare 7.1.1
   from Red Hat
Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC
   drivers and ODBC
driver manager.
   
Any ideas?
   
Regards,
   
Simon.
   
 -Original Message-
 From: Andrew Hill [mailto:[EMAIL PROTECTED]]
 Sent: woensdag 31 oktober 2001 16:12
 To: Kraa de Simon; Php-General (E-mail)
 Subject: RE: [PHP] Desperate: odbc_connect() does not work!
 Please help!


 Kraa,

 The 01000 error is a 'General Error', probably at 
 connect time.
 This suggest that your DSN settings might be bad or not being
 passed into
 PHP.
 Is your DSN named results and is that the one you are using
 in your tests?

 Also, are you setting your environment variables as
   appropriate? e.g.:
 setenv(ODBCINI=/path/to/odbc.ini);
 setenv(LD_LIBRARY_PATH=/path/to/your/driver/manager/lib);

 You may also 

Re: [PHP] Advantages of php

2001-11-19 Thread Adrian D'Costa

On Sat, 17 Nov 2001, Jason G. wrote:

 You could check the list archives...  This question flys by every week or 
 two...

Thanks, but browsing is one thing I am still to get used to :)  I like
things in my mail box.

Adrian

 
 -Jason Garber
 IonZoft.com
 
 At 01:41 PM 11/17/2001 +0530, Adrian D'Costa wrote:
 Hi,
 
 Is there somewhere on the PHP site that give a list of advantages, speed,
 etc in comparsion with other similar programs.  I have a client that is in
 ASP and would like to move to PHP and need this info.
 
 Thanks
 
 Adrian
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] mail list

2001-11-19 Thread Yura

Hi,

I already run php site www.body-builders.org but I wanned to add to it mailing list 
like this one at 
php.net I understand general algorithm of it but as newbuy I don't know how MySQL 
database 
can receive mail and then add it to the base?

so my question is how do i make MySQL database to receive emails automaticaly?

Youri
God is our provider 
http://www.body-builders.org



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] FW: Array problem

2001-11-19 Thread De Necker Henri

 Hi there.I just want to know if the following code is suppose to work or
 not?
 I thing it must work!
 Is there something wrong with my while() funtion or must i use other
 functions?
 
   $query = SELECT co_id FROM employee  ORDER BY co_id;
   db_connect($query);
   while($row=db_range()){
  list($co_id) = $row ;
  $id[$i] = $co_id ;
  echo br$id[$i];  // This works 
  $i++ ;
   }//end while 1
   
   $j = 0;
 
   while($id[$j]){
 echo br$id[$i];   // Doesnt wanna work. WHY ???
 $j++;
   }

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general Digest 19 Nov 2001 09:39:20 -0000 Issue 1003

2001-11-19 Thread php-general-digest-help


php-general Digest 19 Nov 2001 09:39:20 - Issue 1003

Topics (messages 75039 through 75081):

PHP mail() function.  Help please...
75039 by: Anthony Ritter
75040 by: Avdija A. Ahmedhod¾iæ
75052 by: Anthony Ritter

Re: building a php based subscription site (not a porn site)
75041 by: Joe Stump

Re: Auto Thumbnail?
75042 by: Joe Stump

Re: alzheimers and confused
75043 by: Joe Stump

Re: Error running ./configure (c++ error)
75044 by: David Robley

Re: Question on variable variables
75045 by: Joe Stump

Re: relative paths
75046 by: Joe Stump

Re: Standalone PHP Application
75047 by: John Monfort

add column?
75048 by: Marts

Re: comma-formatting numbers
75049 by: Joe Stump

Re: PHP Backing up a Database?
75050 by: Joe Stump

Re: extract() question
75051 by: Joe Stump

Segmented Code/HTML VS. ECHO??
75053 by: Brad Melendy
75054 by: Martin Towell
75056 by: Richard S. Crawford
75060 by: Christopher William Wesley

Additional e-mail address in PHP script...
75055 by: Anthony Ritter
75057 by: Martin Towell
75058 by: Avdija A. Ahmedhod¾iæ
75059 by: David Robley
75076 by: _lallous

Re: Quiz questions on PHP
75061 by: jimmy elab

How to create and run background process at Win2K
75062 by: Chris Lee
75063 by: John Monfort
75064 by: Chris Lee

MySQL INSERT
75065 by: Justin French
75066 by: David Robley
75067 by: Matthew Loff
75068 by: Justin French
75069 by: David Robley

Cache Control
75070 by: Jeff Sittler

RPM Installation Did Not Install PHP Modules
75071 by: Gabriel Richards

Virtual Directory Support disabled
75072 by: Mit Rowe

Valid Chars Function
75073 by: phantom
75075 by: _lallous

Re: Resetting ID in mySQL DB
75074 by: Thomas Edison Jr.

Re: Desperate: odbc_connect() does not work! Please help!
75077 by: Kraa de Simon

Apache 2.0.28  module
75078 by: Jobarr

Re: Advantages of php
75079 by: Adrian D'Costa

mail list
75080 by: Yura

Re: Array problem
75081 by: De Necker Henri

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--

---BeginMessage---

I'm reading J.Meloni's tutorial on page 119 in Fast and Easy and she is
explaining using the PHP mail function.

There are two scripts for this example...

One is the .html file which lays out the form with input boxes, a textarea
box and a submit button.

It is:

HTML
HEAD
TITLE Simple Feedback Form /TITLE
/HEAD
BODY
FORM METHOD=post  ACTION=send_simpleform.php
P strong Your name: /strong br
INPUT TYPE=text  NAME=sender_name  SIZE=30/P
P strong Your e-mail address: /strong br
INPUT TYPE=text  NAME=sender_email  SIZE=30/P
P strong Your message: /strong br
TEXTAREA NAME =message COLS=30  ROWS=5  WRAP=virtual/TEXTAREA/P
P INPUT TYPE=submit  NAME= submit  VALUE=Send this form /P
/FORM
/BODY
/HTML


The next is the PHP script which reads as follows:

?
$msg=This e-mail is being sent from www site\n;
$msg.=Sender's name: \t$sender_name\n;
$msg.=Sender's e-mail:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
$to=[EMAIL PROTECTED];
$subject=Website Feedback;
$mailheaders=From: My website \n;
$mailheaders.=Reply to: $sender_email\n\n;
mail($to,$subject,$msg,$mailheaders);
?
HTML
HEAD
TITLESimple Feedback Form/TITLE
/HEAD
BODY
H1The following e-mail has been sent:/H1
PstrongYour Name:/strongbr
?echo $sender_name;?
PstrongYour email address:/strongbr
?echo $sender_email;?
PstrongMessage:/strongbr
? echo $message; ?
/BODY
/HTML
..

Everytime I input a name, e-mail, and test blurb for the message box form
and hit submit, I get:

Warning: Failed to connect in C:\Program Files\Apache
Group\Apache\htdocs\send_simpleform.php
in line 10.

I have made the corrections in my php.ini file in the [mail function]
to read as follows:

SMTP=localhost
[EMAIL PROTECTED]

Please advise if anyone knows what I am doing wrong.

Thanking all in advance.
Tony Ritter










---End Message---
---BeginMessage---

do you have sendmail or smtp configured properly. Yao should test that
first. Try to put instad of SMTP=localhost name of  some other server, taht
you can connect and send mail from.


- Original Message -
From: Anthony Ritter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 19. studeni 2001 01:07
Subject: [PHP] PHP mail() function. Help please...


 I'm reading J.Meloni's tutorial on page 119 in Fast and Easy and she is
 explaining using the PHP mail function.

 There are two scripts for this example...

 One is the 

[PHP] Detecting IP address

2001-11-19 Thread Heidi Belal

Does anyone have any idea how i can detect a clients
IP address?  I've found javascripts on the net but
they only work on netscape and only when java is
enabled.  I need it to work on IE.
Thanks!
Heidi

=
Heidi Belal
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Detecting IP address

2001-11-19 Thread Oosten, Sjoerd van

some loggings:

$LogIp1 = getenv(REMOTE_ADDR);
$LogIpaddr = gethostbyaddr($LogIp1);
$LogIpname = gethostbyname($LogIp1);
$LogBrowser = $HTTP_USER_AGENT; 
$LogReferer = getenv(HTTP_REFERER);


Sjoerd van Oosten 
Digitaal vormgever [EMAIL PROTECTED]
Datamex E-sites B.V. 
http://www.esites.nl
Minervum 7368 Telefoon: (076) 5 730 730 
4817 ZH BREDA Telefax: (076) 5 877 757 
___


-Oorspronkelijk bericht-
Van: Heidi Belal [mailto:[EMAIL PROTECTED]]
Verzonden: maandag 19 november 2001 10:58
Aan: js-jive mailing list; Php
Onderwerp: [PHP] Detecting IP address


Does anyone have any idea how i can detect a clients
IP address?  I've found javascripts on the net but
they only work on netscape and only when java is
enabled.  I need it to work on IE.
Thanks!
Heidi

=
Heidi Belal
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] FW: Array problem

2001-11-19 Thread Alexander Weber

Well, I tried the following script which works:
?php
$i = 0;
while ($i  5) 
{
$x[$i] = 1;
$i++;
}

$i = 0;
while($x[$i]) 
{
echo value .$i.: .$x[$i].br;
$i++;
}

?

but the following does not:

?php
//$i = 0;
while ($i  5) 
{
$x[$i] = 1;
$i++;
}

$i = 0;
while($x[$i]) 
{
echo value .$i.: .$x[$i].br;
$i++;
}

?
That is the same code as yours. It generates an array in the first while
loop and prints each value in the second one.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Detecting IP address

2001-11-19 Thread Sebastian Wenleder

Hi Heidi,

Does anyone have any idea how i can detect a clients
IP address?

in PHP:

? echo $REMOTE_ADDR; ?

best,
Sebastian

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Standalone PHP Application

2001-11-19 Thread Shane Wright


mm, thats true - there is no compiler as such.  PHP probably isnt the right 
language for you in this case :(

--
Shane


On Sunday 18 Nov 2001 11:43 pm, John Monfort wrote:
  I just got it.
  So far, it doesn't look like it lets convert your code to a .exe code.
  My client's scoring logic is proprietary and I need to protect the code.


 __John Monfort_
 _+---+_
  P E P I E  D E S I G N S
www.pepiedesigns.com
 The world is waiting, are you ready?
 -+___+-

 On Sun, 18 Nov 2001, Shane Wright wrote:
  Hi
 
  You could have a look at the GTK+ bindings for PHP - AFAIK they let you
  write standalone apps.
 
  There's info on the PHP web site ( www.php.net ).
 
  --
  Shane
 
I'm looking for information on using PHP for standalone applications.
Specifically, I need to create a PHP-based application that can be
   runned from a CD-ROM. Have any of you done this?
  
Any suggestions?
  
On another note:
I need to develop a CD-ROM based Survey, where the result will be
   saved in an external file. What software, would you recommend, to use
   for this? I'm currently using Multimedia Builder, and was wondering if
there is something better.
  
I need something that allows customization(via scripting) and more
interaction with external files/commands.
Any help would be appreciated.
  
Thanks!
  
-John
  
  
  
   __John Monfort_
   _+---+_
P E P I E  D E S I G N S
  www.pepiedesigns.com
   The world is waiting, are you ready?
   -+___+-
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Standalone PHP Application

2001-11-19 Thread Ulf Wendel



Shane Wright wrote:
 
 mm, thats true - there is no compiler as such.  PHP probably isnt the right
 language for you in this case :(

Dirty windows hack: http://www.deskcode.com/phpcompiler/

Ulf

-- 
NetUSE AG  Dr.-Hell-Straße   Fon: +49 431 386 436 00 
http://www.netuse.de/  D-24107 Kiel  Fax: +49 431 386 435 99

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Invalid preceding regular expression

2001-11-19 Thread phantom

What is a  Warning: Invalid preceding regular expression  mean when
running a page?

Output ---
Warning: Invalid preceding regular expression in /ereg.php on line 4

PHP Page Source -

%
function invalid_string($string,$valid) {
 for ($i=0; $istrlen($string); $i++) {
  if (!ereg ($string[$i], $valid)) return true;   \\Line
4;
  }
 return false;
}

if ($Action==Submit) {
 $validChars =
1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ;
 $validAlphas = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ;

 $validNums = 1234567890;
 if (invalid_string($Word,$validChars)) $Msg = You entered a bad
word.;
 else $Msg = That word is acceptable.;
}
%
html
head
titleEreg/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1

/head

body bgcolor=#FF text=#00
%=$Msg;%titleEREG/title
form name=form1 method=post action=ereg.php
  Please enter a valid word only. Only alphanumeric characters! I dare
you to
  try anything else.br
  input type=text name=Word size=20 maxlength=20
  input type=submit name=Action value=Submit
/form
/body
/html




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Standalone PHP Application

2001-11-19 Thread Ulf Wendel



Ulf Wendel wrote:
 
 Shane Wright wrote:
 
  mm, thats true - there is no compiler as such.  PHP probably isnt the right
  language for you in this case :(
 
 Dirty windows hack: http://www.deskcode.com/phpcompiler/

Uuups, that one is broken. But there's somethink like that. I once
downloaded it. It's integrating the PHP script and the PHP interpreting
into one .exe-File.

Ulf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Standalone PHP Application

2001-11-19 Thread Ulf Wendel



Ulf Wendel wrote:
  Dirty windows hack: http://www.deskcode.com/phpcompiler/
 
 Uuups, that one is broken. But there's somethink like that. I once
 downloaded it. It's integrating the PHP script and the PHP interpreting
 into one .exe-File.

Here's the announcement:
http://www.phpbuilder.com/mail/php-developer-list/2001031/1305.php and
there some more attempts e.g. http://sourceforge.net/projects/pbc/

Ulf

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] PHP + librairies OCI8 + IPlanet Web Server

2001-11-19 Thread Damien LEBLANC

Hi,

   I have installed PHP 4.0.4pl1 on a Sun/OS 5.6 server with iPlanet Web
Server 4.1. I want to access to an Oracle database with the OCI8
librairies. I have an Oracle client 8.1.5 installed on my server.

  I have recompiled my PHP with these options :
   ./configure --prefix=/usr/local/php --with-nsapi=/opt/iplanet
--with-oci8=/export/home/oracle --with-oracle=/export/home/oracle

The compilation doesn't work.

So I have gotten the demo/rdbms librairies from Oracle 8.1.7 client
which seem to avoid. The compilation works but the libphp4.so file is
invalid. When the instance of iPlanet Web Server starts, it cannot load
this librairie.

If somebody can help me,
Thanks in advance,
Damiens

[EMAIL PROTECTED]
PS : Sorry for my english, I'm french.



[PHP] Installing Apache, mySql and php

2001-11-19 Thread Douglas McKenzie

I installed Apache, mySql and php from the redhat installation disk when
it first installed the operating system.

Apache and MySql are working fine but php isn't.

Checked the httpd.conf file and found this info:

LoadModule php4_module  modules/libphp4.so

That file is there. The web root is var/www/html

So the question is, when I put a .php file there, why doesn't it run?
Why does it return the page as code?

All help and explanations would be much appreciated.

TIA, Doug


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Installing Apache, mySql and php

2001-11-19 Thread Duncan Hill

On Mon, 19 Nov 2001, Douglas McKenzie wrote:

 That file is there. The web root is var/www/html
 
 So the question is, when I put a .php file there, why doesn't it run?
 Why does it return the page as code?

Edit the httpd.conf file.  Look for .php .  You'll probably find the line 
that loads the actualy interpreter to extension map is commented out.  
Uncomment, save, restart Apache.  Try page again.

-- 

Sapere aude
My mind not only wanders, it sometimes leaves completely.
Never attribute to malice that which can be adequately explained by stupidity.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Installing Apache, mySql and php

2001-11-19 Thread Douglas McKenzie

I've got this:
ifModule mod_php4.c
AddType application/x-httpd-php .php4 .phtml .php
AddType application/x-httpd-php-source .phps
/ifModule

There no '#' marks at start of line so Im presuming that its running. However, the
only mod_php4.c on the system is in the folder where I gunzip'd the php file. I
haven't run this download as I'm still trying to get the original install working

As a sideline, at the start of httpd.conf it says that the document is created
every time apache starts, so if I make changes here, will they be saved?

Duncan Hill wrote:

 On Mon, 19 Nov 2001, Douglas McKenzie wrote:

  That file is there. The web root is var/www/html
 
  So the question is, when I put a .php file there, why doesn't it run?
  Why does it return the page as code?

 Edit the httpd.conf file.  Look for .php .  You'll probably find the line
 that loads the actualy interpreter to extension map is commented out.
 Uncomment, save, restart Apache.  Try page again.

 --

 Sapere aude
 My mind not only wanders, it sometimes leaves completely.
 Never attribute to malice that which can be adequately explained by stupidity.

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] About header or ..!(language/translation)

2001-11-19 Thread mahboobeh khossrojerdi

Hi,
Thanks but,
header(Content-Type: text/html;
charset=windows-1256);
header(Content-Language: fa);

can not work and Farsi messages not shown.may be that
there was another way for define Arabic code page.

Thanks advance.


__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Standalone PHP Application

2001-11-19 Thread John Monfort



  It seems like that project vanished...none of the urls worked.

  Thanks for the help!


__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Mon, 19 Nov 2001, Ulf Wendel wrote:



 Ulf Wendel wrote:
   Dirty windows hack: http://www.deskcode.com/phpcompiler/
 
  Uuups, that one is broken. But there's somethink like that. I once
  downloaded it. It's integrating the PHP script and the PHP interpreting
  into one .exe-File.

 Here's the announcement:
 http://www.phpbuilder.com/mail/php-developer-list/2001031/1305.php and
 there some more attempts e.g. http://sourceforge.net/projects/pbc/

 Ulf



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] PHP + librairies OCI8 + IPlanet Web Server

2001-11-19 Thread Thies C. Arntzen

On Mon, Nov 19, 2001 at 12:54:05PM +0100, Damien LEBLANC wrote:
 Hi,
 
I have installed PHP 4.0.4pl1 on a Sun/OS 5.6 server with iPlanet Web
 Server 4.1. I want to access to an Oracle database with the OCI8
 librairies. I have an Oracle client 8.1.5 installed on my server.
 
   I have recompiled my PHP with these options :
./configure --prefix=/usr/local/php --with-nsapi=/opt/iplanet
 --with-oci8=/export/home/oracle --with-oracle=/export/home/oracle
 
 The compilation doesn't work.
 
 So I have gotten the demo/rdbms librairies from Oracle 8.1.7 client
 which seem to avoid. The compilation works but the libphp4.so file is
 invalid. When the instance of iPlanet Web Server starts, it cannot load
 this librairie.

copying the demo/rdbms is not enough. please *install* oracle
onto the machine you want to run php on.

i'd also be interested in the messages you get when trying to
load php into iPlanet.

tc

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] extract() question

2001-11-19 Thread Jason G.

I needed this once, but I could not figure out how to just create the vars 
in current scope.

If my_extract() is called from within a function, then the variables will 
not be available unless you declare them global (which kinda makes the 
function pointless).

Any ideas?

-Jason Garber
IonZoft.com


At 06:55 PM 11/18/2001 -0500, Joe Stump wrote:
You may want to do something like this instead:

?

   function my_extract($arr)
   {
 if(is_array($arr)  sizeof($arr))
 {
   while(list($key,$val) = each($arr)
   {
 $new_var = str_replace(' ','_',$key);
 global $$new_var;
 $$new_var = $val;
   }
 }
   }

?

--Joe


On Sun, Nov 18, 2001 at 04:21:46PM -0500, David Bernier wrote:
  There is this array which I would like to convert into a series 
 variables using the extract function:
 
  ?
  $oz = array(
   lion = courage,
   dorothy = kansas,
   scarecrow = brain
   tin man = heart);
 
  extract($oz);
  ?
 
  now, I would like to access my new variables. it is obviously easy for 
 $lion, $dorothy, and $scarecrow but it isn't for tin man.
 
  from this, I have 3 or 4 questions:
  1) has $oz[tin man] been passed into a variable?
  2) if yes, how do I access the variable that came out of $oz[tin man]?
  3) let's pretend that I have no control over the names of the keys for 
 $oz, how should I have called extract() to tell it to replace the space 
 between tin and man by a underscore character?
  4)  finally, is there a way to access and retrieve that values of the 
 symbol table without knowing their names?
 
  David
 

Joe Stump [EMAIL PROTECTED]

How would this sentence be different if pi equaled 3?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Detecting IP address

2001-11-19 Thread Jason G.

Use the $HTTP_SERVER_VARS['REMOTE_IP'] variable...

At 01:58 AM 11/19/2001 -0800, Heidi Belal wrote:
Does anyone have any idea how i can detect a clients
IP address?  I've found javascripts on the net but
they only work on netscape and only when java is
enabled.  I need it to work on IE.
Thanks!
Heidi

=
Heidi Belal
ICQ# 32127109

A bus stops at a bus station.
A train stops at a train station.  On my desk
I have a work station...

__
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] How to create and run background process at Win2K

2001-11-19 Thread Jason G.

I believe that there is something like crontab for windows...  If not, then 
you could write one in C or C++ or VB etc...

 From apache/mod_php, set a marker in a file, or in a db.

Every minute, or 5 minutes, or 15 minutes (you decide), your crontab 
equivalent will call a cgi/php script that checks for the marker in the 
file/db.  If the marker is there, then remove the marker, and generate the 
report.

Hope it helps.

-Jason Garber
IonZoft.com

At 12:00 PM 11/19/2001 +0800, Chris Lee wrote:
Dear John,

Actually I need to generate an report which need an half an hour to
complete.
The MS Proxy Server time out for the long process, so I want to create the
report by following method:

apache/mod_php - call cgi/php - email notify end user when completed.

Regards,
Chris Lee


  -Original Message-
  From: John Monfort [mailto:[EMAIL PROTECTED]]
  Sent: Monday, November 19, 2001 11:38 AM
  To: Chris Lee
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] How to create and run background process at Win2K
 
 
 
 
  You can run the application as a SERVICE.
  Would that do the trick?
 
 
  __John Monfort_
  _+---+_
   P E P I E  D E S I G N S
 www.pepiedesigns.com
  The world is waiting, are you ready?
  -+___+-
 
  On Mon, 19 Nov 2001, Chris Lee wrote:
 
   Hi,
  
   It is possible to create/run background process at Win2K / Apache
   environment? If yes, how?
  
   Regards,
   Chris Lee
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
  [EMAIL PROTECTED]
  
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Valid Chars Function

2001-11-19 Thread Jason G.

Well, you can make good use of regular expressions, or write your own function.
(It turns out i needed the functions, so I just wrote them, and included 
them here)


**
//This regex checks for  1 letters in a string - anything else will fail
if(ereg('^[a-z|A-Z]+$', $sName))
 echo 'Valid';
else
 echo 'Invalid';
**
//Returns TRUE if all characters in sString are found in sValidChars
function ValidChars($sValidChars, $sString)
{
 $len = strlen($sString);
 for($i=0; $i$len; $i++)
 if(strpos($sValidChars,$sString[$i])===FALSE)
 return FALSE;
 return TRUE;
}
**
//Returns TRUE if none characters in sString are found in sValidChars
function InvalidChars($sValidChars, $sString)
{
 $len = strlen($sString);
 for($i=0; $i$len; $i++)
 if(strpos($sValidChars,$sString[$i]))
 return FALSE;
 return TRUE;
}
**

-Jason Garber
IonZoft.com





At 01:28 AM 11/19/2001 -0600, phantom wrote:
Anyone know a good PHP function or script to scan a string for Valid
Characters to make sure something that is not allow is not included in a
form?

$Name = #@@##@!#!@ would not be a valid alphabetical name, how do I
scan for that in PHP?  Thanks.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Segmented Code/HTML VS. ECHO??

2001-11-19 Thread Jason G.

We are not writing in perl...

Php offers a very handy feature, the ability to go in and out of html/php 
code by just using ?  ? and the ability to echo data by using ?= $var ?

Seperate as much of your HTML from your PHP as possible.  It will assist in 
readability, and
maintenance.

---
?php
 $color = #FFCC00;
 $name  = Yogi;
?
font color=?= $color ?The bear is ?= $name ?./font
---

-Jason Garber
IonZoft.com




At 05:36 PM 11/18/2001 -0800, you wrote:
I _hate_ echo'n out big batches of HTML, so I never do it.  I prefer to
include HTML, or have a class or function write HTML.  However, printing
in heredoc style is very handy ... more so than sliced bread.

For example:

?php
 $color = #FFCC00;
 $name  = Yogi;

 print EOF
 font color=${color}The bear is ${name}./font
 !-- this can be as much plain HTML intermixed with PHP
  variables as you like --
EOF;
 print( date() );
?

PHP code, followed by plain HTML (I put in some PHP variables, but they
aren't necessary) (without a bunch of echo/print calls, or having to
escape quotes), followed by more PHP ... wash, rinse, repeat as much as
necessary ... you get the picture.  It works out rather nicely.

 $0.02
 ~Chris   /\
  \ / September 11, 2001
   X  We Are All New Yorkers
  / \ rm -rf /bin/laden

On Sun, 18 Nov 2001, Brad Melendy wrote:

  Hello,
  Other than the fact that sometimes, you just can't get raw HTML to process
  properly by dropping out of PHP code, what are the pros and cons of using
  RAW HTML or just ECHOING everything in PHP?  Thanks for any insights.
 
  ..Brad
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to create and run background process at Win2K

2001-11-19 Thread Andrey Hristov

there is 'at' program in windows2k (try it at the console)
- Original Message - 
From: Jason G. [EMAIL PROTECTED]
To: Chris Lee [EMAIL PROTECTED]; 'John Monfort' 
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 1:16 PM
Subject: RE: [PHP] How to create and run background process at Win2K


 I believe that there is something like crontab for windows...  If not, then 
 you could write one in C or C++ or VB etc...
 
  From apache/mod_php, set a marker in a file, or in a db.
 
 Every minute, or 5 minutes, or 15 minutes (you decide), your crontab 
 equivalent will call a cgi/php script that checks for the marker in the 
 file/db.  If the marker is there, then remove the marker, and generate the 
 report.
 
 Hope it helps.
 
 -Jason Garber
 IonZoft.com
 
 At 12:00 PM 11/19/2001 +0800, Chris Lee wrote:
 Dear John,
 
 Actually I need to generate an report which need an half an hour to
 complete.
 The MS Proxy Server time out for the long process, so I want to create the
 report by following method:
 
 apache/mod_php - call cgi/php - email notify end user when completed.
 
 Regards,
 Chris Lee
 
 
   -Original Message-
   From: John Monfort [mailto:[EMAIL PROTECTED]]
   Sent: Monday, November 19, 2001 11:38 AM
   To: Chris Lee
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP] How to create and run background process at Win2K
  
  
  
  
   You can run the application as a SERVICE.
   Would that do the trick?
  
  
   __John Monfort_
   _+---+_
P E P I E  D E S I G N S
  www.pepiedesigns.com
   The world is waiting, are you ready?
   -+___+-
  
   On Mon, 19 Nov 2001, Chris Lee wrote:
  
Hi,
   
It is possible to create/run background process at Win2K / Apache
environment? If yes, how?
   
Regards,
Chris Lee
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
   [EMAIL PROTECTED]
   
  
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: [PHP-DB] MS SQL Server support

2001-11-19 Thread Alexander Weber

Daniel Persson wrote:
 
 I got this error message when using PHP 4.06 with MSSQL.
 
 PHP ERROR: PHP build incomplete: the prerequisite MS SQL Server support
 required to read the alert database
 was not built into PHP. Please recompile PHP with the necessary library
 (--enable-mssql).
 
 Is there anyone who knows what's wrong?
 
You need special software for connecting to MSSQL. Just have a look at
www.freetds.org
MSSQL and Sybase use a protocol called Tabular Data Stream to connect to
the server.
Install the software and then recompile it. Normally you have to use
--with-sybase=path-to-tds.
If there is an --enable-mssql it must be new to 4.0.6.

I have not tried it myself, but maybe someone else on this mailing list
did it already.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] File Download Inquiry

2001-11-19 Thread Joe Van Meer

Hi there. How would I go about downloading a file off of the server. The
filename will always be the same in my case. Say it is sitting in a
directory called 'textfiles'. What method/function would I use to download
it to a user's local system?

Thx Joe:)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] PHP + librairies OCI8 + IPlanet Web Server

2001-11-19 Thread J. Anderson Scarbrough

What kind of error message do you get?  Anything in the web server logs?  My 
guess would be that you do not have your all of your oracle environment 
variables set up.

-Original Message-
From: Damien LEBLANC [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 6:54 AM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP + librairies OCI8 + IPlanet Web Server


Hi,

   I have installed PHP 4.0.4pl1 on a Sun/OS 5.6 server with iPlanet Web
Server 4.1. I want to access to an Oracle database with the OCI8
librairies. I have an Oracle client 8.1.5 installed on my server.

  I have recompiled my PHP with these options :
   ./configure --prefix=/usr/local/php --with-nsapi=/opt/iplanet
--with-oci8=/export/home/oracle --with-oracle=/export/home/oracle

The compilation doesn't work.

So I have gotten the demo/rdbms librairies from Oracle 8.1.7 client
which seem to avoid. The compilation works but the libphp4.so file is
invalid. When the instance of iPlanet Web Server starts, it cannot load
this librairie.

If somebody can help me,
Thanks in advance,
Damiens

[EMAIL PROTECTED]
PS : Sorry for my english, I'm french.


_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] configure problem

2001-11-19 Thread Chip

I am setting up a new system for a friend and am getting the following error 
when running ./configure -

/usr/libexec/elf/ld: cannot find -lgd.
error code 1

This machine is a default install of FreeBSD4.4, Apache-1.3.22, MySQL-3.23.44 
and PHP-4.0.6. I have set this same system up on several other machines and 
have never come across this error.
What am I missing that is causing this problem?
--
Chip W.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Setting up PHP and ODBC on Linux

2001-11-19 Thread Andrew Hill

Mweb,

The iODBC site is back up; I recommend downloading the iODBC SDK and using
that.
I apologize for the inconvenience; we had a power station fire in the
neighborhood!

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers


 -Original Message-
 From: mweb [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, November 17, 2001 6:09 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: [PHP] Setting up PHP and ODBC on Linux


 Hello,

 as you may remember, some day ago, I asked how to develop
 on linux PHP pages accessing  Mysql via ODBC (The reasons why I *have*
 to cope with this exact sub optimal set up are in the original
 message, no reason to repeat them here). I have installed
 all the UnixODBC rpms I could find ( I have RH 7.1); the iodbc
 packages on the openlinksw were not accessible.
 Now I have the following packages installed:


 [root@ari mweb] rpm -qa|egrep -i 'php|odbc|sql'
 php-4.0.4pl1-9
 php-manual-4.0.4pl1-9
 mysql-server-3.23.36-1
 MyODBC-2.50.39-1
 unixODBC-devel-2.0.7-1
 asp2php-0.75.11-1
 mysql-3.23.36-1
 mysql-devel-3.23.36-1
 php-mysql-4.0.4pl1-9
 unixODBC-2.0.7-1
 unixODBC-generic-2.0.7-1
 mysqlclient9-3.23.22-4
 unixODBC-mysql-2.0.7-1

 However, I currently have PHP set up as pasted below (from phpinfo):
 that means I have to recompile it from scratch, doesn't it? If so,
 with which options? Is it enough to change --without-mysql to
 --with-mysql and add --with-odbc?

 Also, is it safer/worst/irrelevant/mandatory to erase the php rpm
 package before building it again from source?

   TIA,
   mweb


 './configure' '--prefix=/usr' '--with-config-file-path=/etc'
 '--disable-debug'
 '--enable-pic' '--enable-shared'
 '--enable-inline-optimization'
 '--with-apxs=/usr/sbin/apxs'
 '--with-exec-dir=/usr/bin' '--with-regex=system'
 '--with-gettext' '--with-gd'
 '--with-jpeg-dir=/usr' '--with-png' '--with-zlib'
 '--with-db2' '--with-db3'
 '--with-gdbm' '--enable-debugger'
 '--enable-magic-quotes'
 '--enable-safe-mode' '--enable-sockets' '--enable-sysvsem'
 '--enable-sysvshm'
 '--enable-track-vars' '--enable-yp' '--enable-ftp'
 '--enable-wddx' '--without-mysql'
 '--without-oracle' '--without-oci8' '--with-xml'
 --
 If you have the right attitude, interesting problems will find you
 Eric S. Raymond, The Cathedral and the bazaar, chapter 2

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Desperate: odbc_connect() does not work! Please help!

2001-11-19 Thread Andrew Hill

Simon,

You may use the 91b driver against a 91c database, connecting in sockets, or
you may use the 91 object file we ship and relink it against your 91c
installation to produce a shared-memory version.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers

 -Original Message-
 From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
 Sent: Monday, November 19, 2001 3:12 AM
 To: '[EMAIL PROTECTED]'; Kraa de Simon; Php-General (E-mail)
 Subject: RE: [PHP] Desperate: odbc_connect() does not work! Please help!


 I checked openlinksw and the driver for Progress 9.1b is indeed
 available...
 (for client is Linux glibc2.1 (x86) and server is UnixWare 7 (x86))

 ...but we are on Progress 9.1c.

 When will the Progress 9.1c driver for this client/server config be
 available?

 Regards,

 Simon.

  -Original Message-
  From: Andrew Hill [mailto:[EMAIL PROTECTED]]
  Sent: woensdag 31 oktober 2001 21:32
  To: Kraa de Simon; Php-General (E-mail)
  Subject: RE: [PHP] Desperate: odbc_connect() does not work!
  Please help!
 
 
  Kraa,
 
  Sorry for the confusion; we should have that component
  available by the end
  of the week.
 
  Best regards,
  Andrew
 
 
   -Original Message-
   From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, October 31, 2001 2:50 PM
   To: '[EMAIL PROTECTED]'; Php-General (E-mail)
   Subject: RE: [PHP] Desperate: odbc_connect() does not work!
  Please help!
  
  
   Hi,
  
   The problem is that a Progress 9.1c is not available at
   openlinksw.com for:
  
   Client:   Linux glibc2.1 (x86)
   Server:   UnixWare 7 (x86)
  
   Only Progress 8.3b is supported.
  
   So you are saying that a setting in the .ini files or some
  environment
   variable could be missing.
  
   I will have a look at it.
  
   Thanks,
  
   Simon.
  
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: woensdag 31 oktober 2001 20:25
To: Kraa de Simon; Php-General (E-mail)
Subject: RE: [PHP] Desperate: odbc_connect() does not work!
Please help!
   
   
Kraa,
   
I'm not sure why the two sample apps are using different
connection calls;
It's not terribly relevant - both are legal.
   
Driver manager and driver are not typically dependent on each
other, no.
The fact that the connection fails in odbctest is probably
due to a missing
parameter that iODBC wants in the DSN or the environment
variables. You can
look at error messages for the Merant driver - I'm not going
to get into
debugging it :)
   
If you want to try OpenLink's ODBC drivers, you will find
they work fine
with PHP and Progress.
I suggest you download the Multi-Tier driver from our site -
they comes free
with a 2 user connection.  I would also suggest that you
compile --with-iodbc, as it is in greater use and has been
more thoroughly
tested with PHP.
   
Free support is available as well if you have difficulties, at:
http://www.openlinksw.com/support/suppindx.htm.
   
Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access  Data Integration Technology Providers
   
 -Original Message-
 From: Kraa de Simon [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 31, 2001 1:59 PM
 To: '[EMAIL PROTECTED]'; Php-General (E-mail)
 Subject: RE: [PHP] Desperate: odbc_connect() does not work!
Please help!


 Hi Andrew,

 I'm using the Merant DataDirect 3.6 Progress SQL92 ODBC
drivers and they
 seem to be working fine when I try their test C program. I
can connect to
 the Progress database en retrieve data.

 I'm using their driver manager as well (--with-custom-odbc).

 The test C program uses:

 SQLConnect (hdbc, driver, SQL_NTS, uid, SQL_NTS, pwd, SQL_NTS);

 SQLConnect is executed without problems. A connection
  can be made.

 When I try odbctest (from iODBC / odbcsdk) the connect fails
 (same drivers,
 same odbc.ini, same odbcinst.ini).

 SQLDriverConnect (hdbc, 0, (UCHAR *) dataSource, SQL_NTS,
(UCHAR *) buf,
 sizeof (buf), buflen, SQL_DRIVER_COMPLETE);

 SQLDriverConnect returns -1. A connection cannot be made.

 Why is the first program using SQLConnect() and the other
 SQLDriverConnect()?

 Are ODBC driver and ODBC driver manager dependent on each other?

 Or can I use the iODBC driver manager and the Merant
  ODBC drivers
 together?

 Are there alternatives to the Merant ODBC drivers?

 I am connect a Progress 9.1c database on SCO UnixWare 7.1.1
from Red Hat
 Linux 7.1 with Merant DataDirect 3.6 Progress SQL92 ODBC
drivers and ODBC
 driver manager.

 Any ideas?

 

[PHP] OOP support

2001-11-19 Thread Roko Roic

I don't know if this is the right place to ask this (there is no .news.admin
group on news.php.net), but where is the right place to look for support for
OOP PHP programming.

Any newsgroups, mailing lists?

Maybe opening a group in this hierarchy named php.oop?? Where is the right
place to ask for group opening?

I believe there are a lot of us OOProgrammers using PHP in an OOP manner who
would like to share ideas, solutions and troublshooting.


Roko



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newbie Date Question

2001-11-19 Thread David Mitchell

Hey Guys and Girls,

I'm selecting a datetime value from SQL Server. In the database the data
looks like:

2001-11-16 18:33:56

When I print out the results on the page I get this:

1005958764

This is how I'm displaying the data:

while(!$rs-EOF)
{
print(trtdfont class=smallText . $dtmDate-value .
/font/tdtd
$rs-MoveNext();
}

I'm obviously missing something here
Any suggestions would be appreciated.

Dave


%
David Mitchell
[EMAIL PROTECTED]
www.IceRadio.ca
%


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Newbie Date Question

2001-11-19 Thread _lallous

try using the date() with the field content.

string date (string format [, int timestamp])

David Mitchell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hey Guys and Girls,

 I'm selecting a datetime value from SQL Server. In the database the data
 looks like:

 2001-11-16 18:33:56

 When I print out the results on the page I get this:

 1005958764

 This is how I'm displaying the data:

 while(!$rs-EOF)
 {
 print(trtdfont class=smallText . $dtmDate-value .
 /font/tdtd
 $rs-MoveNext();
 }

 I'm obviously missing something here
 Any suggestions would be appreciated.

 Dave


 %
 David Mitchell
 [EMAIL PROTECTED]
 www.IceRadio.ca
 %




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Newbie Question about a counter

2001-11-19 Thread Jeff Williamson

I've modified a couple of php scripts that are working quite well.  They are
simple form/email scripts.

I have hit a road block with a counter that I need.

I need a counter that starts with i-1 and will increment by 1 after each
confirmation of a reservation form.

I don't necessarily have to store this in a database.  As long as the E-mail
is forwarded correctly the confirmation numbers are put into the PC
manually.

Can anyone point me to a script that I can modify to do this?  I've searched
the popular scripts archives but must be looking in the wrong categories.
If you can suggestion some categories that would help in my search, that
would be great too.

Thanks,

Jeff



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] add system user using PHP Apache

2001-11-19 Thread Mark Lo

Hi,

 I would like to know how to use PHP  Apache to add system user.  Eg. #
Adduser mark

I am seeking advice, so should I use suexec to perform the task or
others.


Thank you



Mark Lo


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Download File Problem - text not appearing on downloaded file

2001-11-19 Thread Joe Van Meer

Hi there. I managed to get the prompt for a file download when a user clicks
on a text link. The file downloads properly to the client machine, howevr,
when I open up the file there is no content. What do I have to add to the
following code to get the content sent back to the user?

Thx Joe :)

?PHP

header(Content-type: application/octet-stream);
header(Content-Disposition: attachment; filename=file.txt);

?




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] POST files with PHP

2001-11-19 Thread Daniel Reichenbach

Hy,

I'm trying to post image files to a php script with another php script.
Don't ask why, it's a crazy project :)
Now the file is around 28000 bytes but the post receiver only gets
around
300 bytes. Has anybody experienced this behaviour?

I use the following script:

--- snap ---
?
// the receiver of file 
$remote_page = http://www.server.com/post.php;; 

// the file to upload
$file = /var/www/test/dummy.jpg; // the file location 
$con_type = image/jpg; // the file mime type 
$content_file = join(,file($file)); 

// define boundary 
srand((double)microtime()*100); 
$boundary =
---.substr(md5(rand(0,32000)),0,10);
$data = --$boundary 
Content-Disposition: form-data; name=\userfile\; filename=\$file\ 
Content-Type: $con_type 

$content_file.--$boundary--\r\n\r\n; 
$msg = 
POST $remote_page HTTP/1.0 
Content-Type: multipart/form-data; boundary=$boundary 
Content-Length: .strlen($data).\r\n\r\n; 

$f = fsockopen(www.server.com,80); 
fputs($f,$msg.$data); 
$result = fread($f,32000); 
fclose($f); 
print $result.\nbr; 

?
--- snap --



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Mike Elkins

Hello All,
 
I am looking for example code demonstrating the ability to dynamically
modify website navigation based upon data in a database. Specifically what I
am trying to figure out is how to control what pages are available based
upon whether they have been enabled in the database. I am developing a
template driven website, with content controlled by the database which
indicates what the customer has opted for. While ten pages might be
available and part of the web site template, a given customer may have only
paid for four, thus when his site is hit, only those four pages will be
available in the navigation elements. Should the customer care to request an
additional feature (page), simply accessing the database and enabling it
would make it immediately available.
 
Any suggestions or pointers would be greatly appreciated.
 
Michael



[PHP] Re: Dynamic Navigation w/PHP

2001-11-19 Thread Julio Nobrega Trabalhando

  Well, I don't really get what is your problem here. :-)

  You said people must 'enable' pages to have it available. Is it not only a
matter of checking this 'enabled' flag? For example a database table with a
column named 'enabled', and others 'link' and 'text':

(example for mysql)

?php

$sql = 'SELECT link, page FROM menu WHERE enabled = 1';
$res = mysql_query($sql);

while(list($link,$page) = mysql_fetch_array($res)) {
// Construct the menu
?
a href=?php echo $link; ??php echo $text; ?/abr/
/php
}

?

  The only thing I see different is the 'enabled' at the $sql command,
telling only to select links that were selected to be show. I guess you
would also want to put 'AND user = $some_user' to select only links for a
previous autheticaded user.

--

Julio Nobrega

No matter where you go, this.

Mike Elkins [EMAIL PROTECTED] wrote in message
0A81AC3C2888D4119C9200A0C9A3179A1713C7@ramses">news:0A81AC3C2888D4119C9200A0C9A3179A1713C7@ramses...
 Hello All,

 I am looking for example code demonstrating the ability to dynamically
 modify website navigation based upon data in a database. Specifically what
I
 am trying to figure out is how to control what pages are available based
 upon whether they have been enabled in the database. I am developing a
 template driven website, with content controlled by the database which
 indicates what the customer has opted for. While ten pages might be
 available and part of the web site template, a given customer may have
only
 paid for four, thus when his site is hit, only those four pages will be
 available in the navigation elements. Should the customer care to request
an
 additional feature (page), simply accessing the database and enabling it
 would make it immediately available.

 Any suggestions or pointers would be greatly appreciated.

 Michael




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Web developer

2001-11-19 Thread Peter Marrocco

I am looking for someone to help maintain and work on our web page. We have
several PHP pages and can't find anyone locally who knows php. 

Thanks, 
Peter

800.333.9302

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Andy Woolley

Hi,

You could try using a DHTML menu like the one at
http://www.milonic.co.uk/menu

The array of elements needed can be generated using PHP based on certain
criteria.

Let me know if you or anybody else would like a PHP script creating so that
you could generate menus based on values that you have in PHP.

Regards
Andy.


- Original Message -
From: Mike Elkins [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 4:17 PM
Subject: [PHP] Dynamic Navigation w/PHP


 Hello All,

 I am looking for example code demonstrating the ability to dynamically
 modify website navigation based upon data in a database. Specifically what
I
 am trying to figure out is how to control what pages are available based
 upon whether they have been enabled in the database. I am developing a
 template driven website, with content controlled by the database which
 indicates what the customer has opted for. While ten pages might be
 available and part of the web site template, a given customer may have
only
 paid for four, thus when his site is hit, only those four pages will be
 available in the navigation elements. Should the customer care to request
an
 additional feature (page), simply accessing the database and enabling it
 would make it immediately available.

 Any suggestions or pointers would be greatly appreciated.

 Michael



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] configure problem: --with-mysql=/what exactly?

2001-11-19 Thread James Green

Hi all,

I have Debian Sid, I have Apache installed by source, and am trying to
install the source of PHP4.0.6. For reasons I won't go into, I cannot
use the Debian packages of Apache or PHP.

The problem is when I come to configure PHP with mysql support. I have
MySQL debs installed: mysql-server, mysql-client, libmysqlclient10-dev.
I can see the mysql libs in /usr/lib/, and the headers in
/usr/include/mysql/.

I have tried the following, each time removing config.cache beforehand:

--with-mysql=/usr
--with-mysql=/usr/include
--with-mysql=/usr/include/mysql
--with-mysql=/usr/lib

According to a friend with mysql Debs installed it should be the first,
yet PHP tells me each time it's using the bundled MySQL version and to
be careful of running it with other mysql-using modules.

Any ideas why configure doesn't pick up my local MySQL installation? It
certainly picks up the currect socket path.

Many thanks,

James Green



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Error running ./configure (c++ error)

2001-11-19 Thread Roy Sigurd Karlsbakk

 Do you have appropriate permissions in the directory you are runnning
 configure in for the user running configure??

Yes.
I'm r00t
--
Roy Sigurd Karlsbakk, MCSE, MCNE, CLS, LCA

Computers are like air conditioners.
They stop working when you open Windows.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] IP Address Converted to Computer Name

2001-11-19 Thread Ben Clumeck

I am trying to convert an ip address to a computer name.  Then I am putting
it into the mail() script.  However, when I do this it come up blank.  I am
putting $r_hostname in the mail() script.  Can anyone tell me why its not
working?  The script I am using is:
?
$r_hostname = gethostbyaddr($REMOTE_ADDR);
if ($REMOTE_ADDR == $r_hostname);
echo $r_hostname;
?

Thanks,

Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] HTTPs ????

2001-11-19 Thread Scott Fletcher

Hi Everyone!

I have the HTTP reference book.  Honestly, I don't know a lot about HTTP
language or protocol.  I am supposely to write the HTTP script to connect to
the one of hte machine on the internet, then use authentication, then send
data and receive data, then close the connection.  It is a pretty basic
thing.  But I noticed it doesn't work at all.  I can write it in PHP using
hte PHP Header.  But the truth is it doesn't do anything.  So, I am lead to
believe that it meant I'm not finish with hte script.

So, anyone where can I find a good documentation on using HTTP in PHP
and making it work?  I looked around on the internet and it isn't very
reliable.  I checked out the book stores and no luck.  I appreciate all of
the help I can get on programming HTTP in PHP.  Here's the HTTP script in
PHP and not a bad start for a HTTP beginner.

-- demo script --
  $eq_one = 10xxx;
  $eq_two = test;
  $eq_three = DIAL999ZIDNT99xxxM3 J02;
  $post_string_len =
strlen(site_id=.$eq_one.service_name=.$eq_two.efx_request=.$eq_three
);

  header(POST eq_test.php HTTP/1.1);
  header(Content-Transfer-Encoding: base64);
  header(Content-Location:
http://transport5.ec.equifax.com/servlet/stspost;);
  header(Authorization: basic 10xxx:trwdwdxx);
//  header(Content-type: application/x-www-form-urlencoded);
  header(Content-length: $post_string_len);
  header(site_id=$eq_oneservice_name=$eq_twoefx_request=$eq_three);

  echo htmlhead;
  echo meta http-equiv='Content-Type'
content='application/x-www-form-urlencoded';
  echo /headbodyTesting!/body/html;
-- demo script end --

Thanks!
  Scott

P.S.  Just any helpful information will be useful.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Adding *another* person to an e-mail *to:* address

2001-11-19 Thread Anthony Ritter

Hi,
Thanks to all that helped me out yesterday.

I'm using PHP with Apache on a MS Windows 98 box.

I would like to include a cc to another e-mail adresss when sending an
e-mail.

In addition I would like to *receive* and *also have the cc person receive*
this e-mail as well.

Right now, I am receiving an e-mail but not the other person using the
following script.

Using the variable and concatating the string to read:

$to.=[EMAIL PROTECTED];

does not seem to work.

How do I go about configuring this script so that both of us - the *to*
person and the *cc* person can recieve the same e-mail?

The script:



?
$msg=Email sent from WWW site;
$msg.=Sender's name:\t$sender_name\n;
$msg.=Sender's email address:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
$to=[EMAIL PROTECTED];
$other_email = [EMAIL PROTECTED];
$subject=Web Site Feedback;
$mailheaders=From: My Website\n;
$mailheaders.=Cc: $other_email\n;
$mailheaders.=Reply to: $sender_email\n;
mail($to,$subject,$msg,$mailheaders);
?
..

In the above script:
I received an e-mail but *not* the cc person - Linda.

However, when I hit reply to that e-mail, both:

[EMAIL PROTECTED]
and
[EMAIL PROTECTED]

showed up with Linda's as the cc.

O.K. That's half the riddle.

I'm trying to have both myself *and Linda* receive
an e-mail...not just me.

So I tried the following script by concatating the string
$to
...


?
$msg=Email sent from WWW site;
$msg.=Sender's name:\t$sender_name\n;
$msg.=Sender's email address:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
mailto:$to=[EMAIL PROTECTED];;
$to.=[EMAIL PROTECTED];
$other_email = [EMAIL PROTECTED];
$subject=Web Site Feedback;
$mailheaders=From: My Website\n;
$mailheaders.=Cc: $other_email\n;
$mailheaders.=Reply to: $sender_email\n;
mail($to,$subject,$msg,$mailheaders);
?

HTML
HEAD
TITLE Simple Feedback Form /TITLE
/HEAD
BODY
H1 The following email has been sent: /H1
PstrongYour Name:/strongbr
? echo $sender_name; ?
PstrongYour email address:/strongbr
? echo $sender_email; ?
PstrongMessage: /strong br
? echo $message; ?
/BODY
/HTML
.

And after using *that* script neither of us receive an e-mail except that it
gets bounced back as:

[EMAIL PROTECTED]

So, it seems that somewhere the string in

$to

is getting fouled up.

Any ideas?

Many thanks for your time and help.

Kindest regards,
Tony Ritter








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Adding *another* person to an e-mail *to:* address

2001-11-19 Thread Jason G.

Bcc: [EMAIL PROTECTED],[EMAIL PROTECTED]
Or
Cc: [EMAIL PROTECTED],[EMAIL PROTECTED]
Or
To: [EMAIL PROTECTED],[EMAIL PROTECTED]

Put a comma between email addresses.

-Jason Garber
IonZoft.com


At 01:00 PM 11/19/2001 -0600, Anthony Ritter wrote:
Hi,
Thanks to all that helped me out yesterday.

I'm using PHP with Apache on a MS Windows 98 box.

I would like to include a cc to another e-mail adresss when sending an
e-mail.

In addition I would like to *receive* and *also have the cc person receive*
this e-mail as well.

Right now, I am receiving an e-mail but not the other person using the
following script.

Using the variable and concatating the string to read:

$to.=[EMAIL PROTECTED];

does not seem to work.

How do I go about configuring this script so that both of us - the *to*
person and the *cc* person can recieve the same e-mail?

The script:



?
$msg=Email sent from WWW site;
$msg.=Sender's name:\t$sender_name\n;
$msg.=Sender's email address:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
$to=[EMAIL PROTECTED];
$other_email = [EMAIL PROTECTED];
$subject=Web Site Feedback;
$mailheaders=From: My Website\n;
$mailheaders.=Cc: $other_email\n;
$mailheaders.=Reply to: $sender_email\n;
mail($to,$subject,$msg,$mailheaders);
?
..

In the above script:
I received an e-mail but *not* the cc person - Linda.

However, when I hit reply to that e-mail, both:

[EMAIL PROTECTED]
and
[EMAIL PROTECTED]

showed up with Linda's as the cc.

O.K. That's half the riddle.

I'm trying to have both myself *and Linda* receive
an e-mail...not just me.

So I tried the following script by concatating the string
$to
...


?
$msg=Email sent from WWW site;
$msg.=Sender's name:\t$sender_name\n;
$msg.=Sender's email address:\t$sender_email\n;
$msg.=Message:\t$message\n\n;
mailto:$to=[EMAIL PROTECTED];;
$to.=[EMAIL PROTECTED];
$other_email = [EMAIL PROTECTED];
$subject=Web Site Feedback;
$mailheaders=From: My Website\n;
$mailheaders.=Cc: $other_email\n;
$mailheaders.=Reply to: $sender_email\n;
mail($to,$subject,$msg,$mailheaders);
?

Simple Feedback Form

The following email has been sent:



Your Name:
? echo $sender_name; ?

Your email address:
? echo $sender_email; ?

Message:
? echo $message; ?
.

And after using *that* script neither of us receive an e-mail except that it
gets bounced back as:

[EMAIL PROTECTED]

So, it seems that somewhere the string in

$to

is getting fouled up.

Any ideas?

Many thanks for your time and help.

Kindest regards,
Tony Ritter








--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] PEAR: nextID() mysql

2001-11-19 Thread Chris Dorr

My ignorance with databases will probably show here, but I haven't been 
able to solve this myself so I thought I'd post.

I'm working on converting a DB driven site using mysql specific commands 
to the PEAR DB method.

One of the fields I have in my mysql database is a auto_increment 
primary key (will show below).

On my php script I used to use mysql_insert_id to get the id (number) of 
my last insert so I can pass this to the next page (multiple tables).

When I tried to use nextID(), it kept creating _seq tables in my DB 
depending on what I specified as the sequence(argument). This causes a 
problem because it returns 1, because there's nothing previously in _seq 
table.  The real _seq or auto_increment is in my table chamber(described 
below).

My question is: is there anyway to make nextID() use the 
id/auto_increment in the table I've setup previously and have id/data in 
rather than having it create _seq and rewrite all of my code??

Hope I'm clear.  If not drop me an e-mail.


Thanks

Chris D.


mysql describe chamber;
+--+--+--+-+-++
| Field| Type | Null | Key | Default | Extra 
   |
+--+--+--+-+-++
| id   | smallint(5) unsigned |  | PRI | NULL| 
auto_increment |
| company  | varchar(255) | YES  | | NULL| 
   |
| contact_name | varchar(100) | YES  | | NULL| 
   |
| address  | varchar(100) | YES  | | NULL| 
   |
| city | varchar(75)  | YES  | | NULL| 
   |
| state| varchar(50)  | YES  | | NULL| 
   |
| phone| varchar(100) | YES  | | NULL| 
   |
| fax  | varchar(100) | YES  | | NULL| 
   |
| category | varchar(100) | YES  | | NULL| 
   |
| email| varchar(100) | YES  | | NULL| 
   |
| company_url  | varchar(255) | YES  | | NULL| 
   |
| ad_url   | varchar(255) | YES  | | NULL| 
   |
+--+--+--+-+-++
12 rows in set (0.00 sec)


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Version Contol for PHP site

2001-11-19 Thread Jeff Bearer

Hello,
I'm trying to come up with a workable solution to implement version
control for our site.  I have developers that use windows, and don't
know too much about the unix command line, so I'd prefer to use a
windows client to work on the site if possible.  

I'm looking into CVS for the version control and I've found some
directions on how to use it with websites.  But it only talks about
static HTML development, it doesn't say how developers would debug PHP,
CGI, etc.  This solution would not give them any ability to debug their
code before checking it back in.

I suppose if I could get them all comfortable with the UNIX command
line, they could work on the development server, checking out the files
to a working directory that is also a virtual host.

A new idea that I just came up with would be to have the developers use
VNC viewer to connect to an X server on the development box. The
deveopers could use a X GUI for CVS to check it out, and edit files etc.
and keep the working directory a virtual host like above.
 
Is anybody doing something like this with their PHP development?  Any
direction from a working implementation would be great. And what do you
think about the VNC idea that I just came up with?

-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Version Contol for PHP site

2001-11-19 Thread John Lim

Hi Jeff

There is a Windows version of WinCVS (see http://wincvs.org/ ).

John

Jeff Bearer [EMAIL PROTECTED] wrote in message
1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
 Hello,
 I'm trying to come up with a workable solution to implement version
 control for our site.  I have developers that use windows, and don't
 know too much about the unix command line, so I'd prefer to use a
 windows client to work on the site if possible.

 I'm looking into CVS for the version control and I've found some
 directions on how to use it with websites.  But it only talks about
 static HTML development, it doesn't say how developers would debug PHP,
 CGI, etc.  This solution would not give them any ability to debug their
 code before checking it back in.

 I suppose if I could get them all comfortable with the UNIX command
 line, they could work on the development server, checking out the files
 to a working directory that is also a virtual host.

 A new idea that I just came up with would be to have the developers use
 VNC viewer to connect to an X server on the development box. The
 deveopers could use a X GUI for CVS to check it out, and edit files etc.
 and keep the working directory a virtual host like above.

 Is anybody doing something like this with their PHP development?  Any
 direction from a working implementation would be great. And what do you
 think about the VNC idea that I just came up with?

 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: Version Contol for PHP site

2001-11-19 Thread Joshua Hoover

John is right.  Use something like WinCVS.  Then you can either setup 
virtual hosts for each developer to have as their sandbox on the 
development server or you can allow the developer to run php on his/her 
own box and check in to the development server when they check into 
CVS.  There are pros and cons to each approach.  You have more central 
control with having the sandboxes on the dev server, but you might have 
an admin nightmare on your hands if configurations keep having to 
change, etc.  Letting the developer run PHP on his/her own box is very 
flexible, but may not mimic the production environment well enough.

Hope that helps...

Joshua Hoover

 Hi Jeff

 There is a Windows version of WinCVS (see http://wincvs.org/ ).

 John

 Jeff Bearer [EMAIL PROTECTED] wrote in message
 1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
 Hello,
 I'm trying to come up with a workable solution to implement version
 control for our site.  I have developers that use windows, and don't
 know too much about the unix command line, so I'd prefer to use a
 windows client to work on the site if possible.

 I'm looking into CVS for the version control and I've found some
 directions on how to use it with websites.  But it only talks about
 static HTML development, it doesn't say how developers would debug PHP,
 CGI, etc.  This solution would not give them any ability to debug their
 code before checking it back in.

 I suppose if I could get them all comfortable with the UNIX command
 line, they could work on the development server, checking out the files
 to a working directory that is also a virtual host.

 A new idea that I just came up with would be to have the developers use
 VNC viewer to connect to an X server on the development box. The
 deveopers could use a X GUI for CVS to check it out, and edit files 
 etc.
 and keep the working directory a virtual host like above.

 Is anybody doing something like this with their PHP development?  Any
 direction from a working implementation would be great. And what do you
 think about the VNC idea that I just came up with?

 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] Re: Version Contol for PHP site

2001-11-19 Thread Chris Bailey

I'm maybe a little unclear on exactly what you want.  It says Version
Control in the subject, but then PHP debugging and such is discussed below.
To me the two are independent subjects.  So, some more general info...

For version control I'd suggest either CVS or Perforce, depending on budget
:)  CVS is obviously free, and is quite good.  You definitely want to run
the server portion of it on a UNIX/Linux box, but you can use it quite
easily from Windows with WinCVS or you can probably integrate CVS commands
into your editor (depending on your editor/IDE).  Perforce is a superb
source code management tool, but it costs money (although it's price is
reasonable).  It has some nice features over CVS (such as the whole atomic
checkin process, which once you use/work this way, you'll be bummed that
they don't all have it - I heard CVS 2 may do this if that ever happens).
You can get Perforce for free if you only have 2 (or less) users.  It works
very well on Windows and has a nice GUI.  You can also run the server on
Windows NT/2000.

Just about any version control system will work for your PHP, HTML, CSS, and
any other source code you have.  Basically they're all text files, and
that's where these systems work best because they can help with merges and
diffing and obviously keep track of differences between revisions.

You can do your development work on any platform and use typically
UNIX/Linux or Windows for a server for source control, deployment, etc.
Version control is just that, it is up to you how you employ it in terms of
your development environment.  I would think most people use it most
strictly for version control, and have scripts on their staging and/or
deployment system where they pull a snapshot of code down, do a build
(which may be compiling CGI scripts, or may just mean copying the files to
the appropriate place on the server), and then fire up the server.  Your
developers would do similar things, just on their own machine (I assume they
have a similar environment setup as the deployment, e.g. they're running a
web server with mod_php or whatever).

Hope that helps.

-Original Message-
From: John Lim [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 10:57 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Version Contol for PHP site


Hi Jeff

There is a Windows version of WinCVS (see http://wincvs.org/ ).

John

Jeff Bearer [EMAIL PROTECTED] wrote in message
1006195598.1407.7.camel@jbearer">news:1006195598.1407.7.camel@jbearer...
 Hello,
 I'm trying to come up with a workable solution to implement version
 control for our site.  I have developers that use windows, and don't
 know too much about the unix command line, so I'd prefer to use a
 windows client to work on the site if possible.

 I'm looking into CVS for the version control and I've found some
 directions on how to use it with websites.  But it only talks about
 static HTML development, it doesn't say how developers would debug PHP,
 CGI, etc.  This solution would not give them any ability to debug their
 code before checking it back in.

 I suppose if I could get them all comfortable with the UNIX command
 line, they could work on the development server, checking out the files
 to a working directory that is also a virtual host.

 A new idea that I just came up with would be to have the developers use
 VNC viewer to connect to an X server on the development box. The
 deveopers could use a X GUI for CVS to check it out, and edit files etc.
 and keep the working directory a virtual host like above.

 Is anybody doing something like this with their PHP development?  Any
 direction from a working implementation would be great. And what do you
 think about the VNC idea that I just came up with?

 --
 Jeff Bearer, RHCE
 Webmaster
 PittsburghLIVE.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Version Contol for PHP site

2001-11-19 Thread John S. Huggins

On 19 Nov 2001, Jeff Bearer wrote:

-Is anybody doing something like this with their PHP development?  Any
-direction from a working implementation would be great. And what do you
-think about the VNC idea that I just came up with?
-
VNC in a fine tool, but I think not needed for this.  Here is what I do
using WinCVS and Windows work stations.

I have three servers: one live web server, one development web server and
one completely seperate CVS server. Both web servers carry the same
Apache/PHP/MySQL setup.

At a work station (Windows for me) I checkout whatever (PHP, INC, HTML)
from the CVS server to my local drive.  I then edit it in Ultraedit and
save it via FTP to the development server.  Then I work, work, work,
crashing, banging, fixing with my browser pointing at the development
server.  Edits complete, I then save as to the local file name, do a CVS
commit and call it done.

Every so often, I will CVS Update the latest changes from the CVS
repository directly into the live web server and evaluate the web site. 
If things bomb, I will obtain a previous tagged-as-stable version of the
whole site (HTML,PHP,graphics) into the web directory and continue working
towards the next stable release.  If the development release works just
fine, I will tag the whole CVS repository with a new release description. 

CVS is proving quite effective at managing this stuff.

**

John Huggins
VANet
7101 Oriole Avenue
Springfield, VA 22150
703-912-6453
703-912-4831 fax

[EMAIL PROTECTED]
http://www.va.net/

**


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Dynamic Navigation w/PHP

2001-11-19 Thread Matthew Moreton

My website has a navigation menu that is written to the browser depending on
what vars are set in the php script.  I store all the link names in an
array, then simply do a 'foreach' loop to write the output.  This would
allow me to add another menu item by just adding it into the array.

Simple example:

foreach($linkname as $key = $value)
{
echo a href={$linkname[$key]}.php{$linkname[$key]}/ABR\n;
}

You could do something similar to this, when you want a menu item to be
enabled you could append it to the array.

- Original Message -
From: Andy Woolley [EMAIL PROTECTED]
To: Mike Elkins [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 4:51 PM
Subject: Re: [PHP] Dynamic Navigation w/PHP


 Hi,

 You could try using a DHTML menu like the one at
 http://www.milonic.co.uk/menu

 The array of elements needed can be generated using PHP based on certain
 criteria.

 Let me know if you or anybody else would like a PHP script creating so
that
 you could generate menus based on values that you have in PHP.

 Regards
 Andy.


 - Original Message -
 From: Mike Elkins [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 19, 2001 4:17 PM
 Subject: [PHP] Dynamic Navigation w/PHP


  Hello All,
 
  I am looking for example code demonstrating the ability to dynamically
  modify website navigation based upon data in a database. Specifically
what
 I
  am trying to figure out is how to control what pages are available based
  upon whether they have been enabled in the database. I am developing a
  template driven website, with content controlled by the database which
  indicates what the customer has opted for. While ten pages might be
  available and part of the web site template, a given customer may have
 only
  paid for four, thus when his site is hit, only those four pages will be
  available in the navigation elements. Should the customer care to
request
 an
  additional feature (page), simply accessing the database and enabling it
  would make it immediately available.
 
  Any suggestions or pointers would be greatly appreciated.
 
  Michael
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] File Download Inquiry

2001-11-19 Thread Douglas McKenzie

You can just link to the file eg
a href=yourfilenamehere.whatever_extdownload file/a

just make sure the path is correct.

Joe Van Meer wrote:

 Hi there. How would I go about downloading a file off of the server. The
 filename will always be the same in my case. Say it is sitting in a
 directory called 'textfiles'. What method/function would I use to download
 it to a user's local system?

 Thx Joe:)

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Web developer

2001-11-19 Thread John Monfort



 Where are you located?

__John Monfort_
_+---+_
 P E P I E  D E S I G N S
   www.pepiedesigns.com
The world is waiting, are you ready?
-+___+-

On Mon, 19 Nov 2001, Peter Marrocco wrote:

 I am looking for someone to help maintain and work on our web page. We have
 several PHP pages and can't find anyone locally who knows php.

 Thanks,
 Peter

 800.333.9302

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] schedule a task

2001-11-19 Thread Gab

Hi,

I have a form (POST method), that creates a back-up of a MySQL database as
an SQL file when submited. I am looking for a way to automate this task (ie
on a daily basis at midnight).
Any idea on how to do it in PHP? (if it is possible)

Thanks

Gab



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

cron either a php script itself [if you've got it installed as a cgi] or a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this comes up
every week or so

- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task


 Hi,

 I have a form (POST method), that creates a back-up of a MySQL database as
 an SQL file when submited. I am looking for a way to automate this task
(ie
 on a daily basis at midnight).
 Any idea on how to do it in PHP? (if it is possible)

 Thanks

 Gab



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Tyler Longren

Set up a crontab that uses wget to hit that page everyday at midnight.

You should use the flag in wget that tells it to delete the page that it
downloads.  I use that method sometimes.

Tyler

- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 2:15 PM
Subject: [PHP] schedule a task


 Hi,

 I have a form (POST method), that creates a back-up of a MySQL database as
 an SQL file when submited. I am looking for a way to automate this task
(ie
 on a daily basis at midnight).
 Any idea on how to do it in PHP? (if it is possible)

 Thanks

 Gab



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Gab

thanks for a quick response but I have a major problem with that:
no shell access = can't use cron

Any other idea?
Gab


Jack Dempsey [EMAIL PROTECTED] wrote in message
005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
 cron either a php script itself [if you've got it installed as a cgi] or a
 lynx request of the page
 check the archives as well [marc.theaimsgroup.com] because this comes up
 every week or so

 - Original Message -
 From: Gab [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 19, 2001 3:15 PM
 Subject: [PHP] schedule a task


  Hi,
 
  I have a form (POST method), that creates a back-up of a MySQL database
as
  an SQL file when submited. I am looking for a way to automate this task
 (ie
  on a daily basis at midnight).
  Any idea on how to do it in PHP? (if it is possible)
 
  Thanks
 
  Gab
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] schedule a task

2001-11-19 Thread Jack Dempsey

you need some way of automating the process, and without cron automatically
doing things for you, you're going to be pressed for a solution...i'm not
sure what you could do because you need something to do this
automatically...your host doesn't provide perl scripts to be cronned or
anything like that? if not, i'm not sure what to tell you...

jack
- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 3:32 PM
Subject: Re: [PHP] schedule a task


 thanks for a quick response but I have a major problem with that:
 no shell access = can't use cron

 Any other idea?
 Gab


 Jack Dempsey [EMAIL PROTECTED] wrote in message
 005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
  cron either a php script itself [if you've got it installed as a cgi] or
a
  lynx request of the page
  check the archives as well [marc.theaimsgroup.com] because this comes up
  every week or so
 
  - Original Message -
  From: Gab [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 19, 2001 3:15 PM
  Subject: [PHP] schedule a task
 
 
   Hi,
  
   I have a form (POST method), that creates a back-up of a MySQL
database
 as
   an SQL file when submited. I am looking for a way to automate this
task
  (ie
   on a daily basis at midnight).
   Any idea on how to do it in PHP? (if it is possible)
  
   Thanks
  
   Gab
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] schedule a task

2001-11-19 Thread Boget, Chris

 thanks for a quick response but I have a major problem with that:
 no shell access = can't use cron

Your Windows task manager?  Just set it up to go to that page
every night at your (not the server's) midnight...

Chris



Re: [PHP] schedule a task

2001-11-19 Thread Gab

I'll check with the tech support but nothng is mentioned on the website.
I can transform the method into GET on the form, and could call the script.
The only way I see so far is using thi URL as a default page in my Win
browser and automate sschedule the task in windows, but i don't like that.




Jack Dempsey [EMAIL PROTECTED] wrote in message
007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
 you need some way of automating the process, and without cron
automatically
 doing things for you, you're going to be pressed for a solution...i'm not
 sure what you could do because you need something to do this
 automatically...your host doesn't provide perl scripts to be cronned or
 anything like that? if not, i'm not sure what to tell you...

 jack
 - Original Message -
 From: Gab [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 19, 2001 3:32 PM
 Subject: Re: [PHP] schedule a task


  thanks for a quick response but I have a major problem with that:
  no shell access = can't use cron
 
  Any other idea?
  Gab
 
 
  Jack Dempsey [EMAIL PROTECTED] wrote in message
  005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
   cron either a php script itself [if you've got it installed as a cgi]
or
 a
   lynx request of the page
   check the archives as well [marc.theaimsgroup.com] because this comes
up
   every week or so
  
   - Original Message -
   From: Gab [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, November 19, 2001 3:15 PM
   Subject: [PHP] schedule a task
  
  
Hi,
   
I have a form (POST method), that creates a back-up of a MySQL
 database
  as
an SQL file when submited. I am looking for a way to automate this
 task
   (ie
on a daily basis at midnight).
Any idea on how to do it in PHP? (if it is possible)
   
Thanks
   
Gab
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
   
   
  
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Username:Password??? (Using fsockopen...)

2001-11-19 Thread Scott Fletcher

Hi!

How do I send the username and password to the port and recieve a
response saying hte username  password is accepted or fail???


Thanks,
 Scott



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] fopen r+ not working - how to add to beginning of txt file

2001-11-19 Thread Brian Tully

hey there - 

i've been going crazy trying to figure out how to add news items to the top
of an already existing txt file containng previous news posts. While I'd
love to change the system so everything is database-driven (as most of the
rest of the site is), this news area has so much news posts that it would
take forever to convert the info the database.

SO... i want to just create a simple script that adds text to the beginning
of an existing text file, without overwriting any previous text in the file.
The manual and php site refer to using the fopen function with the r+ option
- which i've done, BUT some if the text still gets overwritten with the new
next.

here's what I'm using:

?php

$today = getdate();
$month = $today[month];
$mday = $today[mday];
$year = $today[year];


if ($fp = fopen(/home/foo/www/whats_new/whats_new2.txt, r+)) {

fwrite($fp, this is the new line of text I want to add to the top of
the page); 

fclose($fp);

print success!;

}

else {

print Could not open What\'s New file for updating.;

}

? 


What happens is that the line does get written to the top of the page but it
overwrites or deletes some of the existing text. Even though the r+ option
is supposed to put the pointer at the beginning of the file and add to it as
opposed to overwriting it doesn't seem to be working for me.

What am I doing wrong?

Is there a better way to accomplish what I'm trying to do?

any help would be GREATLY appreciated!

regards,
brian


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Re: $ENV{'REMOTE_ADDR'}

2001-11-19 Thread Danijel Tasov

Hello,

On Wed, Oct 31, 2001 at 03:26:44PM -0500, Liz Fulghum wrote:
 if ($REMOTE_ADDR==127.0.0.1) {
 do something
 } elseif ($REMOTE_ADDR==remote.somewhere.com) {
 do something else
 } else {
 eeks! its the end
 }

But how to easily accessing the whole environment. For example,
can you port this to PHP?

  print map { $_=$ENV{$_}\n } sort keys %ENV;

bye,
Da.Ta.

-- 
ooo   oo   o oo   |  Danijel Tasov, [EMAIL PROTECTED]
o  o o  oo  o  o  |  00 3A 65 0C 47 66 46 27  E2 AF 3A C4 1C 2E E8 EE
o  o o    |  http://www.camelot.de/news/
ooo  o  o.   o  o  o. |  # fortune: No such file or directory



msg40507/pgp0.pgp
Description: PGP signature


Re: Re: [PHP] schedule a task

2001-11-19 Thread Matthew Moreton

You can launch IE with an address as a paramater from task scheduler.

Example:

C:\PROGRA~1\INTERN~1\IEXPLORE.EXE http://somehost.com/somepath/somescript.php

Matt.


Gab [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'll check with the tech support but nothng is mentioned on the website.
 I can transform the method into GET on the form, and could call the script.
 The only way I see so far is using thi URL as a default page in my Win
 browser and automate sschedule the task in windows, but i don't like that.
 
 
 
 
 Jack Dempsey [EMAIL PROTECTED] wrote in message
 007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
  you need some way of automating the process, and without cron
 automatically
  doing things for you, you're going to be pressed for a solution...i'm not
  sure what you could do because you need something to do this
  automatically...your host doesn't provide perl scripts to be cronned or
  anything like that? if not, i'm not sure what to tell you...
 
  jack
  - Original Message -
  From: Gab [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 19, 2001 3:32 PM
  Subject: Re: [PHP] schedule a task
 
 
   thanks for a quick response but I have a major problem with that:
   no shell access = can't use cron
  
   Any other idea?
   Gab
  
  
   Jack Dempsey [EMAIL PROTECTED] wrote in message
   005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
cron either a php script itself [if you've got it installed as a cgi]
 or
  a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this comes
 up
every week or so
   
- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task
   
   
 Hi,

 I have a form (POST method), that creates a back-up of a MySQL
  database
   as
 an SQL file when submited. I am looking for a way to automate this
  task
(ie
 on a daily basis at midnight).
 Any idea on how to do it in PHP? (if it is possible)

 Thanks

 Gab



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
  [EMAIL PROTECTED]


   
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



[PHP] use PHP as a module in Apache on win9x

2001-11-19 Thread Gary

Has anyone been able to run PHP 4.06 as a module on windows 98? Every 
time I have tried, using the install directions I get an error on 
starting Apache.It tells me it take two arguments, a module name and 
shared object file what am I doing wrong?

Gary


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: Re: [PHP] schedule a task

2001-11-19 Thread Gab

thanks,
That's what I did, and it works fine, was just hopping to find another way
than using cron, but still as a server-side script.
Gab


Matthew Moreton [EMAIL PROTECTED] wrote in message
018c01c1713f$d98f9ab0$0100a8c0@summy">news:018c01c1713f$d98f9ab0$0100a8c0@summy...
You can launch IE with an address as a paramater from task scheduler.

Example:

C:\PROGRA~1\INTERN~1\IEXPLORE.EXE
http://somehost.com/somepath/somescript.php

Matt.


Gab [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I'll check with the tech support but nothng is mentioned on the website.
 I can transform the method into GET on the form, and could call the
script.
 The only way I see so far is using thi URL as a default page in my Win
 browser and automate sschedule the task in windows, but i don't like that.




 Jack Dempsey [EMAIL PROTECTED] wrote in message
 007f01c1713a$2a18e140$[EMAIL PROTECTED]">news:007f01c1713a$2a18e140$[EMAIL PROTECTED]...
  you need some way of automating the process, and without cron
 automatically
  doing things for you, you're going to be pressed for a solution...i'm
not
  sure what you could do because you need something to do this
  automatically...your host doesn't provide perl scripts to be cronned or
  anything like that? if not, i'm not sure what to tell you...
 
  jack
  - Original Message -
  From: Gab [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, November 19, 2001 3:32 PM
  Subject: Re: [PHP] schedule a task
 
 
   thanks for a quick response but I have a major problem with that:
   no shell access = can't use cron
  
   Any other idea?
   Gab
  
  
   Jack Dempsey [EMAIL PROTECTED] wrote in message
   005401c17137$b930af00$[EMAIL PROTECTED]">news:005401c17137$b930af00$[EMAIL PROTECTED]...
cron either a php script itself [if you've got it installed as a
cgi]
 or
  a
lynx request of the page
check the archives as well [marc.theaimsgroup.com] because this
comes
 up
every week or so
   
- Original Message -
From: Gab [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 3:15 PM
Subject: [PHP] schedule a task
   
   
 Hi,

 I have a form (POST method), that creates a back-up of a MySQL
  database
   as
 an SQL file when submited. I am looking for a way to automate this
  task
(ie
 on a daily basis at midnight).
 Any idea on how to do it in PHP? (if it is possible)

 Thanks

 Gab



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
  [EMAIL PROTECTED]


   
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
   To contact the list administrators, e-mail:
[EMAIL PROTECTED]
  
  
 



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] diferent data on diferent columns...

2001-11-19 Thread Romeo Manzur

Hi, I wonder how could I do a script for print direfent data on
diferents columns from a table...
I mean this
$result = mysql_query(SELECT * FROM xxx);
while(($row = mysql_fetch_array($result)){
echo table
echo tr
echo td.$row[id].td\n;//id for the firt record ex:1
echo td.$row[id].td\n;//id for the second record ex: 2
echo /tr\n;
echo /table\n;

if I do this it prints the same record value...

please I need help...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] exporting

2001-11-19 Thread Kunal Jhunjhunwala

hey guys..

does anyone have any ideas on how to export information from a mysql
database to microsoft word, excel, access, note pad or any other such
application?


Regards,
Kunal Jhunjhunwala


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] exporting

2001-11-19 Thread Kunal Jhunjhunwala

I need something that will do a direct transfer to word or excel or the
others.. not something via a cvs method..
Regards,
Kunal Jhunjhunwala
- Original Message -
From: Joshua Hoover [EMAIL PROTECTED]
To: Kunal Jhunjhunwala [EMAIL PROTECTED]
Sent: Tuesday, November 20, 2001 3:39 AM
Subject: Re: [PHP] exporting


 You can use something like this from MySQL:

 SELECT * INTO OUTFILE 'data.txt'
 FIELDS TERMINATED BY ','
 FROM ...;

 This will give you a comma delimited file that you can then import into
 Excel, Access, etc.

 You can find more out on this at:
 http://www.mysql.com/doc/L/O/LOAD_DATA.html

 Hope that helps.

 Joshua Hoover

  hey guys..
 
  does anyone have any ideas on how to export information from a mysql
  database to microsoft word, excel, access, note pad or any other such
  application?
 
 
  Regards,
  Kunal Jhunjhunwala





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] exporting

2001-11-19 Thread Jason Murray

 I need something that will do a direct transfer to word or 
 excel or the others.. not something via a cvs method..

Excel loads comma separated (CSV - CVS is something else entirely)
files happily.

Jason

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] strip BR(s) from the end of the string

2001-11-19 Thread Justin French

Hi,

Some RegExp help here would be great... how do I strip one (or more)
BR's from the END of a string?

Many thanks,

Justin French

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: diferent data on diferent columns...

2001-11-19 Thread Chris Lee

echo td.$row[id].td\n;//id for the firt record ex:1
echo td.$row[name].td\n;//id for the second record ex: 2

or

echo td.$row[0].td\n;//id for the firt record ex:1
echo td.$row[1].td\n;//id for the second record ex: 2

is that what you mean?

--

  Chris Lee
  [EMAIL PROTECTED]



Romeo Manzur [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi, I wonder how could I do a script for print direfent data on
 diferents columns from a table...
 I mean this
 $result = mysql_query(SELECT * FROM xxx);
 while(($row = mysql_fetch_array($result)){
 echo table
 echo tr
 echo td.$row[id].td\n;//id for the firt record ex:1
 echo td.$row[id].td\n;//id for the second record ex: 2
 echo /tr\n;
 echo /table\n;

 if I do this it prints the same record value...

 please I need help...




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Problem with PARSE ERROR

2001-11-19 Thread Nicolas Llamosas

My browser show the message
#8220;Parse error: parse error in C:\apache\htdocs\prueba\prueba.php on 
line 21#8221;
when i try to connect to a mysql server (v.3.23) using the follow syntax:

?php
line 21à$link = mysql_connect (localhost, my_user, my_pass) {
or die (Could not connect);
}
print (Connected successfully);
mysql_close ($link);
?

I read the php manual and the mysql manual, but I can#8217;t find the 
solution.

My server run under w98. (I installed the php triad)

Thank you

Nicolás Llamosas #8211; Rio Cuarto, Argentina -



_
Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: Download File Problem - text not appearing on downloaded file

2001-11-19 Thread Chris Lee

I dont know if Im pointing out the obvious or if you orgot to post more
code.

?PHP
  header(Content-type: application/octet-stream);
  header(Content-Disposition: attachment; filename=file.txt);
  // get file data rom db or wherever
  echo $data;
?

--

  Chris Lee
  [EMAIL PROTECTED]



Joe Van Meer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi there. I managed to get the prompt for a file download when a user
clicks
 on a text link. The file downloads properly to the client machine, howevr,
 when I open up the file there is no content. What do I have to add to the
 following code to get the content sent back to the user?

 Thx Joe :)

 ?PHP

 header(Content-type: application/octet-stream);
 header(Content-Disposition: attachment; filename=file.txt);

 ?






-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: diferent data on diferent columns...

2001-11-19 Thread Romeo Manzur

I found the way...
$i = 0;
$result = mysql_query(SELECT * FROM sometable);
echo   tr \n;
while($row = mysql_fetch_array($result)){
echo td.$row[id]./td\n;
 if($i % 2 == 1){
  echo   /tr\n;
  echo   tr\n;
 }
$i++;
}
echo   /tr\n;

I hope that this can help to somebody...

Romeo Manzur wrote:

 Hi, I wonder how could I do a script for print direfent data on
 diferents columns from a table...
 I mean this
 $result = mysql_query(SELECT * FROM xxx);
 while(($row = mysql_fetch_array($result)){
 echo table
 echo tr
 echo td.$row[id].td\n;//id for the firt record ex:1
 echo td.$row[id].td\n;//id for the second record ex: 2
 echo /tr\n;
 echo /table\n;

 if I do this it prints the same record value...

 please I need help...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] transfer parameters

2001-11-19 Thread astenios

Hi
I'm trying to transfer a variable from one web-page to another

The source page (http://astenios.hn.org/php/wall.php) is like

echo 'TD CENTER A HREF=/php/detall.php?codi=', urlencode ($row[1]),
'';
echo 'SPAN id=Texte', $row[1], '/SPAN /A /CENTER /TD';

and target(http://astenios.hn.org/php/detall.php) catch it by:

$codi = urldecode($codi);
echo 'codi = ', $codi;

This do not work.

isset($codi) returns TRUE
empty($codi) returns TRUE

Something similar ocurrs with:

?php
if (!isset($PHP_AUTH_USER))

  header('WWW-Authenticate: Basic realm=Acceso restringido');
  header('HTTP/1.0 401 Unauthorized');
  echo 'Authorization Required.';
  exit;
   }

   $fich = file(php/password.txt);
   $i=0; $validado=false;
   while ($fich[$i]  !$validado)

  $campo = explode(|,$fich[$i]);
  if (($PHP_AUTH_USER==$campo[0])  ($PHP_AUTH_PW==chop($campo[1])))
$validado=true;
  $i++;
   }

   if (!$validado)

  header('WWW-Authenticate: Basic realm=Acceso restringido');
  header('HTTP/1.0 401 Unauthorized');
  echo 'Authorization Required.';
  exit;
   }
?

It seems like the variables doesn't store the values.

What I'm doing wrong??

Thank's in advance and sorry for my english.

Astenios



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problem with PARSE ERROR

2001-11-19 Thread Brian Clark

Hi Nicolas,

@ 5:26:44 PM on 11/19/2001, Nicolas Llamosas wrote:

NL line 21à$link = mysql_connect (localhost, my_user, my_pass) {
NL or die (Could not connect);
NL }
NL print (Connected successfully);
NL mysql_close ($link);

You want:

$link = mysql_connect (localhost, my_user, my_pass) or die (Could not connect);
print (Connected successfully);
mysql_close ($link);

(Lose the curly braces)

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip BR(s) from the end of the string

2001-11-19 Thread Brian Clark

Hi Justin,

@ 5:20:15 PM on 11/19/2001, Justin French wrote:

JF Some RegExp help here would be great... how do I strip one (or more)
JF BR's from the END of a string?


Are they always at the end of the string? No more anywhere else on the
line?

$string = str_replace('BR','',$string);
$string = str_replace('br','',$string);

Or maybe..

$string = preg_replace('/(br)+$/i','',$string);

(untested)

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: OOP support

2001-11-19 Thread Chris Lee

this is fine as any of a place to ask OOP questions :)

--

  Chris Lee
  [EMAIL PROTECTED]


Roko Roic [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I don't know if this is the right place to ask this (there is no
.news.admin
 group on news.php.net), but where is the right place to look for support
for
 OOP PHP programming.

 Any newsgroups, mailing lists?

 Maybe opening a group in this hierarchy named php.oop?? Where is the right
 place to ask for group opening?

 I believe there are a lot of us OOProgrammers using PHP in an OOP manner
who
 would like to share ideas, solutions and troublshooting.


 Roko





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] transfer parameters

2001-11-19 Thread Brian Clark

Hi Astenios,

@ 5:35:28 PM on 11/19/2001, astenios wrote:

a I'm trying to transfer a variable from one web-page to another

a The source page (http://astenios.hn.org/php/wall.php) is like

a echo 'TD CENTER A HREF=/php/detall.php?codi=', urlencode ($row[1]),
'';
a echo 'SPAN id=Texte', $row[1], '/SPAN /A /CENTER /TD';

Try:

TDCENTER
A HREF=/php/detall.php?codi=?php print urlencode($row[1]); ?
SPAN id=Texte?php print $row[1]; ?/SPAN/A
/CENTER/TD

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] use PHP as a module in Apache on win9x

2001-11-19 Thread Brian Clark

Hi Gary,

@ 4:42:20 PM on 11/19/2001, Gary wrote:

G Has anyone been able to run PHP 4.06 as a module on windows 98? Every 
G time I have tried, using the install directions I get an error on 
G starting Apache.It tells me it take two arguments, a module name and 
G shared object file what am I doing wrong?

Where did you get the packages from?

Try php4win which has Apache+PHP4 with a bunch of other support
built-in. It should work `out of the box' on windows:

http://www.php4win.com/

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip BR(s) from the end of the string

2001-11-19 Thread Justin French

Sorry, yeah, there are other BR's in the string... I only want to chop
the trailing ones.

Justin


Brian Clark wrote:
 
 Hi Justin,
 
 @ 5:20:15 PM on 11/19/2001, Justin French wrote:
 
 JF Some RegExp help here would be great... how do I strip one (or more)
 JF BR's from the END of a string?
 
 Are they always at the end of the string? No more anywhere else on the
 line?
 
 $string = str_replace('BR','',$string);
 $string = str_replace('br','',$string);
 
 Or maybe..
 
 $string = preg_replace('/(br)+$/i','',$string);
 
 (untested)
 
 --
  -Brian Clark | PGP is spoken here: 0xE4D0C7C8
   Please, DO NOT carbon copy me on list replies.
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] strip BR(s) from the end of the string

2001-11-19 Thread Brian Clark

Hi Justin,

@ 5:51:23 PM on 11/19/2001, Justin French wrote:

JF Sorry, yeah, there are other BR's in the string... I only want to chop
JF the trailing ones.

 $string = preg_replace('/(br)+$/i','',$string);

^^^ that'll do it then.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] query works in mysql, but not from php

2001-11-19 Thread Olav Drageset

Hi

$sql = SELECT user FROM persons WHERE user = '$firstName' and domain = '$domainName' 
; ;
$result = mysql_query($sql,$connection ) or die(mysql_error()); 

Calling above lines from php returns: You have an error in SQL syntax near ';'  at 
line 1

Issuing the command

SELECT user FROM persons WHERE user = 'fred' AND domain = 'company.net' ; 

in mysql give a proper result.

Can anyone explain what might be causing the error???
regards Olav


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Brian Clark

Hi Olav,

@ 5:58:14 PM on 11/19/2001, Olav Drageset wrote:

OD Hi

OD $sql = SELECT user FROM persons WHERE user = '$firstName' and domain = 
'$domainName' ; ;

Remove the semi-colon:

$sql = SELECT user FROM persons WHERE user = '$firstName' and domain = '$domainName';

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [newbie] passing variables

2001-11-19 Thread Brian Clark

Hi pjc,

@ 7:59:51 PM on 11/19/2001, pjc wrote:

p The error that I am getting on delete_entry.php is that my variables aren't
p there. Any suggestions folks?

Copy and paste the exact error message and repost it here.

--
 -Brian Clark | PGP is spoken here: 0xE4D0C7C8
  Please, DO NOT carbon copy me on list replies.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Christian Dechery

remove the ; at the end...

mysql_query() doesn't need it... since it only executes on atomic command, 
the ; is useless..

that's what's causing the error...

At 22:58 19/11/01 +, Olav Drageset wrote:
Hi

$sql = SELECT user FROM persons WHERE user = '$firstName' and domain = 
'$domainName' ; ;
$result = mysql_query($sql,$connection ) or die(mysql_error());

Calling above lines from php returns: You have an error in SQL syntax 
near ';'  at line 1

Issuing the command

SELECT user FROM persons WHERE user = 'fred' AND domain = 'company.net' ;

in mysql give a proper result.

Can anyone explain what might be causing the error???
regards Olav


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


_
. Christian Dechery
. . Gaita-L Owner / Web Developer
. . http://www.webstyle.com.br
. . http://www.tanamesa.com.br


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Form results sent to file

2001-11-19 Thread Ben Clumeck

Does anybody have an easy script that send form results to a .txt file in
comma separated format.

Thanks,

Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] query works in mysql, but not from php

2001-11-19 Thread Steve Cayford

You don't need to put in the final semi-colon when running a query from 
php. Take that out and you should be fine.

-Steve

On Monday, November 19, 2001, at 04:58  PM, Olav Drageset wrote:

 Hi

 $sql = SELECT user FROM persons WHERE user = '$firstName' and domain = 
 '$domainName' ; ;
 $result = mysql_query($sql,$connection ) or die(mysql_error());

 Calling above lines from php returns: You have an error in SQL 
 syntax near ';'  at line 1

 Issuing the command

 SELECT user FROM persons WHERE user = 'fred' AND domain = 
 'company.net' ;

 in mysql give a proper result.

 Can anyone explain what might be causing the error???
 regards Olav


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] phptriad / apache on windows question

2001-11-19 Thread christian calloway

Hi everyone,

I just downloaded phptriad, which installs apache/php/mysql/perl on a win
system. Im not sure on the language, but I want to be able to define virtual
directories. Currently everything under /apache/htdocs/ is accessible from
the browser, ie test.php located at c:\apache\htdocs\test.php can be
accessed on the browser url at http://localhost/test.php. Now if I wanted to
define say the directory web located at d:\code\web so that I could type
http://localhost/web/somephpfile.php in my browser how would I go about
making that association. Thanks,

Christian



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] [newbie] passing variables

2001-11-19 Thread Dean Householder


- Original Message -
From: pjc [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, November 19, 2001 5:59 PM
Subject: [PHP] [newbie] passing variables


 I just started playing with PHP and MySQL and am building an online
 phonebook for myself.

 From my 'view_all_numbers.php' I have a link that looks something like
this:
 a

href=delete_entry_confirm.php?first=yourfirstnamelast=yourlastnameDELETE
 /a

 Here is the code from delete_entry_confirm.php
 ?
 echo h3 align=centerAre you sure you want to delete br;
 echo i.$first. .$last./i;
 echo brfrom the phonebook?/h3\n\n;
 echo form action='delete_entry.php' action='get'\n;
 echo \t input type='hidden' name='first'
 value='.stripslashes($first).'\n;
 echo \t input type='hidden' name='first'
 value='.stripslashes($last).'\n;
 echo input type=submit value='Delete This Entry';
 echo  input type=button value='I would rather keep it...'
 onclick='javascript:history.back();';
 echo /form;
 ?
 ===
 And here's the code from my delete_entry.php
 ?
 if(!$last || !$first) {
  echo h4 align=centerSomething's fucked up with yo script ya
 herd.../h4;
  exit;
 }

 $db = @mysql_connect(localhost,login,pass);

 if (!$db)
  {
  echo bDatabase ain't workin dawg!!/b;
  exit;
  }

 mysql_select_db(paultest);
 $query = delete from phonebook where last='.$last.' and
 first='.$first.';
 $result = mysql_query($query);
 if($result)
  echo h3.mysql_affected_rows(). record(s) deleted./h3;
 ?
 ===

 This link does work though: a
 href=delete_entry.php?first=yourfirstnamelast=yourlastnameYES I WANT
TO
 DELETE/a

 The error that I am getting on delete_entry.php is that my variables
aren't
 there. Any suggestions folks?

 Thank you in advance.
 -p

 --

 Paul C
 [EMAIL PROTECTED]
 ICQ:68274240

 You can't put a bag over someone's personality.






 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   >