Re: [PHP] Viral Marketing PHP (was Re: [PHP] Computer Science and PHP)

2002-01-28 Thread DL Neil

Hello Manuel,

I have just re-read this, and am conscious that I am appearing to disagree with you, 
too frequently, yet in
overview I am wanting to agree!? I am a consultant, and I am well used to playing 
devil's advocate, ie
disagreeing with what is being said, in order to arrive at the best possible solution. 
Please don't interpret
anything said as grounds for a personal argument.

 Dl Neil wrote:
   One good point about what you said is that one budgetless what to
   promote PHP is to use 'viral marketing'. Viral marketing is a way to
   market something by using a technique that spreads by itself, ie, no
   additional effort or money needed to be spent by the originator to have
   the notice of what you want to market spread like crazy.
  ...
   sort what ideas can become viral. With that topic in the mind, if you
   ever figure a viral idea to promote PHP, just share it here to prove the
   concept as well! :-)
 
  I had intended that the 'institutional approach' be seen as the seeds of a viral 
marketing campaign. If
students
  learn the tool, when they 'go out to work' they want to use it. Even if the 
student is a 'hobbyist' then it
  still spreads the 'word' around...

 That is not viral enough because it is not smooth. When it is not
 smooth, not only it will propagate slowly but also it may stop
 propagating at all because word of mouth is not always convincing. To
 make it work smoothly it should not be hard to convince anybody that PHP
 is a good idea.

=I take it smooth means quick? Yes I agree propagation through 3- and 4-year 
training institutions will be
slow. However PHP can be quickly taught to anyone beyond a 'first steps in 
programming' course (hopefully after
they have graduated from an HTML course too. Thus a 'build on' or 'conversion' PHP 
course need not take long to
run, even as a night course (once/week, 2-3 hours/session).

=Years ago I can remember talking to one of the staff who was instrumental in getting 
ORACLE to market
(seriously) ORACLE Applications (accounting system). He told me that he considered 
that it would take five years
to get the product into IT Managers' (decision-makers) minds when they thought of 
buying an accounting package.
He figured that after those five, it would run for a further five years as the 
pre-eminent solution, ie the
first one anyone thought of; and then for the next five years it would start to 
'decline' as competitors tried
to 'take over'. He was arguing for methods of lengthening the middle five year period, 
or how essentially the
same product could be re-branded, so that it began a new 5/15 year cycle without the 
company having to invest in
a completely new product from scratch. [evidently he also didn't see SAP arriving!]

  Your point earlier, if statistics say x million dynamic web sites are held 
together by PHP, IT
managers/decision
  makers tend to feel they should take notice, eg Apache and the Netcraft surveys. 
The same will apply to PHP,
  numbers need to build to some 'critical mass' for corporate credibility to follow 
(as wrong as that sounds).

 Yes, but you only establish credibility when you manage to put your
 arguments in favour of PHP in the mouths of opinion makers. Statistics
 of PHP usage in the PHP site will never be credible enough. It is like
 when parents tell everybody how smart their kids are, see what I mean?

=not the mouths, but the ears of decision makers; and no I establish credibility 
(in myself) first and then
ask them to listen to my words. I liked the parents talking about kids analogy. 
However I disagree with the
analysis/application to this discussion. Which web site contains the most talking-up 
of M$ products? Which of
ORACLE? Which of IBM? etc. Why, there own of course!

=a lot of the talk on open source sites does not communicate with IT decision makers. 
It is talk by techies to
techies and of techies; and thus it (almost) never will. That point is most important. 
It is no good saying that
IT Managers are all brainless in (important) technical matters and should be first up 
against the wall; at least
not if you're attempting to convince them of something! There needs to be 
communication at the IT Manager
'level' (I return to my earlier references to SuSE's marketing approach).

=Now is a very good time to be doing this. There is a lot of bad press about M$, eg 
what's in XP that can really
be called an 'upgrade', what of the privacy/M$ 'control', major changes in bulk 
license pricing arrangements,
and some heavy-hitters (eg Gartners) who are raising the issue of M$ products with 
frequent needs for patching
and thereby a steeply increasing TCO (M$'s preferred term = Total Cost of Ownership). 
Talking in terms of lines
of debugged code per day, platform flexibility/neutrality, scaleability, 
maintainability, ease of use, security,
etc, is all far more entertaining (to an IT Manager looking to purchase/standardise on 
a tool) than the daily
interchanges of this discussion list!


[PHP] PHP env variables; please read...!

2002-01-28 Thread Prakash

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]




Re: [PHP] Back button to Query Pages

2002-01-28 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then phantom blurted
 Page 1 is a list of people's names (queried by State).
 
 Page 2 is each person's profile.
 
 When I hit the back button on Page 2 it tells me it has to requery the
 List on Page 1 (apparently not stored in the client's browser cache).
 Is there anyway to make it use the cached copy instead of requeurying
 the database?  I know using Active Server Pages you could do this.

Tough one.
This will need some experimentation as I'm just speculating a theory
Set a session var on page 1 *after* a successfull query. 
At the beginning of page 1 test to see if the var is set, 
If so just print the peoples names as if the query were run, if not
run the query.

I have no idea if that will help but I hope it provides a little
inspiration anyhow :-)
- -- 

Nick Wilson

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



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

iD8DBQE8VRJ2HpvrrTa6L5oRAkWYAJ45ckNJHxjlvz5i/pMKVSkXjwgItgCfbLZA
fXxmthm2VEP5nqjv1Zj+j0Y=
=R2HK
-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] Back button to Query Pages

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

Hi,

a possible solution is also to provide the backbutton href with the original
variable values...

print a href='bladibla.php?var1=val1var2=val2'back/a\n;

Greets,

Edward

- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 9:57 AM
Subject: Re: [PHP] Back button to Query Pages


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then phantom blurted
  Page 1 is a list of people's names (queried by State).
 
  Page 2 is each person's profile.
 
  When I hit the back button on Page 2 it tells me it has to requery the
  List on Page 1 (apparently not stored in the client's browser cache).
  Is there anyway to make it use the cached copy instead of requeurying
  the database?  I know using Active Server Pages you could do this.

 Tough one.
 This will need some experimentation as I'm just speculating a theory
 Set a session var on page 1 *after* a successfull query.
 At the beginning of page 1 test to see if the var is set,
 If so just print the peoples names as if the query were run, if not
 run the query.

 I have no idea if that will help but I hope it provides a little
 inspiration anyhow :-)
 - --

 Nick Wilson

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



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

 iD8DBQE8VRJ2HpvrrTa6L5oRAkWYAJ45ckNJHxjlvz5i/pMKVSkXjwgItgCfbLZA
 fXxmthm2VEP5nqjv1Zj+j0Y=
 =R2HK
 -END PGP SIGNATURE-

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




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




Re: [PHP] Back button to Query Pages

2002-01-28 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Edward van Bilderbeek - Bean IT blurted
 Hi,
 
 a possible solution is also to provide the backbutton href with the original
 variable values...

I'm pretty sure he means the /browser/ back button though.
- -- 

Nick Wilson

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



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

iD8DBQE8VRamHpvrrTa6L5oRAs5EAJ4kJyVPGdcvNmPkTEgCJkIUJZ20PwCgi4K0
XJCudv0n1sFrJBrH37W5mVg=
=ntoU
-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] Back button to Query Pages

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

the moment I hit the send button I realised it myself too :-)

but this is a pretty good alternative...

Edward

- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 10:15 AM
Subject: Re: [PHP] Back button to Query Pages


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then Edward van Bilderbeek - Bean IT blurted
  Hi,
 
  a possible solution is also to provide the backbutton href with the
original
  variable values...

 I'm pretty sure he means the /browser/ back button though.
 - --

 Nick Wilson

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



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

 iD8DBQE8VRamHpvrrTa6L5oRAs5EAJ4kJyVPGdcvNmPkTEgCJkIUJZ20PwCgi4K0
 XJCudv0n1sFrJBrH37W5mVg=
 =ntoU
 -END PGP SIGNATURE-

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




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




[PHP] 'relocate' errors on php module load? try changing the compiler.

2002-01-28 Thread Kervin Pierre

Hi,

I sending this message because a few people have contacted me offline 
about a question I posted to the list a while back.

It seems that on certain Sun Solaris systems, Apache and PHP compile 
fine but apache does *not* run.  When Apache is started with the PHP 
module or any other module, the error...

/www bin/apachectl start
Syntax error on line 208 of /www/conf/httpd.conf:
Cannot load /www/libexec/libphp4.so into server: ld.so.1:
/www/bin/httpd: fatal: relocation error: file /www/libexec/libphp4.so:
symbol ap_block_alarms: referenced symbol not found
bin/apachectl start: httpd could not be started
/www

For some reason, the Apache symbols, which should have been exported for 
use by the modules are not.  This results in a bunch of referenced 
symbol not found errors.

I spoke to a few other people about this and a constant factor seems to 
be GCC 2.95.3 + Solaris.  If you recieve this error and compiled using 
GCC 2.95.3, try upgrading your compiler. GCC 3.0.2 compiled apache and 
PHP and the resulting binaries started without any problems.

If that still does not work, visit http://sunsolve.sun.com/ under their 
patchfinder section and look for the maintennance patches or at least 
the patches that affect the linker such as Patch-ID# 109147-14 .

Hope this helps.

--Kervin


-- 
http://linuxquestions.org/ - Ask linux questions, give linux 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 in the University and Corporation

2002-01-28 Thread Dreamriver.com


Hello,
I teach internet programming part-time and my findings are that the best language to 
learn for the web - for students - is php because it is more affordable and easier to 
learn for the students. The instruction the school provides does NOT include php. I 
added instruction in php as a bonus. I teach students database design and then when 
it comes time to talk with the database I show them php. The students are amazed at 
how easy it is to connect to their database! When I see the students graduate, for the 
most part php is their preferred language - and that's just squeezing the php subject 
in less than 20 hours.


