Re: [PHP] php vs asp

2002-01-29 Thread Mike Frazer

If ASP is as slow with MySQL as it is with native Microsoft DBs (Access, SQL
Server), then you may be in trouble.  I did some work for a friend who owns
a hosting company on a site done in ASP and the worst part of the whole
thing was testing because the database was so slow.  He's got some high-end
servers, too, so it wasn't the system slowing it down.  I have my personal
site with him and it seems to load stuff from MySQL about 2-5 times as fast
as the ASP-based sites load from SQL Server.

My two cents.

Mike Frazer



Jon Farmer [EMAIL PROTECTED] wrote in message
025001c1a810$587b6730$[EMAIL PROTECTED]">news:025001c1a810$587b6730$[EMAIL PROTECTED]...
  sorry i should have explained myself abit better.i am a huge fan of
 php
  hence why i subscribe to this mailing list. its just that i need to
settle
  an argument. my understanding is that php works better with mysql
however
 a
  friend of mine is adament that asp will work just as well. i am not
  sure


 Hmm I have to say it would depend on the quality of the ODBC driver you
 would be using.

 For instance: would you be able to get the insert id with ASP as easily as
 PHP?

 Look at all the MySQL functions in PHP and ask your friend hwo they would
 accomplish this in ASP.

 I would be interested to hear what your friend has to say to this, I would
 appreciate if you would drop me his/her reaction..

 Regards

 Jon


 --
 Jon Farmer
 Systems Programmer, Entanet www.enta.net
 Tel 01952 428969
 PGP Key available, send email with subject: Send PGP Key




