[PHP] Re: Sessions Variables and refresh pages

2001-10-03 Thread Philippe Saladin

is your web server a Microsoft one (IIS, PWS, ...) ?
I'm not sure, but I think there is a known problem with them if you set a
session variable and do a redirect in the same page.
Can anyone confirm this ?

Philippe


Karina Gómez Salgado [EMAIL PROTECTED] a écrit dans le message news:
[EMAIL PROTECTED]
 Hello, this is the fourth time i wrote expecting some answer from
 somebody with more experience than me.

 I have a protected page , i ask for user and pass and save these
 variables as session variables, with session_register.

 When the user submit this page.. this variables are registered, in the
 next page, i do some queries using a substr of REQUEST_URI and
 displaying 2 selects results and 1 update.

 When i remove the access-control page all works fine, but when i set the
 session vars, the first time i see the results, i need to refresh/reload
 the web page to show the correct results of the queries, otherwise the
 page source shows data missing... post operation... refresh...

 Please, how can i avoid the manual refresh ?

 Karina Gomez




-- 
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] named anchors and query strings

2001-10-03 Thread Ralph Guzman

Never had to do this, however I would think the correct way to be:

a href=page.php#bottom?location=01

try it.
-Original Message-
From: Scott Mebberson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 4:53 PM
To: [EMAIL PROTECTED]
Subject: [PHP] named anchors and query strings

Hi Guys,

How do you reference both a named anchor and a query string in a link? i.e.
a href=page.php?location=01#bottomlink text/a I am not sure if this is
even possible?

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 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] retrieving info from a berkley db 3.0.11 ldbm databse..

2001-10-03 Thread Sovan_Shatpathy



Hi all ...
   I am an absolute newbie to php ... Here i am looking at wririting
a script in php which can do a search in my berkley db 3.0.11 database  and
retrieve the required information ...


In order to do the same which set of functions are supported .. is it that the
functions mentioned with dbm like dbmopen etc do the trick ...

Any guidance will be appreciated ...

Thanks and regards
Sovan



-- 
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] named anchors and query strings

2001-10-03 Thread Philip Olson

Here's an example :

  http://www.php.net/manual/en/configuration.php?foo=bar#ini.include-path

It works.

Regards,
Philip Olson



On Tue, 2 Oct 2001, Ralph Guzman wrote:

 Never had to do this, however I would think the correct way to be:
 
 a href=page.php#bottom?location=01
 
 try it.
 -Original Message-
 From: Scott Mebberson [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 4:53 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] named anchors and query strings
 
 Hi Guys,
 
 How do you reference both a named anchor and a query string in a link? i.e.
 a href=page.php?location=01#bottomlink text/a I am not sure if this is
 even possible?
 
 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 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: Detecting user logout.

2001-10-03 Thread nayco

Well, I personnally use a SQL db into which I insert some information about
the connected users (IP,LOGIN if member or visitor if not, MD5 session
id -'cause I cannot use PHP4 sessions, my provider's got php3 - and unix
epoch DATE).
Each time a user sees a page, this user's DATE field is updated in the db,
and rows where DATE is older than 10 minutes are deleted, so inactive
members are not displayed anymore in the connected members list 
As well, I use this table to implement sessions to authenticate users, using
cookies and MD5 strings.

If you want a script  Tell me !!!


(°-Nayco,
//\[EMAIL PROTECTED]
v_/_ http://nayco.free.fr


- Original Message -
From: Alexander Deruwe [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 3:21 AM
Subject: Re: [PHP] Re: Detecting user logout.


| -BEGIN PGP SIGNED MESSAGE-
| Hash: SHA1
|
| On Tuesday 02 October 2001 18:11, tonyz wrote:
|  why bother charting logouts.  use cookies that expires so you know that
|  they will eventually lose access and need to login again.
|
| Yes, but then I can't show a list of logged in users (for administration
| purposes).
|
| Alexander
|
|
| -BEGIN PGP SIGNATURE-
| Version: GnuPG v1.0.6 (GNU/Linux)
| Comment: For info see http://www.gnupg.org
|
| iD8DBQE7umgFySJLuRUx8aQRAo7+AJkB0GD6i+0mNIfsaoakw/WP1klyagCfZ8l6
| QB3ijCXziMhlhHyjDBgu/rM=
| =Tlms
| -END PGP SIGNATURE-
|
| --
| 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: Free hosts, or Temp account...some thing

2001-10-03 Thread Philip Olson


sounds like it's time to repartition your HD, or get a new HD, or linux
box ... install a flavor of linux and try it out locally.  in the long
run, this will be the most fun anyways :-)  

Regards,
Philip Olson


On Wed, 3 Oct 2001, ReDucTor wrote:

 But that doesn't have an option to search for only free ones...or even in a
 specific price range
 - Original Message -
 From: Richard Lynch [EMAIL PROTECTED]
 To: Reductor [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, October 03, 2001 12:47 PM
 Subject: Re: Free hosts, or Temp account...some thing
 
 
  http://php.net/hosts.php or http://hosts.php.net or somesuch is a database
  of hosts, some free, some cheap...
 
  --
  WARNING [EMAIL PROTECTED] address is an endangered species -- Use
  [EMAIL PROTECTED]
  Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
  Volunteer a little time: http://chatmusic.com/volunteer.htm
  - Original Message -
  From: Reductor [EMAIL PROTECTED]
  Newsgroups: php.general
  To: [EMAIL PROTECTED]
  Sent: Wednesday, September 26, 2001 5:36 AM
  Subject: Free hosts, or Temp account...some thing
 
 
   Hey,
 I just made a kewl little script, that i want to test out it requires
  GD,
   it doesn't appear to work on my Windows machine, but i think it might
 work
   better on a Unix/Linux machine, so does anyone know of a free web host,
  that
   supports php, gd, or someone that can open an account for about half an
  hour
   or so, for me to test out my script, to see if it is my OS that is
 causing
   these problem
  - James ReDucTor Mitchell
  
 
 
 
 -- 
 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] Creating mailaccounts

2001-10-03 Thread Ralph Guzman

This is somewhat dependant on the email server (MTA) you are running and how
it is set to authenticate users. If using linux/unix, sometimes all that is
required is for you to create an account is to add the entry in the
/etc/passwd, and create a home directory. This you can easily do with a PHP
a script. Some MTAs like Postfix allow you to store your users in a mySQL
database. This in turn allows you to create a php based web admin interface
to your mysql user authentication table.