I still agree that the best tool for the job is the way to go for commercial 
applications, but I encourage anyone teaching to introduce php as the superlative 
alternative it is, if only as a bonus instructional feature. Marketing hype is 
powerful, but ease of use and affordability is powerful too.


Richard Creech
http://www.dreamriver.com



Chris Lott [EMAIL PROTECTED] wrote in message
snip
 Many institutions, like the one I teach for, are entrenched in ASP and
Java
snip
 Also, these programs are typically staffed by a cadre of aduncts. If you
 have PHP skills and teaching skills and you can basically donate your
time
 for the peanuts that are offered (and the fun of it), there is a place for
 YOU to help promote PHP.

snip
 often, in my experience, PHP is slow to be adopted in the corporate
 environment because MS is so entrenched, and because MS' firm
establishment
 on the desktop means hiring MS people, who naturally promote and hire
other
 MS people, and administrators often equate using other technologies with
 abandoning their desktops.
snip
 c
 --
 Chris Lott
 http://www.chrislott.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]




Re: [PHP] set_time_limit() in a loop

2002-01-28 Thread DL Neil

Matthew,

There's some strange stuff going on here, and in the conversation.

For information about set_time_limit() please read 
http://uk2.php.net/manual/en/function.set-time-limit.php.
Despite the sense of what is written below, the manual says When called, 
set_time_limit() restarts the
 timeout counter from zero. In other words, if the timeout is the
 default 30 seconds, and 25 seconds into script execution a call
 such as set_time_limit(20) is made, the script will run for a
 total of 45 seconds before timing out.
Accordingly, every loop of the script is asking for the time_limit to be imposed in 30 
minutes' time.

The foibles of mail() are well documented on this list - please check the archives. 
The most pertinent comment
being that mail() does not suit volume transmissions, and bulk-mailer software should 
be used instead. In your
case, personalisation makes that a little more difficult.

Do you have any idea how far through the mail out is the script getting before it 
stops/stalls/bombs/cycles
aimlessly? If not, why not?

The previous respondent asked you for the exit criteria for your while loop. The code 
example below is not pure
PHP. Again: what is it - show us the code.

Are you suffering this problem on a production machine, but not on your development 
machine, ie do we have
machine-differences to take into account?

Have you tried commenting out the mail() command and replacing it with an ECHO To 
address (and perhaps a
counter) to see just how far the script gets?

If that works perfectly, then questions have to be asked about mail() and the email 
server being used... at the
moment all the questions center on what you are ACTUALLY doing.