-- 
PHP General Mailing List (http://www.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] [ANNOUNCEMENT] Phpauction 2.1 released

2002-01-29 Thread Gianluca Baldo

PHPAUCTION 2.1 has been released and is available in the downloads
section at http://phpauction.org .-

This release includes an installation script, edit live auctions,  post a question to
the seller. We have fixed bugs to make this a stable version.

Regards,

Gianluca

--
ALBASOFTWARE
C/ Mallorca 186 - 3º 1ª
08036 Barcelona (Spain)
Tel./Fax +34 934549324
[EMAIL PROTECTED]
http://www.gianlucabaldo.com
http://www.phpauction.org


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




[PHP] Re: How do I use a confirm box to confirm before deletion from a database

2002-01-29 Thread Mike Frazer

Use Javascript on the links.  I've done this for all delete links I've done
with database-driven sites.  Place the following code in the head section
of the pages:

 script language=Javascript
  var goTo;
  function verifyClick(goTo) {
   var choice;
   choice = confirm(Are you sure you want to delete this entry?);
   if (choice) { window.location = goTo; }
  }
 /script

Then just have it print something like the following for the links:

a href=javascript:verifyClick(delete.php?id=xxx)Delete/a

of course you'll need to set up the link however your scripts require, but
the basic idea here is that if the user clicks OK then the link passed to
the javascript function verifyClick() is executed.

Hope that helps.

Mike Frazer



Ivan Carey [EMAIL PROTECTED] wrote in message
006301c1a7f4$a195ea60$0201a8c0@icarey">news:006301c1a7f4$a195ea60$0201a8c0@icarey...
Hello,
Thankyou for your reply.

When a user clicks upon a delete link that deletes a record from a database,
I would like to be able to give them the option to OK or Cancel this action.

I have tried coding the browsers built in confirm box (I can bring up this)
but am unable to combine it with php or a combination of php and a
javascript funtion

Thanks,
Ivan





-- 
PHP General Mailing List (http://www.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] broken imap client?

2002-01-29 Thread Cary Mathews

I've been trying to compile php_4.1.1 with imap support for the last
couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
of the c-client2000 libraries, along with the source of pine4.44, which
uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
and it configures and builds just fine.  But when I attempt to install it
as a DSO in Apache, and do an apachectl configtest I get the following:
/usr/libexec/ld.so: Undefined symbol _mail_string in
httpd:/usr/local/apache/libexec/libphp4.so

So I try to install it as a static module in Apache, and Apache bombs on
the build with:
/usr/libexec/ld.so: Undefined symbol _mm_dlog in
gen_test_char:{lib dir}/libc-client.so.2.1
*** Error code 1

In short, I think the c-client libraries are broken, at least as far as
php is concerned, but the php documentation says that the c-client libs
are required for IMAP support.  Can someone help me understand what I am
doing wrong?

Thanks in advance,
Cary



-- 
PHP General Mailing List (http://www.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] mailing to 19000 users

2002-01-29 Thread Kancha .

How about creating a mailing list will 19000 users and
then using the mail() function to send mail to that
list. so that you will not have to loop through.

--- John Meyer [EMAIL PROTECTED] wrote:
 How about croning the job and splitting up the load
 as you go.
 - Original Message - 
 From: Mostafa Al-Mallawani [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 27, 2002 11:23 PM
 Subject: [PHP] mailing to 19000 users
 
 
  hi, does anyone know how to send mail to 19000
 users using the mail()
  function, I need to create a mailing list of this
 number of users and
  looping on 19000 users takes up a heck of a lot of
 resources...any
  solutions? thanks.
   
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 To contact the list administrators, e-mail:
 [EMAIL PROTECTED]
 


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.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: Mysql Connection

2002-01-29 Thread David Robley

In article Pine.LNX.4.21.0201291202160.2265-
[EMAIL PROTECTED], [EMAIL PROTECTED] says...
 
 Hello,
 
 
   I have installed php3 in my system.I want to connect with mysql.I have
 given this code
 
 $link=mysql_connect(localhost,username,password) or die(could not
 connect);
 
 
 but it is giving Fatal error: Call to undefined function: mysql_connect()
 
 
 Why it is showing like.
 
 Mysql is also running
 
 
  Any one came to know this tell me as soon as possible

The error message says that the installation of PHP you are using does 
not have MySQL support enabled/compiled in. If you are on a *nix system, 
you may need to recompile with mysql support; if on Windows you need to 
ensure that the mysql module (dll) is being used.

-- 
David Robley
Temporary Kiwi!

-- 
PHP General Mailing List (http://www.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] --enable-transid and slash URI's

2002-01-29 Thread Tomek Golembiewski

I've got a problem. I want to propagate sessionid using this greate php 
feature --enable-transid but I want pretty slash url too (I mean 
www.eee.com/w/12/2344556b44455).
I don't want transid to add sessionid at the end of each link with ? or , I 
want only slah
(/session_id_here). Is the any way to change this behaviour?

-- 
PHP General Mailing List (http://www.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: Initializing Array

2002-01-29 Thread Tim Ward

As far as using them is concerned they are already zero (as indeed are
undefined elements). If you want force the type you'll have to step through
the array.

$pos[17][7][3] = 0; // will only set the value of that element, in PHP or C

Tim
www.chessish.com http://www.chessish.com 

--
From:  pong-TC [SMTP:[EMAIL PROTECTED]]
Sent:  28 January 2002 19:07
To:  [EMAIL PROTECTED]
Subject:  Initializing Array

Hello All

I would like to initialize the array $pos[17][7][3] to zero.  Can i
do
like in C ie. $pos[17][7][3] = 0;?  Or, will I have to do initialize
every
single element of array to zero by using loop?

Thank you.
Pong


-- 
PHP General Mailing List (http://www.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] HOWTO: detect browser's script enabled?

2002-01-29 Thread Ivo Stoykov

Hi

I've fillowing (dull perhaps) question:

Could I chanck somehow whether the browser has script enabled. I'd like to
use it for my statistics.
I saw such into http://www.extreme-dm.com/tracking/ free tracking service.

Thank you.

Ivo



-- 
PHP General Mailing List (http://www.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: --enable-transid and slash URI's

2002-01-29 Thread Yasuo Ohgaki

Tomek Golembiewski wrote:
 I've got a problem. I want to propagate sessionid using this greate php 
 feature --enable-transid but I want pretty slash url too (I mean 
 www.eee.com/w/12/2344556b44455).
 I don't want transid to add sessionid at the end of each link with ? or , I 
 want only slah
 (/session_id_here). Is the any way to change this behaviour?
 

Disable trans-sid and do it by yourself :)
-- 
Yasuo Ohgaki


-- 
PHP General Mailing List (http://www.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 specify custom http header in fopen(http://...,...)

2002-01-29 Thread g.p.ciceri

Hello all,
I've a bunch of PHP program that heavily depends 
on remote services via fopen(http://...;,...) costruct.

Now I've installed mod_gzip on the remote server 
and so if I can specify Accept-Encoding: gzip,deflate in 
my http header request, I can have a (much) smaller network traffic.

My question: how can I specify a custom HTTP header
in the fopen(http://...;,...) function ???

Any help will be highly appreciated.

TIA
/gp


-- 
anyone can create a cryptography product that he himself cannot break.
Bruce Schneier

If you don't know the things, study them.
g.p.

But writing non-free software is another matter.  Non-free software is
a plan for subjugating and dividing the people who use it--an
antisocial practice.  Our goal is to bring that practice to a halt. 
Richard Stallman 

  Gian Paolo Cicerivia B.Diotti 45 - 20153 Milano MI ITALY
  CTO @ Louise mobile :   ++39 348 3658272   
   eMail  :   [EMAIL PROTECTED],
[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] mailing to 19000 users

2002-01-29 Thread val petruchek

 How about creating a mailing list will 19000 users and
 then using the mail() function to send mail to that
 list. so that you will not have to loop through.

The main disadvantage (not sure of such long $to) is that EVERY user will
receive e-mail's of others.


Valentin Petruchek (aki Zliy Pes)
*** Cut the beginning ***
http://zliypes.com.ua
mailto:[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] FOUND SOLUTION

2002-01-29 Thread phantom

Doing some research I found that session cache paramemters may be set in
PHP.INI or overridden by inserting the following header() lines into the
php for the page you want to cache on the clients browser.

Allow Cache Expire time is set in php.ini in minutes.  Search php.ini for
key word cache and it will be the first time that comes up.

header(Cache-Control: public);
header(Cache-Control: max-age= . $this-allowcache_expire * 60);


-- 
PHP General Mailing List (http://www.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] browser back button - Page has Expired.. problem

2002-01-29 Thread phantom

Also consider:

header(Cache-Control: public);
header(Cache-Control: max-age= . $this-allowcache_expire * 60);

This will allow to set the expiration of the cached file on the on the clients
browser.  The Cache Expire time is in minutes and can be found (and changed)
in the php.ini file.  Search keyword Cache in php.ini and it will be the first
thing you find.

Alex Vargas wrote:

 Just add this header

 header (Cache-Control: public);

 Alex.

 - Original Message -
 From: Lee P Reilly [EMAIL PROTECTED]
 To: PHP List [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 11:26 PM
 Subject: [PHP] browser back button - Page has Expired..  problem

  Hi,
 
  I wonder if anyone can offer me a few pointers..?
 
  I'm building a portal to do various bits and bobs. I'm using sessions to
  facilitate the user authentication/login, etc. The only problem I have
  is that when viewing these (.php) pages in IE once the session variable
  has been set, a Warning: Page has Expired  page is displayed whenever
  the 'Back' button is pressed. This means that the user can only access
  the page again by hitting 'Refresh' (and therefore posting the form data
  back  executing whatever scripts again).
 
  The rest of IE's error message reads, The page you requested was
  created using information you submitted in a form. This page is no
  longer available. As a security precaution, Internet Explorer does not
  automatically resubmit your information for you.
 
  I know from using other web applications (Hotmail is one example), that
  this doesn't always have to be the case. Is there anyway I can eliminate
  this security precaution on the *server side* i.e. without telling users
  to ditch IE ;-)
 
  Thanks very much in advance for any advice.
 
  - Best regards,
 
 Lee
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


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




[PHP] Error executing PHP-Scripts

2002-01-29 Thread Heiko Schneebeck

Hi,

everytime I request a phpscript form my Apache I got an segmentation fault 11 in 
apaches errorlog.

System is:
Apache 1.3.22, PHP 4.1.1, SuSE Linux 7.2 (2.2.19)

The backtrace:
(gdb) run -X
Starting program: /usr/local/apache/bin/httpd -X

Program received signal SIGSEGV, Segmentation fault.
0x80bdafc in ap_table_setn ()
(gdb) bt
#0  0x80bdafc in ap_table_setn ()
#1  0x80671be in execute ()
#2  0x40362b84 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:814
#3  0x40376091 in php_execute_script (primary_file=0xb4d8) at main.c:1307
#4  0x40370a40 in apache_php_module_main (r=0x82a28c8, display_source_mode=0)
at sapi_apache.c:90
#5  0x403719c0 in send_php (r=0x82a28c8, display_source_mode=0,
filename=0x82a4400 /www/htdocs/info.php) at mod_php4.c:575
#6  0x40371a43 in send_parsed_php (r=0x82a28c8) at mod_php4.c:590
#7  0x80c2089 in ap_invoke_handler ()
#8  0x80d813f in process_request_internal ()
#9  0x80d81b2 in ap_process_request ()
#10 0x80cec96 in child_main ()
#11 0x80cee75 in make_child ()
#12 0x80ceff6 in startup_children ()
#13 0x80cf69d in standalone_main ()
#14 0x80cff1c in main ()
#15 0x400a5c6f in __libc_start_main () from /lib/libc.so.6
(gdb)

Can someone tell me what's going wrong?

Heiko

-- 
PHP General Mailing List (http://www.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 specify custom http header in fopen(http://...,...)

2002-01-29 Thread Joffrey van Wageningen

 I've a bunch of PHP program that heavily depends 
 on remote services via fopen(http://...;,...) costruct.
 
 Now I've installed mod_gzip on the remote server 
 and so if I can specify Accept-Encoding: gzip,deflate in 
 my http header request, I can have a (much) smaller network traffic.
 
 My question: how can I specify a custom HTTP header
 in the fopen(http://...;,...) function ???

i think the best way is to use
http://www.php.net/manual/en/function.fsockopen.php
and send your your own headers...

mvgr,
Joffrey van Wageningen

ps/1: hows the smog in milano? :P

--
.-[ Joffrey van Wageningen | WoLFjuh | [EMAIL PROTECTED] ]--
| Networking Event 2000 - www.ne2000.nl - IRCnet:#ne2000, Undernet:#clue
| PGP:1024D/C6BA5863 - 3B93 52D3 CB91 9CB7 C50D FA79 865F 628A C6BA 5863
| * We demand guaranteed rigidly defined areas of doubt and uncertainty.
|   -- Douglas Adams


-- 
PHP General Mailing List (http://www.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: HOWTO: detect browser's script enabled?

2002-01-29 Thread Martin Thoma

Hm, the easiest way would be, try
SCRIPT LANGUAGE=Javascript SRC=myfile.js/SCRIPT

where myfile.js contains simply nothing. Everytime the file is downloaded,
someone uses Javascript.



-- 
PHP General Mailing List (http://www.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] configuring php and apache

2002-01-29 Thread liz lynch

hi all,
i have installed php and apache on my home computer..i am running xp home edition.
the problem is that the php and apache are not working together. what i have done so 
far:

1. configured the httpd.conf file by adding the following lines:
ScriptAlias /php/ c:/php/ 
AddType application/x-httpd-php .php .phtml 
Action application/x-httpd-php /php/php.exe

2.moved the php4ts.dll file to windows\system32note i do not have a directory 
called winnt

3.configured the php.ini file(located in windows dir)so that:

extension_dir = c:\windows\system32//points to where i located the php4ts.dll 
file 

doc_root = c:\program files\apache group\apache\htdocs//points to the document 
root file. i will be storing my files in the htdocs dirrectory.


what am i doing wrong



Re: [PHP] configuring php and apache

2002-01-29 Thread Neil Freeman

What problems/errors are you getting?

Place the following code into a .php file under htdocs:

?php

phpinfo();

?

and then enter something like http://localhost/xxx.php into your browser.

Neil

liz lynch wrote:

 hi all,
 i have installed php and apache on my home computer..i am running xp home edition.
 the problem is that the php and apache are not working together. what i have done so 
far:

 1. configured the httpd.conf file by adding the following lines:
 ScriptAlias /php/ c:/php/
 AddType application/x-httpd-php .php .phtml
 Action application/x-httpd-php /php/php.exe

 2.moved the php4ts.dll file to windows\system32note i do not have a directory 
called winnt

 3.configured the php.ini file(located in windows dir)so that:

 extension_dir = c:\windows\system32//points to where i located the 
php4ts.dll file

 doc_root = c:\program files\apache group\apache\htdocs//points to the document 
root file. i will be storing my files in the htdocs dirrectory.

 what am i doing wrong

 ***
  This message was virus checked with: SAVI 3.53 Jan 2002
  last updated 28th January 2002
 ***

--

 Email:  [EMAIL PROTECTED]
 [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] configuring php and apache

2002-01-29 Thread Neil Freeman

Oh yeah... extension_dir should also have a trailing '\' I believe.

Neil

liz lynch wrote:

 hi all,
 i have installed php and apache on my home computer..i am running xp home edition.
 the problem is that the php and apache are not working together. what i have done so 
far:

 1. configured the httpd.conf file by adding the following lines:
 ScriptAlias /php/ c:/php/
 AddType application/x-httpd-php .php .phtml
 Action application/x-httpd-php /php/php.exe

 2.moved the php4ts.dll file to windows\system32note i do not have a directory 
called winnt

 3.configured the php.ini file(located in windows dir)so that:

 extension_dir = c:\windows\system32//points to where i located the 
php4ts.dll file

 doc_root = c:\program files\apache group\apache\htdocs//points to the document 
root file. i will be storing my files in the htdocs dirrectory.

 what am i doing wrong

 ***
  This message was virus checked with: SAVI 3.53 Jan 2002
  last updated 28th January 2002
 ***

--

 Email:  [EMAIL PROTECTED]
 [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] mailing to 19000 users

2002-01-29 Thread Stefan Rusterholz

Read through the according rfc's.
http://www.ietf.org/rfc/rfc0821.txt could match (else do a google search on
rfc +mail without parenthesis)
I didn't find anything about length limitation (but I didn't read it _very_
seriously) so I think it's theoretically not limited. But I could imagine
that (once more) theory and reality diverge so that some mail-servers _have_
limitations (due to memory issues or whatever - I'm not a specialist here as
I mentioned).
If you have a domainname with e-mail address supporting wildcards, just try
it out sending yourself one or two hundreds of mails. 190 loops shouldn't be
bad.

good luck
stefan rusterholz

- Original Message -
From: val petruchek [EMAIL PROTECTED]
To: Stefan Rusterholz [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 12:00 PM
Subject: Re: [PHP] mailing to 19000 users



  I have no experience with this stuff, but some thoughts
  split the recipients up into groups of 100-1000 persons. put that group
of
  recipients into bbc (all) so nobody will see the others mail address.


 And what about $bcc  length? Has it any length limitations?

 Valentin Petruchek (aki Zliy Pes)
 *** Cut the beginning ***
 http://zliypes.com.ua
 mailto:[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] configuring php and apache

2002-01-29 Thread Mike Maltese

Problems I see:

First, use forward slashes!

extension_dir = c:\windows\system32//points to where i located the
php4ts.dll file

This should be the folder that contains extension dll's. If you used the
installer it will be C:/php/extensions (no quotes) or wherever you
installed PHP.


doc_root = c:\program files\apache group\apache\htdocs

Same thing about forward slashes here.

Good luck!

- Original Message -
From: liz lynch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 3:00 AM
Subject: [PHP] configuring php and apache


hi all,
i have installed php and apache on my home computer..i am running xp home
edition.
the problem is that the php and apache are not working together. what i have
done so far:

1. configured the httpd.conf file by adding the following lines:
ScriptAlias /php/ c:/php/
AddType application/x-httpd-php .php .phtml
Action application/x-httpd-php /php/php.exe

2.moved the php4ts.dll file to windows\system32note i do not have a
directory called winnt

3.configured the php.ini file(located in windows dir)so that:

extension_dir = c:\windows\system32//points to where i located the
php4ts.dll file

doc_root = c:\program files\apache group\apache\htdocs//points to the
document root file. i will be storing my files in the htdocs dirrectory.


what am i doing wrong



-- 
PHP General Mailing List (http://www.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] Opening an URL on an new window

2002-01-29 Thread Eduardo Melo

There is a way to open an URL in a new window using JAVASCRIP commands as 
such as window.open

where is the documentation for JAVASCRIP commands ?

thanks

Eduardo Melo
copmuter programmer

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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




Re: re: [PHP] Paypal Instant Payment Notification

2002-01-29 Thread David

 simply change the fsocketopen's socket from 80 to 443 (SSL port)

 I'm thinkin' the problem is that I'm not posting to 
 https://www.paypal.com/blah, but to 
 http://www.paypal.com/. How do I use the posttohost 
 function (or some other function) to post securely? 

-- 
PHP General Mailing List (http://www.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 and Webmin...

2002-01-29 Thread Prakash

PLEASE, can someone tell me how may I reach someone that can help me in this
problem ?!?
I've already asked in the PHP-DEV mailing list, but I've seen no answers at
all also there...! IMHO, it can be very useful to use php as a remote
administration language!!!

thanks,
prakash


- Original Message -
From: Prakash [EMAIL PROTECTED]


 Hi,
 I'm trying to execute a Webmin script where I can use php as scripting
 language... (It will be good to work with a language as php in a remote
 administration server, as root! potentially dangerous but good!)

 Now the STRANGE problem: (seems to be some env variables (maybe I'm wrong)
 when executing PHP as CGI...)

 When I execute a test.cgi program from Webmin, it's executed as root, as
it
 was from command line... that's good. The problem is that Webmin execute
 well _every_ program I tried , EXCEPT php !

 It seems that php needs some env variables to work well, and these
variables
 aren't provided from the Webmin interface, so to solve the problem I've
 first to understand WHY php does not work...

 -

 Maybe I can better explain with 2 samples:

  file aaa.cgi
 
  #!/bin/bash
  echo Content-type: text/plain
  echo
  echo aaa
  touch /home/test.txt

  file bbb.cgi
 
  #!/usr/local/bin/php -q
  ?php
  echo Content-type: text/plain\n\n;
  echo aaa\n;
  $fd = fopen(/home/test.txt,w);
  fclose($fd);
  ?

 Now, the 2 programs are quite the same... (if test.txt does not exist...)
 But, the 2 programs behave the same way only if you execute them _from
 command line_.
 If you execute them from the Webmin interface (very good for remote
 administration, that lets execute programs as user root), they behave
 differently:
 aaa.cgi is the same, displays aaa on the remote web-browser, and creates
 (well, if text.txt doesn't exist) a local file.
 bbb.cgi does nothing, sends no http headers, no aaa, and does not create
the
 file...

 It seems that PHP needs some env variables, and without them, it suddenly
 stops without parsing the file... am I right ?!?

 I've also tried to escape from this problem (until understood and solved)
 with a third program:

  file ccc.cgi
 
  #!/bin/bash
  /usr/bin/at -f /path/bbb.cgi now+1minute
  touch /home/test2.txt

 If I call ccc.cgi from Webmin and then from command line, the 2 executions
 are scheduled properly, and look really the same (root user,same
 program,...) but the task scheduled from Webmin is not executed
 properly...
 the php seems to stop with no output.

 Also with a file like this:

  file ddd.cgi
 
  #!/bin/bash
  /path/bbb.cgi 21  test3.txt

 show that php really has no output on stdout or stderr (test3.txt is
 created, but 0 bytes long when invoked from Webmin!)

 So, the BIG problem is: if Webmin can execute all programs, running them
as
 root, WHY doesn't work well with php scripts ?!?
 I think that the PHP need something, and not having it it suddenly
stops...
 but what ?!?

 Are there some developer that can help ?!?

 (Writing Webmin modules in perl is not good, if you work mainly with php,
 and webmin can be the best remote administration utility...)

 thanks to all,
  waiting for some news...
 prakash


 --
 PHP General Mailing List (http://www.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] include redirects

2002-01-29 Thread Calin Uioreanu

Hi all,

I have a problem with a redirect. I have a file that includes a content from
another PHP script,
parses the content as string with output buffering and displays it.

The problem is that the include function doesn't seem to handle redirects.
When that other
PHP script makes a Header relocate the fopen from my initial file is lost
and I get
Warning  fopen No such file or directory
I get the same when I try include.

Do you know a solution to insert remote content handling eventual redirects
in the remote?
Something like a browser.

--

Regards,
--
Calin Uioreanu
[EMAIL PROTECTED]
Tel: +49 - (0) 89 - 25 55 17 07
http://www.ciao.com
München, Germany
--



-- 
PHP General Mailing List (http://www.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: How can I retrieve the HTTP Response Headers

2002-01-29 Thread Alexandre Ferreira Novello

Hello guys,

I asked that before, but I will explain my problem with more details.

How can I retrieve the HTTP Response Headers using iPlanet or an
independent SAPI function?

Does these variables could come in any $HTTP_*_VARS or $_*?

In Apache we have a function called getallheaders(), but this functions
only returns the HTTP Request Headers, I need the HTTP Response Headers
and it works only under Apache.

For example, suppose there is a function called getallresponseheaders()
that is independent of the Web Server (in fact I did one that just works
under apache,
because it is similar to the getallheaders())

If I write a script like this:

?
header(TEST_HEADER: TEST_VALUE);
var_dump(getallresponseheaders());
?

I would like to have a result like this:

array(2) {
   [X-Powered-By]=
   string(12) PHP/4.0.3pl1
   [TEST_HEADER]=
   string(10) TEST_VALUE
}

If anyone has any tip, please, don’t worry to write.

A whole project that is already done is dependent of just this feature.

Thanks a lot
Novello



-- 
PHP General Mailing List (http://www.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] Need a little help

2002-01-29 Thread Brian V Bonini

What browser are you using?

I just read in the annotated manual there
may be issues wiht this using ie5.x.

Do you have the script running on a public webserver
where I can try it from here just to see if
I get the same results?

-Brian

 -Original Message-
 From: Girish Nath [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 28, 2002 7:55 PM
 To: Brian V Bonini
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Need a little help


 Hi Brian

 I've just setup the RedirectMatch in Apache and tried the PHP script
 (test.php) out and it worked fine.

 The only thing that caused broken image symbols to appear was if the image
 redirect script (test.php) created any output before the header()
 functions.
 Check for whitespace or any functions that might be outputting error
 messages within test.php

 Regards


 Girish
 --
 www.girishnath.co.uk



 - Original Message -
 From: Brian V Bonini [EMAIL PROTECTED]
 To: Girish Nath [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 8:17 PM
 Subject: RE: [PHP] Need a little help


 hmmm, I think I see where your going but
 that either just puts out a lot of garbage
 on the screen:

 ¤X!lø`7-Y± Á\t1h^?(uT3è¡? J2¶'O\Ô'G)ÂGì^
 Ì-.téZ-ä(òS¡¹!n3pPßsfÔÓÄVoõ`\Z·Åô2'Ô?;Ur©e8òÞhS??0Ít^%;-,X
 âÑ9ºcI%,(CqxpR ¤Ô4ûȶÔ%03. Ì`?ÃåP? r ~éT
 ÀÃ^IÀ¦.Zª^:;}ä,ò,XOWýH0PE8´ä,Sx'À^µT÷Src`ÀÏÀrBÀ7í¨òT
 ÙÑç|+iûJFA?ERKfÙ4
 J³Ð²
 etc.

 or a broken image symbol.

 -B

  -Original Message-
  From: Girish Nath [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 28, 2002 11:21 AM
  To: Brian V Bonini
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Need a little help
 
 
  Hi
 
  This should send different images to the referer based on what
 parse_url()
  returns:
 
  ?php
 
   $url=parse_url($HTTP_REFERER);
   if ($url[host] == domain.com) {
$requestImage = images/domain_A.gif;
   }
   else {
$requestImage = images/domain_B.gif;
   }
 
   header (Content-Type: image/gif);
   header (Content-Length: . filesize($requestImage));
   header (Content-Disposition: filename= . $requestImage);
   readfile($requestImage);
 
  ?
 
  You may need to modify it a bit perhaps with a switch
 statement for more
  flexibilty. Let me know how you get on.
 
  Regards
 
 
  Girish
  --
  www.girishnath.co.uk
 
 
 
 
  - Original Message -
  From: Brian V Bonini [EMAIL PROTECTED]
  To: PHP Lists [EMAIL PROTECTED]
  Sent: Monday, January 28, 2002 4:02 PM
  Subject: [PHP] Need a little help
 
 
  I'm trying to redirect based on referring host
  and request.
 
  I have an .htaccess set up like this:
  RedirectMatch (.*)\.gif$ http://www.domain.com/_borders/test.php
  to redirect all requests for .gif's to a php script which then
  determines the referring host.
 
  $url=parse_url($HTTP_REFERER);
  if ($url[host] == domain.com) {
  file://this is where I get stuck
do something
  } else {do some thing}
 
  how to I return the correct image. I.e. if the referring page
  has an img src=mydomain.com/image link and I redirect requests for
  that image to the php script to determine the host how can I now
  return a different image for display into the page. Make sense?
  Is it possible?
 
  -Brian
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  PHP General Mailing List (http://www.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] Opening an URL on an new window

2002-01-29 Thread David Otton

On Tue, 29 Jan 2002 09:46:39 -0200, you wrote:

There is a way to open an URL in a new window

a href=blah target=_blank/a

using JAVASCRIP commands as such as window.open

[windowVar = ][window].open(URL, windowName, [windowFeatures])

Where windowFeatures is a comma-separated list of any of the following
:

   toolbar[=yes|no]|[=1|0]
   location[=yes|no]|[=1|0]
   directories[=yes|no]|[=1|0]
   status[=yes|no]|[=1|0]
   menubar[=yes|no]|[=1|0]
   scrollbars[=yes|no]|[=1|0]
   resizable[=yes|no]|[=1|0]
   width=pixels
   height=pixels

where is the documentation for JAVASCRIP commands ?

http://directory.google.com/Top/Computers/Programming/Languages/JavaScript/References/

thanks

But please don't do this without a very good reason. It disrupts the
flow of the user's session, and only serves to annoy him. Trying to
second-guess the user's needs in this way is bad user-interface
design.

(Oh, and you posted to a PHP list... you know that, right?)

Eduardo Melo
copmuter programmer

*sigh*...

djo


-- 
PHP General Mailing List (http://www.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] is create_function slow?

2002-01-29 Thread Emile Bosch

Hi, is create function slow? Or has it a very significant slowdown compared
to an include?

i might want to create functions on the fly if it isn't tooo slow..

warm regards,
Emile Bosch



-- 
PHP General Mailing List (http://www.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] is create_function slow?

2002-01-29 Thread Edward van Bilderbeek - Bean IT

including a file is nothing more then placing the text of the include file
at the place you called include() so I think there's no reason why it
should be quicker or slower...

Edward



Hi, is create function slow? Or has it a very significant slowdown compared
to an include?

i might want to create functions on the fly if it isn't tooo slow..

warm regards,
Emile Bosch



--
PHP General Mailing List (http://www.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] include redirects

2002-01-29 Thread David Otton

On Tue, 29 Jan 2002 12:51:15 +0100, you wrote:

Do you know a solution to insert remote content handling eventual redirects
in the remote?
Something like a browser.

fopen() the file you're trying to include, and handle the response
from the server yourself. If it returns 301 or 302, you have to find
the Location header, parse the URL out of it, and retry the fopen().

When you finally have a URL that returns 200 OK, include() it.

Having said that, I'd bet there's a class somewhere that will do the
response parsing for you.
http://php.resourceindex.com/Functions_and_Classes/Clients_and_Servers/HTTP/

Yes, this is a failing of the include() statement... it really should
handle HTTP response codes if it's going to do HTTP. I'm kinda
surprised it doesn't... are you certain?

djo


-- 
PHP General Mailing List (http://www.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] One form - Two emails, I need some help please

2002-01-29 Thread Edward R. Bailey

Hi,

I am trying to submit the contents of a form via email to a set address
and then send a confirmation email based on the entered email address
from the form.

Sending the confirmation email works fine but the second email
confirming delievery of the email is not working. Right now the script
is not picking up the user email varible from the form. The email field
name is biz_email and you can see where I set the varible in the script
$mailto=$biz_email. When I test the form I get the first email without
any problems but the second email comes back to me with the error
stating the user is unknown and I see nobody@domain name in the To:
field. So I guess the varible from the form is not being picked up. Any
ideas

Below is the relevent code - I would greatly appreciate any help -
thanks

if (isset($PHP_MAIL_FORM)) {
include(classes/MailClass.php);
$tgFormMail=new phpMailer();
$mailto= Webmaster Form Submission email address;
$subject=Basic Registration Submission Form;
$from=Website;
$FormMail_sent =home.php;
if ($from ==){
$lol =$HTTP_HOST;
$a = str_replace (www.,,$lol);
$replaced = webmaster@$a;
$from = $replaced;
}
if($subject ==){
$subject =Server Generated Email;
}
$i=0;
$arr = array($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$mex = $mex.$key: $val\n;
}
$FormMail-AddSender($from,$HTTP_HOST);
$FormMail-AddAddress($mailto,$mailto);
$FormMail-SetSubject($subject);
$FormMail-AddBody($mex);
$FormMail-Send();
if($tgFormMail_sent != ){
header(Location: $FormMail_sent);
}
}
if ($PHP_MAIL_FORM=true){
   include(classes/MailClass.php);
   $FormMail=new phpMailer();
   $mailto=$biz_email;
   $subject1=Your Submission has been recieved;
   $message=Submission email body;
 
   $FormMail-AddSender($from,$HTTP_HOST);
   $FormMail-AddAddress($to,$to);
   $FormMail-SetSubject($subject1);
   $FormMail-AddBody($messsage);
   $FormMail-Send();
if($tgFormMail_sent != ){
header(Location: $FormMail_sent);
}
}


-- 
PHP General Mailing List (http://www.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] broken imap client?

2002-01-29 Thread Cary Mathews


  I've been trying to compile php_4.1.1 with imap support for the last
  couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
  of the c-client2000 libraries, along with the source of pine4.44, which
  uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
  and it configures and builds just fine.  But when I attempt to install it
  as a DSO in Apache, and do an apachectl configtest I get the following:
  /usr/libexec/ld.so: Undefined symbol _mail_string in
  httpd:/usr/local/apache/libexec/libphp4.so
 
  So I try to install it as a static module in Apache, and Apache bombs on
  the build with:
  /usr/libexec/ld.so: Undefined symbol _mm_dlog in
  gen_test_char:{lib dir}/libc-client.so.2.1
  *** Error code 1

 a common mistake in compiling php is thinking installing the c-client on
 your system is enough :)

 a little cut'n'paste from the docs:

[snip cut'n'paste]

 did you rename the files?


(Was I supposed to rename the files?) I've followed the directions from
the docmuentation, to the 'T'. Unless apache is looking for the rfc822.h
et al in /usr/local/include and _not_ /usr/local/include/c-client, I
don't see why I'm having  so many problems.  I'll try moving those *.h
files up a directory and try once more...[sigh]

[snip some rant about the c-client being broken... ;-)]

 the c-client libs arnt broken :)
I'll take your word for it. But as for getting it to work...

--Cary


-- 
PHP General Mailing List (http://www.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] create xml document with PHP

2002-01-29 Thread Rodrigo Peres

Hi list,

I'm new to the xml world, and I need to create a page with data retrieved
from my database using PHP. The process is the same of create an html page??
I mean I can use echo to output the xml tags and values?? Since this page
will be dinamically generated what kind of headers I need to use to this
page become an xml???
I saw many docs in web but all about parse an xml, but not in how to build
one.
-- 



Thank's in advance

Rodrigo


-- 
PHP General Mailing List (http://www.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: HOWTO: detect browser's script enabled?

2002-01-29 Thread Todor Stoyanov

use the noscript/noscript   tag


Ivo Stoykov [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi

 I've fillowing (dull perhaps) question:

 Could I chanck somehow whether the browser has script enabled. I'd like to
 use it for my statistics.
 I saw such into http://www.extreme-dm.com/tracking/ free tracking service.

 Thank you.

 Ivo





-- 
PHP General Mailing List (http://www.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] preg_match won't match elements

2002-01-29 Thread Larry Brown

I have two arrays and need to perform the array_diff function.  However,
since it is broken in 4.x, I'm trying to get the same outcome.  Due to the
nature of my call to this function the selected is always going to be a
number of items selected from the connections.  For some reason the outcome
does not work sometimes.  The following is the code I set up.  Please excuse
any poor abilities on my part for constructing the code efficiently (I'm
pretty new at this stuff)

function array_dif($slctd, $connctns)
{
for($i = 0; $i  count($slctd); $i++)
{
if(preg_match(/\b$slctd[$i]\b/, $connctns[$i]))
{
unset($connctns[$i]);
unset($slctd[$i]);
echo match0;
}
for($j = 1 ; $j  count($connctns); $j++)
{
if(preg_match(/\b$slctd[$i]\b/, $connctns[$j]))
{
unset($connctns[$j]);
unset($slctd[$i]);
echo match[$i];
}
}
}
$k = array_merge($connctns, $selected);
return $k;
}

$selected = preg_split(/\,/, $pltoload);
echo THSelect:TH;
echo 'BRselect multiple name=plutoload[]';

for ($i = 0; $i  count($selected); $i++)
{
echo 'option selected value=', $selected[$i], '', 
$selected[$i];
$trimselect = array();
array_push($trimselect, (trim($selected[$i])));
}
$unselect = array_dif($trimselect, $connections);
for ($s = 0; $s  count($unselect); $s++)
{
echo 'option value=conn ', $unselect[$s], '', $unselect[$s];
}
echo /select;

I trimmed the selected value of white spaces and left the connection
elements alone.  Note the value of $pltoload will be connection, connection,
connection or connection,connection,connection.  If anyone can tell why some
matches don't work when I can view the element in each array and they are
identical in the exception of the key value within their respective array.


Larry

PS. HTML-Kit kicks butt!



-- 
PHP General Mailing List (http://www.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] Feature requests for PHP development - where to post them?

2002-01-29 Thread Stefan Rusterholz

Is there a place especially meant to make feature-requests to the
php-development team?

TIA
stefan rusterholz


-- 
PHP General Mailing List (http://www.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] Custom email after form submission

2002-01-29 Thread Edward R. Bailey

Can anyone point me in the right direction about how to send a custom
email to a user after a form submission. The user would provide their
email address in the form.

Thanks

Ed


-- 
PHP General Mailing List (http://www.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] Custom email after form submission

2002-01-29 Thread Jason Cox

Sorry. I forgot to reply to the list.

- Original Message -
From: Jason Cox [EMAIL PROTECTED]
To: Edward R. Bailey [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 8:27 AM
Subject: Re: [PHP] Custom email after form submission


 Ed,

 Check the manual for the mail() function.  Here's a link:
 http://www.php.net/manual/en/ref.mail.php

 Good Luck,
 Jason Cox

 - Original Message -
 From: Edward R. Bailey [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 29, 2002 8:25 AM
 Subject: [PHP] Custom email after form submission


  Can anyone point me in the right direction about how to send a custom
  email to a user after a form submission. The user would provide their
  email address in the form.
 
  Thanks
 
  Ed
 
 
  --
  PHP General Mailing List (http://www.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: One form - Two emails, I need some help please

2002-01-29 Thread Michael Kimsal

Edward R. Bailey wrote:

if ($PHP_MAIL_FORM=true){

should probably be

if ($PHP_MAIL_FORM==true){



Try that.


Michael Kimsal
http://www.tapinternet.com/php
PHP Training Courses
734-480-9961





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




php-general Digest 29 Jan 2002 16:25:18 -0000 Issue 1140

2002-01-29 Thread php-general-digest-help


php-general Digest 29 Jan 2002 16:25:18 - Issue 1140

Topics (messages 82513 through 82571):

Re: upload permission denied!
82513 by: Jason Wong
82515 by: Girish Nath
82527 by: sundogcurt
82530 by: Mike Frazer

Re: Session updates ok first time only.
82514 by: Jason Wong

Re: problem with relative header
82516 by: Bogdan Stancescu

Re: Resalution Dection
82517 by: Justin French

Re: Back button to Query Pages
82518 by: phantom

Mysql Connection
82519 by: Uma Shankari T.
82520 by: Chris Grigor
82523 by: Uma Shankari T.
82524 by: Jason Wong
82536 by: David Robley

question the function begin with @
82521 by: Vincent Ma
82522 by: Chris Randall
82525 by: Jason Wong

Re: why isn't this working? (many questions inside)
82526 by: Robin Chen

After installing php-imap RPM, there's no --enable-imap when phpinfo()
82528 by: gaukia 345

Re: Paypal Instant Payment Notification
82529 by: Sondra Russell
82555 by: David

Re: php vs asp
82531 by: Mike Frazer

[ANNOUNCEMENT] Phpauction 2.1 released
82532 by: Gianluca Baldo

Re: How do I use a confirm box to confirm before deletion from a database
82533 by: Mike Frazer

broken imap client?
82534 by: Cary Mathews
82564 by: Cary Mathews

Re: mailing to 19000 users
82535 by: Kancha .
82542 by: val petruchek
82552 by: Stefan Rusterholz

--enable-transid and slash URI's
82537 by: Tomek Golembiewski
82540 by: Yasuo Ohgaki

Re: Initializing Array
82538 by: Tim Ward

HOWTO: detect browser's script enabled?
82539 by: Ivo Stoykov
82547 by: Martin Thoma
82566 by: Todor Stoyanov

how to specify custom http header in fopen(http://...;,...)
82541 by: g.p.ciceri
82546 by: Joffrey van Wageningen

FOUND SOLUTION
82543 by: phantom

Re: browser back button - Page has Expired..  problem
82544 by: phantom

Error executing PHP-Scripts
82545 by: Heiko Schneebeck

configuring php and apache
82548 by: liz lynch
82550 by: Neil Freeman
82551 by: Neil Freeman
82553 by: Mike Maltese

Re: PHP and Webmin...
82549 by: Prakash

Opening an URL on an new window
82554 by: Eduardo Melo
82559 by: David Otton

include redirects
82556 by: Calin Uioreanu
82562 by: David Otton

HOW TO: How can I retrieve the HTTP Response Headers
82557 by: Alexandre Ferreira Novello

Re: Need a little help
82558 by: Brian V Bonini

is create_function slow?
82560 by: Emile Bosch
82561 by: Edward van Bilderbeek - Bean IT

One form - Two emails, I need some help please
82563 by: Edward R. Bailey
82571 by: Michael Kimsal

create xml document with PHP
82565 by: Rodrigo Peres

preg_match won't match elements
82567 by: Larry Brown

Feature requests for PHP development - where to post them?
82568 by: Stefan Rusterholz

Custom email after form submission
82569 by: Edward R. Bailey
82570 by: Jason Cox

Administrivia:

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

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

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


--

---BeginMessage---

On Tuesday 29 January 2002 11:48, sundogcurt wrote:

 the directory permissions are set to 777 / 0777 any user, any group,
 etc. at least that is how I understand it. if i'm wrong please correct
 me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it 
should be OK. The only thing is whether you have set the *correct* directory? 
According to your code, I believe the file will be copied to:

  /home/gruesome/public_html/valeriemacwilliam/includes/content/
  
Is this correct?


-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
If you have never been hated by your child, you have never been a parent.
-- Bette Davis
*/

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

Hi

For some reason i couldn't get the 777 thing to work on one of my hosts but
managed to get this syntax to work instead :

chmod o=rwx directoryname

***It's not exactly secure but might get the job done ***

Regards


Girish
--
www.girishnath.co.uk


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 3:55 AM
Subject: Re: [PHP] upload permission denied!


On Tuesday 29 January 2002 11:48, sundogcurt wrote:

 the directory permissions are set to 777 / 0777 any user, any group,
 etc. at least that is how I understand it. if i'm wrong please correct
 me, I do appreciate the help thank you.

If they're set to 777 then anybody can do anything to it which means it
should be OK. The only 

RE: [PHP] Re: One form - Two emails, I need some help please

2002-01-29 Thread Matt Schroebel

And I write those as (true == $PHP_MAIL_FORM) so the parser will catch the missing 
second equal sign. 
This won't parse: (true = $PHP_MAIL_FORM)

Edward R. Bailey wrote:
if ($PHP_MAIL_FORM=true){
should probably be
if ($PHP_MAIL_FORM==true){



-- 
PHP General Mailing List (http://www.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: create xml document with PHP

2002-01-29 Thread J Smith


The only real difference between HTML and XML (besides the obvious 
standards and formats and such) is the MIME type, I believe. HTML has a 
text/html MIME type, while XML can have a whole bunch, depending on what 
the XML is supposed to do. (I.e. text/xml, application/xml, 
application/xml-dtd, etc.)

Try outputing the XML using text/xml as the MIME type by using

header(Content-type: text/xml);

at the beginning of your script. (Or at least as the first bit of output -- 
nothing should come before the headers.

J


Rodrigo Peres wrote:

 Hi list,
 
 I'm new to the xml world, and I need to create a page with data retrieved
 from my database using PHP. The process is the same of create an html
 page?? I mean I can use echo to output the xml tags and values?? Since
 this page will be dinamically generated what kind of headers I need to use
 to this page become an xml???
 I saw many docs in web but all about parse an xml, but not in how to build
 one.


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




[PHP] --enable-ftp in RedHat 7.0

2002-01-29 Thread Ing. Gustavo Edelstein

Hi members,
How can I install the PHP4 rpm with ftp support in RedHat 7.0 ? 
Thanks,

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com 
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [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] Write an array to a file

2002-01-29 Thread Scott Saraniero

Hi,

How do I write an array to a file? For example, I need to write just this in
a file:
?php $Company = array(Item 1, Item 2, Item 3, Item 4, Item 5,);
?

I've been hung up for 2 days on this. Any help would be appreciated.

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] Write an array to a file

2002-01-29 Thread Chris Boget

 How do I write an array to a file? For example, I need to write just this in
 a file:
 ?php $Company = array(Item 1, Item 2, Item 3, Item 4, Item 5,);
 ?
 I've been hung up for 2 days on this. Any help would be appreciated.

Use serialize prior to writing the data to the file and unserialize upon retrieval.

Chris


-- 
PHP General Mailing List (http://www.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] Win32 : php_gd.dll (GIF, PNG, WBMP et JPEG)

2002-01-29 Thread php-general

I found a dll to generate gif under windows.
It work with php 4.0.6, 4,0.4 but it dosen't work with php 4.1.1

link ? tips ?

thanks

franck


-- 
PHP General Mailing List (http://www.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: broken imap client?

2002-01-29 Thread Mike Frazer

I also think there are a few bugs with IMAP.  I have 4.0.1 (time to update,
I know...see below) and have experienced a few problems with the imap_*()
functions:

1 - Enabled pop3d on system; set protocol to pop3; unable to retrieve
mailbox listings.  Pop3d working properly under manual connections (telnet
to localhost port 110)
2 - Swtiched to imapd; connections work perfectly; when listing mailboxes I
instead get a list of *every single file* on my system.

Mind you I've not used these functions in the past; however, I don't see how
this could be expected behavior.

Tried to upgrade yesterday but it seemed as if there was a problem with the
archive.  Recieved unexpected EOF in archive file.  I didn't get a chance to
re-download it, I'll do that today and report if there are any problems
still.

Mike Frazer



Cary Mathews [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I've been trying to compile php_4.1.1 with imap support for the last
 couple of days (seems like weeks!). I have the OpenBSD 2.9 ports version
 of the c-client2000 libraries, along with the source of pine4.44, which
 uses the same libraries, I think.  I can ./configure --with-imap={lib dir}
 and it configures and builds just fine.  But when I attempt to install it
 as a DSO in Apache, and do an apachectl configtest I get the following:
 /usr/libexec/ld.so: Undefined symbol _mail_string in
 httpd:/usr/local/apache/libexec/libphp4.so

 So I try to install it as a static module in Apache, and Apache bombs on
 the build with:
 /usr/libexec/ld.so: Undefined symbol _mm_dlog in
 gen_test_char:{lib dir}/libc-client.so.2.1
 *** Error code 1

 In short, I think the c-client libraries are broken, at least as far as
 php is concerned, but the php documentation says that the c-client libs
 are required for IMAP support.  Can someone help me understand what I am
 doing wrong?

 Thanks in advance,
 Cary





-- 
PHP General Mailing List (http://www.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] sessions bw http and https hosts in same domain

2002-01-29 Thread razorfish


Problem: hosts http://www.; and https://secure.; of the same domain need
to work with the same browser session_id.  This is a
login/authenticate/redirect scenario.  In this case the session data store
is a common MySQL database, so the issues of /tmp sharing, NFS, etc. are set
aside.  My platform is Apache 1.3.22 and RH Linux 7.1.

What PHP v4.1.x method of exchanging the session_id and session_name is most
secure, most effective, and generally makes good soup?

I've had some success with initial tests in appending
'?PHPSESSID=29AE490...' to the URL and link hrefs, but that really seems
ugly and unnecessary. hopefully there's a better way!?

This question seems to get asked a lot in the archives but there doesn't
seem to be a guideline resolution.

PLEASE and THANK YOU!
RF.



-- 
PHP General Mailing List (http://www.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] Cobalt RAQ4 apache config index.php

2002-01-29 Thread Beeman

I am using a Cobalt RAQ4 server and need to edit my config file to allow
index.php as the directory index. the config file appears non standard, ad
it has the pearl for the web based server administration.. What and where do
I need to add the DirectoryIndex? also how do I disable the directory
listing.



-- 
PHP General Mailing List (http://www.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: Cobalt RAQ4 apache config index.php

2002-01-29 Thread Mike Frazer

RaQ4 systems still use what is *basically* a standard config (the only real
difference is some really stupid Perl code for SSL that can screw the whole
system up).  I don't recall where in the Web-based admin area you change
these values, but the httpd.conf still has the DirectoryIndex line.  Just
open it in a text editor and do a search for DirectoryIndex.

NOTE: Remember that changing these files manually will void your Cobalt
warranty!

Mike Frazer


Beeman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I am using a Cobalt RAQ4 server and need to edit my config file to allow
 index.php as the directory index. the config file appears non standard, ad
 it has the pearl for the web based server administration.. What and where
do
 I need to add the DirectoryIndex? also how do I disable the directory
 listing.





-- 
PHP General Mailing List (http://www.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: Cobalt RAQ4 apache config index.php

2002-01-29 Thread Beeman

The config file currently doesn't have any occurance of DirectoryIndex, can
I just add it within the virtual host for the site that I want to modify. it
currently will default to index.html or index.htm and then the directory
listing if neither index is found. Is the DIrectoryIndex param similiar to
IIS where you can enter multiple values, and it searches for the index in
the order they are in the list??
Mike Frazer [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 RaQ4 systems still use what is *basically* a standard config (the only
real
 difference is some really stupid Perl code for SSL that can screw the
whole
 system up).  I don't recall where in the Web-based admin area you change
 these values, but the httpd.conf still has the DirectoryIndex line.  Just
 open it in a text editor and do a search for DirectoryIndex.

 NOTE: Remember that changing these files manually will void your Cobalt
 warranty!

 Mike Frazer


 Beeman [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I am using a Cobalt RAQ4 server and need to edit my config file to allow
  index.php as the directory index. the config file appears non standard,
ad
  it has the pearl for the web based server administration.. What and
where
 do
  I need to add the DirectoryIndex? also how do I disable the directory
  listing.
 
 





-- 
PHP General Mailing List (http://www.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] HOWTO Q: detect browser's script enabled? - II

2002-01-29 Thread Ivo Stoykov

Hello again

earlier today I asked about detecting whether javascript is enabled on the
visitor's browser (bellow are the question and answeres received). I'd like
to clear - I do not want to take any following actions - I'd just like to
detect this for statistial purposes
(as is released into http://extremetracking.com/open;sum?login=bissclub for
instance).

So I cannot see and use of noscript or script src=file.js/script .

All day long I'm digging any newsgroups I can think out but didn't find any
solution. Is this a hard question or no one is using such detections? Or I
do not search the right groups?

All the best

Ivo

 Hi

 I've fillowing (dull perhaps) question:

 Could I chanck somehow whether the browser has script enabled. I'd like to
 use it for my statistics.
 I saw such into http://www.extreme-dm.com/tracking/ free tracking service.

 Thank you.

 Ivo

Todor Stoyanov [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 use the noscript/noscript   tag


 Ivo Stoykov [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi
 
  I've fillowing (dull perhaps) question:
 
  Could I chanck somehow whether the browser has script enabled. I'd like
to
  use it for my statistics.
  I saw such into http://www.extreme-dm.com/tracking/ free tracking
service.
 
  Thank you.
 
  Ivo
 
 




Martin Thoma [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hm, the easiest way would be, try
 SCRIPT LANGUAGE=Javascript SRC=myfile.js/SCRIPT

 where myfile.js contains simply nothing. Everytime the file is downloaded,
 someone uses Javascript.







-- 
PHP General Mailing List (http://www.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] Session updates ok first time only.

2002-01-29 Thread Floyd Baker

On Tue, 29 Jan 2002 12:11:02 +0800, you wrote:

On Tuesday 29 January 2002 06:36, Floyd Baker wrote:

 Yes I have a c:\tmp directory and I see the session being created in
 it.  And the page_view value of 1 after the first increment.  The
 editor wants to reload each time I hit the submit button after that
 but the value does not increase beyond 1.  It is also the same session
 each time.  No new sessions are being created.

 I have turned on the log and keep getting undefined_variables for
 those two lines in each page that call $page_view before it's
 incremented, unless I am engaging the $_SESSION call.  Then
 $table_view becomes 1 and there are no errors.  But the incremented
 value doesn't hold up.

 Almost like nothing is happening.., except the *editor* thinks there
 is something going on when looking at the session file??  Like a one
 is being loaded each time.  How could that be?  Or the original one is
 staying even though an overwrite is being attempted.

Here's an interesting snippet from the manual:

The track_vars and register_globals configuration settings influence how the 
session variables get stored and restored.
  
Note: As of PHP 4.0.3, track_vars is
 always turned on.
   
If track_vars is enabled and register_globals is disabled, only members of 
the global associative array $HTTP_SESSION_VARS can be registered as session 
variables. The restored session variables will only be available in the array
$HTTP_SESSION_VARS.

Try the simple example in the manual:

?php
session_register(count);
$_SESSION[count]++;
echo Count is  . $_SESSION[count];
?

Wow...  That works.  Al right!  You mean you can only increment
directly in the session register and *then* pull the value.., instead
of pulling it first and then incrementing?   Is that the basic concept
that I should to keep in mind?  I can do that...  :0)

You're all right Jason.  This is a terrific help for me.  And I'm
definitely going to print a hardcopy of the man...  Looks like using
the on-line or even the pd on screen isn't working out too well.

With the changes going on, this is probably something that will come
up again and again for some time to come.  Nice to have it figured
out, eh?  

And I'll do some more tests, etc. and put a little follow up here on
anything else I see.  

Floyd



 Now I have uploaded these scripts to my isp and they do not work up
 there either.  That is, using his ini, his php 4.0 with
 register_globals on, etc.  Could you perhaps test these scripts on
 your machine or create an 'accumulating' routine of your own that
 works?   So I can see where the difference might be coming in?

Your original scripts with the changes I suggested works on my system. 

--


-- 
PHP General Mailing List (http://www.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] Possible to measure CPU and Ram used with PHP?

2002-01-29 Thread Jeff Lewis

Is it possible to measure the amount of RAM or CPU power used to process a
particular file written in PHP?  Can the values be grabbed and displayed
with PHP?

Jeff


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




Re: [PHP] Session updates ok first time only.

2002-01-29 Thread Floyd Baker


Jason put a little snip from the man that he found that works just
fine on my pages.

It looks like you increment or change the variable directly in the
session register instead of doing it on the page.

That sounds suspiciously like what you were trying to tell me.  :-)

What do you think... 
  





On Tue, 29 Jan 2002 12:11:02 +0800, you wrote:

On Tuesday 29 January 2002 06:36, Floyd Baker wrote:

 Yes I have a c:\tmp directory and I see the session being created in
 it.  And the page_view value of 1 after the first increment.  The
 editor wants to reload each time I hit the submit button after that
 but the value does not increase beyond 1.  It is also the same session
 each time.  No new sessions are being created.

 I have turned on the log and keep getting undefined_variables for
 those two lines in each page that call $page_view before it's
 incremented, unless I am engaging the $_SESSION call.  Then
 $table_view becomes 1 and there are no errors.  But the incremented
 value doesn't hold up.

 Almost like nothing is happening.., except the *editor* thinks there
 is something going on when looking at the session file??  Like a one
 is being loaded each time.  How could that be?  Or the original one is
 staying even though an overwrite is being attempted.

Here's an interesting snippet from the manual:

The track_vars and register_globals configuration settings influence how the 
session variables get stored and restored.
  
Note: As of PHP 4.0.3, track_vars is
 always turned on.
   
If track_vars is enabled and register_globals is disabled, only members of 
the global associative array $HTTP_SESSION_VARS can be registered as session 
variables. The restored session variables will only be available in the array
$HTTP_SESSION_VARS.

Try the simple example in the manual:

?php
session_register(count);
$_SESSION[count]++;
echo Count is  . $_SESSION[count];
?

Wow...  That works.  Al right!  You mean you can only increment
directly in the session register and *then* pull the value.., instead
of pulling it first and then incrementing?   Is that the basic concept
that I should to keep in mind?  I can do that...  :0)

You're all right Jason.  This is a terrific help for me.  And I'm
definitely going to print a hardcopy of the man...  Looks like using
the on-line or even the pd on screen isn't working out too well.

With the changes going on, this is probably something that will come
up again and again for some time to come.  Nice to have it figured
out, eh?  

And I'll do some more tests, etc. and put a little follow up here on
anything else I see.  

Floyd



 Now I have uploaded these scripts to my isp and they do not work up
 there either.  That is, using his ini, his php 4.0 with
 register_globals on, etc.  Could you perhaps test these scripts on
 your machine or create an 'accumulating' routine of your own that
 works?   So I can see where the difference might be coming in?

Your original scripts with the changes I suggested works on my system. 

--


-- 
PHP General Mailing List (http://www.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] Array() Limit

2002-01-29 Thread Zach Curtis

Is there a limit to the number of key=value pairs that can be stored in an
array? Or is this more a function of RAM limits?

Thanks.


Zach Curtis
POPULUS


-- 
PHP General Mailing List (http://www.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] Write an array to a file

2002-01-29 Thread Greg Schnippel

Scott -

You can just write it as a pipe-delimited file, write it 
to the file, and then read it back in. Use implode and explode:

$company = array(Item 1, Item 2, Item 3, Item 4);

#-
#
# Output array 
#

$output_string = implode(|, $company);

 write $output_string to a file 

#
# Read array from file
#

if (!$file=fopen(file.txt, r)) {
echo Error opening file;
} else {
$input_string = fread($file,2048);
}

$company = explode(|, $input_string);

#-

-schnippy

 -Original Message-
 From: Scott Saraniero [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 29, 2002 12:34 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Write an array to a file
 
 
 Hi,
 
 How do I write an array to a file? For example, I need to 
 write just this in
 a file:
 ?php $Company = array(Item 1, Item 2, Item 3, Item 
 4, Item 5,);
 ?
 
 I've been hung up for 2 days on this. Any help would be appreciated.
 
 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] Re: Cobalt RAQ4 apache config index.php

2002-01-29 Thread Mike Frazer

I don't remember if the DirectoryIndex directive is usable inside VHosts, it
might just be global.  But yes, to use it add the following line:

DirectoryIndex filename1 filename2 filename3

Add as many as you want, and use any names you want.  Recommended order
would be something along the lines of

DirectoryIndex index.htm index.html index.shtml index.php index.php3
index.cgi

Mike Frazer



Beeman [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 The config file currently doesn't have any occurance of DirectoryIndex,
can
 I just add it within the virtual host for the site that I want to modify.
it
 currently will default to index.html or index.htm and then the directory
 listing if neither index is found. Is the DIrectoryIndex param similiar to
 IIS where you can enter multiple values, and it searches for the index in
 the order they are in the list??
 Mike Frazer [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  RaQ4 systems still use what is *basically* a standard config (the only
 real
  difference is some really stupid Perl code for SSL that can screw the
 whole
  system up).  I don't recall where in the Web-based admin area you change
  these values, but the httpd.conf still has the DirectoryIndex line.
Just
  open it in a text editor and do a search for DirectoryIndex.
 
  NOTE: Remember that changing these files manually will void your Cobalt
  warranty!
 
  Mike Frazer
 
 
  Beeman [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   I am using a Cobalt RAQ4 server and need to edit my config file to
allow
   index.php as the directory index. the config file appears non
standard,
 ad
   it has the pearl for the web based server administration.. What and
 where
  do
   I need to add the DirectoryIndex? also how do I disable the directory
   listing.
  
  
 
 





-- 
PHP General Mailing List (http://www.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: Array() Limit

2002-01-29 Thread Ivo Stoykov

RAM is less then max 32 bit number anyway.

Ivo

Zach Curtis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there a limit to the number of key=value pairs that can be stored in an
 array? Or is this more a function of RAM limits?

 Thanks.


 Zach Curtis
 POPULUS




-- 
PHP General Mailing List (http://www.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] sockets

2002-01-29 Thread Kunal Jhunjhunwala

hey..
does anyone know of any good resources for using sockets? which will also
explain using sockets to connect to various protocols? like ftp, httpd,
mysql etc? Also, somewhere one can read on writing a connection deamon...
Thanks!
Regards,
Kunal Jhunjhunwala


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




[PHP] Re: Array() Limit

2002-01-29 Thread Mike Frazer

Obviously RAM will come into play in this but there is a system-dependent
limit.  I forget which type it uses (int, double, long, etc) to determine
this limit, but math in computers is always finite, as there will always be
a maximum limit, depending on how many bits your system is capable of
handling.

Mike Frazer




Zach Curtis [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Is there a limit to the number of key=value pairs that can be stored in an
 array? Or is this more a function of RAM limits?

 Thanks.


 Zach Curtis
 POPULUS




-- 
PHP General Mailing List (http://www.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] Array() Limit

2002-01-29 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Zach Curtis blurted
 Is there a limit to the number of key=value pairs that can be stored in an
 array? Or is this more a function of RAM limits?

AFAIK it would just be a resources issue.
Are you just curious, or.?

- -- 

Nick Wilson

Tel:+45 3325 0688
Fax:+45 3325 0677
Web:www.explodingnet.com



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.6 (GNU/Linux)

iD8DBQE8VvbrHpvrrTa6L5oRAuq4AJ0Q2uMbOfIrFIWwFQIUTMjGj2PIBgCeLxFw
mRFyp0zMCTI2E1knI3KCB9E=
=zSdf
-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]




Re: [PHP] Write an array to a file

2002-01-29 Thread Mike Frazer

More than one way to skin a cat :)  The question obviously is whether or not
you need to read this data back or if it will be static, unread data.  You
can use several forms here, including the one below.  However, you can use
for, while and foreach loops to handle it:

/*  for (...) method */
$fp = fopen(/path/to/file, w);  // open file for writing
for ($i = 0; $i  sizeof($array); $i++) {
$status = fwrite($fp, $array[$i]);  // Change the part with $array to
whatever you need to write
}
$status = fclose($fp);


/*  foreach (...) method */
$fp = fopen(/path/to/file, w);  // open file for writing
foreach ($array as $item) {
$status = fwrite($fp, $item);  // Change the part with $item to whatever
you need to write
}
$status = fclose($fp);


/*  while(...) method */
$fp = fopen(/path/to/file, w);  // open file for writing
while (list($key, $val) = each($array)) {
$status = fwrite($fp, $val);  // Change the part with $val to whatever
you need to write
}
$status = fclose($fp);

There are other ways, as there always are with PHP.  However, these should
get you by in just about any circumstance.

Mike Frazer




Greg Schnippel [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Scott -

You can just write it as a pipe-delimited file, write it
to the file, and then read it back in. Use implode and explode:

$company = array(Item 1, Item 2, Item 3, Item 4);

#-
#
# Output array
#

$output_string = implode(|, $company);

 write $output_string to a file 

#
# Read array from file
#

if (!$file=fopen(file.txt, r)) {
echo Error opening file;
} else {
$input_string = fread($file,2048);
}

$company = explode(|, $input_string);

#-

-schnippy

 -Original Message-
 From: Scott Saraniero [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, January 29, 2002 12:34 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Write an array to a file


 Hi,

 How do I write an array to a file? For example, I need to
 write just this in
 a file:
 ?php $Company = array(Item 1, Item 2, Item 3, Item
 4, Item 5,);
 ?

 I've been hung up for 2 days on this. Any help would be appreciated.

 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] Re: sockets

2002-01-29 Thread Mike Frazer

Are you referring to PHP sockets or C sockets?  PHP sockets are an
implementation of C sockets (which is why most of the actiones needed are
the same in PHP but are somewhat simplified).

If you mean PHP sockets, you can try taking a look at WhoisPro, a
Whois/NICNAME script I wrote to understand how to implement sockets in PHP.
If you mean C sockets, well, I'm currently learning them myself.  Let me
know which you need and I can try to get you some resources for them.

Mike Frazer




Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message
03dd01c1a8f9$eb909a10$0301a8c0@CONFUSED">news:03dd01c1a8f9$eb909a10$0301a8c0@CONFUSED...
 hey..
 does anyone know of any good resources for using sockets? which will also
 explain using sockets to connect to various protocols? like ftp, httpd,
 mysql etc? Also, somewhere one can read on writing a connection deamon...
 Thanks!
 Regards,
 Kunal Jhunjhunwala




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




[PHP] Sending an e-mail to 1,000 people

2002-01-29 Thread Ben Clumeck

I would like to send an e-mail (the same e-mail) to 1,000 different people.
I want each persons name to be in the To: field.  Is there a way to
customize it to where it can say Dear (having a different persons name
corresponding to an e-mail address) so that it looks customized.

Thanks,

Ben


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




Re: [PHP] Re: sockets

2002-01-29 Thread Kunal Jhunjhunwala

Hey Mike,
I am looking for PHP sockets.. hence the php mailing list :P I hvent found
any decent resource on it.. orielly article is good for complete beginers..
but i was looking for something more detailed... any books anyone can
recommend would do too.. but i would prefer source to study :)
Regards,
Kunal Jhunjhunwala
- Original Message -
From: Mike Frazer [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, January 30, 2002 4:08 AM
Subject: [PHP] Re: sockets


 Are you referring to PHP sockets or C sockets?  PHP sockets are an
 implementation of C sockets (which is why most of the actiones needed are
 the same in PHP but are somewhat simplified).

 If you mean PHP sockets, you can try taking a look at WhoisPro, a
 Whois/NICNAME script I wrote to understand how to implement sockets in
PHP.
 If you mean C sockets, well, I'm currently learning them myself.  Let me
 know which you need and I can try to get you some resources for them.

 Mike Frazer




 Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message
 03dd01c1a8f9$eb909a10$0301a8c0@CONFUSED">news:03dd01c1a8f9$eb909a10$0301a8c0@CONFUSED...
  hey..
  does anyone know of any good resources for using sockets? which will
also
  explain using sockets to connect to various protocols? like ftp, httpd,
  mysql etc? Also, somewhere one can read on writing a connection
deamon...
  Thanks!
  Regards,
  Kunal Jhunjhunwala
 



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






-- 
PHP General Mailing List (http://www.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] Sending an e-mail to 1,000 people

2002-01-29 Thread Rick Emery

yes you can by using MYSQL to store the names, PHP to generate the letters
(or you can store letter template in database as well), and PHP's mail()
function will take you home.

-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 1:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sending an e-mail to 1,000 people


I would like to send an e-mail (the same e-mail) to 1,000 different people.
I want each persons name to be in the To: field.  Is there a way to
customize it to where it can say Dear (having a different persons name
corresponding to an e-mail address) so that it looks customized.

Thanks,

Ben


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

-- 
PHP General Mailing List (http://www.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] Combining my code

2002-01-29 Thread Scott Saraniero

Hi,

I've got two bits of code below that work fine, but I would like to combine
them if possible. The $check variable that is there is there now would
normally be passed from a form. Since the items in the '$Company = array()'
part would be passed into that section - how can this be done?

*
?php 

$check = array(Item1, Item2, Item3, Item4, Item5,);

for ($i=0; $icount($check); $i++) { print(\\\$check[$i]\\\, );
}
  

$fp = fopen(PR.inc, w+);
fwrite($fp,  ?php\n\$Company = array(\Item1\, \Item2\, \Item3\,
\Item4\, \Item5\);\n?);
fclose($fp);

?  
*

The end result would be for me to have

?php $Company = array(Item1, Item2, Item3, Item4, Item5); ?

written in the PR.inc file (for use as an include later).

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] Re: HOW TO: How can I retrieve the HTTP Response Headers

2002-01-29 Thread Manuel Lemos

Hello,

Alexandre Ferreira Novello wrote:
 
 Hello guys,
 
 I asked that before, but I will explain my problem with more details.
 
 How can I retrieve the HTTP Response Headers using iPlanet or an
 independent SAPI function?
 
 Does these variables could come in any $HTTP_*_VARS or $_*?

AFAIK there is no function to do that. Since your script is the one that
generates the headers, you are supposed to keep track of what headers
your script generates.


 A whole project that is already done is dependent of just this feature.

Why?

Why don't you create a replacement for the Header() function that
besides calling that function also stores the headers in a global array
variable as you need?

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.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: create xml document with PHP

2002-01-29 Thread Manuel Lemos

Hello,

Rodrigo Peres wrote:
 
 Hi list,
 
 I'm new to the xml world, and I need to create a page with data retrieved
 from my database using PHP. The process is the same of create an html page??
 I mean I can use echo to output the xml tags and values?? Since this page
 will be dinamically generated what kind of headers I need to use to this
 page become an xml???

I don't think serving XML directly to the browser is a good idea because
many browsers would not render it.


 I saw many docs in web but all about parse an xml, but not in how to build
 one.

This PHP class does exactly what you need. See the documentation for a
typical example.

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.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: create xml document with PHP

2002-01-29 Thread Manuel Lemos

Hello,

Rodrigo Peres wrote:
 
 Hi list,
 
 I'm new to the xml world, and I need to create a page with data retrieved
 from my database using PHP. The process is the same of create an html page??
 I mean I can use echo to output the xml tags and values?? Since this page
 will be dinamically generated what kind of headers I need to use to this
 page become an xml???

I don't think serving XML directly to the browser is a good idea because
many browsers would not render it.


 I saw many docs in web but all about parse an xml, but not in how to build
 one.

This PHP class does exactly what you need. See the documentation for a
typical example.

Regards,
Manuel Lemos

-- 
PHP General Mailing List (http://www.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: HOW TO: How can I retrieve the HTTP Response Headers

2002-01-29 Thread razorfish


check into libcurl and the php/curl integration.  You are certainly able to
process the response headers in curl.

 Hello,

 Alexandre Ferreira Novello wrote:

 Hello guys,

 I asked that before, but I will explain my problem with more details.

 How can I retrieve the HTTP Response Headers using iPlanet or an
 independent SAPI function?

 Does these variables could come in any $HTTP_*_VARS or $_*?

 AFAIK there is no function to do that. Since your script is the one
 that generates the headers, you are supposed to keep track of what
 headers your script generates.


 A whole project that is already done is dependent of just this
 feature.

 Why?

 Why don't you create a replacement for the Header() function that
 besides calling that function also stores the headers in a global array
 variable as you need?

 Regards,
 Manuel Lemos

 --
 PHP General Mailing List (http://www.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: HOWTO Q: detect browser's script enabled? - II

2002-01-29 Thread Arve Bersvendsen

Ivo Stoykov wrote in [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:

 Hello again
 
 earlier today I asked about detecting whether javascript is
 enabled on the visitor's browser (bellow are the question and
 answeres received). 

html
head
/head
body
script type=text/javascript

jsImg = new Image()
jsImg.src = js-yes.gif;

/script
noscript
img src=js-no.gif width=0 height=0 alt= /
/noscript  
/body
/html


Your access logs for the images js-yes.gif, and js-no.gif will give 
you stats over js/no-js.

If you need something more sophisticated, you can replace js-yes.gif 
and js-no.gif with serverside scripts that add the results to a 
database.

I have a sample php-script that gives you some of that functionality 
without resorting to database:

[jsenabled.php]
?php
  if ($js_==y){
$file = ay.txt;
  } else if ($js==n){
$file = an.txt;
  }
  $fp = fopen($file,a);
  fwrite($fp,1);
  fclose($fp);
  header(Content-type: image/gif);
  readfile(spacer.gif);
?

I then modify the html/js code to look like this:

[somedocument.html]
html
head
/head
body
script type=text/javascript

jsImg = new Image()
jsImg.src = jsenabled.php?js=y;

/script
noscript
img src=jsenabled.php?js=n width=0 height=0 alt= /
/noscript  
/body
/html

Please note that you'd want to purge the an.txt and ay.txt every once 
in a while.

-- 
Arve URL:http://www.bersvendsen.com/

Newsere mot X-No-Archive
URL:http://www.ibiblio.org/Dave/Dr-Fun/df9601/df960124.jpg

-- 
PHP General Mailing List (http://www.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] Possible to measure CPU and Ram used with PHP?

2002-01-29 Thread Jason Wong

On Wednesday 30 January 2002 03:10, Jeff Lewis wrote:
 Is it possible to measure the amount of RAM or CPU power used to process a
 particular file written in PHP?  Can the values be grabbed and displayed
 with PHP?


There's a function getrusage(). Not sure whether that'll do what you want.



-- 
Jason Wong - Gremlins Associates - www.gremlins.com.hk

/*
Practical politics consists in ignoring facts.
-- Henry Adams
*/

-- 
PHP General Mailing List (http://www.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 textarea content from one page to another

2002-01-29 Thread Simos Varelakis

Hi to everyone

I try to pass a varaible ($text) which contains text from texarea  (with
Headerlocation:foo2.php?text=$text)  from one page foo1.php to foo2.php
and display it to another textarea object in foo2.php

the problem is that i lose all the contents since the first tab or CR
prsseed in the source textarea

any suggestions

thanks in advance

simos


-- 
PHP General Mailing List (http://www.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] passing textarea content from one page to another

2002-01-29 Thread Ing. Gustavo Edelstein

Try using this:
 location:foo2.php?text=urlencode($text)
Regards,

Ing. Gustavo A. Edelstein
Tech. Mgr.
Equiplus Argentina S.A.
__
Visit us On Line at www.equiplus.com
Email addresses:
Operations: [EMAIL PROTECTED]
Consulting: [EMAIL PROTECTED]
Technical: [EMAIL PROTECTED]
Web related: [EMAIL PROTECTED]
General: [EMAIL PROTECTED]

- Original Message -
From: Simos Varelakis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 5:45 PM
Subject: [PHP] passing textarea content from one page to another


 Hi to everyone

 I try to pass a varaible ($text) which contains text from texarea  (with
 Headerlocation:foo2.php?text=$text)  from one page foo1.php to foo2.php
 and display it to another textarea object in foo2.php

 the problem is that i lose all the contents since the first tab or CR
 prsseed in the source textarea

 any suggestions

 thanks in advance

 simos


 --
 PHP General Mailing List (http://www.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] Book database (slightly OT)

2002-01-29 Thread Reuben D Budiardja


Hi,
I am working on a projects for book cataloging. What I want to do is to input 
all the books isbn to a mysql table, either by hand or by scanning it, and 
then let php go through those data and add more info such as tittle, author, 
publisher, etc.

Now, the real question is, does anyone know is there any database / services 
out there that I can query using isbn, that will return me a parse-able info 
for this purpose? 
I am looking for service that is free, if possible, since this project is not 
for commercial at all (academic purposes). 

Any information on this will be greatly appreciated. 

Thanks.
Reuben D. Budiardja

-- 
PHP General Mailing List (http://www.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] Sending an e-mail to 1,000 people

2002-01-29 Thread Rick Emery

1.  Create a mysql database with the names.  You would have to enter all the
names and addresses into the database.

2.  Create a PHP program which would read the names from the database.  The
names would go into a variable.

3.  Using a template letter in the PHP program, insert the names (from the
variable's values) into the template.

4.  Call PHP's mail() function to send the emails.

Then, in the future, you can simply change the letter template in the PHP
script and easily send the new email to the 1000 recipients.

Note: I mean you no insult.  But, do you know how to script using PHP and
MYSQL?  If not, that's a whole other matter.

rick

-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 3:02 PM
To: Rick Emery
Subject: RE: [PHP] Sending an e-mail to 1,000 people


Thanks for your response.  How would it know who to send it to?  Would I
have to input all the names separtely into the mail() function?  Or would it
be a variable?  Not quite sure on how to do it.  Thanks for your help.  Ben

-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 12:00 PM
To: 'Ben Clumeck'; [EMAIL PROTECTED]
Subject: RE: [PHP] Sending an e-mail to 1,000 people


yes you can by using MYSQL to store the names, PHP to generate the letters
(or you can store letter template in database as well), and PHP's mail()
function will take you home.

-Original Message-
From: Ben Clumeck [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 1:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Sending an e-mail to 1,000 people


I would like to send an e-mail (the same e-mail) to 1,000 different people.
I want each persons name to be in the To: field.  Is there a way to
customize it to where it can say Dear (having a different persons name
corresponding to an e-mail address) so that it looks customized.

Thanks,

Ben


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

-- 
PHP General Mailing List (http://www.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] setting/reading session_id before session_start

2002-01-29 Thread razorfish


Maybe I'm having a brain fart, please set me straight:

I want to use session_id($myval) to use a roll-my-own MD5 session id (SID).

I don't obviously want to assign the session_id() if the session is already
established.

Given that session_id() must come before session_start() how do you tell if
a session_id has already been set before session_start()?!






-- 
PHP General Mailing List (http://www.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] Encoding/Decoding

2002-01-29 Thread Devin Atencio


Dear PHP Users,

I was wanting some input on your ideas. I want to be able to encrypt
data and then store it into a database and then decrypt the information
and display it when I need the data. I have played around with a few
things from the PHP website but have problems with a few things.

Does anyone currently have a kewl encode/decode function that they could
send me to look at? 

Any help would be appreciated.

  __\/__ 
  .  / ^  _ \  . 
  |\| (o)(o) |/| 
#.OOOo--oo--oOOO.---# 
#   # 
#   Devin Atencio [EMAIL PROTECTED] # 
#   Sys Admin Dept  # 
#_Oooo._# 
  .oooO   (   ) 
  (   )) / 
   \ ((_/ 
\_)
 


-- 
PHP General Mailing List (http://www.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/Courier-IMAP and c-client library

2002-01-29 Thread Tony Bibbs

Ok, I have PHP 4.1.1 on RH7.2 and I'm running courier-mta and
courier-imap. I downloaded the UW c-client library and did the make
lrh.  I then do the following configure:

./configure --disable-debug -enable-pic -disable-rpath
--enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-bz2
--with-curl --with-db3 --with-db2 --with-dom --with-gd --with-gdbm
--with-gettext --with-openssl --with-png --with-zlib --enable-debugger
--enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-track-vars --with-mysql
--with-pgsql --with-xml --with-imap=/usr/local/src/imap-2001a
--with-imap-ssl

Then the make and make install go as expected.

I then go to restart Apache and I get:
[root@localhost php-4.1.1]# /etc/rc.d/init.d/httpd restart
Stopping httpd:[FAILED]
Starting httpd: Syntax error on line 261 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server:
/etc/httpd/modules/libphp4.so: undefined symbol: gss_nt_service_name

Please help...

-- 
Tony Bibbs | Life is a moderately good play
[EMAIL PROTECTED] | with a bad 3rd act.
515.554.8046   | 


-- 
PHP General Mailing List (http://www.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] Need a little help

2002-01-29 Thread Brian V Bonini

Hmmm,

I'm using exactly this:

?
$url=parse_url($HTTP_REFERER);
if ($url[host] == domain.com) {
$requestImage = http://www.domain.com/images/image1.gif;;
} else {
$requestImage = http://www.domain2.com/image2.gif;;
}
header (Content-Type: image/gif);
header (Content-Length: . filesize($requestImage));
header (Content-Disposition: inline; filename= . $requestImage);
readfile($requestImage);
?

And, it kind of works using Netscape although it hangs the
progress bar for a really long time and prevents any gif
animations from starting for a long time.

When I try it with IE 5.5sp2, no go, just a broken image.

-brian
**
 -Original Message-
 From: Girish Nath [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 28, 2002 7:55 PM
 To: Brian V Bonini
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Need a little help


 Hi Brian

 I've just setup the RedirectMatch in Apache and tried the PHP script
 (test.php) out and it worked fine.

 The only thing that caused broken image symbols to appear was if the image
 redirect script (test.php) created any output before the header()
 functions.
 Check for whitespace or any functions that might be outputting error
 messages within test.php

 Regards


 Girish
 --
 www.girishnath.co.uk



 - Original Message -
 From: Brian V Bonini [EMAIL PROTECTED]
 To: Girish Nath [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 8:17 PM
 Subject: RE: [PHP] Need a little help


 hmmm, I think I see where your going but
 that either just puts out a lot of garbage
 on the screen:

 ¤X!lø`7-Y± Á\t1h^?(uT3è¡? J2¶'O\Ô'G)ÂGì^
 Ì-.téZ-ä(òS¡¹!n3pPßsfÔÓÄVoõ`\Z·Åô2'Ô?;Ur©e8òÞhS??0Ít^%;-,X
 âÑ9ºcI%,(CqxpR ¤Ô4ûȶÔ%03. Ì`?ÃåP? r ~éT
 ÀÃ^IÀ¦.Zª^:;}ä,ò,XOWýH0PE8´ä,Sx'À^µT÷Src`ÀÏÀrBÀ7í¨òT
 ÙÑç|+iûJFA?ERKfÙ4
 J³Ð²
 etc.

 or a broken image symbol.

 -B

  -Original Message-
  From: Girish Nath [mailto:[EMAIL PROTECTED]]
  Sent: Monday, January 28, 2002 11:21 AM
  To: Brian V Bonini
  Cc: [EMAIL PROTECTED]
  Subject: Re: [PHP] Need a little help
 
 
  Hi
 
  This should send different images to the referer based on what
 parse_url()
  returns:
 
  ?php
 
   $url=parse_url($HTTP_REFERER);
   if ($url[host] == domain.com) {
$requestImage = images/domain_A.gif;
   }
   else {
$requestImage = images/domain_B.gif;
   }
 
   header (Content-Type: image/gif);
   header (Content-Length: . filesize($requestImage));
   header (Content-Disposition: filename= . $requestImage);
   readfile($requestImage);
 
  ?
 
  You may need to modify it a bit perhaps with a switch
 statement for more
  flexibilty. Let me know how you get on.
 
  Regards
 
 
  Girish
  --
  www.girishnath.co.uk
 
 
 
 
  - Original Message -
  From: Brian V Bonini [EMAIL PROTECTED]
  To: PHP Lists [EMAIL PROTECTED]
  Sent: Monday, January 28, 2002 4:02 PM
  Subject: [PHP] Need a little help
 
 
  I'm trying to redirect based on referring host
  and request.
 
  I have an .htaccess set up like this:
  RedirectMatch (.*)\.gif$ http://www.domain.com/_borders/test.php
  to redirect all requests for .gif's to a php script which then
  determines the referring host.
 
  $url=parse_url($HTTP_REFERER);
  if ($url[host] == domain.com) {
  file://this is where I get stuck
do something
  } else {do some thing}
 
  how to I return the correct image. I.e. if the referring page
  has an img src=mydomain.com/image link and I redirect requests for
  that image to the php script to determine the host how can I now
  return a different image for display into the page. Make sense?
  Is it possible?
 
  -Brian
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  PHP General Mailing List (http://www.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] URL Parsing Help

2002-01-29 Thread Shane Lambert

I am trying to write software that will allow me to pass variables to a php 
script like:

index.php/option=contact/step=view

When I do this, I get the varibal PATH_INFO which contains 
/option=contact/step=view. Now, what I want is to have the following:

$option = contact
$step = view

I tried using '$array = explode(/,$PATH_INFO);' which gives me the array:

$array[1] = option=contact
$array[2] = step=view

This of course is not what I want. I want:

$array[option] = contact
$array[step] = view

So that when I use the extract($array) command I get the variables:

$option = contact
$step = view

Like I want. If you aren't lost and you know the answer, PLEASE HELP!


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




[PHP] Re: PHP/Courier-IMAP and c-client library

2002-01-29 Thread Tony Bibbs

For the archives:

I found a fix for my problem. I want to be perfectly clear what my
configuration is so that if anyone has this god-foresaken problem they
can fix it.  

OS: Red Hat Linux 7.2
MTA: courier-mta
IMAP: courier-imap

I installed the UW c-client library and compiled it with make lrh

I compiled PHP with these options:

./configure --disable-debug -enable-pic -disable-rpath
--enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-bz2
--with-curl --with-db3 --with-db2 --with-dom --with-gd --with-gdbm
--with-gettext --with-openssl --with-png --with-zlib --enable-debugger
--enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets
--enable-sysvsem --enable-sysvshm --enable-track-vars --with-mysql
--with-pgsql --with-xml --with-imap=/usr/local/src/imap-2001a
--with-imap-ssl

On restarting Apache it complains with:

[root@localhost php-4.1.1]# /etc/rc.d/init.d/httpd restart
Stopping httpd:[FAILED]
Starting httpd: Syntax error on line 261 of /etc/httpd/conf/httpd.conf:
Cannot load /etc/httpd/modules/libphp4.so into server:
/etc/httpd/modules/libphp4.so: undefined symbol: gss_nt_service_name

I added the following lines to my /etc/rc.d/init.d/httpd script in the
start section right after the echo line:

LD_PRELOAD=/usr/kerberos/lib/libgssapi_krb5.so
export LD_PRELOAD

If there is a more elegant way of doing this via Apache's build I'd love
to know.

Also, I will be documenting an entire howto on this configuration here:

http://www.tonybibbs.com/courier-howto.html

--Tony

On Tue, 2002-01-29 at 16:26, Tony Bibbs wrote:
 Ok, I have PHP 4.1.1 on RH7.2 and I'm running courier-mta and
 courier-imap. I downloaded the UW c-client library and did the make
 lrh.  I then do the following configure:
 
 ./configure --disable-debug -enable-pic -disable-rpath
 --enable-inline-optimization --with-apxs=/usr/sbin/apxs --with-bz2
 --with-curl --with-db3 --with-db2 --with-dom --with-gd --with-gdbm
 --with-gettext --with-openssl --with-png --with-zlib --enable-debugger
 --enable-ftp --enable-magic-quotes --enable-safe-mode --enable-sockets
 --enable-sysvsem --enable-sysvshm --enable-track-vars --with-mysql
 --with-pgsql --with-xml --with-imap=/usr/local/src/imap-2001a
 --with-imap-ssl
 
 Then the make and make install go as expected.
 
 I then go to restart Apache and I get:
 [root@localhost php-4.1.1]# /etc/rc.d/init.d/httpd restart
 Stopping httpd:[FAILED]
 Starting httpd: Syntax error on line 261 of /etc/httpd/conf/httpd.conf:
 Cannot load /etc/httpd/modules/libphp4.so into server:
 /etc/httpd/modules/libphp4.so: undefined symbol: gss_nt_service_name
 
 Please help...
 
 -- 
 Tony Bibbs | Life is a moderately good play
 [EMAIL PROTECTED] | with a bad 3rd act.
 515.554.8046   | 
-- 
Tony Bibbs | Life is a moderately good play
[EMAIL PROTECTED] | with a bad 3rd act.
515.554.8046   | 


-- 
PHP General Mailing List (http://www.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] Session Help

2002-01-29 Thread Michael: Dave II, Electric Boogaloo

I'm having a little problem with my sessions on a website I'm programming
for.  After a user logs in, if that user follows a link, the variable
information is being passed correctly, but when they hit Back, Internet
Explorer gives a Warning This Page Has Expired error.  Hitting refresh
does fix this, but Forward/Back is such a common procedure that I'd like
for this to work smoothly.  Could someone tell me what I'm doing wrong here?

Thanks in advance.


Michael



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




Re: [PHP] URL Parsing Help

2002-01-29 Thread Christopher William Wesley

$myPairs = explode( /, $PATH_INFO );
while( list( $key, $val ) = each( $myPairs ) ){
if( !empty( $val ) ){
$myVar = explode( =, $val );
${$myVar[0]} = $myVar[1];
}
}

For you example URI, index.php/option=contact/step=view
you would then have $option and $step available, with the assigned values
of contact and view, respectively.

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

On Tue, 29 Jan 2002, Shane Lambert wrote:

 I am trying to write software that will allow me to pass variables to a php
 script like:

 index.php/option=contact/step=view

 When I do this, I get the varibal PATH_INFO which contains
 /option=contact/step=view. Now, what I want is to have the following:

 $option = contact
 $step = view

 I tried using '$array = explode(/,$PATH_INFO);' which gives me the array:

 $array[1] = option=contact
 $array[2] = step=view

 This of course is not what I want. I want:

 $array[option] = contact
 $array[step] = view

 So that when I use the extract($array) command I get the variables:

 $option = contact
 $step = view

 Like I want. If you aren't lost and you know the answer, PLEASE HELP!


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





-- 
PHP General Mailing List (http://www.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] Submit/View images using PHP/MySQL

2002-01-29 Thread Mike C

Hi,

Can anyone point me to some good examples of how to add images using PHP 4 (from 
within a browser) to a MySQL database running on MacOSX, which is already configured  
working, then display the images by selecting their name or category etc, again within 
the browser. I also need to restrict the size of the file upload to approx  300kb

I found a good example at http://www.weberdev.com but it's a little too cut-down for 
me!

Thanks

Mike C
-- 

-- 
PHP General Mailing List (http://www.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] Feature requests for PHP development - where to post them?

2002-01-29 Thread Lars Torben Wilson

On Tue, 2002-01-29 at 06:53, Stefan Rusterholz wrote:
 Is there a place especially meant to make feature-requests to the
 php-development team?
 
 TIA
 stefan rusterholz

http://bugs.php.net

Select 'Feature/Change Request' as the bug type.


Cheers,

Torben

-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


-- 
PHP General Mailing List (http://www.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] Getting an include file into a string after PHP evaluates the vars?

2002-01-29 Thread Kevin Stone

I'm using templates to create an interface for a new ePostcard script.
The templates are HTML with embedded PHP tags in the likely positions
(ie. font, text, bgcolor, etc..).  The script include()'s the chosen
template file and evaluates the variables stored in the active session
for display in the browser.

I don't know why I didn't think of this ahead of time but in order to
produce the HTML-based ePostcard email I have to get the evaluated
template into a string.

I can fopen() the template file and read it into a string but the PHP
won't evaluate.  And since most of the template is HTML with some
Javascript of course eval() won't work on the string.

Did I paint myself into a corner here?  Or is there a way out that I
just don't see.

Thanks,
Kevin Stone
[EMAIL PROTECTED]
www.helpelf.com



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




Re: [PHP] URL Parsing Help

2002-01-29 Thread Shane Lambert

Actually, I found a simpler way:

$vars = str_replace(/,,$PATH_INFO);
parse_str($vars);

But thanks for your help...

Christopher William Wesley wrote:

 $myPairs = explode( /, $PATH_INFO );
 while( list( $key, $val ) = each( $myPairs ) ){
   if( !empty( $val ) ){
   $myVar = explode( =, $val );
   ${$myVar[0]} = $myVar[1];
   }
 }
 
 For you example URI, index.php/option=contact/step=view
 you would then have $option and $step available, with the assigned values
 of contact and view, respectively.
 
 ~Chris   /\
  \ / September 11, 2001
   X  We Are All New Yorkers
  / \ rm -rf /bin/laden
 
 On Tue, 29 Jan 2002, Shane Lambert wrote:
 
 
I am trying to write software that will allow me to pass variables to a php
script like:

index.php/option=contact/step=view

When I do this, I get the varibal PATH_INFO which contains
/option=contact/step=view. Now, what I want is to have the following:

$option = contact
$step = view

I tried using '$array = explode(/,$PATH_INFO);' which gives me the array:

$array[1] = option=contact
$array[2] = step=view

This of course is not what I want. I want:

$array[option] = contact
$array[step] = view

So that when I use the extract($array) command I get the variables:

$option = contact
$step = view

Like I want. If you aren't lost and you know the answer, PLEASE HELP!


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



 
 


-- 
PHP General Mailing List (http://www.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] Date time

2002-01-29 Thread Torkil Johnsen

Hello...

I have a field in my mysql database containing datetime on the format
-MM-DD HH:MM:SS (24-hour format)

Now. I want to output this as follows: DD.MM.YY at HH:MM:SS
Currently I do this by this function:

function convert_datetime($in){
$return = substr($in,8,2) . . . substr($in,5,2) . . . substr($in,2,2) .
 at  . substr($in,11,8);
return $return;
}

Is there a better way? Either with mysql or php?
Now. Another problem. Since my webserver is in the states, and I live in
Norway, I get a 7 hour time difference.

So when I do date(Y-m-d H:i:s) I get a time that is 7 hours wrong.
Any idea as to how I can correct this to be 7 hours later (that is: 12 in
server time is really 19 where I live) in an easy way?

THanks in advance,
Torkil


-- 
PHP General Mailing List (http://www.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] Date time

2002-01-29 Thread Dennis Moore

It is much easier to use the mysql DATE_FORMAT()  function to format your
dates when retrieving directly from the data base.  You do not have to
convert to a UNIX time stamp and all that other stuff.

Your select statement should look something like:
$date_format_long=%d:%m:%y at %T;
$query=select DATE_FORMAT(date_field, '$date_format_long' ) as fmt_date
from your_table;

RTM at http://www.mysql.com  Chapter 6






- Original Message -
From: Torkil Johnsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 29, 2002 7:29 PM
Subject: [PHP] Date  time


 Hello...

 I have a field in my mysql database containing datetime on the format
 -MM-DD HH:MM:SS (24-hour format)

 Now. I want to output this as follows: DD.MM.YY at HH:MM:SS
 Currently I do this by this function:

 function convert_datetime($in){
 $return = substr($in,8,2) . . . substr($in,5,2) . . . substr($in,2,2)
.
  at  . substr($in,11,8);
 return $return;
 }

 Is there a better way? Either with mysql or php?
 Now. Another problem. Since my webserver is in the states, and I live in
 Norway, I get a 7 hour time difference.

 So when I do date(Y-m-d H:i:s) I get a time that is 7 hours wrong.
 Any idea as to how I can correct this to be 7 hours later (that is: 12 in
 server time is really 19 where I live) in an easy way?

 THanks in advance,
 Torkil


 --
 PHP General Mailing List (http://www.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: sockets

2002-01-29 Thread Michael Sims

At 01:22 AM 1/30/2002 +0530, Kunal Jhunjhunwala wrote:
Hey Mike,
I am looking for PHP sockets.. hence the php mailing list :P I hvent found
any decent resource on it.. orielly article is good for complete beginers..
but i was looking for something more detailed... any books anyone can
recommend would do too.. but i would prefer source to study :)

Here are my unqualified opinions:

Knowing how to use PHP sockets is as simple of using fsockopen() to open a 
connection and return a file pointer, and then using fgets() and fputs() to 
read from the socket and write to it.

Of course, the tricky part is knowing WHAT to write, and what to read, and 
what to do with it after you have read it.  In my experience, RFCs are the 
best source of information here.  For example, if you want to use PHP 
sockets to write a custom mail function, then the SMTP RFCs would be 
invaluable.  Same for FTP, or HTTP.

Of course things get trickier when you're talking about opening a direct 
TCP connection to a MySQL server, or something similar.  It's easy enough 
to know that you need to connect to port 3306, but without understanding 
the protocol MySQL uses (including the handshaking and authentication) 
you're not going to get very far.  And again as far as I know there is no 
such thing as a MySQL RFC, but perhaps they have programmer's references on 
their site.  If all else fails then it's time to start reading the source 
code. :-)

Of course this begs the question as to why you are trying to establish a 
socket connection to a MySQL server when PHP already has excellent support 
for MySQL.  So I guess I will end with the question that I should have 
began with:  What exactly are you trying to accomplish? :-)


-- 
PHP General Mailing List (http://www.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] Fwd: PhpSmsSend remote execute commands bug

2002-01-29 Thread Jason Murray

 I'm think I'm going to start forwarding all the bugtraq 
 alerts for PHP scripts to this list. Any objections?

Yes, if the author of the script isn't on the list it's useless
unless someone wants to patch their script themselves. And if
they're the kind of person who's inclined to do that, they'd
most likely already be watching BugTraq.

There's such a large possibility of crappily-written code out
there, I don't know if its worth the traffic on this list
given that it's usually newbies.

J

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




[PHP] setting up a members Login section on a webpage.

2002-01-29 Thread Matthew Darcy

Hi,

I am looking at getting users to input their details to be stored in mysql,
I would then like them to have to login to get access to certain functions
when they come back.

Does anyone have a good idea on how to do this,

is the best / only way to do this sessions ?

This must be quite secure I don't really want this hacked.

Look forward to peoples ideas.

Matt.


-- 
PHP General Mailing List (http://www.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] Fwd: PhpSmsSend remote execute commands bug

2002-01-29 Thread bvr


I agree, but it may be usefull to tell those newbies that when you
execute a command from PHP that will get some parameters from an external
source (like a form or a get variable) ALWAYS use the

escapeshellcmd()

function to prevent users from executing arbitrary commands.

bvr.

There's such a large possibility of crappily-written code out
there, I don't know if its worth the traffic on this list
given that it's usually newbies.




-- 
PHP General Mailing List (http://www.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] Fwd: PhpSmsSend remote execute commands bug

2002-01-29 Thread Evan Nemerson

Good point, but I actually reccomend newbies subscribe to bugtraq. It really 
opened my eyes to the world of cross-site scripting. Now I not only know how, 
but do, write secure code.

If I saw a warning about a script either here or on bugtraq, I would 
immediatly patch it- or at least shut down until it could be patched. It 
would be useful...

The probability that we may fail in the struggle ought not to deter us from 
the support of a cause we believe to be just.






On Tuesday 29 January 2002 17:22, you wrote:
  I'm think I'm going to start forwarding all the bugtraq
  alerts for PHP scripts to this list. Any objections?

 Yes, if the author of the script isn't on the list it's useless
 unless someone wants to patch their script themselves. And if
 they're the kind of person who's inclined to do that, they'd
 most likely already be watching BugTraq.

 There's such a large possibility of crappily-written code out
 there, I don't know if its worth the traffic on this list
 given that it's usually newbies.

 J

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




[PHP] Re: Getting an include file into a string after PHP evaluates the vars?

2002-01-29 Thread CC Zona

In article 007601c1a91f$ea9ecac0$6401a8c0@kevin,
 [EMAIL PROTECTED] (Kevin Stone) wrote:

 I don't know why I didn't think of this ahead of time but in order to
 produce the HTML-based ePostcard email I have to get the evaluated
 template into a string.
 
 I can fopen() the template file and read it into a string but the PHP
 won't evaluate.  And since most of the template is HTML with some
 Javascript of course eval() won't work on the string.
 
 Did I paint myself into a corner here?  Or is there a way out that I
 just don't see.

You could use output buffering.  Start a buffer, include template(s), 
manipulate buffer content, end/flush the buffer. 
http://www.php.net/manual/en/ref.outcontrol.php

-- 
CC

-- 
PHP General Mailing List (http://www.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   >