If you want other alternatives outside of php, you can look into QmailAdmin
( http://inter7.com/qmailadmin/ ) if you are using Qmail, or Webmin which is
a awesome web based administration tool ( http://www.webmin.com )

Hope this helps.

-Original Message-
From: Bjornie [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 11:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Creating mailaccounts

Hi everybody!

I have a problem :/
I just said yes to a project, which includes webmail. I know how to send
mail and how to receive mail with imap, but can I in any way create a
mailaccount on the server by using PHP? Or should I use any other language
like Java/JSP or ASP (with a component)?`

Hilfe! :)



--
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] php not reading php.ini

2001-10-03 Thread Caleb Carvalho

Hi all,

I have enable sybase magic quotes=on in php.ini, and with the test file in 
my phpinfo(); says configuration path /www/conf i have placed the file 
there, but the sybase magic quote=off!!

am i suppose to change all files ie php.ini -dist  php.ini -optimized 
aswell?

pls help

Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
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] Creating POP3 account

2001-10-03 Thread Rosen

Hi,
Can I create POP3 account with PHP on Linux mail server ?

Thanks,
Rosen



-- 
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 not reading php.ini

2001-10-03 Thread David Robley

On Wed,  3 Oct 2001 17:16, Caleb Carvalho wrote:
 Hi all,

 I have enable sybase magic quotes=on in php.ini, and with the test file
 in my phpinfo(); says configuration path /www/conf i have placed the
 file there, but the sybase magic quote=off!!

 am i suppose to change all files ie php.ini -dist  php.ini -optimized
 aswell?

 pls help

You did remember to restart apache to re-read the php.ini? (Assuming you 
are not using a cgi version of PHP)

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   DILATE: To live longer.

-- 
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] Mirroring Website

2001-10-03 Thread Phil Driscoll

On Wednesday 03 October 2001 5:21 am, Jon Shoberg wrote:
 Nope, teh pages are actually hosted on a (gasp ...) NT machine.  I need
 something that will suck down and write out a pure static .html mirror of
 an ASP/PHP driven website.  WGET will surely mirror everything but not
 re-structure the internal links within the pages.

 Might be time to write my own ...
Try httrack - think there are versions for multiple platforms. I've used the 
windows version to great effect.

http://httrack.free.fr
-- 
Phil Driscoll

-- 
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] Simple Question, I think

2001-10-03 Thread Ralph Guzman

I would suggest you implement this at the web server level. If using Apache,
use virtual hosting or perhaps a rewrite condition if needed.
If you must do this in PHP, and  you want to do is redirect the user to a
particular directory depending on the URL they type, then something like
this should work:

switch ($HTTP_HOST) {
case www.firstdomain.com:
header(Location: http://www.domainname.com/dir_01;);
break;
case www.seconddomain.com:
header(Location: http://www.domainname.com/dir_02;);
break;
case www.thirddomain.com:
header(Location: http://www.domainname.com/dir_03;);
break;
}


Ralph

-Original Message-
From: Ratfish [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Question, I think

All I want to do is what an ASP page I have is doing.

I just want to host multiple sites with one page like the one in the article
below until I can get my head around the real way of doing it.

http://www.zdnet.com/devhead/stories/articles/0,4413,2418330,00.html

Surely there is a PHP equivalent?

Thanks
Andrew

--
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] php not reading php.ini

2001-10-03 Thread Ralph Guzman

Unless you modified the default path to the configuration file when
compiling, your Configuration Path setting should be set to something like
this:

/usr/local/lib/php.ini

in this case, you say it is set to /www/conf. I'm assuming by this that it
looking for a configuration file called 'conf' in the www directory. You
might want to look this over, and possible recompile with the default
setting.

-Original Message-
From: Caleb Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php not reading php.ini

Hi all,

I have enable sybase magic quotes=on in php.ini, and with the test file in
my phpinfo(); says configuration path /www/conf i have placed the file
there, but the sybase magic quote=off!!

am i suppose to change all files ie php.ini -dist  php.ini -optimized
aswell?

pls help

Caleb Carvalho
Application Engineer
LoadRunner/APM

-
Enterprise Testing and Performance Management Solutions

-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
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 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] REPLACE problem

2001-10-03 Thread Daniel Alsén

Hi,

i need help with a, seemingly, simple problem...

I have a form that is supposed to update a MySql table with only two fields
(id and show_id). I use show_id to determine what is showing on my first
page and never store more than one value in the table.

Now - i cant seem to get the REPLACE to work. First it only added more rows
in the table with a new value each time. I solved that by inserting
I inserted a hidden value into the form to make sure that the correct (and
only) value will be replaced:

input type=hidden name=fid value=1

But, that´s when it stopped working.
Show_id is determined by radio buttons in the form and that part is working.
In the actual query i REPLACE the value of show_id:

$query = REPLACE INTO puff;
$query .= (id, show_id);
$query .=  values('$fid''$show_id');

I am sure it´s a simple solution. But please point it out for me.

Regards
# Daniel Alsén| www.mindbash.com #
# [EMAIL PROTECTED]  | +46 704 86 14 92 #
# ICQ: 63006462   |  #


-- 
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] Creating POP3 account

2001-10-03 Thread Ralph Guzman

This is related to the email I responded to a few minutes ago. See below:


-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:25 AM
To: Bjornie; [EMAIL PROTECTED]
Subject: RE: [PHP] Creating mailaccounts

This is somewhat dependant on the email server (MTA) you are running and how
it is set to authenticate users. If using linux/unix, sometimes all that is
required is for you to create an account is to add the entry in the
/etc/passwd, and create a home directory. This you can easily do with a PHP
a script. Some MTAs like Postfix allow you to store your users in a mySQL
database. This in turn allows you to create a php based web admin interface
to your mysql user authentication table.

If you want other alternatives outside of php, you can look into QmailAdmin
( http://inter7.com/qmailadmin/ ) if you are using Qmail, or Webmin which is
a awesome web based administration tool ( http://www.webmin.com )

Hope this helps.

-Original Message-
From: Rosen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Creating POP3 account

Hi,
Can I create POP3 account with PHP on Linux mail server ?

Thanks,
Rosen



--
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: image upload problems (diff. file size after upload)

2001-10-03 Thread AJDIN BRANDIC

I posted the same question and I have found an answer in the archive. I 
guess you are using php on RedHat.  The problem is (as Richard sugested) 
extra lines that need to be triped off. NOTE: I am not sure if this is 
the problem with image files only or this applies to .txt, .doc, etc.
this works for me

---
function fix_php_upload_bug($tmp) {

$infile=fopen($tmp,r); // Open the file for the copy

$outfile=fopen($tmp.new,w); // create a new temp file

$header=fgets($infile,255); //get the 1st line (netscape sometimes 
doesn't add a Content-type line)

//if its more than just a \r\n sequence 
then

if (strlen($header)2) 
$header=fgets($infile,255); //get next 
line also

while(!feof($infile)) { // Loop through 
the remaining file

$temp=fread($infile,128);

fwrite($outfile,$temp,strlen($temp)); 
//copying contents to new temp file

}

fclose($outfile);

fclose($infile);

copy($tmp.new,$tmp); //replace the 
original with our new bug fixed file

unlink($tmp.new); //and delete the 
new file

return filesize($tmp); //return a true 
file size

copy($tmp, 
/home/webdesigning/public_html/demo/.$myfile_name);

}
--
Hope this helps

REgards

Ajdin


On Tue, 2 Oct 2001, Richard Lynch wrote:

 #1  Upgrade PHP.
 
 #2  Try comparing the files in a text-editor.
 
 You may be able to strip out the extra stuff at the top as an interim
 measure.
 
 
 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Boni Ion [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Saturday, September 29, 2001 6:35 PM
 Subject: image upload problems (diff. file size after upload)
 
 
  image for upload: admin_logo.gif size: 1665 bytes
 
  image after upload ON SERVER: admin_logo.gif size: 1692 bytes WHY ???
  and I can't see it in browser???!
 
  pls help ...
 
  php version:4.04pl1
  apache server:1.3.12
  so:red hat 7.0
 
  this is my code :
 
  /*upload.html */
 
   html
   head
   titleUpload a File/title
   /head
 
   body
 
   h1Upload a File/h1
 
   form enctype=multipart/form-data method=post
  action=do_upload.php
 
   pstrongFile to Upload:/strongbr
   input type=file name=img1 size=30/p
 
   Pinput type=submit name=submit value=Upload File/p
 
   /form
   /body
 
  /html
 
 
  /* do_upload.php
   ?
 
   if ($img1_name != ) {
 
   copy($img1, /tmp/$img1_name)
   or die(Couldn't copy the file!);
 
   } else {
 
   die(No input file specified);
   }
 
   ?
 
   html
   head
   titleSuccessful File Upload!/title
   body
 
   h1Success!/h1
 
   PYou sent: ? echo $img1_name; ?, a ? echo $img1_size; ?
   byte file with a mime type of ? echo $img1_type; ?./p
 
   /body
   /html
 
 
 
  --
   Boni Ion
   Intersat-Telecom / www.intersat-telecom.ro /
   Constanta, Romania, Europe
   Phone: +40 41 691230
 
 
 -- 
 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] REPLACE problem

2001-10-03 Thread David Robley

On Wed,  3 Oct 2001 17:35, Daniel Alsén wrote:
 Hi,

 i need help with a, seemingly, simple problem...

 I have a form that is supposed to update a MySql table with only two
 fields (id and show_id). I use show_id to determine what is showing on
 my first page and never store more than one value in the table.

 Now - i cant seem to get the REPLACE to work. First it only added more
 rows in the table with a new value each time. I solved that by
 inserting I inserted a hidden value into the form to make sure that the
 correct (and only) value will be replaced:

 input type=hidden name=fid value=1

 But, that´s when it stopped working.
 Show_id is determined by radio buttons in the form and that part is
 working. In the actual query i REPLACE the value of show_id:

 $query = REPLACE INTO puff;
 $query .= (id, show_id);
 $query .=  values('$fid''$show_id');

 I am sure it´s a simple solution. But please point it out for me.

A quick look at the REPLACE syntax tells me that 

REPLACE works exactly like INSERT, except that if an old record in the 
table has the same value as a new record on a unique index, the old 
record is deleted before the new record is inserted.

So if id isn't a unique index, you could expect the values to be added.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Multitasking = 3 PCs and a chair with wheels!

-- 
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 attempting to parse non-existent files

2001-10-03 Thread Tim Ward

these are all the php and error related lines in the httpd.conf


ScriptAlias /php/ E:/PHP40/
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
Action application/x-httpd-php /php/php.exe

...

ErrorDocument 404 http://www.stivesdirect.com/error.html


Tim Ward
Senior Systems Engineer

Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html


 -Original Message-
 From: Richard Lynch [SMTP:[EMAIL PROTECTED]]
 Sent: Wednesday, October 03, 2001 3:27 AM
 To:   Tim Ward
 Cc:   [EMAIL PROTECTED]
 Subject:  Re: PHP attempting to parse non-existent files
 
 Your settings in httpd.conf to convince Apache to use PHP on .html files
 does not correctly pass the buck to the error-handling in Apache...
 
 Post your php-related and error-related settings in httpd.conf
 
 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Tim Ward [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 25, 2001 10:21 AM
 Subject: PHP attempting to parse non-existent files
 
 
  okay, I'll try again. The apache server our site runs on is set up to
 parse
  .html files as php. If you pass a url of a non-existant file to the
 server
  the client gets a php parse error back rather than a 404 error ...
  specifically:
  pass in
  http://www.sitename/fred.html
  and you get
  Fatal error: Unable to open e:\program files\apache
  group\apache\htdocs\dev\maintenance\fred.html in Unknown on line 0
  pass in
  http://www.sitename/fred.htm (which apache hasn't been told to treat as
 PHP)
  and you get the expected 404 error which I am well aware can be trapped
 in
  apache.
 
  (n.b. http://www.sitename/bill/fred.html where bill is a non existant
  directory, gives the 404 error okay)
 
  Either this happens to everyone (which apparently it doesn't) or I've
 got
  the configuration wrong somewhere in Apache or PHP. I've trawled through
 the
  on-line documentation for both and haven't found anything relevant. I'm
 a
  programmer not a network or web administrator, but here I'm all there
 is.
  Any ideas what and/or where the problem is?
 
  Tim Ward
  Senior Systems Engineer
 
  Please refer to the following disclaimer in respect of this message:
  http://www.stivesdirect.com/e-mail-disclaimer.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]




[PHP] Calling Function Identity

2001-10-03 Thread Ray Hilton

Is it possible to discover any sort of details about the function/script
that is calling a piece of code?  Ie, Passively

If not, does anyone have a good design pattern of how a debugger for php
should work?  At the moment I am using a class which formats the data
and dumps it to a log file, then just using a function as a wrapper so
that set_error_handler uses it.

I'm thinking there must be a better way of doing this, anyone have any
ideas?

Ray Hilton


-- 
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] REPLACE problem

2001-10-03 Thread Daniel Alsén

 A quick look at the REPLACE syntax tells me that

 REPLACE works exactly like INSERT, except that if an old record in the
 table has the same value as a new record on a unique index, the old
 record is deleted before the new record is inserted.

 So if id isn't a unique index, you could expect the values to be added.

The id is a unique index.
But - as often before. Asking something here triggers my brain to work. I
found the problem. I simply forgot a comma in my query:
$query .=  values('$fid''$show_id');

I got a little disappointed at first when the query started adding
additional values again. But it only did that one time. For some reason it
wanted id to have a row with the value 0. After that it started to replace
the row with id 1. And now it works :)

- Daniel



-- 
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 not reading php.ini

2001-10-03 Thread Caleb Carvalho

Hi,
you're right, i did without knowledge enable --with -conf /www/conf when 
running the ./configure :(..

ok, thanks for point that out, do i need to go to square 0 i mean by running 
configure then make make install?

thanks

Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300



From: Ralph Guzman [EMAIL PROTECTED]
To: Caleb Carvalho [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] php not reading php.ini
Date: Wed, 03 Oct 2001 01:05:07 -0700

Unless you modified the default path to the configuration file when
compiling, your Configuration Path setting should be set to something like
this:

/usr/local/lib/php.ini

in this case, you say it is set to /www/conf. I'm assuming by this that it
looking for a configuration file called 'conf' in the www directory. You
might want to look this over, and possible recompile with the default
setting.

-Original Message-
From: Caleb Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php not reading php.ini

Hi all,

I have enable sybase magic quotes=on in php.ini, and with the test file in
my phpinfo(); says configuration path /www/conf i have placed the file
there, but the sybase magic quote=off!!

am i suppose to change all files ie php.ini -dist  php.ini -optimized
aswell?

pls help

Caleb Carvalho
Application Engineer
LoadRunner/APM

-
Enterprise Testing and Performance Management Solutions

-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
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]



_
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]




Re: [PHP] php not reading php.ini

2001-10-03 Thread Caleb Carvalho

Hi,
yeah i did httpd restart, and i also tried to place the file
in /etc/httpd/conf  /usr/local/lib  /www/conf but not luck...

I am using php-4.0.6,


Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300



From: David Robley [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Caleb Carvalho [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] php not reading php.ini
Date: Wed, 3 Oct 2001 17:32:10 +0930

On Wed,  3 Oct 2001 17:16, Caleb Carvalho wrote:
  Hi all,
 
  I have enable sybase magic quotes=on in php.ini, and with the test file
  in my phpinfo(); says configuration path /www/conf i have placed the
  file there, but the sybase magic quote=off!!
 
  am i suppose to change all files ie php.ini -dist  php.ini -optimized
  aswell?
 
  pls help

You did remember to restart apache to re-read the php.ini? (Assuming you
are not using a cgi version of PHP)

--
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA

DILATE: To live longer.

--
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]



_
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]




Re: [PHP] Sessions Variables and refresh pages

2001-10-03 Thread Derek Mailer

I'm not sure I fully understand the problem, but I think I can have a guess
at it based on my past experiences...

if you have a php page that starts a session with session_start() and, say
for example, you then try and echo the session id with session_id() it will
not be displayed on screen until you actually refresh the page or move to
another page that calls the session id.

In other words, the session id seems to be set when the session is started,
but isn't availale to use in your script until the page is re-loaded.

This is based on what I can remember from 8 months ago and I haven't tested
it out, but I believe this is the sort of problem being described in this
thread.

Cheers the noo,

Derek

- Original Message -
From: Karina Gómez Salgado [EMAIL PROTECTED]
To: Rasmus Lerdorf [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 8:18 PM
Subject: Re: [PHP] Sessions Variables and refresh pages


 again with the problem i discovered that the problem is that the reload is
 needed when i use the session variables in the queries, otherwise there
are
 not problem. Even if i only want to display the session variable in the
 result page, i need to do a reload.






 Karina wrote:

  Well, I don't understand it too, i don't know why with normal variables
  there are not problem and with session variables i need to refresh the
  page to see the results after the submit form.
 
  The mechanism is this:
 
  query 1 with parameter   ACCESS FORM ---   results
  only
 session_register(uid) shown with refresh
 session_register(pwd)  (get parameter from
  REQUEST_URI)
 
 
  if i do this:
 
  query 1     (NOT ACCESS)   ---   results with no problem
 
 
  I hope than somebody can give me some ideas... because this is driving
  me crazy..
 
  THks,
  Karina
 
  --
  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]




**
This e-mail (and any attachment) is intended only for the attention
of the addressee(s). Its unauthorised use, disclosure, storage
or copying is not permitted. If you are not the intended recipient,
please destroy all copies and inform the sender by return e-mail. 
This e-mail (whether you are the sender or the recipient) may be 
monitored, recorded and retained by Business Information 
Publications Limited (BiP). E-mail monitoring/ blocking software 
may be used, and e-mail content may be read at any time.You 
have a responsibility to ensure laws are not broken when composing 
or forwarding e-mails and their contents.
**


-- 
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: images no appearing

2001-10-03 Thread Adrian D'Costa

My local gd version is 1.6.2 or higher, online check the link
vvmm.net/phpinfo.php

Adrian

On Tue, 2 Oct 2001, Richard Lynch wrote:

 Older versions of GD will do GIF, but not JPEG, and vice versa...
 
 What versions of GD are on the two servers?
 
 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Adrian D'Costa [EMAIL PROTECTED]
 Newsgroups: php.general
 To: php general list [EMAIL PROTECTED]
 Sent: Monday, September 24, 2001 12:05 AM
 Subject: images no appearing
 
 
  Hi,
 
  I wrote a php script to create a dynamic graph (image/jpeg).  On my
  development system the image appears on my website it gives Image/Jpeg
  support not compiled.
 
  Below are the config settings:
 
  My system:
  Configure Command ^@ './configure' '--prefix=/usr'
   ^@'--with-config-file-path=/etc' '--disable-debug'
   ^@'--enable-pic' '--enable-inline-optimization'
   ^@'--enable-sockets' '--with-apxs=/usr/sbin/apxs'
   ^@'--disable-static' '--with-exec-dir=/usr/bin'
   ^@'--with-regex=system' '--with-gd'
   ^@'--with-jpeg-dir=/usr' '--with-png' '--with-gdbm'
   ^@'--enable-debugger' '--enable-magic-quotes'
   ^@'--enable-safe-mode' '--enable-track-vars'
   ^@'--enable-ftp' '--with-mysql' '--with-xml'
   ^@'--enable-trans-sid'
   ^@'--with-readline=/usr/include/readline'
 
  My webserver the info can be got from vvmm.net/phpinfo.php.
 
  They my provider has given --with-jpeg-dir=/usr/lib still the image does
  not appear.  Even in the gd section it does not give JPG Support
  enabled.  Only give.  Right now I have changed the program to work with
  gif.  My question, why not Jpg??
 
  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]




RE: [PHP] Mirroring Website

2001-10-03 Thread Lawrence . Sheed

Webzip is ok too for downloading an entire site onto a local machine,
restructuring links, although the non registered version inserts javascript
 html code into every page header.  Its nothing that a quick regex replaces
can't fix though ;)

www.webzip.com


-Original Message-
From: Phil Driscoll [mailto:[EMAIL PROTECTED]]
Sent: October 3, 2001 5:04 PM
To: Jon Shoberg; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Mirroring Website


On Wednesday 03 October 2001 5:21 am, Jon Shoberg wrote:
 Nope, teh pages are actually hosted on a (gasp ...) NT machine.  I need
 something that will suck down and write out a pure static .html mirror of
 an ASP/PHP driven website.  WGET will surely mirror everything but not
 re-structure the internal links within the pages.

 Might be time to write my own ...
Try httrack - think there are versions for multiple platforms. I've used the

windows version to great effect.

http://httrack.free.fr
-- 
Phil Driscoll

-- 
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] php javascript

2001-10-03 Thread nate

Hey all!

I'm including some javascript that enables a button in a form   input 
type=button name=CheckAll value=Check All
onClick=checkAll(document.myform.email)to check all the check boxes 
at once. (I have an array of check boxes from a mysql db)

I use:

SCRIPT LANGUAGE=JavaScript
!-- Begin
function checkAll(field)
{
for (i = 0; i  field.length; i++)
 field[i].checked = true ;
}

function uncheckAll(field)
{
for (i = 0; i  field.length; i++)
 field[i].checked = false ;
}
//  End --
/script

So... In order to use this script my button has to have 
onClick=checkAll(document.myform.email) and my check boxes have to have name=email 
but i need to name them name=email[] in order to pass the variables as an array in 
php. ive tried using onClick=checkAll(document.myform.email[]) but that just gives 
me an error for obvious reasons im sure. I don't know jack about javascript, so if you 
know of a better way to make a button that selects all check boxes or another way to 
code how the check boxes values are passed to the next page, I would be so greatful.

Thanks!
Nate



Re: [PHP] need help with safe mode and Restrict where PHP is Usable?

2001-10-03 Thread Tamas Arpad

Hi,
Both problems can be solved with php directives in httpd.conf or in 
.htaccess. 
You can just put php_value safe_mode off or php_value engine off 
into Directory definitions in httpd.conf to restrict only for some 
directories or into Virtual for virtual servers.
(Of course in htaccsess you can only restrict for directories)
Arpi

1.
 Can I add php_admin_flag safe_mode off to the httpd.conf file 
to
 turn safe mode off for just one site. And leave it on for the rest
 of the server. According to the manual this can be done but when I
 try it. It does not work. Is there something else I have to do to
 make this work properly.


2.
Is there a way to restrict PHP to certain directories, so that it can
only be used by files within those directories?
[...]

-- 
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 javascript

2001-10-03 Thread Matthew Armsby

Leave the input name as email.  If you really want to call it email[], 
you should be able to reference this in JavaScript as the object 
document.myform[email[]]

If you leave it as email, you can then convert the email variable into an 
array using explode() or split() as so:
?php
// on the recieving page, of course
$emailArray = explode (,, $email);
// Alternatively, a bit of RE exploding...
$emailArray = split (,, $email);
?

Matt

 Hey all!
 
 I'm including some javascript that enables a button in a form  
 input type=button name=CheckAll value=Check All
 onClick=checkAll(document.myform.email)to check all
 the check boxes at once. (I have an array of check boxes from a mysql
 db)
 
 I use:
 
 SCRIPT LANGUAGE=JavaScript
 !-- Begin
 function checkAll(field)
 {
 for (i = 0; i  field.length; i++)
  field[i].checked = true ;
 }
 
 function uncheckAll(field)
 {
 for (i = 0; i  field.length; i++)
  field[i].checked = false ;
 }
 //  End --
 /script
 
 So... In order to use this script my button has to have
 onClick=checkAll(document.myform.email) and my check boxes have to
 have name=email but i need to name them name=email[] in order to
 pass the variables as an array in php. ive tried using
 onClick=checkAll(document.myform.email[]) but that just gives me an
 error for obvious reasons im sure. I don't know jack about javascript,
 so if you know of a better way to make a button that selects all check
 boxes or another way to code how the check boxes values are passed to
 the next page, I would be so greatful.
 
 Thanks!
 Nate



-- 
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 javascript

2001-10-03 Thread nate

First off thanks for the reply.

When I click the test button I get Error: 'length' is null or not an
object.

I used

script language=javascript

  function func( field ) {
for ( i = 0; i  field.length; i++ )
  field[i].checked = true ;
  }

/script

input type=checkbox name=email[] value=5
input type=checkbox name=email[] value=2
input type=checkbox name=email[] value=1

input type=button value=test onclick=func( document.forms[ 0
].elements[ 'email[]' ] )



- Original Message -
From: Krzysztof Kocjan [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 2:47 AM
Subject: Re: [PHP] php  javascript


 Try document.myform.elements['email[]'] like below

 script language=javascript

   function func( field ) {
 for ( i = 0; i  field.length; i++ )
   field[i].checked = true ;
   }

 /script

 form name=myform
 input type=checkbox name=email[] value=email_1
 input type=checkbox name=email[] value=email_2
 input type=checkbox name=email[] value=email_3
 input type=checkbox name=email[] value=email_4
 input type=checkbox name=email[] value=email_5
 br
 input type=button value=test onclick=func( document.forms[ 0
 ].elements[ 'email[]' ] )
 /form



 Krzysztof

 [EMAIL PROTECTED] wrote:
 
  Hey all!
 
  I'm including some javascript that enables a button in a form
input type=button name=CheckAll value=Check All
  onClick=checkAll(document.myform.email)to check all
the check boxes at once. (I have an array of check boxes from a mysql db)
 
  I use:
 
  SCRIPT LANGUAGE=JavaScript
  !-- Begin
  function checkAll(field)
  {
  for (i = 0; i  field.length; i++)
   field[i].checked = true ;
  }
 
  function uncheckAll(field)
  {
  for (i = 0; i  field.length; i++)
   field[i].checked = false ;
  }
  //  End --
  /script
 
  So... In order to use this script my button has to have
onClick=checkAll(document.myform.email) and my check boxes have to have
name=email but i need to name them name=email[] in order to pass the
variables as an array in php. ive tried using
onClick=checkAll(document.myform.email[]) but that just gives me an error
for obvious reasons im sure. I don't know jack about javascript, so if you
know of a better way to make a button that selects all check boxes or
another way to code how the check boxes values are passed to the next page,
I would be so greatful.
 
  Thanks!
  Nate

 
 99% trafien. 1% rezerwy, zeby innym nie bylo przykro.
 Nowe Centrum Wyszukiwania  http://szukaj.interia.pl/



-- 
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] open_basedir and Apache virtual hosts

2001-10-03 Thread Daniel Lacroix

I use php4 in apache as a module. It seams that
I can only setup php with php.ini.

I want to use the open_basedir option to limit
php to a web site files. But my apache use
virtual host. It means that depending on
the host (fun.test.org or www.test.org) I
start in /home/httpd/fun or /home/httpd/www
as the html root.

When I am connected to fun.erasme.org, I want
open_basedir to be equal to /home/httpd/fun
and when I use www.erasme.org, I want open_basedir
to be equal to /home/httpd/www. I want this
to protect a web site (with an administrator)
against another web site (with another administrator).

Like I can't use .htaccess for open_basedir neither
httpd.conf I have no way to change this value
depending on the web site.

I try in php.ini :
open_basedir = $DOCUMENT_ROOT;

Because DOCUMENT_ROOT is an environment variable
which contains /home/httpd/www or /home/httpd/fun.

But it doesn't work. php.ini is not dynamically
evaluated (I think).

Is there is solution for this security problem ?

Daniel Lacroix

-- 
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 javascript

2001-10-03 Thread nate

Thanks...

 Leave the input name as email.  If you really want to call it email[],
 you should be able to reference this in JavaScript as the object
 document.myform[email[]]

document.myform[email[]] seems to give me a syntax error.

 If you leave it as email, you can then convert the email variable into an
 array using explode() or split() as so:

On the recieving page I have echo($array = implode (,, $email));

which echos the array of text box values just fine. but only if the input
name=email[] not name=email, and email[] doesnt work since my javascript
uses email, not email[]

- Original Message -
From: Matthew Armsby [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 2:54 AM
Subject: Re: [PHP] php  javascript


 Leave the input name as email.  If you really want to call it email[],
 you should be able to reference this in JavaScript as the object
 document.myform[email[]]

 If you leave it as email, you can then convert the email variable into an
 array using explode() or split() as so:
 ?php
 // on the recieving page, of course
 $emailArray = explode (,, $email);
 // Alternatively, a bit of RE exploding...
 $emailArray = split (,, $email);
 ?

 Matt

  Hey all!
 
  I'm including some javascript that enables a button in a form
  input type=button name=CheckAll value=Check All
  onClick=checkAll(document.myform.email)to check all
  the check boxes at once. (I have an array of check boxes from a mysql
  db)
 
  I use:
 
  SCRIPT LANGUAGE=JavaScript
  !-- Begin
  function checkAll(field)
  {
  for (i = 0; i  field.length; i++)
   field[i].checked = true ;
  }
 
  function uncheckAll(field)
  {
  for (i = 0; i  field.length; i++)
   field[i].checked = false ;
  }
  //  End --
  /script
 
  So... In order to use this script my button has to have
  onClick=checkAll(document.myform.email) and my check boxes have to
  have name=email but i need to name them name=email[] in order to
  pass the variables as an array in php. ive tried using
  onClick=checkAll(document.myform.email[]) but that just gives me an
  error for obvious reasons im sure. I don't know jack about javascript,
  so if you know of a better way to make a button that selects all check
  boxes or another way to code how the check boxes values are passed to
  the next page, I would be so greatful.
 
  Thanks!
  Nate



 --
 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] bulk e-mails

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

You've already had a nice answer. Look for ezmlm. It is a very powerful
open source mailing manager.

You could store the data in mySQL database and administer it in your
favorite way via PHP or whatever. Then, loop your PHP code and (if you
need this of course) copy all the emails of users you need to send it to
into a temporary table. And run ezmlm to send emails. You can do it all
very automatically and maybe even in a better way that what I said.
Ezmlm is the greatest, with lots of features and add-ons. Even this list
uses it.

Maxim Maletsky
www.PHPBeginner.com



-Original Message-
From: Tyler Longren [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 3 ottobre 2001 5.05
To: PHP-General
Subject: [PHP] bulk e-mails


Hello everyone,

I have a few questions about sending bulk e-mails.  We have a client who
has some customers that are signing up to win a prize in a contest.
These users can also join the e-mail club.  What's the best way to send
many, many e-mails?

I don't want to send an e-mail to each individual user (that can be
tough on the server).  I also don't want to just make a bunch of entries
in the To: header.  I don't want people to be able to see who else is on
the mailing list.  Could I solve that problem by putting their e-mails
in the bcc section of the header?

Any other ideas are appreciated...thanks,
Tyler Longren



-- 
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] exec() system() passthru() problems. (S.u.S.E 7.2)

2001-10-03 Thread Edward Woodstarf

Hi,
I was wondering if someone could HELP I'm very new to php and I am 
trying to get the application functions to start an instance of a program. 
However no matter what I do the functions return -1. Even if I add the 
absoulte path it still returns -1. nothing happens. I'm running S.u.S.E 7.2 
php4. I was wondering if I have missed something in a config file. If i su 
to nobody (I think this is the user apache runs as on S.u.S.E) and run ps it 
works fine as the user has permissions for it.
I am completely baffled I have tried multiple examples from books that all 
say it should work but I always get -1. could someone help before my brain 
turns into a cabbage.

Ta,

E.



_
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]




RE: [PHP] Simple Question, I think

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


Try also mod_rewrite of apache. It is great for doing such things.

Visit apache.org and search docs for mod_rewrite or simply look into
archives of this list.

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Ralph Guzman [mailto:[EMAIL PROTECTED]] 
Sent: mercoledi 3 ottobre 2001 10.03
To: Ratfish; [EMAIL PROTECTED]
Subject: RE: [PHP] Simple Question, I think


I would suggest you implement this at the web server level. If using
Apache, use virtual hosting or perhaps a rewrite condition if needed. If
you must do this in PHP, and  you want to do is redirect the user to a
particular directory depending on the URL they type, then something like
this should work:

switch ($HTTP_HOST) {
case www.firstdomain.com:
header(Location: http://www.domainname.com/dir_01;);
break;
case www.seconddomain.com:
header(Location: http://www.domainname.com/dir_02;);
break;
case www.thirddomain.com:
header(Location: http://www.domainname.com/dir_03;);
break;
}


Ralph

-Original Message-
From: Ratfish [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Question, I think

All I want to do is what an ASP page I have is doing.

I just want to host multiple sites with one page like the one in the
article below until I can get my head around the real way of doing it.

http://www.zdnet.com/devhead/stories/articles/0,4413,2418330,00.html

Surely there is a PHP equivalent?

Thanks
Andrew

--
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] querying a berkley db3 database with a php script..

2001-10-03 Thread Sovan_Shatpathy



Hi,
Can any one tell me as to which are the set of functions which can be
used to query a berkley db 3.0.11 ldbm database ?

I am a bit confused here ,, are the function mentioned for dbm going to work
here like dbmopen, dbmclose etc...If not then what is the way out ?

Any help is appreciated i am a complete new bie here 

Pls help

Thanks and regards
Sovan



-- 
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] New York Remembrance

2001-10-03 Thread Irmingard Anna Kotelev

 Dear friends,

the madness incarnate of  September 11th, 2001 is one which will never 
be
forgotten. How could it be?
This shook the entire world, and my heart was broken along with all of
yours.

I have created a slide show in respectful tribute to all who passed, as
well as the heroics of the people. I know that America...the world... will
not allow this attack to ruffle it's feathers, and I stand and applaude 
for
the strength and resolve of it's people.

God bless America...God bless the world.

Do sign my 'Response to this Tribute' if compelled and please pass this 
on to at least one friend.

http://www.aurumxxl.de/ny/ny.htm

Irmingard Anna Kotelev
Photographer

25th of September 2001


-- 
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 javascript

2001-10-03 Thread Matthew Armsby

 document.myform[email[]] seems to give me a syntax error.

Check if your already using  you'll need to use single quotes as so:
input type=button name=CheckAll value=Check All
onClick=checkAll(document.myform['email[]'])
(tested on IE 5.5 and NS 4.08, works)

 If you leave it as email, you can then convert the email variable into an
array using explode() or split() as so:

  On the recieving page I have echo($array = implode (,, $email));
which echos the array of text box values just fine. but only if the input
name=email[] not name=email, and email[] doesnt work since my javascript
uses email, not email[]

If you want to continue using email[], the above advise should be okay, and
no need to read on.
If you want to use email, instead of echo(implode(,, $email)), just
echo($email), then you can use explode() when you want the array.
?php
// When using $email, not $email[]
// The comma seperated string:
echo($email);
// The array:
$ar_email = explode(, $email);
// The array glued for viewing:
echo(implode (,, $ar_email));
?



-- 
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] Parsing a CSV file

2001-10-03 Thread Sharat Hegde

Hello,

I am trying to parse a CSV (comma separated file) file to get the separate
elements. The format of each line of the file is as follows:

R001,23,2,5

Note that the 3rd field 2,5 is enclosed within quotes as it has commas
within the field itself. This is a standard file created when an Excel file
is saved as a CSV file. What I need after parsing this is an array with the
elements being:
Element 0 - R001
Element 1 - 23
Element 2 - 2,5

Standard split command gives 4 elements instead of 3.

I know I can do this by some brute programming, but is there an elegant way
out. Note that I am not using PHP 4.0 and hence PHP4 specific features are
not available to me as yet!

Regards,
Sharat


-- 
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] sophisticated debugging idea. suggestions?

2001-10-03 Thread alvarez


I want to alternate between different operation modes without having
to introduce additional control structures into a piece of software.

This could be archieved by setting an optional parameter to a function
that does not affect the programs state. It should accept an arbitrary
number of mixed-type arguments while not causing significant overhead
at runtime. Then you would call the parameter each time the code runs.

Assuming debugging is what you want to be done, the use would be like

   function f ($arg, $mode = 'array') {

 function debug () { echo $arg };
 $mode ($arg);

 compute ();
   }
.

array () suffices but introduces to overhead when large chunks of data
(e.g. pieces of code) are passed to it. Any suggestions on this?


  D. Alvarez Arribas [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] Simple Question, I think

2001-10-03 Thread Ralph Guzman

I would suggest you implement this at the web server level. If using Apache,
use virtual hosting or perhaps a rewrite condition if needed.
If you must do this in PHP, and  you want to do is redirect the user to a
particular directory depending on the URL they type, then something like
this should work:

switch ($HTTP_HOST) {
case www.firstdomain.com:
header(Location: http://www.domainname.com/dir_01;);
break;
case www.seconddomain.com:
header(Location: http://www.domainname.com/dir_02;);
break;
case www.thirddomain.com:
header(Location: http://www.domainname.com/dir_03;);
break;
}


Ralph

-Original Message-
From: Ratfish [mailto:[EMAIL PROTECTED]]
Sent: Monday, October 01, 2001 7:25 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Simple Question, I think

All I want to do is what an ASP page I have is doing.

I just want to host multiple sites with one page like the one in the article
below until I can get my head around the real way of doing it.

http://www.zdnet.com/devhead/stories/articles/0,4413,2418330,00.html

Surely there is a PHP equivalent?

Thanks
Andrew

--
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] Parsing a CSV file

2001-10-03 Thread alvarez

sure.  explode (',', $yourdata) is what you are looking for.
use file () to read in the file and use foreach () to iterate
over the lines.

 D. Alvarez Arribas [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] File extension inc?

2001-10-03 Thread Jan Grafström

Hi!
How does server handle the .inc extension and for what do I use it ?
Where can I read about it?
Thanks in advace
Jan Grafström



-- 
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] only c if u r an indian...

2001-10-03 Thread sagar N Chand

hi,

any body out there from hyderabad. if u r a hyderabadi plese mail me.
v have got a lot of things to do.

thanks,
/sagar




Re: [PHP] File extension inc?

2001-10-03 Thread alvarez

Use the '.inc' extension only for files that are not directly accessible to the client.
For example, database configuration files do not need to be php and you can mark them
as '.inc' for increased code legibility. AFAIK a client's request to one of these files
won't be served at all.

D. Alvarez Arribas [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] New York Remembrance

2001-10-03 Thread AJDIN BRANDIC

It is very nice of you to have done so.  Thousands of children are being 
killed in the world by different groups and no one gives a s***. They are 
mainly killed by USA guns sold by USA guvernment who also 
deosn't give a s*** where those guns go or who uses them. All it is 
important is that guns are sold, US economy is OK and jobs are made.  so 
please post stuff related to PHP. We are all sorry for what happened and 
it shouldn't happen again, Anyware!

Regards

Ajdin

On Wed, 3 Oct 2001, Irmingard Anna Kotelev wrote:

  Dear friends,
 
 the madness incarnate of  September 11th, 2001 is one which will never 
 be
 forgotten. How could it be?
 This shook the entire world, and my heart was broken along with all of
 yours.
 
 I have created a slide show in respectful tribute to all who passed, as
 well as the heroics of the people. I know that America...the world... will
 not allow this attack to ruffle it's feathers, and I stand and applaude 
 for
 the strength and resolve of it's people.
 
 God bless America...God bless the world.
 
 Do sign my 'Response to this Tribute' if compelled and please pass this 
 on to at least one friend.
 
 http://www.aurumxxl.de/ny/ny.htm
 
 Irmingard Anna Kotelev
 Photographer
 
 25th of September 2001
 
 
 -- 
 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] Parsing a CSV file

2001-10-03 Thread Niklas Lampén

That won't do if the list is 'R001,23,2,5'.

I'd break that to parts with preg_match_all().


Niklas


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: 3. lokakuuta 2001 15:08
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [PHP] Parsing a CSV file


sure.  explode (',', $yourdata) is what you are looking for. use file ()
to read in the file and use foreach () to iterate over the lines.

 D. Alvarez Arribas [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] PHP in Novell Web Server?

2001-10-03 Thread Marc

I was wondering if it is possible to create a configuration with Novell
Netware, Novell Web Server, PHP and Oracle. Does anybody have experience
with such a configuration?

Marc



-- 
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] Parsing a CSV file

2001-10-03 Thread Matthew Armsby

Example

?php
exampleLine = R001,23,\2,5\;

preg_match_all (/(\[^\]+\|[^,]+)/, exampleLine, $matches);

for ($i=0; $i count($matches[0]); $i++) {
echo matched: .$matches[0][$i].br;
}

?

Please note, empty elements will not be handled

btw Any Australian employers want a programmer for awhile?

- Original Message -
From: Sharat Hegde [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 9:55 PM
Subject: [PHP] Parsing a CSV file


 Hello,

 I am trying to parse a CSV (comma separated file) file to get the separate
 elements. The format of each line of the file is as follows:

 R001,23,2,5

 Note that the 3rd field 2,5 is enclosed within quotes as it has commas
 within the field itself. This is a standard file created when an Excel
file
 is saved as a CSV file. What I need after parsing this is an array with
the
 elements being:
 Element 0 - R001
 Element 1 - 23
 Element 2 - 2,5

 Standard split command gives 4 elements instead of 3.

 I know I can do this by some brute programming, but is there an elegant
way
 out. Note that I am not using PHP 4.0 and hence PHP4 specific features are
 not available to me as yet!

 Regards,
 Sharat



-- 
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] Creating mailaccounts

2001-10-03 Thread sagar N Chand

work out with squrrelmail or basilix. If u want to set up won mail server then
you must have your head and fingers into linux.

/sagar

  - Original Message - 
  From: Bjornie 
  To: [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 12:25 AM
  Subject: [PHP] Creating mailaccounts


  Hi everybody!

  I have a problem :/
  I just said yes to a project, which includes webmail. I know how to send
  mail and how to receive mail with imap, but can I in any way create a
  mailaccount on the server by using PHP? Or should I use any other language
  like Java/JSP or ASP (with a component)?`

  Hilfe! :)



  -- 
  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] A powerful editor!

2001-10-03 Thread sagar N Chand

coool man,
i've been using it since 2yrs.

/sagar

  - Original Message - 
  From: Dean Householder 
  To: Alex Shi ; [EMAIL PROTECTED] 
  Sent: Wednesday, October 03, 2001 2:27 AM
  Subject: Re: [PHP] A powerful editor!


  I used to use TextPad until I found EditPlus.  I'm also amazed by it's
  power.  It has more than I could even use including everything TextPad has
  and nicer colors for the different styles.  You can find it at
  http://www.editplus.com.

  Dean Householder
  Daylight Creations
  http://www.daylightcreations.com



  - Original Message -
  From: Alex Shi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, October 01, 2001 6:08 PM
  Subject: [PHP] A powerful editor!


   Hello folks,
  
   Today, I found a very powerful editor, called TextPad. I said it is
   'powerful'
   because it can recognize syntax of php, html, java, css and also many
   many more great featuresmuch better that Windows Notepad. You can
   download and try. You need to take a few minutes to explore it and
  maximize
   its functionality for you.
  
   Here is the link:
   http://www.textpad.com/
  
   Alex
  
  
  
  
   --
   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] A powerful editor!