Please advise,
=dn




 Thanks for your reply Paul.

 The script is getting subscriber details from a database and then
 firing our personalised emails in HTML and text format. The while
 statement loops through the query results and fires out the emails
 using the mail() command.

 It works well so far and indeed does finish the loop OK - but as
 mentioned the script is still running 13 hours later. I don't get it.

 Any ideas? Is it possible to kill a script via PHP code?

 Matthew

 PS Here is the script again

 ?
  ignore_user_abort(true);
  set_time_limit(1800);
  while:
 personalise the message;
   mail();
 set_time_limit(1800);
  endwhile;
 ?

 -Original Message-
 From: Paul Roberts [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, January 27, 2002 12:08 AM
 To: Matthew Delmarter
 Cc: PHP Mailing List
 Subject: Re: [PHP] set_time_limit() in a loop


 what are you doing a while on

 if while never ends and you reset the time out each loop and use
 ignore_user_abort(true), it will still be going 13 hours latter.

 maybe if you send the full code so we can look at it.

 Paul Roberts
 [EMAIL PROTECTED]
 
 - Original Message -
 From: Matthew Delmarter [EMAIL PROTECTED]
 To: Martin Towell [EMAIL PROTECTED]
 Cc: PHP Mailing List [EMAIL PROTECTED]
 Sent: Friday, January 25, 2002 12:55 AM
 Subject: RE: [PHP] set_time_limit() in a loop


  I should also mention that the loop is sending mail using mail().
 
  Is it possible that this is the problem somehow?
 
  -Original Message-
  From: Martin Towell [mailto:[EMAIL PROTECTED]]
  Sent: Friday, January 25, 2002 1:16 PM
  To: 'Matthew Delmarter'; PHP Mailing List
  Subject: RE: [PHP] set_time_limit() in a loop
 
  your first thought was correct - it sets it to 1800, it's NOT
  accumulative.
 
  it would have something to do with  ignore_user_abort(true); and
 also
  is your while loop's exit check working?
 
  Martin
 
 
  -Original Message-
 
  Just wondering about set_time_limit() in a loop.
 
  The current code looks something like this:
 
  ?
   ignore_user_abort(true);
   set_time_limit(1800);
   while:
  do stuff;
  set_time_limit(1800);
   endwhile;
  ?
 
  Does this reset the timeout to 1800 seconds every time it loops? Or
  does it accumulate so that the timeout has 1800 seconds added to it
  every time?
 
  The reason I ask is that my ISP informs me that the script is still
  running 13 hours later! Or is this related to the ignore_user_abort?
 
  Regards,
  Matthew Delmarter
 
 
 
  --
  PHP General Mailing List (http://www.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, 

[PHP] RE: [PHP-WIN] HELP! with PHP extension

2002-01-28 Thread Martin Lindhe

 Hi all,
 
 Here is the situation.
 
 I have Windows 2000 SP2, IIS5 running PHP 4.1.1 using CGI.
 
 My PHP folder is C:\php
 Extension Folder is: C:\php\extension
 PHP.INI file: extention_dir = C:\php\extension\

Are you sure the foldername is extension?
Just asking you to doublecheck since the default would be
extensions.

/Martin

-- 
PHP General Mailing List (http://www.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 there any Jabber Client in PHP

2002-01-28 Thread S.Murali Krishna


Hi all
Is there any jabber client in PHP available ?. I have
searched the net and got some information on how to write jabber client,
but ( to learn ) i need an existing one if any.


S.Murali Krishna
[EMAIL PROTECTED]  
= 
We grow slow trying to be great

   - E. Stanley Jones
-


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

2002-01-28 Thread Uma Shankari T.



Hello,

   The system have to send mail automatically to the username stored in
mysql table.I am having the details of usermailid,date.By using php script
how do i go about with this

Regards,
Uma


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

2002-01-28 Thread Jeff Van Campen


The system have to send mail automatically to the username stored in
mysql table.I am having the details of usermailid,date.By using php script
how do i go about with this

To send the mail, use the mail function:
http://www.php.net/manual/en/function.mail.php


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

2002-01-28 Thread DrouetL


Hi everybody

I'm not sure it is the best place for my question.

Until now we were using PHP connecting to an oracle database. We are
looking to change for an opensource database for the new applications.

Do you know where I can find a recent and objective study comparing both
with PHP to connect to it.

Thanks and exceuse me if it is not the right forum to ask it

Laurent Drouet



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

2002-01-28 Thread Jeff Van Campen


Do you know where I can find a recent and objective study comparing both
with PHP to connect to it.

http://phpbuilder.com/columns/tim2705.php3

HTH
-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] Mysql / PostgreSQL with PHP

2002-01-28 Thread Ben-Nes Michael

Don't use MySQL its way to primitive.
Go for Postgresql.

I worked with both of them with PHP and they both fast, stable and supported
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 1:17 PM
Subject: [PHP] Mysql / PostgreSQL with PHP



 Hi everybody

 I'm not sure it is the best place for my question.

 Until now we were using PHP connecting to an oracle database. We are
 looking to change for an opensource database for the new applications.

 Do you know where I can find a recent and objective study comparing both
 with PHP to connect to it.

 Thanks and exceuse me if it is not the right forum to ask it

 Laurent Drouet



 --
 PHP General Mailing List (http://www.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] How do I use a confirm box to confirm before deletion from a database

2002-01-28 Thread Ivan Carey

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




Re: [PHP] Got a problem I cant figure out

2002-01-28 Thread Miles Thompson

A goog first step is to rename the page with a .phps extension and display 
it in the browser. The coloring of the text often gives you an idea where 
PHP got turned off or something critical was commented out.

Miles Thompson

At 09:55 PM 1/27/2002 -0700, Ben Turner wrote:
Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47

I am receiving this error on my page but the problem is that line 47 is 
the ? and last line of the page.  Is their something Im missing here??

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] session id's and url rewriting.

2002-01-28 Thread Aric Caley

Is there any way to access the PHP4 session URL rewriter directly?  Is there
a way to override it and use a different function (say you wanted to make a
rewriter for XML or something other than HTML)?

Could anybody point me to a function that does what the rewriter does?
Surely somebody's written such a thing I dont want to have to do it again..
:)



-- 
PHP General Mailing List (http://www.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] get image from DB problem

2002-01-28 Thread freddy

 I guess I must be lucky. Where I currently work we have been using ColdFusion and 
Oracle for all our database web
 development. After verifying with the SAs that we had compiled php support on our 
new instalation of Apache on Solaris
 I asked our CIO directly if it would be ok to look at starting new web applications 
using PHP. I was told that as long
 as the other developers did not mind learning it to support the applications I built 
that it was a go.

I did not go deeply into the cost benefits of php, or the support benifits associated 
with the open source community. I
simply pointed out that we already were configured to run it. I did mentioned that it 
looked to be as powerful or more
powerful than our current solution and that it worked natively with our database.

The CIO here is not a pushover at all. Most often it takes me forever to get my 
recomendations implemented if they are
implemented at all. I guess he just looked at it and saw that it made sense.  Now I 
get to use either tool and in the
process further my own career by becoming adept in another language. Not to mention 
working towards making our current
site a shocase for PHP in a large commercial enterprise envirionment.

PS It may have helped that the CIO considers M$ to be the devil.


-- 
PHP General Mailing List (http://www.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 do I use a confirm box to confirm before deletion from a database

2002-01-28 Thread Jeff Van Campen


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

I've done something similar.  Here is the code that I used:

?php
echo a href=\web_clients.php?type=deleteidClient=$idClient\ 
onclick=\return confirm('Are you sure that you want to delete this 
client?')\delete/a
?

HTH
-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-28 Thread Floyd Baker

On Mon, 28 Jan 2002 15:20:05 +0800, you wrote:

On Monday 28 January 2002 14:27, you wrote:

Please keep discussion on the list!

Sorry about that. I meant to..

  //pull value from session file:
  $page_views = $_SESSION['page_views'];
 
 No need for this, in fact this is what is preventing it from working! Once
 you've used session_register('var'), $var is available for use.

 Still ng..  I've eliminated the line on each and both pages in turn
 but still no improvement.  The count is going from 0 to 1 on the first
 invoke, then from 1 to 3 after passed to the second page.  From there
 on it falls apart, repeating 1 to 2 or 1 to 3 depending on the page.
 The session file never sees a higher value once the initial 1 is
 input.  It just keeps starting over from that same point.

  print brReturn Page;
  print brBefore increment = $page_views;
 
  //increment the counter:
  $page_views++;
  $page_views++;
 
 You're inc'ing $page_views twice, this is what makes you *think* the
  session is working when in fact it isn't!
 
 hth

 The double increment was to give me a different count for the second
 page just to tell where I was at any time.   I see the count go
 1-2-1-3-1-2-1-3-1-2 etc., as it passes back and forth.

Ahh, but I thought that was what the Send Page and Return Page was for :)

 But it's still not climbing.

1) You could try reloading (F5 if using IE) the Send Page, if sessions were 
working you should see the counter counting.

2) session.save_path = c:/tmp, I don't use PHP on Windows, but looking at the 
other settings, paths for Windows systems are specified with a backslash. Try

  session.save_path = c:\tmp


Refreshing was what I was doing in the original single page, but it
wasn't working.  I went to two pages to try and help show what was
going on.  Still reloading doesn't help.  Neither does the dos slash
reversal.  I thought that might be going to do it for a while, but
nothing.  :-  

I only listed the *un* rem'ed lines of the ini session portion.  Is it
possible I need to remove a rem on one of those that were rem'ed?
It's a vanilla 'suggested' ini.   

Or maybe an error log I can look at?  Can such a report be created?  

Floyd


--


-- 
PHP General Mailing List (http://www.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] Trying to remove bad charactors.

2002-01-28 Thread bvr


Special characters must be escaped with a backslash:

$q = preg_replace(\!, , $q);

or

$q = preg_replace( preg_quote(!@#$%^*()), , $q);

bvr.


On Mon, 28 Jan 2002 11:24:30 +1300, Philip J. Newman wrote:

I'm trying to replace !@#$%^*() with nothing how ever every thing that I try it 
takes out the space too which is bad. Siggestions

$q=preg replace(!,,$q);

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012





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

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

Hi,

I've asked this question before, but no answer... so here it is again:

does anyone now how I can get the dimensions (width, height) of an mpeg
file? maybe via a unix command... (because in the PHP manual, I can't find
anything about it, and I'm not that much of a unix-guru...)...

thanks,

Edward



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

On Monday 28 January 2002 20:52, Floyd Baker wrote:
 On Mon, 28 Jan 2002 15:20:05 +0800, you wrote:
 On Monday 28 January 2002 14:27, you wrote:

 2) session.save_path = c:/tmp, I don't use PHP on Windows, but looking at
  the other settings, paths for Windows systems are specified with a
  backslash. Try
 
   session.save_path = c:\tmp


 Refreshing was what I was doing in the original single page, but it
 wasn't working.  I went to two pages to try and help show what was
 going on.  Still reloading doesn't help.  Neither does the dos slash
 reversal.  I thought that might be going to do it for a while, but
 nothing.  :-

But you *do* have a c:\tmp directory  ?

This is where php will store the session info and if it doesn't find that 
directory your sessions stuff wouldn't work.

 I only listed the *un* rem'ed lines of the ini session portion.  Is it
 possible I need to remove a rem on one of those that were rem'ed?
 It's a vanilla 'suggested' ini.

If it were the vanilla 'suggested' ini as per the standard php distribution 
then it *should* work, as those are more or less the same settings that I use 
myself (but under Linux).

 Or maybe an error log I can look at?  Can such a report be created?

Yes, in php.ini,

log_errors = On
error_log = c:\tmp\php-error.log


Don't forget to restart your webserver or whatever.


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

/*
 I've finally learned what `upward compatible' means.  It means we
  get to keep all our old mistakes.
 -- Dennie van Tassel
*/

-- 
PHP General Mailing List (http://www.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] Syntax highlighting through Apache (Re: [PHP] Got a problem I cant figure out)

2002-01-28 Thread bvr


I just thought of this good tip:

To show the highlighted php source without constanly renaming your scripts
you can add the the following to your httpd.conf :


  Alias /src /your/document/root
  LocationMatch /src/*
 ForceType application/x-httpd-php-source
  /LocationMatch


Now, for example to show the source of

http://localhost/index.phtml

you can use

http://localhost/src/index.phtml

bvr.


On Mon, 28 Jan 2002 08:27:05 -0400, Miles Thompson wrote:

A goog first step is to rename the page with a .phps extension and display 
it in the browser. The coloring of the text often gives you an idea where 
PHP got turned off or something critical was commented out.



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

2002-01-28 Thread Jon Farmer

 I've asked this question before, but no answer... so here it is again:

 does anyone now how I can get the dimensions (width, height) of an mpeg
 file? maybe via a unix command... (because in the PHP manual, I can't find
 anything about it, and I'm not that much of a unix-guru...)...

ImageMagick will do this AFAIK. However you have to compile with the Mpeg
libraries to achieve it.

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] Re: Mysql / PostgreSQL with PHP

2002-01-28 Thread Michael Waples

[EMAIL PROTECTED] wrote:
 
 Hi everybody
 
 I'm not sure it is the best place for my question.
 
 Until now we were using PHP connecting to an oracle database. We are
 looking to change for an opensource database for the new applications.
 
 Do you know where I can find a recent and objective study comparing both
 with PHP to connect to it.
 
 Thanks and exceuse me if it is not the right forum to ask it
 
 Laurent Drouet

http://www.ca.postgresql.org/~petere/comparison.html  is well worth a
read
and since MYsql has no triggers, stored procedures, views or subselects
you will miss a lot of what you are used to.
Postgresql has all those and you will find pl/pgsql quite easy to use as
its similar to Oracles plsql.

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

Hi Ivan, I've this a number of times. What I suggest is that you have two
forms, each with a button on the page that receives the delete request. Both
forms post to the processing page. The first button passes a value called
dodelete and the second one passes another value say, dontdelete. On the
processing page you determine if $dodelete is set, if it is then do your
delete. If not, redirect them to another page and bypass the whole deleteion
process. Below if the code I use on the processing page:

?php session_start(); ?
?php

if (!isset($HTTP_SESSION_VARS[islogged])){

header(Location:index.php);
}


if(isset($dodelete)){

// connect to db
$connectionToDB = odbc_connect(4gdols4f, jolf, rty);

$sqldel =  DELETE FROM RECOMMENDATION WHERE recid ='$recid';

odbc_do($connectionToDB, $sqldel);

}
else
{
header(Location:login.php);
}

?



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] Internet-Cafe package needed !!!

2002-01-28 Thread charles ariwodo

hello All,

I was wondering if anyone can help me find or tell me where I a can find
an Internet-cafe program for managing time and permision on  the computers.

I know there  are lot of such programs for windows .

But I will like to use RedHat Linux at my internet-cafe bussiness because 
it has better security.

Thanks
charles


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

2002-01-28 Thread Scott Saraniero

Hi,

I have a form that has a section with multiple checkboxes. I would like to
be able to send the checked boxes out as an array, and be able to retrieve
the array in the next page (that the form variables go to.) I cannot find
specific info on this anywhere. Can someone please point me in the right
direction?

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] Sending Form Arrays

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

try something like this:

input type=checkbox name=check[0] value='Y' check 1BR
input type=checkbox name=check[1] value='Y' check 2BR
input type=checkbox name=check[2] value='Y' check 3BR
input type=checkbox name=check[3] value='Y' check 4BR
input type=checkbox name=check[4] value='Y' check 5BR

that should do it...

Edward

- Original Message -
From: Scott Saraniero [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:17 PM
Subject: [PHP] Sending Form Arrays


 Hi,

 I have a form that has a section with multiple checkboxes. I would like to
 be able to send the checked boxes out as an array, and be able to retrieve
 the array in the next page (that the form variables go to.) I cannot find
 specific info on this anywhere. Can someone please point me in the right
 direction?

 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]




RE: [PHP] Got a problem I cant figure out

2002-01-28 Thread Rick Emery

SHOW US YOUR CODE

-Original Message-
From: Ben Turner [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 10:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Got a problem I cant figure out


Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line
47

I am receiving this error on my page but the problem is that line 47 is the
? and last line of the page.  Is their something Im missing here??  

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] Re: Got a problem I cant figure out

2002-01-28 Thread Dan Koken

Could be that you have a open curly bracket somewhere.
Here is a quick program I use to beautify and clean up my PHP code and 
point out any open brackets;
HTH .. Dan

?
/* - *\
** Beauty: cleans up source PHP code and
** nest everything
\* - */
$file_name = ?.php;   // gimme your file name
$data =  file(c:/temp/$file_name);// gimme your in location
$fp   = fopen(c:/temp/$file_name,'w');// gimme your out location
$sho_nst = N; // set [Y] to see nest count

$cmt = 0;   // start comment count
$nst = 0;   // start nesting count
$i   = 0;   // count for input array

while (isset($data[$i])) {  // while going through the data
if (strstr($data[$i],/*)) $cmt++; // don't count If comments Start
if (strstr($data[$i],*/)) $cmt--; // Count again if comments end

if (($cmt  1)  (strstr($data[$i],{)))  $nst++; // count number of 
begin nesting

$x = '';// init the output file line
for ($j = 0; $j  $nst; $j++) { // according to nestings
$x .= \t; //  put tabs on
} 
// end for
$y = ltrim($data[$i]);
if (empty($y)) $y = \n;
$out = $x . $y; // strip leading junk and put tabs on

if (($cmt  1)  (strstr($data[$i],})))  $nst--; // un count number of end 
nesting

if ($sho_nst == 'Y') $out = $i . | . $cmt . | . $nst . | . $out;
fwrite ($fp, $out); // put it to the output file
echo $i | $cmt | $nst | $out BR;// lemme see it in the browser
$i++; 
// bump count for input array
} 
// end while

fclose($fp); 
// close the output file
?


Ben Turner wrote:

 Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47
 
 I am receiving this error on my page but the problem is that line 47 is the ? and 
last line of the page.  Is their something Im missing here??  
 
 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] PHP IDE

2002-01-28 Thread TD - Sales International Holland B.V.

On Saturday 26 January 2002 03:49, Zeev Suraski stuffed this into my mailbox:

I use Activestate Komodo (www.activestate.com). It's not free though ($ 29,95 
end-user/educational $ 299 commercial). However, it's not just PHP, it also 
has stuff for perl, C and several other languages.

regards


 I'm probably not objective, but the upcoming (Feb 4) Zend Studio is pretty
 darned good, and it works perfectly under Linux.  You can try the beta
 (even though final release will have much more impressive/intelligent code
 completion) at zend.com/store/beta.php

 Zeev

 On Fri, 25 Jan 2002, Rafael Perazzo B Mota wrote:
  Who knows a good Php IDE for linux, like PHP Code ?
 
  Rafael Perazzo
 
 
 
  _
  Do You Yahoo!?
  Get your free @yahoo.com address at http://mail.yahoo.com

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




Re: [PHP] Sending Form Arrays

2002-01-28 Thread Scott Saraniero

Thanks, I'll try this, but why is the value always 'Y'?

 From: [EMAIL PROTECTED] (Edward Van Bilderbeek - Bean It)
 Newsgroups: php.general
 Date: Mon, 28 Jan 2002 15:24:01 +0100
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] Sending Form Arrays
 
 try something like this:
 
 input type=checkbox name=check[0] value='Y' check 1BR
 input type=checkbox name=check[1] value='Y' check 2BR
 input type=checkbox name=check[2] value='Y' check 3BR
 input type=checkbox name=check[3] value='Y' check 4BR
 input type=checkbox name=check[4] value='Y' check 5BR
 
 that should do it...
 
 Edward
 
 - Original Message -
 From: Scott Saraniero [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 3:17 PM
 Subject: [PHP] Sending Form Arrays
 
 
 Hi,
 
 I have a form that has a section with multiple checkboxes. I would like to
 be able to send the checked boxes out as an array, and be able to retrieve
 the array in the next page (that the form variables go to.) I cannot find
 specific info on this anywhere. Can someone please point me in the right
 direction?
 
 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: Got a problem I cant figure out

2002-01-28 Thread Dan Koken

Could be that you have a open curly bracket somewhere.
Here is a quick program I use to beautify and clean up my PHP code and 
to point out any open brackets;
HTH .. Dan

?
/* - *\
** Beauty: cleans up source PHP code and
** nest everything
\* - */
$file_name = ?.php;   // gimme your file name
$data =  file(c:/temp/$file_name);// gimme your in location
$fp   = fopen(c:/temp/$file_name,'w');// gimme your out location
$sho_nst = N; // set [Y] to see nest count

$cmt = 0;   // start comment count
$nst = 0;   // start nesting count
$i   = 0;   // count for input array

while (isset($data[$i])) {  // while going through the data
if (strstr($data[$i],/*)) $cmt++; // don't count If comments Start
if (strstr($data[$i],*/)) $cmt--; // Count again if comments end

if (($cmt  1)  (strstr($data[$i],{)))  $nst++; // count number of 
begin nesting

$x = '';// init the output file line
for ($j = 0; $j  $nst; $j++) { // according to nestings
$x .= \t; //  put tabs on
} 
// end for
$y = ltrim($data[$i]);
if (empty($y)) $y = \n;
$out = $x . $y; // strip leading junk and put tabs on

if (($cmt  1)  (strstr($data[$i],})))  $nst--; // un count number of end 
nesting

if ($sho_nst == 'Y') $out = $i . | . $cmt . | . $nst . | . $out;
fwrite ($fp, $out); // put it to the output file
echo $i | $cmt | $nst | $out BR;// lemme see it in the browser
$i++; 
// bump count for input array
} 
// end while

fclose($fp); 
// close the output file
?


Ben Turner wrote:

 Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line 47
 
 I am receiving this error on my page but the problem is that line 47 is the ? and 
last line of the page.  Is their something Im missing here??  
 
 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] Sending Form Arrays

2002-01-28 Thread Matt Schroebel

What I do is:
input type=checkbox name=check[] value=Box 1Box 1BR 
input type=checkbox name=check[] value=Box 2Box 2BR 
input type=checkbox name=check[] value=Box 3Box 3BR 
input type=checkbox name=check[] value=Box 4Box 4BR 
input type=checkbox name=check[] value=Box 5Box 5BR

Then in the action script you'll get an array with only the checked values named 
$checked.  So $checked[0] could be 'Box 2' and $checked[1] could be 'Box 5'.  Be aware 
if nothing is checked, then $checked won't be an array, so you'll need
to test with is_array($checked) before referencing it with, say, foreach.

 From: Scott Saraniero [EMAIL PROTECTED]
 Hi,
 
 I have a form that has a section with multiple checkboxes. I would 
 like to be able to send the checked boxes out as an array, and be 
 able to retrieve the array in the next page (that the form variables 
 go to.) I cannot find specific info on this anywhere. Can someone 
 please point me in the right direction?
 

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

2002-01-28 Thread Michael Kimsal

Liz Lynch wrote:

 can someone tell me whether or not asp can be used with mysql and is there any 
drawbacks to using it as opposed to php
 
 

Yes it can be used - no there are no real drawbacks other than that most 
documentation for ASP work assumes SQL Server or Access, so many 
tutorials won't be directly usable.


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]




Re: [PHP] php vs asp

2002-01-28 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then liz lynch blurted
 can someone tell me whether or not asp can be used with mysql and is there any 
drawbacks to using it as opposed to php

erm are you looking for an unbiased opinion on a /php/ mailing list?
If you're serious you might want to post your question on the MySQL list
or something similar.

- -- 

Nick Wilson

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



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

iD8DBQE8VWVPHpvrrTa6L5oRAoIHAJ4q43y5nSlmvMlfzTn/9VRC8NHy/gCdHfVy
qa2Ni5E2SyqkysDBY4IbEJ4=
=mx6e
-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] PHP IDE

2002-01-28 Thread DrouetL


You can use html-kit (www.chami.com) with the php plugin.

Very simple editor with syntax highlighting. Free

Or  you can buy phped from www.nusphere.com more sophisticated.

Laurent Drouet


-- 
PHP General Mailing List (http://www.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] Can PHTML pages cause spurious high counts?

2002-01-28 Thread Orrin Kerr

I've been searching the PHP website and FAQ and also the Analog web server analyzer 
website and their FAQ, but I haven't found an answer and was wondering if anyone else 
had seen ridiculously high request counts for their PHTML pages?

 I've tried a couple of the pages on my site and a single reload will result in the 
request count being incremented by 1000+.  According to Analog, about 96% of our 
requests have come from two pages on our website.  Not many of the phtml pages are 
misbehaving as far as I can see, but the few problem pages are a bugger.

Nothing very fancy in the code.  Primarily some include requests and a little bit of 
Javascript to parse the contents of a meta tag, format the result and create the HTML 
code to display it.

Does anyone have any ideas as to the cause of the high count?  or pointers to a site 
with the answer?

TIA muchly,


Orrin C. Kerr, Intranet Developer
RMAD, Farm Financial Programs Br, Agriculture  Agri-Food Canada
(613)759-7191
SJCB 6th floor, 930 Carling Ave., Ottawa, ON  K1A 0C5


--
PHP General Mailing List (http://www.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] Got a problem I cant figure out

2002-01-28 Thread JSheble


typically this means a missing semi-colon or a control structure that 
wasn't closed somewhere in the code...  it won't tell you where, so you'll 
just have to check and double-check all the lines of code

At 08:28 AM 1/28/2002 -0600, Rick Emery wrote:
SHOW US YOUR CODE

-Original Message-
From: Ben Turner [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 27, 2002 10:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Got a problem I cant figure out


Parse error: parse error in /var/www/docs/tacklebox/404handler.php on line
47

I am receiving this error on my page but the problem is that line 47 is the
? and last line of the page.  Is their something Im missing here??

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]




Re: [PHP] php vs asp

2002-01-28 Thread liz lynch

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
- Original Message -
From: Nick Wilson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 2:50 PM
Subject: Re: [PHP] php vs asp


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then liz lynch blurted
  can someone tell me whether or not asp can be used with mysql and is
there any drawbacks to using it as opposed to php

 erm are you looking for an unbiased opinion on a /php/ mailing list?
 If you're serious you might want to post your question on the MySQL list
 or something similar.

 - --

 Nick Wilson

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



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

 iD8DBQE8VWVPHpvrrTa6L5oRAoIHAJ4q43y5nSlmvMlfzTn/9VRC8NHy/gCdHfVy
 qa2Ni5E2SyqkysDBY4IbEJ4=
 =mx6e
 -END PGP SIGNATURE-

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



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




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

2002-01-28 Thread Girish Nath

Hi

If you have a delete link then try this :

script language=javascript

function confirmThis(url) {
if (confirm(Are you sure you want to delete ?)) {
window.location = url;
}
}
/script

Then you can generate the delete link dynamically with PHP eg :

a href=javascript:confirmThis('delete.php?id=xxx')Delete!/a

This should pop up a OK/Cancel dialog box type confirmation.

Regards


Girish
--
www.girishnath.co.uk




- Original Message -
From: Ivan Carey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 12:09 PM
Subject: [PHP] How do I use a confirm box to confirm before deletion from a
database


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]




Re: [PHP] php vs asp

2002-01-28 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then liz lynch blurted
 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

Hehe, well truth is I'm not sure either but I expect that performance
wise it would be very similar. It's when you start talking about
documentation and envoirnment as Micheal said that you'll notice the
difference. 

- -- 

Nick Wilson

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



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

iD8DBQE8VWxxHpvrrTa6L5oRAkCUAJ9aeWdNyTOXPBCi09C2tznk7Fw02QCgnCoC
RhQrSJDs4mw8WzWAMWBmXx8=
=GRe3
-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] php vs asp