2001-10-03 Thread Sheridan Saint-Michel

I wasn't saying anything about the quality of Editplus.  I was just
wondering
what justification there was for the statement

It has more than I could even use including everything TextPad
has and nicer colors for the different styles since Textpad lets you set
all
of your colors from a 16.7M palette.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Maxim Maletsky (PHPBeginner.com) [EMAIL PROTECTED]
To: 'Sheridan Saint-Michel' [EMAIL PROTECTED]; 'Dean Householder'
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 5:15 PM
Subject: RE: [PHP] A powerful editor!


 EditPlus is the best. Many nice functions and, I think, it is more
 adapted for HTML/PHP development that TextPad.

 What I can't live without when developing on windows are those drag 
 drop customs of EditPlus. I find it pretty handy. on VIM is great as
 well.

 Hey, look into archives. There are thousands posts about Editor.

 Maxim Maletsky
 www.PHPBeginner.com


 -Original Message-
 From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
 Sent: martedì 2 ottobre 2001 23.20
 To: Dean Householder; [EMAIL PROTECTED]
 Subject: Re: [PHP] A powerful editor!


 I just have to ask what EXACTLY you mean by nicer colors as Textpad
 Allows you to set any element of a Syntax Definition to any color
 between
 (0,0,0) and (255,255,255).  Last I checked 16.7M colors was plenty  =P

 Sheridan Saint-Michel
 Website Administrator
 FoxJet, an ITW Company
 www.foxjet.com


 - Original Message -
 From: Dean Householder [EMAIL PROTECTED]
 To: Alex Shi [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, October 02, 2001 3:57 PM
 Subject: Re: [PHP] A powerful editor!


  I used to use TextPad until I found EditPlus.  I'm also amazed by it's

  power.  It has more than I could even use including everything TextPad

  has and nicer colors for the different styles.  You can find it at
  http://www.editplus.com.
 
  Dean Householder
  Daylight Creations
  http://www.daylightcreations.com
 
 
 
  - Original Message -
  From: Alex Shi [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Monday, October 01, 2001 6:08 PM
  Subject: [PHP] A powerful editor!
 
 
   Hello folks,
  
   Today, I found a very powerful editor, called TextPad. I said it is
   'powerful' because it can recognize syntax of php, html, java,
   css and also
 many
   many more great featuresmuch better that Windows Notepad. You
   can download and try. You need to take a few minutes to explore it
   and
  maximize
   its functionality for you.
  
   Here is the link:
   http://www.textpad.com/
  
   Alex
  
  
  
  
   --
   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 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] New York Remembrance

2001-10-03 Thread Chris Allen

umm ya forward this on to the czechs and the french etc...


-- 
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: MySql still not working...

2001-10-03 Thread The Doctor

On Wed, Oct 03, 2001 at 07:56:12AM -0600, System Administrator a.k.a. The Root of the 
Problem wrote:
 I will be forward this to [EMAIL PROTECTED] and hope that an answer could be 
 there.
 
 On Wed, Oct 03, 2001 at 09:24:37AM -0400, Justin Hall wrote:
  
  Dave:
  
We are getting closer to a solution, but mysql is still not working.
  
Now when I try to access the dB via php OR via the command line doing
  a USE dbname then SELECT statement I always get
  
  ERROR 1 at line 7: Can't create/write to file
  './tsgca_postalcodes/codes.frm' (Errcode: 13)
  
  (If I am trying to access the codes table)
  
Did you move the location of the database I thought it was in /var
  something???
  
Please look into this ASAP. You can reach me during the day at 813 891
  6084 x4353.
  
  Regards
  
  Justin hall
  
  
  
 Justin Hall   http://www.4digipics.com/jh/
  Web Developer @ The Technical Resource Connection, Inc.
  Software Creator of DIGIPICS, 877-376-5686
  
 
 -- 
 contact:
 Dave Yadallee  NetLine 2000  The Edmonton Internet Service Company
 [EMAIL PROTECTED]http://www.nl2k.ab.ca
 990-3244


Correction, [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] Thanks Jason

2001-10-03 Thread Jan Grafström

Regards
Jan
Jason Stechschulte wrote:

 On Wed, Oct 03, 2001 at 02:13:54PM +0200, Jan Grafström wrote:
 
How does server handle the .inc extension and for what do I use it ?
Where can I read about it?

 
 This depends on the setup of the web server.  On some servers, it is set
 up to be parsed just as a .php extension would be.  On these servers,
 people put PHP code into these files and then include() them.
 



-- 
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] Parsing a CSV file

2001-10-03 Thread alvarez

 Re: [PHP] Parsing a CSV file
 
there is no need to special-case here, for empty statements would also be handled by
repeated calls to explode (). quoted expressions can be joined by preg_matches then.
 
D. Alvarez Arribas [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] something like alert (javascript)

2001-10-03 Thread Eduardo Kokubo

Is there any function in PHP that is similar to alert() or confirm() of javascript ? I 
tried die() but that's not what I need.



RE: [PHP] something like alert (javascript)

2001-10-03 Thread Boget, Chris

 Is there any function in PHP that is similar to alert() or 
 confirm() of javascript ? I tried die() but that's not what I need.

What do you want it to do?  Remember, though, that 
PHP = server side while Javascript = client side.  If you 
want alert() or confirm() functionality on the client side
(why would you want this server side; it'll just hang there
until someone on the back end hits a key or something)
use either of those two functions.

Chris 



RE: [PHP] something like alert (javascript)

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)

Then what do you need?

We are not any sure on what your question is ...

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: Eduardo Kokubo [mailto:[EMAIL PROTECTED]] 
Sent: mercoledì 3 ottobre 2001 16.31
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP] something like alert (javascript)


Is there any function in PHP that is similar to alert() or confirm() of
javascript ? I tried die() but that's not what I need.