2002-01-28 Thread Jon Farmer

 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] strerror and PHP 4.1.1

2002-01-28 Thread R'twick Niceorgaw

Is strerror function removed from PHP 4.1.1 ?

I'm getting an error like this after upgrading to PHP 4.1.1 from PHP 4.0.6.

Fatal error: Call to undefined function: strerror() in
/usr/nmademo/ctm/nma.php on line 79

This line was working fine on PHP 4.0.6.

Any help is appreciated.

Regards
R'twick Niceorgaw



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

I am soon to encounter the problem Mostafa is facing.
Currently, I have written my custom code to mail to
users subscribed to mailing lists on my site. (It is
custom code using PHP, MySQL, Linux cron.)
I was wondering if there is a mailing list system that
could use MySQL to retreive the list of subscribers.
Thanks.


--- Mostafa Al-Mallawani [EMAIL PROTECTED] wrote:
 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.
  
 


=
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

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




Re: [PHP] mailing to 19000 users

2002-01-28 Thread Jason Wong

On Monday 28 January 2002 23:33, Anas Mughal wrote:
 I am soon to encounter the problem Mostafa is facing.
 Currently, I have written my custom code to mail to
 users subscribed to mailing lists on my site. (It is
 custom code using PHP, MySQL, Linux cron.)
 I was wondering if there is a mailing list system that
 could use MySQL to retreive the list of subscribers.
 Thanks.

If you're using qmail, then ezmlm (or even better ezmlm-idx) can be made to 
work with MySQL.


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

/*
Leveraging always beats prototyping.
*/

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

2002-01-28 Thread Jason Wong

On Monday 28 January 2002 22:34, Scott Saraniero wrote:

 Thanks, I'll try this, but why is the value always 'Y'?

It doesn't have to be 'Y', it can be anything you want, as long as it's not 0 
(zero) or an empty string because they would be pretty hard to test for.


  try something like this:
 
  input type=checkbox name=check[0] value='Y' check 1BR
  input type=checkbox name=check[1] value='Y' check 2BR
  input type=checkbox name=check[2] value='Y' check 3BR
  input type=checkbox name=check[3] value='Y' check 4BR
  input type=checkbox name=check[4] value='Y' check 5BR


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

/*
Rocky's Lemma of Innovation Prevention:
Unless the results are known in advance, funding agencies will
reject the proposal.
*/

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

2002-01-28 Thread Jason Wong

On Monday 28 January 2002 23:15, liz lynch wrote:
 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

Still, you're not really going to get an unbiased opinion from this list. 
What you'll hear is probably something that reinforces your already biased 
point of view :)

For me, the drawback of using asp (and anything MS stuff) is the cost.

 - Original Message -
 From: Nick Wilson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 2:50 PM
 Subject: Re: [PHP] php vs asp

  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
 
  * and then liz lynch blurted
 
   can someone tell me whether or not asp can be used with mysql and is

 there any drawbacks to using it as opposed to php

  erm are you looking for an unbiased opinion on a /php/ mailing list?
  If you're serious you might want to post your question on the MySQL list
  or something similar.

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

/*
When neither their poverty nor their honor is touched, the majority of men
live content.
-- Niccolo Machiavelli
*/

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

If you use qmail, then ezmlm (www.ezmlm.org) might be a solution
for you. It's capable of using MySQL to store the subscriber
lists.

Daniel
 I am soon to encounter the problem Mostafa is facing.
 Currently, I have written my custom code to mail to
 users subscribed to mailing lists on my site. (It is
 custom code using PHP, MySQL, Linux cron.)
 I was wondering if there is a mailing list system that
 could use MySQL to retreive the list of subscribers.
 Thanks.


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




[PHP] Basic Password Protection.

2002-01-28 Thread Philip J. Newman

Can someone point me to a section in the manual where I can read about basic 
Authentication?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



[PHP] Need a little help

2002-01-28 Thread Brian V Bonini

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) {
//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]




Re: [PHP] php vs asp

2002-01-28 Thread Clint Tredway

With ASP the only cost is the OS.

Clint

-- Original Message --
From: Jason Wong [EMAIL PROTECTED]
Date: Mon, 28 Jan 2002 23:45:57 +0800

On Monday 28 January 2002 23:15, liz lynch wrote:
 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

Still, you're not really going to get an unbiased opinion from this list. 
What you'll hear is probably something that reinforces your already biased 
point of view :)

For me, the drawback of using asp (and anything MS stuff) is the cost.

 - Original Message -
 From: Nick Wilson [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, January 28, 2002 2:50 PM
 Subject: Re: [PHP] php vs asp

  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
 
  * and then liz lynch blurted
 
   can someone tell me whether or not asp can be used with mysql and is

 there any drawbacks to using it as opposed to php

  erm are you looking for an unbiased opinion on a /php/ mailing list?
  If you're serious you might want to post your question on the MySQL list
  or something similar.

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

/*
When neither their poverty nor their honor is touched, the majority of men
live content.
-- Niccolo Machiavelli
*/

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



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




Re: [PHP] php vs asp

2002-01-28 Thread Jon Farmer

 With ASP the only cost is the OS.
 
 Clint

ASP = Cost of hardware + Cost of OS + Cost of 3rdParty components.

PHP = Cost of hardware.

Regards

Jon

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



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

2002-01-28 Thread Girish Nath

Hi

Try :

http://www.php.net/manual/en/features.http-auth.php

Check the comments on the page for links to tutorials etc.

Regards :)


Girish
--
www.girishnath.co.uk


- Original Message -
From: Philip J. Newman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:49 PM
Subject: [PHP] Basic Password Protection.


Can someone point me to a section in the manual where I can read about basic
Authentication?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012



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

2002-01-28 Thread TD - Sales International Holland B.V.

On Monday 28 January 2002 16:21, you wrote:

I could be very very very wrong on this, but I think that if you want to 
access MySQL through ASP you need an ODBC in between it and I think that will 
slow things down. Far as I know PHP uses the MySQL libraries and that SHOULD 
(again, I'm NOT sure) take away some of the extra overhead ODBC has and it 
should thus be faster with PHP. (Assuming you don't run PHP on a windows box, 
in which case you might need to use ODBC as well, but again, not sure about 
that, I never use any of these on windoze machines why get things so 
complicated when it runs so smooth with apache/php/mysql under linux...)

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1


 * and then liz lynch blurted

  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

 Hehe, well truth is I'm not sure either but I expect that performance
 wise it would be very similar. It's when you start talking about
 documentation and envoirnment as Micheal said that you'll notice the
 difference.

 - --

 Nick Wilson

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



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

 iD8DBQE8VWxxHpvrrTa6L5oRAkCUAJ9aeWdNyTOXPBCi09C2tznk7Fw02QCgnCoC
 RhQrSJDs4mw8WzWAMWBmXx8=
 =GRe3
 -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] Need a little help

2002-01-28 Thread Girish Nath

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] enable dmalloc option for php 4.1.1

2002-01-28 Thread Ziying Sherwin



We tried to install php 4.1.1 on our Solaris 2.8 machine with gcc 2.95.2  and 
apache 1.3.22. We tried to enable as many configuration options as possible. 
It configured OK, but we encountered several error messages during compilation:

We configured with option --enable-dmalloc and --with-apxs,  the error
messages we got are:

In file included from /depot/package/apache_1.3.22/vendor/include/ap_config.h:1160,
 from /depot/package/apache_1.3.22/vendor/include/httpd.h:72,
 from mod_php4.c:32:
/usr/include/memory.h:20: conflicting types for `_dmalloc_memccpy'
/depot/include/dmalloc.h:435: previous declaration of `_dmalloc_memccpy'
/usr/include/memory.h:35: conflicting types for `_dmalloc_memchr'
/depot/include/dmalloc.h:437: previous declaration of `_dmalloc_memchr'
/usr/include/memory.h:37: conflicting types for `_dmalloc_memcpy'
/depot/include/dmalloc.h:424: previous declaration of `_dmalloc_memcpy'
/usr/include/memory.h:38: conflicting types for `_dmalloc_memset'
/depot/include/dmalloc.h:426: previous declaration of `_dmalloc_memset'
*** Error code 1
make: Fatal error: Command failed for target `mod_php4.lo'
Current working directory /site4/web_kit_1.0_rodgers/php_4.1.1/sapi/apache
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'

When we built apache, there is no options for dmalloc, does that mean we
could not enable dmalloc in php too?

Thanks
Ziying Sherwin


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

2002-01-28 Thread charlesk

How do you make a function like 
bool session_register (mixed name [, mixed ...])

What does the function look like that it can take unlimited arguments?

Charles Killmer

-- 
PHP General Mailing List (http://www.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] help sorting readdir values

2002-01-28 Thread dan radom

First I must state that I didn't write the code, and I'm not much of a programmer of 
any kind.  I'm hoping someone can tell me how to sort the filenames and file sizes 
returned by readdir and filesize in the below code.  Thanks in advance.

dan


?

function list_dir($dir)
{
$handle=opendir($dir);
echo ul;
while ($file = readdir($handle))
{
if ($file != '.'  $file != '..'   !ereg(\.php$, $file)) {
print (tr\ntd\n);
print (lia
href=\.$GLOBALS[path].$file.\.$file./a);
print (/td\n);
if (is_dir($file))
{
printf (td);
$toto = $GLOBALS[path];
$GLOBALS[path] .= $file./;
chdir ($file);
list_dir(.);
$GLOBALS[path] = $toto;
chdir (..);
printf (/td);
} else {
printf (td\n);
$size = filesize($file);
if ($size == NULL)
$size = unknown;
printf (nbsp;.$size. 
nbsp;bytes\n);
printf (/td\n);
}
   print (/tr\n);
}
}
echo /ul;
closedir($handle);
}

$directory = screenshots;

$GLOBALS[path] = http://.$HTTP_HOST./.$directory./;;

echo table\n;
list_dir(.); 
echo /table;

?

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

2002-01-28 Thread Matt Schroebel

http://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list

-Original Message-
From: charlesk [mailto:[EMAIL PROTECTED]] 

What does the function look like that it can take unlimited arguments?


-- 
PHP General Mailing List (http://www.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]Upload file to system

2002-01-28 Thread sundogcurt

Is that a bad word?

\ :

[EMAIL PROTECTED] wrote:

Did someone say hosting fees?

- Original Message -
From: sundogcurt [EMAIL PROTECTED]
To: GENERAL PHP LIST [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:32 PM
Subject: Re: [PHP]Upload file to system


You could try contacting your server admin and seeing if he / she will
increase the limit...

That would be where I would start.
If  that doesn't work, my hosting fees are quite reasonable  ahah



[EMAIL PROTECTED] wrote:

Thnx. it's working now. But.. Howcome I can only upload files no bigger
then 100 kb? I have changed the MAX_FILE_SIZE to 10. Also, I

can't

change the php.ini, coz the webserver isn't mine.. what to do now??

Sundogcurt wrote:

http://www.php.net/manual/en/features.file-upload.php
http://www.faqts.com/knowledge_base/view.phtml/aid/988

: )

[EMAIL PROTECTED] wrote:

I want to make something like when you are attaching something to an
email in hotmail. I want to make something that searches your own
computer for files on your harddisk that you want to upload to the
server.

But I don't know if this is possible. If this is possible.Can somebody
tell me which function I should use? Or if someone have an example...
please...

Duky











Re: [PHP] php vs asp

2002-01-28 Thread John Meyer

You can use ASP with Mysql, as long as you have myodbc installed on your
machine.  For me, ASP has been a bit slower, but you can still use it.
- Original Message -
From: liz lynch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 7:14 AM
Subject: [PHP] php vs asp


can someone tell me whether or not asp can be used with mysql and is there
any drawbacks to using it as opposed to php



-- 
PHP General Mailing List (http://www.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 call method from another class

2002-01-28 Thread David Yee

If I have a PHP class (let's say it's called ClassA), how do I call a method
from another class (ClassB) within ClassA?  Thanks.

David


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




[PHP] Human Resource managment system

2002-01-28 Thread M.E. Suliman

Hi

Are there any PHP Projects that are developing a HR management system.  We
hope to create this and in future integrating with payroll and tax
deductions etc.

I will appreciate anyone who can advise where I can find info relating to
this.

Thanks

Mohamed

- Original Message -
From: Michael Kimsal [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, January 27, 2002 8:08 PM
Subject: [PHP] Re: CGI vs. ISAPI


 Benjamin Deruyter wrote:

  I'm fairly new to PHP, having worked with ColdFusion in the past.  Can
  somebody shed some light on to the key differences between the CGI
  installation and the ISAPI installation.  I working with IIS on Win2k
and
  using MySQL for a db server.  Thanks.
 
   - Ben
 
 

  From all practical accounts the ISAPI is still not stable under
 Windows.  The claim is that PHP itself is stable, but the majority of
 the DLL files which provide the additional functionality (IMAP, GD, etc)
 are NOT stable (threadsafety I think is the issue) so unless you're
 doing something extremely basic ISAPI may not be the answer.

 Only you can tell for certain - set it up on your system and if it
 works, great.  If it starts to crash, don't waste hours or days or weeks
 trying to fix it - it's not your problem.  Just go back to CGI.  If
 you're an experienced C coder under Windows, jump in and try to help
 debug and patch it, otherwise just stick with CGI.

 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 Mailing List (http://www.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] Mysql / PostgreSQL with PHP

2002-01-28 Thread Chris Lott

Both work well with PHP. Later versions of PostgreSQL are quite fast
(comparable to PHP). MySQL is still a little faster and there seems to be a
much larger base of users and support. You can't go wrong with either one...
if you need the features that PostgreSQL offers that MySQL currently lacks
(stored procedures and subselects, which I am waiting for in the new MySQL
almost with tears in my eyes :), I would go with pg. 

I don't believe pg has replication features. I've never used pg on Windows
if you are thinking of using it there.

c
--
Chris Lott
http://www.chrislott.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]




RE: [PHP] strerror and PHP 4.1.1

2002-01-28 Thread Mark Roedel

 -Original Message-
 From: R'twick Niceorgaw [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, January 28, 2002 9:30 AM
 To: PHP-General
 Subject: [PHP] strerror and PHP 4.1.1
 
 
 Is strerror function removed from PHP 4.1.1 ?

The manual at http://www.zend.com/manual/function.strerror.php says it
existed for 4.0.2-4.0.6 only, and includes this notice: 

WARNING: This function is EXPERIMENTAL. The behaviour of this function,
the name of this function, and anything else documented about this
function may change in a future release of PHP without notice. Be warned
and use this function at your own risk.

It looks as if the function has, in fact, been renamed to
socket_strerror() for versions of PHP = 4.1.0, although the same
warning apparently applies.


---
Mark Roedel   | You know, Hobbes, some days even
Systems Programmer|  my lucky rocketship underpants
LeTourneau University |  don't help.
Longview, Texas  USA  | -- Calvin

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

2002-01-28 Thread Jim Lucas [php]

?
function MyFunc($item, $args=)
{
extract((isset($args)?$args:array()));

return($item, $first_arg$second_arg$third_arg);
}

//call MyFunc()
echo MyFunc(hi there, array(
first_arg = my name ,
second_arg = is ,
third_arg = Jim.,
));

// this will print 
//  hi there, my name is Jim.
?

Hope this helps.

Jim Lucas
- Original Message - 
From: charlesk  [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 8:23 AM
Subject: [PHP] mixed datatype


 How do you make a function like 
 bool session_register (mixed name [, mixed ...])
 
 What does the function look like that it can take unlimited arguments?
 
 Charles Killmer
 
 -- 
 PHP General Mailing List (http://www.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: Building my site... again - somewhat OT

2002-01-28 Thread Andrew Chase

Hi Torkil,

You may want to head over to Webmonkey and read their article about Search
Engine optimization:

http://hotwired.lycos.com/webmonkey/01/23/index1a.html

A few key points that have proven very helpful with my personal web site:

• A central crawler index with links to each page on my site that I want
spiders to crawl; this is the only page I need to submit to a search engine,
and since I store my content in MySQL the page is always up to date.
• A friendly URL structure - some search engines will follow a link like
index.php?page=carssubpage=ferrari, but I figured I would make my site
crawlable by *any* spider that might come its way, and began using Apache
mod_rewrite to translate urls internally; so when a browser requests a link
like /cars/ferrari/index.html, Apache will rewrite the URL to
index.php?page=carssubpage=ferrari internally.  I'm not sure if this is
an issue with the CGI version of PHP like the other URL rewriting method
that has been mentioned.

Another handy tag that some spiders (Most notably, Googlebot) obey is the
ROBOTS meta tag, which tells the spider what to do with the current page:
meta robots='index, follow'   - Index the current page, and follow all of
its links
meta robots='index, nofollow' - Index the the current page, but don't
follow any links
meta robots='noindex, follow' - Don't index the current page, but follow
all of its links
meta robots='noindex, nofollow'   - Don't index the current page, and don't
follow any links; dead end.

HTH,

-Andy


 -Original Message-
 From: Torkil Johnsen [mailto:[EMAIL PROTECTED]]

 Will
 the web spiders and web crawlers ever follow a link like
 index.php?page=carssubpage=ferrari and will they ever index what
 they find
 there, and, and, and, and...

 Well... does anyone understand what I'm asking here? WOuld this be a good
 way to build my site to ensure getting hits from search engines,
 or should I
 do this some other way? Anyone know?


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

2002-01-28 Thread charlesk

We host many sites with PHP.  Is there any way to have each site use a different 
php.ini?

Charles Killmer

-- 
PHP General Mailing List (http://www.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] Human Resource managment system]

2002-01-28 Thread 911job

Hi.

Look at 
http://www.911-job.com

If it is like that you need, call me directly.

Elena Koroleva


M.E. Suliman wrote:
 
 Hi
 
 Are there any PHP Projects that are developing a HR
management system.  We
 hope to create this and in future integrating with
payroll and tax
 deductions etc.
 
 I will appreciate anyone who can advise where I can
find info relating to
 this.
 
 Thanks
 
 Mohamed
 
 - Original Message -
 From: Michael Kimsal [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 27, 2002 8:08 PM
 Subject: [PHP] Re: CGI vs. ISAPI
 
  Benjamin Deruyter wrote:
 
   I'm fairly new to PHP, having worked with
ColdFusion in the past.  Can
   somebody shed some light on to the key
differences between the CGI
   installation and the ISAPI installation.  I
working with IIS on Win2k
 and
   using MySQL for a db server.  Thanks.
  
- Ben
  
  
 
   From all practical accounts the ISAPI is still not
stable under
  Windows.  The claim is that PHP itself is stable,
but the majority of
  the DLL files which provide the additional
functionality (IMAP, GD, etc)
  are NOT stable (threadsafety I think is the issue)
so unless you're
  doing something extremely basic ISAPI may not be
the answer.
 
  Only you can tell for certain - set it up on your
system and if it
  works, great.  If it starts to crash, don't waste
hours or days or weeks
  trying to fix it - it's not your problem.  Just go
back to CGI.  If
  you're an experienced C coder under Windows, jump
in and try to help
  debug and patch it, otherwise just stick with
CGI.
 
  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 Mailing List (http://www.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] Multiple INI Files

2002-01-28 Thread Jim Lucas [php]

what OS are you running them on?

if it is linux with apache, you can override most of the php.ini settings in
the httpd.conf file

http://www.php.net/manual/en/configuration.php#AEN2200

this will show you how to override.  it doesn't show it here, but this will
also work in the virtual host blocks in the httpd.conf file.

Jim Lucas
- Original Message -
From: charlesk  [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 10:10 AM
Subject: [PHP] Multiple INI Files


 We host many sites with PHP.  Is there any way to have each site use a
different php.ini?

 Charles Killmer

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

2002-01-28 Thread David Otton

On Mon, 28 Jan 2002 12:10:02 -0600, you wrote:

We host many sites with PHP.  Is there any way to have each site use a different 
php.ini?

You can put seperate PHP directives in Apache's .htaccess file for
each site you host.

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

2002-01-28 Thread Eduardo Melo

Someone knows how to use the IF command ?

I need two expressions as such as IF (exp1 AND exp2) ...

thank's

eduardo melo
computer programmer

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

2002-01-28 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Eduardo Melo blurted
 Someone knows how to use the IF command ?

Have you Read The Fine Manual Eduardo?
Try www.php.net I'm not sure if there is a translation for your language
though.

- -- 

Nick Wilson

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



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

iD8DBQE8VZsIHpvrrTa6L5oRAuZRAJwJ5DyTi1yuZwsCe2gBx+oFf7KtrgCfaI0O
xfGh1w11wqxhl4EUy8tGnUU=
=2OKd
-END PGP SIGNATURE-

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




[PHP] RE: Multiple INI Files

2002-01-28 Thread charlesk

Windows 2000 Server, PHP 4.1.0, IIS 5.0


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

2002-01-28 Thread LaserJetter

Not quite your thing, but I'm sticking the school's timetable on a server so
that anyone can call up their lesson timetable and also find out teacher's
timetables and whether or not classrooms are free.
The only way I found I could do this was in MySQL and although I dont know
of any projects, I think this is the kind of structure you would be after.



M.E. Suliman [EMAIL PROTECTED] wrote in message
012c01c1a822$44203380$c2b81fc4@avalanche">news:012c01c1a822$44203380$c2b81fc4@avalanche...
 Hi

 Are there any PHP Projects that are developing a HR management system.  We
 hope to create this and in future integrating with payroll and tax
 deductions etc.

 I will appreciate anyone who can advise where I can find info relating to
 this.

 Thanks

 Mohamed

 - Original Message -
 From: Michael Kimsal [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, January 27, 2002 8:08 PM
 Subject: [PHP] Re: CGI vs. ISAPI


  Benjamin Deruyter wrote:
 
   I'm fairly new to PHP, having worked with ColdFusion in the past.  Can
   somebody shed some light on to the key differences between the CGI
   installation and the ISAPI installation.  I working with IIS on Win2k
 and
   using MySQL for a db server.  Thanks.
  
- Ben
  
  
 
   From all practical accounts the ISAPI is still not stable under
  Windows.  The claim is that PHP itself is stable, but the majority of
  the DLL files which provide the additional functionality (IMAP, GD, etc)
  are NOT stable (threadsafety I think is the issue) so unless you're
  doing something extremely basic ISAPI may not be the answer.
 
  Only you can tell for certain - set it up on your system and if it
  works, great.  If it starts to crash, don't waste hours or days or weeks
  trying to fix it - it's not your problem.  Just go back to CGI.  If
  you're an experienced C coder under Windows, jump in and try to help
  debug and patch it, otherwise just stick with CGI.
 
  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 Mailing List (http://www.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] if command

2002-01-28 Thread Girish Nath

Hi

http://www.php.net/manual/en/control-structures.php

for example :

if ($firstname  == Eduardo  $lastname == Melo) {
print (I know you)
}
else {
print (I don't know you);
}

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: Eduardo Melo [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:30 PM
Subject: [PHP] if command


Someone knows how to use the IF command ?

I need two expressions as such as IF (exp1 AND exp2) ...

thank's

eduardo melo
computer programmer

_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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

2002-01-28 Thread Rouvas Stathis

 Someone knows how to use the IF command ?
 
 I need two expressions as such as IF (exp1 AND exp2) ...
 
 name of poster deleted
 computer programmer
 ^

A computer programmer not knowing the IF command?
Really, what computer do you program?

-Stathis.

PS: Sorry, I just can't resist. It's ok for someone to asks questions,
but in this
case the axiom the only stupid question is the one not asked
simply does 
not stand.

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




Re: [PHP] File uploading like hotmail

2002-01-28 Thread Girish Nath

Hi

It's in the manual at :

http://www.php.net/manual/en/features.file-upload.php

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File uploading like hotmail


I think you might be looking for input type=file HTML form element.


Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to make something like when you are attaching something to an
 email in hotmail. I want to make something that searches your own
 computer for files on your harddisk that you want to upload to the
 server.

 But I don't know if this is possible. If this is possible.Can somebody
 tell me which function I should use? Or if someone have an example...
 please...

 Duky




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



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




Re: [PHP] File uploading like hotmail

2002-01-28 Thread Girish Nath

Hi

It's in the manual at :

http://www.php.net/manual/en/features.file-upload.php

Regards


Girish
--
www.girishnath.co.uk


- Original Message - 
From: qartis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 6:37 PM
Subject: Re: [PHP] File uploading like hotmail


I think you might be looking for input type=file HTML form element.


Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to make something like when you are attaching something to an
 email in hotmail. I want to make something that searches your own
 computer for files on your harddisk that you want to upload to the
 server.

 But I don't know if this is possible. If this is possible.Can somebody
 tell me which function I should use? Or if someone have an example...
 please...

 Duky




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

2002-01-28 Thread pong-TC

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]




RE: [PHP] How to call method from another class

2002-01-28 Thread Sandeep Murphy


first create an instance of class B like this...

$test = new classB();

Now, u can refer to any function or method of classB like this:

$test-hello(); // where hello() is a method of classB..

cheers,
sands

-Original Message-
From: David Yee [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 28 de Janeiro de 2002 17:19
To: [EMAIL PROTECTED]
Subject: [PHP] How to call method from another class


If I have a PHP class (let's say it's called ClassA), how do I call a method
from another class (ClassB) within ClassA?  Thanks.

David


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

-- 
PHP General Mailing List (http://www.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] multiply-defined symbol error with php 4.1.1 on Solaris 2.8

2002-01-28 Thread Ziying Sherwin


We tried to build php 4.1.1 with as many options as possible on our Solaris 2.8
machine with gcc 2.95.2 and Apache 1.3.22. During the compilation, we had
a problem with wddx extention which complains that header file expat.h is 
not in the expat 1.2 package that we installed for php. Thanks to Rasmus, we 
now know that we can leave off the --with-expat-dir switch completely, 
since php already comes with its own expat. We are wondering, are there 
other packages like expat that php already has its own copy of them, for example,
snmp, yaz, pspell or mnogosearch?

We got the following error message during the compilation:

ld: fatal: symbol `odr_bool' is multiply-defined:
(file Zend/.libs/libZend.al(odr_bool.o) and file 
/depot/package/yaz_1.8.4/vendor/lib/libyaz.a(odr_bool.o));
ld: fatal: symbol `ber_boolean' is multiply-defined:
(file Zend/.libs/libZend.al(ber_bool.o) and file 
/depot/package/yaz_1.8.4/vendor/lib/libyaz.a(ber_bool.o));
[...]
/depot/package/pspell_.12.2/lib/libpspell.a(string_pair_emulation.o));
ld: fatal: symbol `_ZN22PspellCanHaveErrorImpl11reset_errorEv' is multiply-defined:
(file Zend/.libs/libZend.al(error_impl.o) and file 
/depot/package/pspell_.12.2/lib/libpspell.a(error_impl.o));
ld: fatal: symbol `_Z24new_pspell_manager_classP12PspellConfig' is multiply-defined:
(file Zend/.libs/libZend.al(manager_impl.o) and file 
/depot/package/pspell_.12.2/lib/libpspell.a(manager_impl.o));
[...]
ld: fatal: symbol `UdmAddParser' is multiply-defined:
(file Zend/.libs/libZend.al(parser.o) and file 
/depot/package/mnogosearch_3.1.19/vendor/lib/libudmsearch.a(parser.o));
ld: fatal: symbol `UdmInsertAffix' is multiply-defined:
(file Zend/.libs/libZend.al(sql.o) and file 
/depot/package/mnogosearch_3.1.19/vendor/lib/libudmsearch.a(sql.o));

Is that problem similar to expat which php has its own copy or because of
other things that we overlook?

Thanks,
Ziying Sherwin

P.S. I am not in the mailing list, please send your response to 

 [EMAIL PROTECTED]







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




Re: [PHP] File uploading like hotmail

2002-01-28 Thread qartis

I think you might be looking for input type=file HTML form element.


Duky Yuen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I want to make something like when you are attaching something to an
 email in hotmail. I want to make something that searches your own
 computer for files on your harddisk that you want to upload to the
 server.

 But I don't know if this is possible. If this is possible.Can somebody
 tell me which function I should use? Or if someone have an example...
 please...

 Duky




-- 
PHP General Mailing List (http://www.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-28 Thread Mostafa Al-Mallawani

I found some nice mailing list managers at
http://www.hotscripts.com/PHP/Scripts_and_Programs/Mailing_List_Managers
/


-Original Message-
From: Anas Mughal [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 28, 2002 5:33 PM
To: Mostafa Al-Mallawani; [EMAIL PROTECTED]
Subject: Re: [PHP] mailing to 19000 users

I am soon to encounter the problem Mostafa is facing.
Currently, I have written my custom code to mail to
users subscribed to mailing lists on my site. (It is
custom code using PHP, MySQL, Linux cron.)
I was wondering if there is a mailing list system that
could use MySQL to retreive the list of subscribers.
Thanks.


--- Mostafa Al-Mallawani [EMAIL PROTECTED] wrote:
 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.
  
 


=
Anas Mughal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Tel: 973-249-6665

__
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 General Mailing List (http://www.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] Help with Logical 'OR'

2002-01-28 Thread jv

It seems that only the first condition is being evaluated.

I know that if  both of the following conditions are false then the second
set of statements should get read, and that's what happens, but when I set
$name to true and $text to false (true||false) then the first set gets read.

Shouldn't both conditions be true in order for the first set of statements
be read? Why would the first set of statements get read when the conditions
are (true||false)?

Thanks in advance for your help.
james


if ($name || $text)

{

  $text = stripslashes($text);
  print Hello $name\nbr;
  print You said:\nbr $text\n;

}else{

  print Sorry, but you seem to have left one or more entries blank.br\n;
  print Please return to a href=\/prac/form.html\form/a\n;
  print  and complete the inputbr\n;

}
**



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

2002-01-28 Thread Jeff Sheltren

With a logical OR statement, many languages will evaluate the first 
statement, and if the first condition is true, then it will not evaluate 
the second condition, because TRUE OR (anything) is TRUE.  This saves the 
program from executing any more code than it has to.  If the first 
condition is FALSE, then the second condition will be checked.

If you are wanting both $name and $text to be true in order for the first 
block of code to be executed, then you will want to use an AND () statement.

I hope that answers your question.

Jeff

At 02:04 PM 1/28/2002 -0600, jv wrote:
It seems that only the first condition is being evaluated.

I know that if  both of the following conditions are false then the second
set of statements should get read, and that's what happens, but when I set
$name to true and $text to false (true||false) then the first set gets read.

Shouldn't both conditions be true in order for the first set of statements
be read? Why would the first set of statements get read when the conditions
are (true||false)?

Thanks in advance for your help.
james


if ($name || $text)

 {

   $text = stripslashes($text);
   print Hello $name\nbr;
   print You said:\nbr $text\n;

 }else{

   print Sorry, but you seem to have left one or more entries blank.br\n;
   print Please return to a href=\/prac/form.html\form/a\n;
   print  and complete the inputbr\n;

}
**



-- 
PHP General Mailing List (http://www.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-28 Thread Brian V Bonini

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^€(uT”3衇 J2¶’O\ԑG)ÂGìˆ
̖•t鎖ä(òŠ¡¹!n3pPߚƒÔÓÄVœõ`\Z·Å„ô2‘Ԁ;Ur©e8òÞhS€‰0Ítˆ%;-‚X
âÑ9›ºcI%„‚(CqxpR ¤Ô„4ûȶÔ%03. Ì`‰ÃåP† r ˜é™
“ÀÃ^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]




Re: [PHP] How to call method from another class

2002-01-28 Thread David Yee

Got it- thanks Sandeep.

David

- Original Message -
From: Sandeep Murphy [EMAIL PROTECTED]
To: 'David Yee' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 11:12 AM
Subject: RE: [PHP] How to call method from another class



 first create an instance of class B like this...

 $test = new classB();

 Now, u can refer to any function or method of classB like this:

 $test-hello(); // where hello() is a method of classB..

 cheers,
 sands

 -Original Message-
 From: David Yee [mailto:[EMAIL PROTECTED]]
 Sent: segunda-feira, 28 de Janeiro de 2002 17:19
 To: [EMAIL PROTECTED]
 Subject: [PHP] How to call method from another class


 If I have a PHP class (let's say it's called ClassA), how do I call a
method
 from another class (ClassB) within ClassA?  Thanks.

 David


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



-- 
PHP General Mailing List (http://www.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 call method from another class

2002-01-28 Thread Joel Boonstra

 first create an instance of class B like this...

 $test = new classB();

 Now, u can refer to any function or method of classB like this:

 $test-hello(); // where hello() is a method of classB..

That's not what the original question was, though.  David (I think, unless
I got my nested replies wrong), was looking to call a method of ClassA
with an object of ClassB:

  If I have a PHP class (let's say it's called ClassA), how do I call a
  method from another class (ClassB) within ClassA?  Thanks.

The answer to this question, unless my OOP theory is gone, is that you
can't, unless ClassB is an extension of classA.

So if you have:

class ClassA {
  // some vars
  function get_contents() {
// some stuff
return $something;
  }
}

and then:

class ClassB extends ClassA {
  // some vars
  function display_contents() {
print $this-get_contents();
  }
}

Then you're good.  Otherwise, I don't think it's possible...

-- 
[ joel boonstra | [EMAIL PROTECTED] ]


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




RE: [PHP] How to echo the /n, /r, etc... to the HTML display?

2002-01-28 Thread Matt Schroebel

Read the first user note at the bottom of this manual page:
http://www.php.net/manual/en/function.htmlentities.php

-Original Message-
Subject: [PHP] How to echo the /n, /r, etc... to the HTML display?


So, you see, if I use the PHP function, nl2br(), that took care of the cr and 
the lf.  But it doesn't take care of the sp so how do I fix that?  This sp 
when work correctly will be able to justify the text on each line.  Anyone know?

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

Good day,

I've already done this once with Perl and qmail, which was used against
about 50,000 users.  I'm sure it would not be much different with PHP.

All I did was create a program to get the addresses from the DB, and then
use what effectively is a wrapper script for qmail-inject (you would use
whatever program you use) that would add 500 people to the BCC list at a
time and pass the text of the e-mail to the program via a pipe.

It was about a 15 minute job.  I would recommend it, as it's easy to convert
if you have to switch MTAs.


Darren Gamble
Planner, Regional Services
Shaw Cablesystems GP
630 - 3rd Avenue SW
Calgary, Alberta, Canada
T2P 4L4
(403) 781-4948


-Original Message-
From: Jason Wong [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 28, 2002 8:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] mailing to 19000 users


On Monday 28 January 2002 23:33, Anas Mughal wrote:
 I am soon to encounter the problem Mostafa is facing.
 Currently, I have written my custom code to mail to
 users subscribed to mailing lists on my site. (It is
 custom code using PHP, MySQL, Linux cron.)
 I was wondering if there is a mailing list system that
 could use MySQL to retreive the list of subscribers.
 Thanks.

If you're using qmail, then ezmlm (or even better ezmlm-idx) can be made to 
work with MySQL.


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

/*
Leveraging always beats prototyping.
*/

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

2002-01-28 Thread Sam Masiello


For sake of efficiency, many languages will do what is called Short
Circuit in a situation like this.  Let's look at a simple truth table for
an OR using two conditions (T=true, F=false):

T || T = T
T || F = T
F || T = T
F || F = F

In the first two cases, it is only necessary to evaluate the first condition
because since they are true, the entire statement will be true.  In case
number 3, since the first condition was false, the second condition needs to
be evaluated to determine whether or not the entire statement is true.  In
case 4, both statements are evaluated (for the same reason as case 3).

If you need BOTH statements to be evaluated, chances are that you want an
AND condition, not an OR condition.  A simple truth table for an AND using
two conditions:

T  T = T
T  F = F
F  T = F
F  F = F

In the case of the AND, it is always necessary to evaluate both conditions
as both conditions need to be true in order for the entire statement to be
true.  If any condition in a set of AND conditions is false, the value of
the entire expression is also false.

HTH

Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
[EMAIL PROTECTED]



- Original Message -
From: jv [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 3:04 PM
Subject: [PHP] Help with Logical 'OR'


 It seems that only the first condition is being evaluated.

 I know that if  both of the following conditions are false then the second
 set of statements should get read, and that's what happens, but when I set
 $name to true and $text to false (true||false) then the first set gets
read.

 Shouldn't both conditions be true in order for the first set of statements
 be read? Why would the first set of statements get read when the
conditions
 are (true||false)?

 Thanks in advance for your help.
 james

 
 if ($name || $text)

 {

   $text = stripslashes($text);
   print Hello $name\nbr;
   print You said:\nbr $text\n;

 }else{

   print Sorry, but you seem to have left one or more entries
blank.br\n;
   print Please return to a href=\/prac/form.html\form/a\n;
   print  and complete the inputbr\n;

 }
 **



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

2002-01-28 Thread Jason G.

$str = ereg_replace('[-!@#$%^*()_+=-\';:/.,?]', '', $str);

You may need to escape some of these characters with \

On the other hand, they are contained in a character class [] so you may 
not need to escape them.  Note how the `-' is in the beginning.

-Jason Garber
IonZoft.com


At 09:13 AM 1/27/2002 +1300, Philip J. Newman wrote:
Any Ideas how I can remove   !@#$%^*()_+=-';:/.,? charactors from a 
string?

Philip J. Newman
Philip's Domain - Internet Project.
http://www.philipsdomain.com/
[EMAIL PROTECTED]
Phone: +64 25 6144012


-- 
PHP General Mailing List (http://www.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] improve turning urls into links routine

2002-01-28 Thread Peter J. Schoenster

Hi,

I did a quick search for something like this below but did not find it. 

Would you please criticize it. Thanks.

function MakeUrls($data) {
$words = explode( , $data);
$new_data = ;
while (list ($key,$row) = each ($words) ) {

if (preg_match (/^http:\/\//, $row)) {
// should just be the url here
$new_data .= a href=\$row\$row/a ;
continue;
}

if (preg_match (/http/, $row)) {  // catch on the line 
break which I did not explode on
$row = preg_replace (/(http[^\s]+)/,a 
href=\\\1\\\1/a, $row);
}

$new_data .= $row ;
}

return $new_data;   
} # End Get


Peter

---
Reality is that which, when you stop believing in it, doesn't go
away.
-- Philip K. Dick

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

2002-01-28 Thread Phil Schwarzmann

I keep getting parse error with this code:
($teams[] is a big array that I got by using mysql_fetch_array)
 
 
   $r = game;
   echo select name='game';
   echo option value=game1$teams[$r.'1']/option;
   echo option value=game1$teams[$r.'16']/option;
   echo /select;
 
Im trying to make a dropdown list.
 
Here is the error message:
Parse error: parse error, expecting `']'' in
/home/filanya/www/madness/bracket.php on line 65

(line 65 is the third line down)
 
THANKS



  1   2   >