--
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] How to get a list of classes that have been loaded from out the jars in lib?

2001-10-03 Thread Jan

Is there a way to get an array of all the classes that have been loaded from out the 
library directory of cocoon2?
In particlular I need all loaded subclasses of a specific interface foo.bar.Module 
that are in the .jar files (or where ever).

The modules can be anywhere and in multiple .jar files that are not created by me so I 
cannot use a config file containing all the class names for my purpose.

Thanks for your help,
Jan.



Re: [PHP] something like alert (javascript)

2001-10-03 Thread Alexander Deruwe

On Wednesday 03 October 2001 14:30, Eduardo Kokubo wrote:
 Is there any function in PHP that is similar to alert() or confirm() of
 javascript ? I tried die() but that's not what I need.

PHP is server side, so you cannot have it pop windows up, or ask the user 
questions in an inputbox (unless you build the javascript in PHP of course, 
but that probably is still not what you want). For immediately informing the 
user of an error, or whatever, die() makes sure they see it. :)

Alexander

-- 
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 extension inc?

2001-10-03 Thread Alexander Deruwe

On Wednesday 03 October 2001 12:13, Jan Grafström wrote:
 Hi!
 How does server handle the .inc extension and for what do I use it ?

You should be aware that if the webserver is not set up to handle .inc files 
as PHP code, that it might output them as text to the user. Thus possibly 
showing passwords, usernames and whatnot.

Alexander

-- 
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] querying a berkley db3 database with a php script..

2001-10-03 Thread Mukul Sabharwal

Hi Sovan,

try this link :

http://p2p.wrox.com/archive/pro_php/2001-05/46.asp

=
*
Know more about me:
http://www.geocities.com/mimodit
*

__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.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] printf scientific notation?

2001-10-03 Thread Bill Rausch

I'll try this again, with a new topic and a better description.

Can PHP print floating point numbers using scientific notation? 
(like 1.32e+5) sscanf reads them ok using %f, but I'd like to print 
them with %e or %g and the printf documentation doesn't mention them.

I've tried %e anyway and it fails to print the exponent part.

I've looked at the source code to PHP a little but with the IFDEFs 
I'm not sure which routine is actually being used. I sort of have the 
impression it is just calling the C routines directly so the %e and 
%g should work?

Linux (RH 7.1), Apache (1.3.20), PHP (4.0.6)

Thanks.
-- 
  Bill Rausch, Software Development, Unix, Mac, Windows
  Numerical Applications, Inc.  509-943-0861   [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] How to simulate any browser

2001-10-03 Thread Kamil Nowicki


Hello everyone!

I have a problem. My webpage (say webpage_1) needs to get some data
presented on other webpage (wepage_2). I tried to use
fopen("http://webpage_2?params","r") and got connection and stuff, but
I suppose that webpage_2 uses some script checking what type of
browser sent the request, and sends back an error message. I do not
have cURL library installed (and I can't install it cause I'm not
an administrator of the server and my administrator doesn't want to
install it) so I can't use it to pretend my PHP request is from
IE, Netscape or any other WWW browser.
I was thinking abous using sockets to communicate directly and
make a HTTP request manually, but I do not know the HTTP request
specifications (how to send all needed info including browser id).

If You know how to send browser info to WWW server using standard
PHP functions or some common libraries' functions, than PLEASE HELP ME.

Thanx in advance.

 Kamil 'Hilarion' Nowicki

PS.: I can send phpinfo() of my server on Your request.


-- 
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: Sockets on FreeBSD Mac OS X

2001-10-03 Thread Devon Weller


Thanks for your help.  Here is some more information:

I am running the process from the command line as root.  I also tried
several different ports, all with the same result.

I don't think you need any special permission to bind to a port above
1024. If so, I couldn't find anything out about it.

Any other ideas?

Thanks,
- Devon



In article 04c401c14bc4$6a1ddde0$c801a8c0@Lynchux100, [EMAIL PROTECTED]
(Richard Lynch) wrote:

 Wild Guess:
 
 Your OS is configured to not allow nobody to bind port 12345, and PHP is
 running within Apache as nobody...
 
 Check out what sort of limitations are put upon users binding ports...
 
 If I was a real Un*x guru, I'd even know what command tells you that... :-|
 
 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Devon Weller [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Tuesday, October 02, 2001 11:02 AM
 Subject: Sockets on FreeBSD Mac OS X
 
 
 
  Has anyone successfully gotten socket functions to work with FreeBSD?
  More specifically, Mac OS X?
 
  I always get the following error: Can't bind to port 12345, exiting.
 
  The script works fine on Linux machines.  Is there a patch in the works
  for FreeBSD?  If so, I would be very happy.
 
  --
  Devon Weller
  [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] addslashes q's

2001-10-03 Thread Caleb Carvalho

after enabling magic quotes with sybase,
now, i don't even need to addslashes..
the only problem is that is adding  quote when i say won't it adds won''t

does any one know why?

thanks a lot

Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
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]




Re: [PHP] addslashes q's

2001-10-03 Thread Rasmus Lerdorf

 after enabling magic quotes with sybase,
 now, i don't even need to addslashes..
 the only problem is that is adding  quote when i say won't it adds won''t

 does any one know why?

Because that is how a ' is supposed to be escaped in Sybase.

-Rasmus


-- 
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 simulate any browser

2001-10-03 Thread ReDucTor

with HTTP 1.1, you just need the normal url, for the GET, but if you want to
use POST or something, you do strlen() and get the length, set the
contentlength, then you send it...make sure to do urlencode before sending
stuff via get, or doing stuff with POST...i wrote a perl POST Client,
because my host doesn't feel the need to tell me the path ot php, and
doesn't reply to emails, so i wrote a perl http client that uses the POST
method, grabs everything from the stdin and just sends it there...hehe :D

So i learn't a bit on the http specifications...


btw it might be an idea to try

$output = file("http://site.com/website?arg1=valuearg2=value2");

- Original Message -
From: "Kamil Nowicki" [EMAIL PROTECTED]
To: "PHP-list" [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 1:46 AM
Subject: [PHP] How to simulate any browser



 Hello everyone!

 I have a problem. My webpage (say webpage_1) needs to get some data
 presented on other webpage (wepage_2). I tried to use
 fopen("http://webpage_2?params","r") and got connection and stuff, but
 I suppose that webpage_2 uses some script checking what type of
 browser sent the request, and sends back an error message. I do not
 have cURL library installed (and I can't install it cause I'm not
 an administrator of the server and my administrator doesn't want to
 install it) so I can't use it to pretend my PHP request is from
 IE, Netscape or any other WWW browser.
 I was thinking abous using sockets to communicate directly and
 make a HTTP request manually, but I do not know the HTTP request
 specifications (how to send all needed info including browser id).

 If You know how to send browser info to WWW server using standard
 PHP functions or some common libraries' functions, than PLEASE HELP ME.

 Thanx in advance.

  Kamil 'Hilarion' Nowicki

 PS.: I can send phpinfo() of my server on Your request.


 --
 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] Sessions Variables and refresh pages

2001-10-03 Thread Karina

Yes, it is.

This is exactly the problem. Do you know a way to solution this ? 

Thks, Karina

---


I'm not sure I fully understand the problem, but I think I can
have a guess
at it based on my past experiences...

if you have a php page that starts a session with
session_start() and, say
for example, you then try and echo the session id with
session_id() it will
not be displayed on screen until you actually refresh the page
or move to
another page that calls the session id.

In other words, the session id seems to be set when the session
is started,
but isn't availale to use in your script until the page is
re-loaded.

This is based on what I can remember from 8 months ago and I
haven't tested
it out, but I believe this is the sort of problem being
described in this
thread.

Cheers the noo,

Derek

-- 
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] addslashes q's

2001-10-03 Thread Caleb Carvalho

thanks,

how do i get the right output?



Caleb Carvalho
Application Engineer
LoadRunner/APM
-
Enterprise Testing and Performance Management Solutions
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300



From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Caleb Carvalho [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] addslashes q's
Date: Wed, 3 Oct 2001 09:15:49 -0700 (PDT)

  after enabling magic quotes with sybase,
  now, i don't even need to addslashes..
  the only problem is that is adding  quote when i say won't it adds 
won''t
 
  does any one know why?

Because that is how a ' is supposed to be escaped in Sybase.

-Rasmus


--
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]



_
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]




Re: [PHP] addslashes q's

2001-10-03 Thread Rasmus Lerdorf

stripslashes()

On Wed, 3 Oct 2001, Caleb Carvalho wrote:

 thanks,

 how do i get the right output?



 Caleb Carvalho
 Application Engineer
 LoadRunner/APM
 
-
 Enterprise Testing and Performance Management Solutions
 
-
 Mercury Interactive
 410 Frimley Business Park
 Frimley, Surrey.  GU16 7ST
 United Kingdom
 Telephone :  +44 (0)1276 808300



 From: Rasmus Lerdorf [EMAIL PROTECTED]
 To: Caleb Carvalho [EMAIL PROTECTED]
 CC: [EMAIL PROTECTED]
 Subject: Re: [PHP] addslashes q's
 Date: Wed, 3 Oct 2001 09:15:49 -0700 (PDT)
 
   after enabling magic quotes with sybase,
   now, i don't even need to addslashes..
   the only problem is that is adding  quote when i say won't it adds
 won''t
  
   does any one know why?
 
 Because that is how a ' is supposed to be escaped in Sybase.
 
 -Rasmus
 
 
 --
 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]
 


 _
 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]




Re: Re: [PHP] How to simulate any browser

2001-10-03 Thread Kamil Nowicki


Hello again


I suppose I was not precise enough.

 with HTTP 1.1, you just need the normal url, for the GET,
And what do I do with it? How to send it as a request?

 but if you want to
 use POST or something, you do strlen() and get the length, set the
 contentlength, then you send it...
How? Open socket to the server and HTTP port and write what to it?

 So i learn't a bit on the http specifications...
Yes... But I do not know those HTTP specifications...

 btw it might be an idea to try
 $output = file("http://site.com/website?arg1=valuearg2=value2");
Works just like:
$fd = fopen("http://site.com/website?ag1=value1arg2=value2","r");
$output = fread($fd,10);
And gives error page in $output.

Kamil 'Hilarion' Nowicki


-- 
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] Sessions Variables and refresh pages

2001-10-03 Thread Rasmus Lerdorf

Both of SID and session_id() should return the current session id after
session_start() has been called.

-Rasmus

On Wed, 3 Oct 2001, Karina wrote:

 Yes, it is.

 This is exactly the problem. Do you know a way to solution this ?

 Thks, Karina

 ---


 I'm not sure I fully understand the problem, but I think I can
 have a guess
 at it based on my past experiences...

 if you have a php page that starts a session with
 session_start() and, say
 for example, you then try and echo the session id with
 session_id() it will
 not be displayed on screen until you actually refresh the page
 or move to
 another page that calls the session id.

 In other words, the session id seems to be set when the session
 is started,
 but isn't availale to use in your script until the page is
 re-loaded.

 This is based on what I can remember from 8 months ago and I
 haven't tested
 it out, but I believe this is the sort of problem being
 described in this
 thread.

 Cheers the noo,

 Derek



-- 
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: Having trouble using get_browser() function

2001-10-03 Thread Iván Milanez Castellanos

Yeap I did download a browscap.ini from a web site, and yes I am aware of
the functionality of the $HTTP_USER_AGENT variable, and yes I am aware of
the fact that the browscap.ini file tells you what a browser is capable of
hence the name BrowsCap (Browser Capabilities).

The question was how do I get it to work properly, for even though I have
installed it in the directory where php.ini says it should be and have
uncommented the line pertaining to browscap.ini in the php.ini file I still
can't get it to work.

TIA

Iván Milanez

Richard Lynch [EMAIL PROTECTED] wrote in message
04c201c14bc4$6943aa80$c801a8c0@Lynchux100">news:04c201c14bc4$6943aa80$c801a8c0@Lynchux100...
 #1.  Did you download a nice big browscap.ini instead of that empty one
that
 comes with PHP?...

 #2.  Are you aware that $HTTP_USER_AGENT has the Browser in it, without
the
 complications of get_browser and browscap.ini?

 #3.  You do realize that get_browser() only tells you what a browser is
 theoretically capable of, not what the user has enabled/disabled...

 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: IVáN Milanez Castellanos [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Monday, October 01, 2001 7:21 PM
 Subject: Having trouble using get_browser() function


  Hi, does anyone here know how to correctly configure php.ini to be able
to
  use browscap.ini in linux so that I can get the get_browser() function
to
  work properly, I need it because I'm building a statlog from scratch for
 my
  web site.
 
  Any help will be apreciated.
 
  Iván
 
  P.S. Sorry about my spelling but english is not my native language.
 
 




-- 
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] Newlines in files

2001-10-03 Thread Big5ive

My Code:
$PW_LIST=../config/pw.txt;
$fp=fopen($PW_LIST,a);
fputs($fp,$username=$pw\n);
fclose($fp);

This should make a newline after printing $username=$pw, shouldn't it!?
But it doesn't!!!



-- 
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 not reading php.ini

2001-10-03 Thread Ralph Guzman

Yes, it best if you just recompile PHP and let it set the path to it's
default location, or specify a different location if you still desire:

--with-conf /www/conf/php.ini

good luck.



-Original Message-
From: Caleb Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 1:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP] php not reading php.ini

Hi,
you're right, i did without knowledge enable --with -conf /www/conf when
running the ./configure :(..

ok, thanks for point that out, do i need to go to square 0 i mean by running
configure then make make install?

thanks

Caleb Carvalho
Application Engineer
LoadRunner/APM

-
Enterprise Testing and Performance Management Solutions

-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300



From: Ralph Guzman [EMAIL PROTECTED]
To: Caleb Carvalho [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: RE: [PHP] php not reading php.ini
Date: Wed, 03 Oct 2001 01:05:07 -0700

Unless you modified the default path to the configuration file when
compiling, your Configuration Path setting should be set to something like
this:

/usr/local/lib/php.ini

in this case, you say it is set to /www/conf. I'm assuming by this that it
looking for a configuration file called 'conf' in the www directory. You
might want to look this over, and possible recompile with the default
setting.

-Original Message-
From: Caleb Carvalho [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 03, 2001 12:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php not reading php.ini

Hi all,

I have enable sybase magic quotes=on in php.ini, and with the test file in
my phpinfo(); says configuration path /www/conf i have placed the file
there, but the sybase magic quote=off!!

am i suppose to change all files ie php.ini -dist  php.ini -optimized
aswell?

pls help

Caleb Carvalho
Application Engineer
LoadRunner/APM
---
-
-
Enterprise Testing and Performance Management Solutions
---
-
-
Mercury Interactive
410 Frimley Business Park
Frimley, Surrey.  GU16 7ST
United Kingdom
Telephone :  +44 (0)1276 808300


_
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]



_
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 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: MySQL - Selecting Unique Entries

2001-10-03 Thread Iván Milanez Castellanos

Tom: if you need to weed out duplicates you may try knowing which entries
duplicate themselves and how many times they are duplicated, why don't you
try.

SELECT seminar_name COUNT(*)
FROM student_table GROUP BY seminar_name

This will return the seminar_name field plus a COUNT field that will display
the number of times the first field was found.

If you want the seminar_name to be unique and not be repeated then you
should get 1 in every row of the COUNT field, the rows that get more than
1 are repeated and this way you will know which ones to eliminate.

Later.

Iván Milanez


Tom Churm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 hi,

 i need to weed out all duplicate entries in a select statement.
 i've done research and have discovered 2 different possible solutions
 for this.  i'd like to know which one is better to use?

 after trying them out on MySQL, Select Distinct appears to be highly
 unreliable.  i get somewhat better results when i use Select Distinct
 trim(seminar_name), but this Group By solution seems to work better:

 SELECT seminar_name
 FROM student_table GROUP BY seminar_name

 SELECT DISTINCT seminar_name
 FROM student_table

 thanks for the advice,

 tom



-- 
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] A powerful editor!

2001-10-03 Thread Mark

On Wed, 3 Oct 2001 08:52:47 -0500, Sheridan Saint-Michel wrote:
I wasn't saying anything about the quality of Editplus.  I was just
wondering
what justification there was for the statement

It has more than I could even use including everything TextPad
has and nicer colors for the different styles since Textpad lets
you set
all
of your colors from a 16.7M palette.

I'm sure he meant that he prefers the default colors in editplus to
the ones in textpad. since most people probably never get around to
changing the default colors, I guess it makes a difference. For me
tho, the main advantage editplus has is that it lets you edit remote
files (last time I looked at textpad, it didn't), if only it used
sftp I would be completely sold.


--
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: something like alert (javascript)

2001-10-03 Thread John Lim

Try LensDebug. Generates messages in a second window from PHP.

http://phplens.com/lens/free_code/lensdebug.php

Eduardo Kokubo [EMAIL PROTECTED] wrote in message
001801c14c18$07d4d7c0$a102a8c0@cttmar">news:001801c14c18$07d4d7c0$a102a8c0@cttmar...
Is there any function in PHP that is similar to alert() or confirm() of
javascript ? I tried die() but that's not what I need.




-- 
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] Pesky quotes

2001-10-03 Thread René Fournier

A little problem with single quotes messing up an SQL SET statement...

I can type single quotes, double quotes--it seems, any 'special'
character--into a form, and so long as my PHP script tries to INSERT, UPDATE
or DELETE said row into the table, no problem.  But when I try to DUPLICATE
a row that already contains a single quote, the PHP code chokes on it--and
doesn't perform the query operation.  I realize that the code that does the
preprocessing is getting confused by any stray single quote (double quotes
are harmless).  What I don't know is how to get around this problem.  Here's
the code in question:

---
// DUPLICATE
   if ($action == dup) {

$result = mysql_query(SELECT * FROM $table WHERE id=$id,$db);
$myrow = mysql_fetch_array($result);

$comma = ;
echo $priv, br;
for ($i = $priv; $i  $columns; $i++) {
$fld = mysql_field_name($fields, $i);
$set .= $comma.$fld='.$myrow[$i].';
echo $set, br;
$comma = , ;
}

  // run SQL against the DB
  $sql = INSERT $table SET $set;
  $result = mysql_query($sql);

   $affected = $id;
   echo td width=10img border=0 src=../../common/spacer.gif width=10
height=1/tdtd align=center valign=middle bgcolor=#eespan
class=adminnormalgreyRecord duplicated/span/td;
}

---
And here's the echo'd $set:
---
lang='en'
lang='en', record='news.php'
lang='en', record='news.php', buttonname='News and Events'
lang='en', record='news.php', buttonname='News and Events', pagetitle='What
is Happening'
lang='en', record='news.php', buttonname='News and Events', pagetitle='What
is Happening', alttext='Breaking news on new SmartSlitter products and
upgrades, plus a list of trade show's where we will be exhibiting our
machines.'
---

Any help is much appreciated. Thanks!

...Rene

---
Rene Fournier
[EMAIL PROTECTED]


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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] Re: Newlines in files

2001-10-03 Thread Henrik Hansen

[EMAIL PROTECTED] (Big5ive) wrote:

  My Code:
  $PW_LIST=../config/pw.txt;
  $fp=fopen($PW_LIST,a);
  fputs($fp,$username=$pw\n);
  fclose($fp);
  
  This should make a newline after printing $username=$pw, shouldn't it!?
  But it doesn't!!!

after printing where? in a browser \n does NOT mean newline only on
console and in file etc. if you print it in a browser use nl2br();

-- 
Henrik Hansen

-- 
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] Sessions Variables and refresh pages

2001-10-03 Thread Karina

Yes, the result is returned... the problem is that i have to refresh the
page to see it or use it in a query.

Karina

-- 
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] passing object variable from page to page. Please disregard the previous!

2001-10-03 Thread Ming-Chieh Lee

Hello,

 I have a question on how to pass object variable from page to page. Here
is

 something that I found, but it doesn't work. I would greatly appreciate if

 someone can help:

 1. does it matter if I include first, then so session_start()?





 file1.php

 ?

 include ('class.myclass.php');

 session_start();

 $myvar = new MyClass;



 $myvar-who = me;

 // this is where my doubt reside !!!

 session_register ('myvar'); // like this ?



 // don't need to register stuff in the class, it's already there.

 // session_register ('who'); ?

 _

 file2.php

session_start();

 include ('class.myclass.php');

 // using an  you won't make a copy and you

 // can work directly on the session var

 $myvar = $HTTP_SESSION_VARS['myvar'];



 // should print object

 echo br . gettype($myvar);



 // use the object, who is not a session var

 echo Session Var :  .$myvar-who. BR;



 //echo Session Var :  .$HTTP_SESSION_VARS['myvar']['who'] . BR;

 //echo Session Var :  .$HTTP_SESSION_VARS['myvar-who'] . 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]




Re: [PHP] How to simulate any browser

2001-10-03 Thread Mark

On Wed, 3 Oct 2001 17:46:50 +0200, Kamil Nowicki wrote:

  Hello everyone!

  I have a problem. My webpage (say webpage_1) needs to get some
data
presented on other webpage (wepage_2). I tried to use
fopen(http://webpage_2?params,r;) and got connection and stuff,
but
I suppose that webpage_2 uses some script checking what type of
browser sent the request, and sends back an error message. I do not
have cURL library installed (and I can't install it cause I'm not
an administrator of the server and my administrator doesn't want to
install it) so I can't use it to pretend my PHP request is from
IE, Netscape or any other WWW browser.

look on sourceforge for a php project called snoopy


--
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: something like alert (javascript)

2001-10-03 Thread Brian Paulson

Here is something that I finished the other day that does what you need

script language=JavaScript
function MyForm_onsubmit() 
{
bSuccess = true;
if(MyForm.action[0].checked)
{   
var x=window.confirm(Message to be displayed here)
if (x)
bSuccess = true;
else
bSuccess = false;
}
return bSuccess;
}
/script

form name=MyForm method=post action=? Echo $PHP_SELF; ?
language=javascript onsubmit=return MyForm_onsubmit()

Put form stuff in here

input type=submit value=Click here

Hope this helps

Thank You
Brian Paulson
Sr. Web Developer
The Pueblo Chieftain Online
[EMAIL PROTECTED]
http://www.chieftain.com 

 -Original Message-
 From: John Lim [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, October 03, 2001 11:50 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: something like alert (javascript)
 
 
 Try LensDebug. Generates messages in a second window from PHP.
 
 http://phplens.com/lens/free_code/lensdebug.php
 
 Eduardo Kokubo [EMAIL PROTECTED] wrote in message 
001801c14c18$07d4d7c0$a102a8c0@cttmar">news:001801c14c18$07d4d7c0$a102a8c0@cttmar...
Is there any function in PHP that is similar to alert() or confirm() of
javascript ? I tried die() but that's not what I need.




-- 
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] Problem when displaying the $ character

2001-10-03 Thread Dominik

Through php, I run a function that creates a list of items in a select menu
as follows:

select name=menu
option value=? echo $item1; ?Item 1/option
option value=? echo $item2; ?Item 2/option
/select

but here is how the source code looks:

select name=menu
option value=
item1Item 1/option
option value=
item2Item 2/option
/select

It looks like php takes the $ character and inserts a return for it.  This
though disrupts the value of the form element.  Is there anyway to make this
code appear like it should (with the option tag all on one line instead of
2)?

Thanks!
Dominik



-- 
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: MySQL - Selecting Unique Entries

2001-10-03 Thread Sheridan Saint-Michel

Distinct is just a group by on all columns, so either of the queries
you showed should be pretty much the same.  The difference
between the two shows up when you have multiple columns in
your select.  ie

Select distinct id,name from table1;
and
Select id,name from table1 group by name;

do two different things.  The first will combine only those rows who
has the same value in both id and name, the second will combine any
rows with the same value in name.

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


Tom Churm [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 hi,

 i need to weed out all duplicate entries in a select statement.
 i've done research and have discovered 2 different possible solutions
 for this.  i'd like to know which one is better to use?

 after trying them out on MySQL, Select Distinct appears to be highly
 unreliable.  i get somewhat better results when i use Select Distinct
 trim(seminar_name), but this Group By solution seems to work better:

 SELECT seminar_name
 FROM student_table GROUP BY seminar_name

 SELECT DISTINCT seminar_name
 FROM student_table

 thanks for the advice,

 tom



-- 
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 extension inc?

2001-10-03 Thread Rasmus Lerdorf

 On Wednesday 03 October 2001 12:13, Jan Grafström wrote:
  Hi!
  How does server handle the .inc extension and for what do I use it ?

 You should be aware that if the webserver is not set up to handle .inc files
 as PHP code, that it might output them as text to the user. Thus possibly
 showing passwords, usernames and whatnot.

You should set up the web server to block all access to .inc files.  Do
not set them up to be parsed by PHP.  It can be more dangerous to execute
code out of context that to simply display it.

-Rasmus


-- 
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] New York Remembrance

2001-10-03 Thread Hugh Danaher

Thank you.
- Original Message -
From: Irmingard Anna Kotelev [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 1:15 PM
Subject: [PHP] New York Remembrance


 Dear friends,

 the madness incarnate of  September 11th, 2001 is one which will never
 be
 forgotten. How could it be?
 This shook the entire world, and my heart was broken along with all of
 yours.

 I have created a slide show in respectful tribute to all who passed, as
 well as the heroics of the people. I know that America...the world... will
 not allow this attack to ruffle it's feathers, and I stand and applaude
 for
 the strength and resolve of it's people.

 God bless America...God bless the world.

 Do sign my 'Response to this Tribute' if compelled and please pass this
 on to at least one friend.

 http://www.aurumxxl.de/ny/ny.htm

 Irmingard Anna Kotelev
 Photographer

 25th of September 2001


 --
 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] Error: Unable to open *\index.php in Unknown on line 0

2001-10-03 Thread Scott Fletcher

Hi ya all!

I'm having some trouble with PHP on IIS.  Yes, I know IIS suck!  When I
have one website, I have no problem.  But when I have more than one website
on IIS.  This is when I have problem with PHP.  I looked up on php.ini to
make sure the line, doc root =  is left blank and the other line,
include_path =  is left blank also.  It seem that php.ini can't work with
multiple website on IIS that each website have different directory and
seperate directory.

So, what's hte problem and what do I need to do to fix it?

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]




Re: [PHP] Problem when displaying the $ character

2001-10-03 Thread Philip Olson


This assumption is incorrect, these are just variables that most likely
contain unwanted whitespace, such as a \n.  Consider using trim()
beforehand.

  ?php echo trim($item1) ?

Maybe I misunderstand your question.  Also, no need for  when printing
variables directly like that.  echo $foo;

Regards,
Philip Olson

On Wed, 3 Oct 2001, Dominik wrote:

 Through php, I run a function that creates a list of items in a select menu
 as follows:
 
 select name=menu
 option value=? echo $item1; ?Item 1/option
 option value=? echo $item2; ?Item 2/option
 /select
 
 but here is how the source code looks:
 
 select name=menu
 option value=
 item1Item 1/option
 option value=
 item2Item 2/option
 /select
 
 It looks like php takes the $ character and inserts a return for it.  This
 though disrupts the value of the form element.  Is there anyway to make this
 code appear like it should (with the option tag all on one line instead of
 2)?
 
 Thanks!
 Dominik
 
 
 
 -- 
 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] Problem when displaying the $ character

2001-10-03 Thread EDUMEXICO

Hi, try this:

?

echo 
select name=\menu\
option value=\$item1\Item 1/option
option value=\$item2\Item 2/option
/select;

?

I hope this can help you. Cheers

On Wed, Oct 03, 2001 at 11:08:27AM -0700, Dominik wrote:
 Through php, I run a function that creates a list of items in a select menu
 as follows:
 
 select name=menu
 option value=? echo $item1; ?Item 1/option
 option value=? echo $item2; ?Item 2/option
 /select
 
 but here is how the source code looks:
 
 select name=menu
 option value=
 item1Item 1/option
 option value=
 item2Item 2/option
 /select
 
 It looks like php takes the $ character and inserts a return for it.  This
 though disrupts the value of the form element.  Is there anyway to make this
 code appear like it should (with the option tag all on one line instead of
 2)?
 
 Thanks!
 Dominik
 
 
 
 -- 
 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]

-- 
Mauricio Téllez Jiménez
Seguimiento Técnico EDUMEXICO
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Zamora No. 25, Col. Centro
C.P. 91000, Xalapa, Ver.
Tel. 52(28)17-86-87, 17-73-80
Fax. 52(28)18-64-13

 PGP signature


RE: [PHP] File extension inc?

2001-10-03 Thread jallen01

Even better use mod_rewrite so that .inc files
are never displayed :-) 

Jeremy Allen
elliptIQ Inc.


-- 
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] Pesky quotes

2001-10-03 Thread Philip Olson

I don't understand this question, maybe you're looking for :

  http://www.php.net/addslashes
  http://www.php.net/stripslashes
  http://www.php.net/manual/en/configuration.php#ini.magic-quotes-gpc

Looks like you have magic_quotes_gpc enabled.  Adjust accordingly.  Using
addslashes() on a string essentially does the same thing.

Regards,
Philip Olson


On Wed, 3 Oct 2001, [iso-8859-1] René Fournier wrote:

 A little problem with single quotes messing up an SQL SET statement...
 
 I can type single quotes, double quotes--it seems, any 'special'
 character--into a form, and so long as my PHP script tries to INSERT, UPDATE
 or DELETE said row into the table, no problem.  But when I try to DUPLICATE
 a row that already contains a single quote, the PHP code chokes on it--and
 doesn't perform the query operation.  I realize that the code that does the
 preprocessing is getting confused by any stray single quote (double quotes
 are harmless).  What I don't know is how to get around this problem.  Here's
 the code in question:
 
 ---
 // DUPLICATE
if ($action == dup) {
 
   $result = mysql_query(SELECT * FROM $table WHERE id=$id,$db);
   $myrow = mysql_fetch_array($result);
 
 $comma = ;
 echo $priv, br;
 for ($i = $priv; $i  $columns; $i++) {
   $fld = mysql_field_name($fields, $i);
 $set .= $comma.$fld='.$myrow[$i].';
   echo $set, br;
 $comma = , ;
   }
 
 // run SQL against the DB
 $sql = INSERT $table SET $set;
 $result = mysql_query($sql);
 
$affected = $id;
echo td width=10img border=0 src=../../common/spacer.gif width=10
 height=1/tdtd align=center valign=middle bgcolor=#eespan
 class=adminnormalgreyRecord duplicated/span/td;
   }
 
 ---
 And here's the echo'd $set:
 ---
 lang='en'
 lang='en', record='news.php'
 lang='en', record='news.php', buttonname='News and Events'
 lang='en', record='news.php', buttonname='News and Events', pagetitle='What
 is Happening'
 lang='en', record='news.php', buttonname='News and Events', pagetitle='What
 is Happening', alttext='Breaking news on new SmartSlitter products and
 upgrades, plus a list of trade show's where we will be exhibiting our
 machines.'
 ---
 
 Any help is much appreciated. Thanks!
 
 ...Rene
 
 ---
 Rene Fournier
 [EMAIL PROTECTED]
 
 
 _
 Do You Yahoo!?
 Get your free @yahoo.com address at http://mail.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] File extension inc?

2001-10-03 Thread Rasmus Lerdorf

 Even better use mod_rewrite so that .inc files
 are never displayed :-)

mod_rewrite is severe overkill for this.  Just use:

Files ~ \.inc$
Order allow,deny
Deny from all
/Files

-Rasmus


-- 
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] Sorry! The $ character is still making problems

2001-10-03 Thread Dominik

Ok, let me explain exactly what is happening.  On a page, try printing out
this code:

foreach($imgs as $copy) {
   echo option$copy/option;
}

$imgs is of course an array.  The code though goes through all the $imgs and
displays as so

option
image1/option
option
image2/option
option
image3/option

but I need it like this:

optionimage1/option
optionimage2/option
optionimage3/option

or all in one line would be fine.  Any suggestions?

Thanks,
Dominik




-- 
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] Sorry! The $ character is still making problems

2001-10-03 Thread Rasmus Lerdorf

Well, PHP is not adding the line-feed.  It must be in your $copy values.
Run trim() on it before displaying:

   echo 'option'.trim($copy).'/option';

-Rasmus

On Wed, 3 Oct 2001, Dominik wrote:

 Ok, let me explain exactly what is happening.  On a page, try printing out
 this code:

 foreach($imgs as $copy) {
echo option$copy/option;
 }

 $imgs is of course an array.  The code though goes through all the $imgs and
 displays as so

 option
 image1/option
 option
 image2/option
 option
 image3/option

 but I need it like this:

 optionimage1/option
 optionimage2/option
 optionimage3/option

 or all in one line would be fine.  Any suggestions?

 Thanks,
 Dominik







-- 
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 extension inc?

2001-10-03 Thread Sheridan Saint-Michel

Remembering, of course, to check and make sure your include statements are
of the form include(/path/file.inc) rather than
include(http://mysite.com/path/file.inc;) BEFORE adding the below directive
(one mistake I won't ever make again  =P )

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


- Original Message -
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 03, 2001 1:59 PM
Subject: RE: [PHP] File extension inc?


  Even better use mod_rewrite so that .inc files
  are never displayed :-)

 mod_rewrite is severe overkill for this.  Just use:

 Files ~ \.inc$
 Order allow,deny
 Deny from all
 /Files

 -Rasmus


 --
 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: Re: [PHP] How to simulate any browser

2001-10-03 Thread ReDucTor

What does the error page have?
- Original Message - 
From: "Kamil Nowicki" [EMAIL PROTECTED]
To: "PHP-list" [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 2:55 AM
Subject: Re: Re: [PHP] How to simulate any browser


 
 Hello again
 
 
 I suppose I was not precise enough.
 
  with HTTP 1.1, you just need the normal url, for the GET,
 And what do I do with it? How to send it as a request?
 
  but if you want to
  use POST or something, you do strlen() and get the length, set the
  contentlength, then you send it...
 How? Open socket to the server and HTTP port and write what to it?
 
  So i learn't a bit on the http specifications...
 Yes... But I do not know those HTTP specifications...
 
  btw it might be an idea to try
  $output = file("http://site.com/website?arg1=valuearg2=value2");
 Works just like:
 $fd = fopen("http://site.com/website?ag1=value1arg2=value2","r");
 $output = fread($fd,10);
 And gives error page in $output.
 
 Kamil 'Hilarion' Nowicki
 
 
 -- 
 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] Best way to duplicate tables to another DB using PHP

2001-10-03 Thread David Yee

mysqldump would work pretty well if the source DB is mysql, but it's a DB I have to 
access via ODBC on a windows box instead.  And this particular DB doesn't seem to have 
a command line interface to export a table that I can call from PHP.  

David
  - Original Message - 
  From: sagar N Chand 
  To: David Yee 
  Sent: Wednesday, October 03, 2001 6:09 AM
  Subject: Re: [PHP] Best way to duplicate tables to another DB using PHP


  use mysql statement mysql_dump thru php.

  /sagar

- Original Message - 
From: David Yee 
To: [EMAIL PROTECTED] 
Sent: Wednesday, October 03, 2001 2:52 AM
Subject: [PHP] Best way to duplicate tables to another DB using PHP


Hi guys.  What do you suggest is the best (fastest, most efficient) way to
duplicate a table from one database to another using PHP?  I have a windows
machine setup with ODBC for this old school DB (Pervasive SQL 7) and I would
like to duplicate some of the tables into a Linux box with MySQL for some
datawarehousing purposes.  The largest table is about 30K records.  I'm not
sure if something like a select * and then doing a foreach record insert
into MySQL would be the best way.  Thanks for any suggestions.

David


-- 
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   >