Re: [PHP] newbie : how to access functions in seperate files???

2001-09-03 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Aaron Moore) wrote:

 resides in line 6 of test.php where i try to call a function which is in
 function.php
 
 the test.php file :
 ___
 ?php
 require(functions.php);

snip

 function.php file :

Umm, so is the file called function.php, or is it functions.php?  'Cuz 
it's the latter that you've attempted to include...

-- 
CC

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




[PHP] probs with exec, pls pls help

2001-09-03 Thread taz

Should this work, if not, why not?

?php exec(mysqlimport -u root -ppasword test one.txt) ?

the import works fine from the command line
exec(ls) works too


TIA
Terry



Re: [PHP] CSS with PHP?

2001-09-03 Thread David Robley

On Mon,  3 Sep 2001 13:18, Ashlyn wrote:
 I am using a downloaded PHP sitesearch script and can not get it to
 read the page contents past the style sheet..

 If I search a text file it will give me the contents exactly as I wish,
 but if I search a html document it only gives me the page title and
 site links..

 The page in question is at
 http://www.themysticmoon.com/booksfiles/search.php and if you type in
 conway it will show you exactly what I mean. First listing is html
 page, second is text... I need it to look like second listing..

 In the readme file it said to
 When using CSS and Javascript make sure you enclose it in comments or
 place it in an external file, otherwise the indexer will index it. 

 This is way over the top of my head...I am using a linked stylesheet
 for the whole site..
 Any ideas gladly welcomed..
 Thanks
 Ashlyn


Well, without knowing more about your search engine, in your page
 http://www.themysticmoon.com/booksfiles/celtic.html

try referencing your stylesheet without a full URL. That is, use

LINK REL=stylesheet HREF=/sitestyle.css TYPE=text/css

Oh, and I think your stylesheet has a specific font referenced which 
doesn't exist on my machine. Somehow I don't think the results are as you 
would like them to be :-)

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

   Closed Hearing for the Caption Impaired...

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

2001-09-03 Thread Shi

it still dosen't work

Help

Shimon
Richard Lynch [EMAIL PROTECTED] wrote in message
00f701c133ef$b52b5200$6401a8c0@Lynchux100">news:00f701c133ef$b52b5200$6401a8c0@Lynchux100...
 You're missing a closing ) on the final print() statement...

 --
 WARNING [EMAIL PROTECTED] address is an endangered species -- Use
 [EMAIL PROTECTED]
 Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
 Volunteer a little time: http://chatmusic.com/volunteer.htm
 - Original Message -
 From: Shi [EMAIL PROTECTED]
 Newsgroups: php.general
 To: [EMAIL PROTECTED]
 Sent: Sunday, September 02, 2001 11:01 AM
 Subject: imap?


  I'm using imap_header to get all the headers in a newsgroup on a
 NNTP-server
  like this
 
  if($nntp=imap_open({sunsite.auc.dk/nntp:119}dk.admin,,;))
  {
  for($i=1;$i5;$i++)
  {
  $header = imap_header($nntp, $i);
  echo MESSAGE ID:  .
  HTMLSpecialChars($header-message_id) . BR\n;
  echo SUBJECT:a href='visInd.php' .
  $header-Subject . br\n/a;
 
 echo SENDER ADDRESS:  .
  HTMLSpecialChars($header-senderaddress) . BR\n;
 echo REPLY-TO:  .
  HTMLSpecialChars($header-reply_toaddress) . BR\n;
  print(DATE: $header-datebr\n);
  echo REFERENCES:  . HTMLSpecialChars($header-references)
.
  BR\n;
  print(XREF:  . $header-xref) . BR;
  }
  }
 
  But I can't get it to write the XREF on the screen. Every thing else
 works.
 
  I hope that you can help me
  Thanks
 
  Shimon
 
 




-- 
PHP General Mailing List (http://www.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] probs with exec, pls pls help

2001-09-03 Thread David Robley

On Mon,  3 Sep 2001 17:00, taz wrote:
 Should this work, if not, why not?

 ?php exec(mysqlimport -u root -ppasword test one.txt) ?

 the import works fine from the command line
 exec(ls) works too


 TIA
 Terry

Probably the user that your webserver, and hence your php script, runs as 
does not have permissions to execute mysqlimport.

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

   Self-made man: A horrible example of unskilled labor.

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




Re: [PHP] newbie : how to access functions in seperate files???

2001-09-03 Thread Aaron Moore

its functions.php

as i've said my include works... because i'm able to echo from it... i just
can't access the functions.
Cc Zona [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 In article [EMAIL PROTECTED],
  [EMAIL PROTECTED] (Aaron Moore) wrote:

  resides in line 6 of test.php where i try to call a function which is in
  function.php
 
  the test.php file :
  ___
  ?php
  require(functions.php);

 snip

  function.php file :

 Umm, so is the file called function.php, or is it functions.php?  'Cuz
 it's the latter that you've attempted to include...

 --
 CC



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




[PHP] apache 1.3.20 segfaults with php 4.0.6/midgard/imap

2001-09-03 Thread Vincent Stoessel

I am trying to use php 4.0.6 with imap. midgard and mysql
extentions compiled in.
When I start apache I get information in the logs about many child 
proccesses dying. Yet I have plenty memory left and everthing else seems 
OK. Not a lot of traffic here at 3.27 am.

I ran gdb and this is what I got:


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

Program received signal SIGSEGV, Segmentation fault.
0x2ac57f51 in ?? () from /usr/local/apache/libexec/libphp4.so
(gdb) bt
#0  0x2ac57f51 in ?? () from /usr/local/apache/libexec/libphp4.so
#1  0x2ac6fee6 in ?? () from /usr/local/apache/libexec/libphp4.so
#2  0x2ac6f0ca in ?? () from /usr/local/apache/libexec/libphp4.so
#3  0x2ac6e99d in ?? () from /usr/local/apache/libexec/libphp4.so
#4  0x2afaac03 in ?? () from /usr/local/apache/libexec/libphp4.so
#5  0x2af80985 in ?? () from /usr/local/apache/libexec/libphp4.so
#6  0x2af838ca in ?? () from /usr/local/apache/libexec/libphp4.so
#7  0x2af7fafd in ?? () from /usr/local/apache/libexec/libphp4.so
#8  0x2af908b6 in ?? () from /usr/local/apache/libexec/libphp4.so
#9  0x2af8e5a6 in ?? () from /usr/local/apache/libexec/libphp4.so
#10 0x8071cce in run_cleanups ()
#11 0x80704fd in ap_clear_pool ()
#12 0x8070571 in ap_destroy_pool ()
#13 0x80704ec in ap_clear_pool ()
#14 0x807fcff in child_main ()
#15 0x80802bc in make_child ()
#16 0x8080419 in startup_children ()
#17 0x8080a56 in standalone_main ()
#18 0x80811e3 in main ()
#19 0x2ab649cb in __libc_start_main (main=0x8080e9c main, argc=2, 
argv=0x7af4, init=0x804ef6c _init, fini=0x80b59ec _fini,
 rtld_fini=0x2aab5e60 _dl_fini, stack_end=0x7aec) at 
../sysdeps/generic/libc-start.c:92



any clue bricks would be helpful.
System in an intel 800mhz  redhat 6.2 server with 256M

configure line was :


  ./configure  --disable-xml --with-mysql=/usr/local 
--with-apxs=/usr/local/apache/bin/apxs  --with-midgard=/usr/local 
--with-imap

Thanks



-- 
Vincent Stoessel [EMAIL PROTECTED]
Java Linux Apache Mysql Php (JLAMP) Engineer
(301) 362-1750 Mobile (410) 419-8588


-- 
PHP General Mailing List (http://www.php.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: probs with exec, pls help

2001-09-03 Thread _lallous

should'nt I guess
I should at least specify full path of mysqlimport as in:
exec(/usr/local/mysql/bin/mysqlimport -u -p dada dasda)

Taz [EMAIL PROTECTED] wrote in message
002801c133f3$1e2204e0$0feafea9@reynolds">news:002801c133f3$1e2204e0$0feafea9@reynolds...
Should this work, if not, why not

?php exec(mysqlimport -u root -ppasword test one.txt) ?

the import works fine from the command line

TIA
Terry






-- 
PHP General Mailing List (http://www.php.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: number to word converter

2001-09-03 Thread _lallous

What was the solution?

Carry Ian [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 thanks to everybody who responded.


 carry

 Carry Ian
 e-mail: [EMAIL PROTECTED]



 --

 Get real solutions to all your problems.

 http://www.salahkarindia.com - India's first advisory Portal

 Your friend, advisor, healer,companion!!!

 Register now  to  get free advice on all your problems.

 --





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




[PHP] File Upload Problem

2001-09-03 Thread Tim Grubb

I have a problem uploading files that just started the other day. I have
been using the same script for 8 mos.

Site is hosted at a hosting facility.
Anyone outside of our company router can still upload fine.
From our office noone can upload. Only 8097 bytes get sent.
Regular access to the web has not been affected.
I can still do file uploads to Hotmail, Yahoomail etc... but they use a CGI.

The very odd thing is that if I go to a computer that has not yet uploaded a
file I can send one but then cannot send again. I have tried IE,Netscape and
used PC, Mac and Linux.


Any Ideas?



-- 
PHP General Mailing List (http://www.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] POST without Content-Type?

2001-09-03 Thread Chris Maresca


After struggling with this for a bit, I determined that the problem was
not in fact with PHP but with Apache.  

I wound up writing a mod_perl Apache module which took an incoming request
to a particular location and parsed out the stream to find the POST
content, and inserted it into the HTTP header.

That allowed PHP to get access to it...

Hope this helps someone down the line.

Chris.

On Sat, 25 Aug 2001, Rasmus Lerdorf wrote:

 Well, first of all, you are using an ancient version of PHP.  That message
 was changed from a fatal error to a warning over a year ago.
 
 And if you really want to have PHP accept non-typed POST data, it's an
 obvious one-line change in main/SAPI.c
 
 -Rasmus
 
 On Sat, 25 Aug 2001, Chris Maresca wrote:
 
 
  All,
 
  I've been coding a PHP page that listens for a connection from an embedded
  device (a piece of hardware) that sends a POST query to Apache (and to my
  PHP pages...).
 
  I've having a problem that I can't seem to solve.  The embedded
  application does not set a Content-Type header on the POST, so PHP fails
  with the following error:
 
  --
  HTTP/1.1 200 OK
  Date: Sun, 26 Aug 2001 05:26:14 GMT
  Server: Apache/1.3.12 (Unix)  (Red Hat/Linux) PHP/4.0.2
  Connection: close
  Content-Type: text/html
 
  br
  bFatal error/b:  No content-type in POST request in bUnknown/b on
  line b0/bbr
  Connection closed by foreign host.
  --
 
  The connection that the embedded system makes looks like this:
 
  --
  POST http://host.mysite.foo/dir/phppage HTTP/1.0
  User-Agent: ImEmbedded
  Host: host.mysite.foo
  Content-Length: 123
  Pragma: no-cache
  Cookie: embeddedsession=myverylongsessionvariablegeneratedbythehardware
 
  ?xml version=1.0?
  --
  And below is some XML stuff...
 
  I've tried setting 'Content-Type' in $HTTP_POST_VARS, using mod_rewrite in
  Apache to change the content-type (with the -T flag) and looked at all the
  options in php.ini.  I'm using PHP 4.0.2 w/Apache 1.3.12 (if you couldn't
  tell from the sig above...)
 
  Nothing works correctly.  The mod_rewrite trick would work, but it makes
  everthing to that URL text/xml, including the PHP script, which no longer
  executes.  I look on the mailing lists here and on usenet, but I don't see
  a good solution...
 
  Anyone have any ideas?  At this point, I'm thinking of re-writing my code
  in Perl or Python since there seems to be no solution to this problem.
 
  Note that it's PHP that rejects the request, not Apache.  I don't see why
  a missing content-type should do this.  It should just default to
  text/plain or something.
 
  Anyway, thanks for any help.
 
  Chris.
 
  --
  chris maresca
internet systems architect -- www.chrismaresca.com
 
  linux, only up 138 days, because california has flaky power... 
 
 
 
 
 

--
chris maresca
  internet systems architect -- www.chrismaresca.com

linux, only up 138 days, because california has flaky power... 



-- 
PHP General Mailing List (http://www.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] potential preg_replace bug; unsure however

2001-09-03 Thread * RzE:

Original message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Sat, Sep 01, 2001 at 08:55:15PM +0200
Message-ID: [EMAIL PROTECTED]
Subject: [PHP] potential preg_replace bug; unsure however

 I built a Perl-style regex to match function calls in C-like
 languages where $name is the functions name. The functions
 are assumed to accept a single string as parameter.
 
 Here it is.
 
/$name\s*\(\s*\(.*)\\s*\)\s*;/s
 
 The expression is successfully preg_match'ed on a stream
 of code, but when preg_replace is passed the same expression
 it does not return. The piece of code I tested this with was
 fairly small so that an increased demand of computation time
 is unlikely be the reason for this behaviour.
 
 Substituting the subexpression (.*) by ([^\]*) remedies this.
 
 The version of the PHP install is 4.05.
 
 
 Any ideas?
 
 
   D. Alvarez Arribas [EMAIL PROTECTED]
/Original message

Reply

Well... Don't think this is a bug. Regexps usualy are greedy. They
try to take as much code/text as they can get. And well... '.*' can
take up about everything it encounters. Actually (IMO) you should
try to avoid using '.*'. What you mentioned Substituting the
subexpression (.*) by ([^\]*) remedies this. is a much better
solution. It's what you're looking for in the first place. I mean...
you're looking for some text that goes 'till the . Why would you
want to use '.*' then?

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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

2001-09-03 Thread Johan Vikerskog (ECS)

Perhaps someone from your Network group(or similiar) have put a restriction towards 
that site for some strange reason. Ask your administrator and he probobly will know 
the answer.

//Johan

-Original Message-
From: Tim Grubb [mailto:[EMAIL PROTECTED]]
Sent: den 3 september 2001 09:55
To: [EMAIL PROTECTED]
Subject: [PHP] File Upload Problem


I have a problem uploading files that just started the other day. I have
been using the same script for 8 mos.

Site is hosted at a hosting facility.
Anyone outside of our company router can still upload fine.
From our office noone can upload. Only 8097 bytes get sent.
Regular access to the web has not been affected.
I can still do file uploads to Hotmail, Yahoomail etc... but they use a CGI.

The very odd thing is that if I go to a computer that has not yet uploaded a
file I can send one but then cannot send again. I have tried IE,Netscape and
used PC, Mac and Linux.


Any Ideas?



-- 
PHP General Mailing List (http://www.php.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 PHP4 existed in 1995 we would of taken over the world by now

2001-09-03 Thread Maxim Derkachev

Hello Bob,

If someone's grandmother had balls, she would have been someone's
grandfather (Russian idiom).

Do you really think that the development language a company choose
will make the company successful ??


Saturday, September 01, 2001, 7:55:19 AM, you wrote:

B If PHP4 existed in 1995 then http://www.squirrelmail.org could of been
B hotmail.com
B If PHP4 existed in 1995 then http://phpwebsite.appstate.edu could of
B been geocities.com
B If PHP4 existed in 1995 then http://www.phpauction.org could of been
B ebay.com
B If PHP4 existed in 1995 then http://www.audiogalaxy.com could of been
B napster.com




-- 
Best regards,
Maxim Derkachev mailto:[EMAIL PROTECTED]
System administrator  programmer,
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
www.books.ru, www.symbol.ru 


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

2001-09-03 Thread _lallous

are you sure that php_oci.dll is located in c:/php/extentions/ folder?
are you sure you have that file?

Soawarat Weangkawe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 We have installed PHP4.06 manually to use it with IIS 5 on win2000server

 We did everything the installation guide told us to do.
 We uncommented some options in php.ini including

 extension=php_oci8.dll

 Afer we stopped and started the Web server every dll was loaded except
 php_oci.dll

 unable to load dynamic library 'C:/PHP/extentions/php_oci.dll'-The
 specified procedure could not be found.

 What should I do?
 Your help will be very appreciated

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




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




Re: [PHP] newbie : how to access functions in seperate files???

2001-09-03 Thread speedboy

What do people do with required files? I have a file called config.php
which contains all my functions. It is 329526 bytes. Should I split this
up into other files? I don't think so, but what do others think?


-- 
PHP General Mailing List (http://www.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 PHP4 existed in 1995 we would of taken over the world by now

2001-09-03 Thread Bob

Hi Maxim

People have been talking about the future of php and I think that it is the
functionality of the language that will propel php as the defacto language
for websites.  If in 1995 you tell a project manager that I can program
hotmail.com in a couple weeks and that it would be a lot faster then cgi
then they would of been forced to use it and all the marketing would not
matter.  I think first to market is important and php needs to be pushing the
boundaries even more.  I personally think php should be directing their
efforts to something like this site --
http://karaoke.getmusic.com/start.php  It uses flash and java to record your
voice and a song together and let's you play it back and send to a friend.
Now that's cool.

Maxim Derkachev wrote:

 Hello Bob,

 If someone's grandmother had balls, she would have been someone's
 grandfather (Russian idiom).

 Do you really think that the development language a company choose
 will make the company successful ??

 Saturday, September 01, 2001, 7:55:19 AM, you wrote:

 B If PHP4 existed in 1995 then http://www.squirrelmail.org could of been
 B hotmail.com
 B If PHP4 existed in 1995 then http://phpwebsite.appstate.edu could of
 B been geocities.com
 B If PHP4 existed in 1995 then http://www.phpauction.org could of been
 B ebay.com
 B If PHP4 existed in 1995 then http://www.audiogalaxy.com could of been
 B napster.com

 --
 Best regards,
 Maxim Derkachev mailto:[EMAIL PROTECTED]
 System administrator  programmer,
 Symbol-Plus Publishing Ltd.
 phone: +7 (812) 324-53-53
 www.books.ru, www.symbol.ru


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




[PHP] GD2 and alpha channels

2001-09-03 Thread Daniel Reichenbach

Hy,

i would like to use the alpha channel funtionality in GD2 to put a jpeg
into a PNG (24bit) with alpha channel. As i'm a total newbie with GD,
i'd love to see some examples. Can somebody shed a light on this?

Greetings from Germany,
Daniel


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




Re: [PHP] Does PHP supports ..BMP images...

2001-09-03 Thread Ben-Nes Michael

What do you want to do to the BMP Images ?


- Original Message - 
From: Girish P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 01, 2001 10:55 AM
Subject: [PHP] Does PHP supports ..BMP images...


HI ,
  PHP is not able to load bmp images... is there any setting to be
done in ini file???
 
TIA
Girish

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--




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




[PHP] typerules and german umlauts

2001-09-03 Thread Otto Brandstätter

Hello !

i have the following problem:

when using sendfax for sending a german text file including german
umlauts, i get: cannot determine file type ?!?
does anyone know how to modify typerules to handle that file type
correctly ?

one strange thing: when i try to sendfax from the shell, everything
works fine.
when trying it from within php, the error occurs ?!?
i even tried it as user nobody (= apache-user) in a shell it works
fine when i tried it from within php, it doesn´t... :-(((

it would be great if anyone could give me a hint

thank you !

ps: please reply also to [EMAIL PROTECTED] as i am not subscribed to the
mailing list. thanks a lot !


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




[PHP] EDI with PHP?

2001-09-03 Thread Jon Farmer

Hi,

The company I work for is starting to lose contracts because they are not
capable of EDI. As I seem to be the only person in the company who has heard
of EDI and knows what it stands for I am assumed to be an expert :-)

Anyway, I would like to suggest that instead of EDI we use XML and use PHP
both as a parser and a creater of the EDI like transactions. I would propose
they are sent over the net and probably PGP encrypted or signed. I have done
some minor work with PHP and XML, mainly credit card authorisation, but
wondered how suited it would be to this kind of app?

Any ideas/pointers?

Regards

Jon

--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07968 524175
PGP Key available, send blank email 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] Re: probs with exec, pls help (still)

2001-09-03 Thread taz

Hi

I've put the full path in for mysql, i've included -h -u -p and included the
paths of the txt  table files

Still don't work.

I'm logged in as root, working on my own box (linux) .
I'm really struggling with this one.
Has anyone out there done this ??

Many TIA
Terry
- Original Message -
From: _lallous [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 03, 2001 9:24 AM
Subject: [PHP] Re: probs with exec, pls help


 should'nt I guess
 I should at least specify full path of mysqlimport as in:
 exec(/usr/local/mysql/bin/mysqlimport -u -p dada dasda)

 Taz [EMAIL PROTECTED] wrote in message
 002801c133f3$1e2204e0$0feafea9@reynolds">news:002801c133f3$1e2204e0$0feafea9@reynolds...
 Should this work, if not, why not

 ?php exec(mysqlimport -u root -ppasword test one.txt) ?

 the import works fine from the command line

 TIA
 Terry






 --
 PHP General Mailing List (http://www.php.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 to call a member from the base class?

2001-09-03 Thread A. op de Weegh

Hi all,
I am wondering, if I do the following:

class A {
function something() {
}
}

class B extends A {
function something() {
}
}

var $varB = new B;
$varB-something();

How do I make sure in the something() member of class B, that the parent
class member something() is also called? Can I do this:

class B extends A {
function something() {
// some other actions...
A::something();
}
}

Or do I need to do something else?

Thanks,
Alexander.

--
PS: Replace the underscore (_) in my e-mail address with a minus sign (-).



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




Re: [PHP] Re: Plese help me

2001-09-03 Thread hassan el forkani

hi
just a suggestion as itworked for me,

try to edit the dll in notepad and do a string search for dll without the 
quotes
make sure all the dlls you find exist in your windows/system folder
that kind of error usually happens when there are some dlls referenced in 
the extension;

www.php4win.de provide everything that is needed

regards
At 11:20 03/09/01, _lallous wrote:
are you sure that php_oci.dll is located in c:/php/extentions/ folder?
are you sure you have that file?

Soawarat Weangkawe [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  We have installed PHP4.06 manually to use it with IIS 5 on win2000server
 
  We did everything the installation guide told us to do.
  We uncommented some options in php.ini including
 
  extension=php_oci8.dll
 
  Afer we stopped and started the Web server every dll was loaded except
  php_oci.dll
 
  unable to load dynamic library 'C:/PHP/extentions/php_oci.dll'-The
  specified procedure could not be found.
 
  What should I do?
  Your help will be very appreciated
 
  _
  Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 



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



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




[PHP] Re: apache 1.3.20 segfaults with php 4.0.6/midgard/imap

2001-09-03 Thread Yasuo Ohgaki

Vincent Stoessel wrote:

 I am trying to use php 4.0.6 with imap. midgard and mysql
 extentions compiled in.
 When I start apache I get information in the logs about many child 
 proccesses dying. Yet I have plenty memory left and everthing else seems 
 OK. Not a lot of traffic here at 3.27 am.
 
 I ran gdb and this is what I got:

You need to build PHP with debug option (--enable-debug when you 
configure)

Anyway, search bug report see if this problem is reported (hopefully it 
may be fixed)
If this problem is not reported, get backtrace from debug enabled PHP 
core file and report this as a bug.

Yasuo Ohgaki


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




[PHP] Error trapping

2001-09-03 Thread Tim Ward

I've gone an annoying problem. On our site I've trapped file does not
exist errors at Apache level to send out my own error screen with a company
logo, link to home page and a mailto link, but this doesn't work for any
request for a page that would be parsed by php if it existed. In this case a
valid html page (containing the php error) is returned. The problem seems to
be that as far as Apache is concerned there isn't an error. I haven't found
anything in php that allows me to trap errors like this. Error reporting
levels aren't helpful as I still need the error trapped.

I'm sure I'm not the first person who has come across this, and I'm hoping
someone out there has found a way around it.

I'm running PHP 4.0.0, Apache 1.3 on NT (yes I know, but our network manager
has promised me a linux box)

Tim Ward
Senior Systems Engineer

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



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




[PHP] Build and install PHP 4.0 and Apache 1.3.20 on Digital-Unix 4.0e

2001-09-03 Thread Krzysztof Kocjan

Hi

Is it possible to bulid PHP 4.0 and Apache 1.3.20 on Digital Unix 4.0E,
DEC ALPHA. I've only bulid and installed them on RedHat 6.x and 7.x, few
times without any problems :-))) . Is there any problems on Digital
Unix. Thank You for Your any advice or comments.

Krzysztof Kocjan




--R--E--K--L--A--M--A--
Czym jest asertywnosc?
Przeczytaj i nie pozwol sie wykorzystywac!
http://www.polki.interia.pl/rodzina/partnerstwo


-- 
PHP General Mailing List (http://www.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 a member from the base class?

2001-09-03 Thread Alexander Deruwe

On Monday 03 September 2001 09:47, A. op de Weegh wrote:

 How do I make sure in the something() member of class B, that the parent
 class member something() is also called? Can I do this:

Hello there, person with the same name as self, :)

class B extends A {
function something() {
// some other actions
$this-something(); // calls A::something
}
}

I've used this code for calling base class constructors. These ofcourse have 
different names, while your functions are both called the same. I don't think 
that should make any difference, though.

ad.

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




[PHP] Search capability to my intranet?

2001-09-03 Thread Phil Labonte

What does everyone suggest I use as a search engine for my Intranet.

Out Intranet has grown to a size where a search engine is needed.  I use PHP
on Linux and I also use MySQL as my database.

Any suggestions?

Phil

-- 
PHP General Mailing List (http://www.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] Search capability to my intranet?

2001-09-03 Thread Miles Thompson


Check this, but didn't the latest stable release of MySQL add search 
capabilities to text fields, as in indexing key words? How is your database 
structured? What do you use for keys? A simple form may be all you need.

For general indexing and searching of straight html there are htdig and mnogo.

Miles

At 08:50 AM 9/3/01 -0400, Phil Labonte wrote:
What does everyone suggest I use as a search engine for my Intranet.

Out Intranet has grown to a size where a search engine is needed.  I use PHP
on Linux and I also use MySQL as my database.

Any suggestions?

Phil

--
PHP General Mailing List (http://www.php.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] I dont see whats wrong!

2001-09-03 Thread Kyle Smith

i get this error message
Parse error: parse error in /web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php 
on line 53

for

$message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n. $cam. \r\n. 
$quote.;

i honestly dont see whats wrong!

-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





Re: [PHP] I dont see whats wrong!

2001-09-03 Thread Kunal Jhunjhunwala

There is a dot at the end which is wrong :
$message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
$cam. \r\n. $quote.;

^

see this??
it should be like this :
$message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
$cam. \r\n. $quote;
Regards,
Kunal Jhunjhunwala
- Original Message -
From: Kyle Smith [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 04, 2001 3:20 AM
Subject: [PHP] I dont see whats wrong!


i get this error message
Parse error: parse error in
/web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53

for

$message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
$cam. \r\n. $quote.;

i honestly dont see whats wrong!

-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666





-- 
PHP General Mailing List (http://www.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] I dont see whats wrong!

2001-09-03 Thread Kyle Smith

haha, it works, thanks

1 single dot can screw up a script phew!


-lk6-
http://www.StupeedStudios.f2s.com
Home of the burning lego man!

ICQ: 115852509
MSN: [EMAIL PROTECTED]
AIM: legokiller666


- Original Message - 
From: Kunal Jhunjhunwala [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 03, 2001 7:00 AM
Subject: Re: [PHP] I dont see whats wrong!


 There is a dot at the end which is wrong :
 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
 $cam. \r\n. $quote.;
 
 ^
 
 see this??
 it should be like this :
 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
 $cam. \r\n. $quote;
 Regards,
 Kunal Jhunjhunwala
 - Original Message -
 From: Kyle Smith [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, September 04, 2001 3:20 AM
 Subject: [PHP] I dont see whats wrong!
 
 
 i get this error message
 Parse error: parse error in
 /web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53
 
 for
 
 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
 $cam. \r\n. $quote.;
 
 i honestly dont see whats wrong!
 
 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!
 
 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666
 
 
 
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

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




[PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton

Hi, small problem :

phpinfo() shows all kinds of useful variables like PHP_SELF,
PATH_INFO, etc etc but I can't see them from my script.

I get a error - Warning: Undefined variable: PATH_INFO in
[scriptname] on line 13

Is there any situation where such variables would be available to
phpinfo(), but not the rest of the script?

Setup is Win2K, Apache, PHP 4.06

Any thoughts?

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




[PHP] Re: how to get all the records of a particular month....

2001-09-03 Thread Hugh Bothwell


Sagar [EMAIL PROTECTED] wrote in message
001b01c1347e$b58e2580$6dfb7ccb@ravella">news:001b01c1347e$b58e2580$6dfb7ccb@ravella...
 I hope some one will solve my problem.
 I have a table in which a field is of date type.
 i want a mysql query to get all the records of the table
 into an array of  a particular month.

Some clarification is needed: do you want all entries for
a given month of ANY year, or of a specific year?

If the first, I would use
SELECT * FROM table
WHERE MONTH(datefield) = mm
(See the MySQL documentation, section 7.4.11)

Or, for the second
SELECT * FROM table
WHERE datefield BETWEEN
'-mm-01' AND '-mm-31'

... how's that?



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




[PHP] MDB

2001-09-03 Thread Rogerio Coelho - Equipeweb - CompuLand ISP


 Hi, Folks!

   Can I read from an mdb database direct from PHP like DBF,
for example?



[]´s
Rogerio Coelho.
Equipeweb - CompuLand Design
http://www.equipeweb.com.br
Tel/Fax:(xx) 24 237-2088

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




Re: [PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton

On Mon, 03 Sep 2001 15:11:04 -0700, you wrote:

Following up my own post (in case someone finds this in the archives):

Is there any situation where such variables would be available to
phpinfo(), but not the rest of the script?

You can't see $PHP_SELF within a function until you declare it global.

This language really frustrates me sometimes...


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

2001-09-03 Thread ignacio . estrada


Hi, you can see the ODBCSocketServer application driver.   Check  some
related topics in the google.com search engine.

Atte. Ignacio Estrada F.
Centro Nacional de Control de Energia
Area de Control Occidental
025+6463, 025+6464, 025+6469


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




[PHP] hot Image on Image action

2001-09-03 Thread Mike Heald

Hi,

I am creating an image made up of other images.
How can i read in a gif and put it onto the image I
am creating through php?

Thanks,

Mike

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

2001-09-03 Thread Hugh Bothwell


Jon Farmer [EMAIL PROTECTED] wrote in message
003f01c1345c$53e385e0$[EMAIL PROTECTED]">news:003f01c1345c$53e385e0$[EMAIL PROTECTED]...
 The company I work for is starting to lose contracts because they are not
 capable of EDI. As I seem to be the only person in the company who has
heard
 of EDI and knows what it stands for I am assumed to be an expert :-)

Ain't it always the way :-)

 Anyway, I would like to suggest that instead of EDI we use XML and use PHP
 both as a parser and a creater of the EDI like transactions. I would
propose
 they are sent over the net and probably PGP encrypted or signed. I have
done
 some minor work with PHP and XML, mainly credit card authorisation, but
 wondered how suited it would be to this kind of app?

http://www.computerworld.com/cwi/story/0,1199,NAV47-68-85-1552_STO55904,00.h
tml
http://www.xml.com/search/index.ncsp?sp-q=EDI

PHP should be quite capable of handling this,
but you will end up creating a lot of the business
logic from scratch.  If your company already uses
integrated management software like SAP, it may
have EDI capabilities built in.





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




Re: [PHP] Problem with PHP_SELF

2001-09-03 Thread * RzE:

Original message
From: David Otton [EMAIL PROTECTED]
Date: Mon, Sep 03, 2001 at 03:21:00PM -0700
Message-ID: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem with PHP_SELF

 On Mon, 03 Sep 2001 15:11:04 -0700, you wrote:
 
 Following up my own post (in case someone finds this in the archives):
 
 Is there any situation where such variables would be available to
 phpinfo(), but not the rest of the script?
 
 You can't see $PHP_SELF within a function until you declare it global.
 
 This language really frustrates me sometimes...

/Original message

Reply

It's not so frustrating if you configure it correct. If you set
register_globals, you can just use 'm everywhere. It's not something
you should do, though. You can better use $HTTP_SERVER_VARS[]. It's
(some) safer. For those you don't need to turn on the
register_globals. Just turning on track_vars will do then. And from
PHP 4.0.3 you don't even need to do that.

Quote from PHP manual
PHP variables

These variables are created by PHP itself. The $HTTP_*_VARS
variables are available only if the track_vars configuration is
turned on.  When enabled, the variables are always set, even if they
are empty arrays. This prevents a malicious user from spoofing these
variables.

Note: As of PHP 4.0.3, track_vars is always turned on, regardless of
the configuration file setting.

If the register_globals directive is set, then these variables will
also be made available in the global scope of the script; i.e.,
separate from the $HTTP_*_VARS arrays. This feature should be used
with care, and turned off if possible; while the $HTTP_*_VARS
variables are safe, the bare global equivalents can be overwritten
by user input, with possibly malicious intent. If you cannot turn
off register_globals, you must take whatever steps are necessary to
ensure that the data you are using is safe.
/Quote from PHP manual

See: http://www.php.net/manual/en/language.variables.predefined.php

/Reply

-- 

* RzE:


-- 
-- Renze Munnik
-- DataLink BV
--
-- E: [EMAIL PROTECTED]
-- W: +31 23 5326162
-- F: +31 23 5322144
-- M: +31 6 21811143
--
-- Stationsplein 82
-- 2011 LM  HAARLEM
-- Netherlands
--
-- http://www.datalink.nl
-- 

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




Fw: [PHP] Re: probs with exec, pls help (still again)

2001-09-03 Thread taz





 Hi

 I've put the full path in for mysql, i've included -h -u -p and included
the
 paths of the txt  table files

 Still don't work.

 I'm logged in as root, working on my own box (linux) .
 I'm really struggling with this one.
 Has anyone out there done this ??

 Many TIA
 Terry
 - Original Message -
 From: _lallous [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 03, 2001 9:24 AM
 Subject: [PHP] Re: probs with exec, pls help


  should'nt I guess
  I should at least specify full path of mysqlimport as in:
  exec(/usr/local/mysql/bin/mysqlimport -u -p dada dasda)
 
  Taz [EMAIL PROTECTED] wrote in message
  002801c133f3$1e2204e0$0feafea9@reynolds">news:002801c133f3$1e2204e0$0feafea9@reynolds...
  Should this work, if not, why not
 
  ?php exec(mysqlimport -u root -ppasword test one.txt) ?
 
  the import works fine from the command line
 
  TIA
  Terry
 
 
 
 
 
 
  --
  PHP General Mailing List (http://www.php.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: EDI with PHP?

2001-09-03 Thread Jon Farmer

No, we would have to spend around £24,000 sterling to get the modules. We
already have modules that allow importing of order, etc from txt files. I
could write a PHP XML parser to interface into this.

What I am not sure is how acceptable it will be to our customers
--
--
Jon Farmer
Systems Programmer, Entanet www.enta.net
Tel 01952 428969 Mob 07968 524175
PGP Key available, send blank email to [EMAIL PROTECTED]




http://www.computerworld.com/cwi/story/0,1199,NAV47-68-85-1552_STO55904,00.h
 tml
 http://www.xml.com/search/index.ncsp?sp-q=EDI

 PHP should be quite capable of handling this,
 but you will end up creating a lot of the business
 logic from scratch.  If your company already uses
 integrated management software like SAP, it may




-- 
PHP General Mailing List (http://www.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] I dont see whats wrong!

2001-09-03 Thread John Monfort



 Try removing the last period(.) after $quote.

 Also, try this method:

 $nl = \r\n;

 $message = $alias$nl$name$email$...so on and so forth.

 Come to think of it, I think PHP has a constant for \r\.
 I think its  NL or something like that, I can't remember. Look in the
 manual pages for some clues...hopefully, someone on here remember it.


 I hope that helped.


 -John


On Mon, 3 Sep 2001, Kyle Smith wrote:

 i get this error message
 Parse error: parse error in 
/web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53

 for

 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n. $cam. 
\r\n. $quote.;

 i honestly dont see whats wrong!

 -lk6-
 http://www.StupeedStudios.f2s.com
 Home of the burning lego man!

 ICQ: 115852509
 MSN: [EMAIL PROTECTED]
 AIM: legokiller666





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




Re: [PHP] Re: EDI with PHP?

2001-09-03 Thread Sean C. McCarthy

Hi,

You can also try to use Java (the list is going to run over me with this
comment). Xerces parser is quite good and amazinly fast, and opensource.
We are validating XML document of 3Mb with it, and it is done in three
seconds (creating a DOM object). It is just another idea if you haven't
look at it.

Also you can keep the logic more organized with the object structure.

Sean C. McCarthy
SCI, S.L. (www.sci-spain.com)

Jon Farmer wrote:
 
 No, we would have to spend around £24,000 sterling to get the modules. We
 already have modules that allow importing of order, etc from txt files. I
 could write a PHP XML parser to interface into this.
 
 What I am not sure is how acceptable it will be to our customers
 --
 --
 Jon Farmer
 Systems Programmer, Entanet www.enta.net
 Tel 01952 428969 Mob 07968 524175
 PGP Key available, send blank email to [EMAIL PROTECTED]
 
 
 http://www.computerworld.com/cwi/story/0,1199,NAV47-68-85-1552_STO55904,00.h
  tml
  http://www.xml.com/search/index.ncsp?sp-q=EDI
 
  PHP should be quite capable of handling this,
  but you will end up creating a lot of the business
  logic from scratch.  If your company already uses
  integrated management software like SAP, it may
 
 --
 PHP General Mailing List (http://www.php.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[2]: [PHP] If PHP4 existed in 1995 we would of taken over the world by now

2001-09-03 Thread Maxim Derkachev

Hello Bob,

Monday, September 03, 2001, 1:08:40 PM, you wrote:
B If in 1995 you tell a project manager that I can program
B hotmail.com in a couple weeks and that it would be a lot faster then cgi
B then they would of been forced to use it and all the marketing would not
B matter.
Then (maybe) hotmail could have been written in php, but again, it
would be hotmail, not squirrelmail. We know hotmail as it is now not because
it is written in perl/asp/php/jsp/whatever, but because it is simply a
successful project. Marketing and promotion here means more than the
underlying engine - without it there would be no hotmail or yahoo, but
something else, like, say, coldmail and hoooya, better promoted.

Meanwhile, there were no microwave oven in 1950. It simply could not
exist in 1950. Like PHP, ASP, JSP, etc. could not exist in 1985 in the
current form. Technology needs time to improve.



-- 
Best regards,
Maxim Derkachev mailto:[EMAIL PROTECTED]
System administrator  programmer,
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
www.books.ru, www.symbol.ru 


-- 
PHP General Mailing List (http://www.php.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: Posting data through PHP scripts

2001-09-03 Thread Krzysztof Kocjan

I've never used method virtual but it seems to fit Your problem.
Explanation below.

Krzysztof Kocjan

virtual

(PHP 3, PHP 4 = 4.0b1)

virtual -- Perform an Apache sub-request

Description

int virtual (string filename)

virtual() is an Apache-specific function which is equivalent to
!--#include virtual...-- in mod_include. It performs an Apache
sub-request. It is useful for including
CGI scripts or .shtml files, or anything else that you would parse
through Apache. Note that for a CGI script, the script must generate
valid CGI headers. At the
minimum that means it must generate a Content-type header. For PHP
files, you need to use include() or require(); virtual() cannot be used
to include a document
which is itself a PHP file.


Jean Madson wrote:

 I have been thinking about a thing.  If I have a PHP script (a)
 which receives some data by a POST method only -- GET method
 is track to not be accepted --, and if I have another PHP script (b)
 that takes initial input from the user's browser... Well, the
 question is: how can I, in the script b, take the input data and
 post it to script a and receive its response,
 following by processing it and giving back the response
 to the browser? The user wouldn't see the action of script a
 in any way.  To the user, only script b would exist.  I think
 I can do this by using Delphi, but in PHP this task seens to be
 a nightmare.

 browser ==input== b ==post== a...
 ...a ==response== b ==response== browser

 Is this possible with PHP 3 or later?


-- 
PHP General Mailing List (http://www.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] I dont see whats wrong!

2001-09-03 Thread Andy Woolley

You could also perhaps try this.

$message = 
$alias
$name
$email
$site
$cam
$quote
;

Might not work in all cases though but it's certainly easier to read.

It all very much depends on personal preference.

Andy.

- Original Message -
From: John Monfort [EMAIL PROTECTED]
To: Kyle Smith [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, September 03, 2001 4:13 PM
Subject: Re: [PHP] I dont see whats wrong!




  Try removing the last period(.) after $quote.

  Also, try this method:

  $nl = \r\n;

  $message = $alias$nl$name$email$...so on and so forth.

  Come to think of it, I think PHP has a constant for \r\.
  I think its  NL or something like that, I can't remember. Look in the
  manual pages for some clues...hopefully, someone on here remember it.


  I hope that helped.


  -John


 On Mon, 3 Sep 2001, Kyle Smith wrote:

  i get this error message
  Parse error: parse error in
/web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53
 
  for
 
  $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n.
$cam. \r\n. $quote.;
 
  i honestly dont see whats wrong!
 
  -lk6-
  http://www.StupeedStudios.f2s.com
  Home of the burning lego man!
 
  ICQ: 115852509
  MSN: [EMAIL PROTECTED]
  AIM: legokiller666
 
 
 


 --
 PHP General Mailing List (http://www.php.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] probs with exec, pls pls help

2001-09-03 Thread Chris Hobbs

David Robley wrote:

 On Mon,  3 Sep 2001 17:00, taz wrote:
?php exec(mysqlimport -u root -ppasword test one.txt) ?


 Probably the user that your webserver, and hence your php script, runs as 
 does not have permissions to execute mysqlimport.


Or, mysqlimport is not in the path - try using the complete path and see 
if that solves it.

-- 
___  ____    _
Chris Hobbs   / \ \/ / |  | |/ ___\|  __ \
Head Geek| (___  \ \  / /| |  | | (___ | |  | |
WebMaster \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster) |  \  /  | |__| |) | |__| |
   \/\/\/ \/|_/
   http://www.silvervalley.k12.ca.us
   [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] MDB

2001-09-03 Thread Alfredo Yong

Man, this is a real value!

I was in a trouble thinking how to publish data coming from the 
administration area. Thinking in programming visual basic interfaces, 
generate SQL inserts, etc. But now you can simply publish it and thats 
all! Browsing with google, I found this well written article from Tim 
Uckun ODBC Socket Server
http://www.phpbuilder.com/columns/timuckun20001207.php3?print_mode=1


Dos cositas:

1. This works for any ODBC filter installed on the windows server? So, 
we can browse and update excel, text, SQL Server, etc, without having to 
compile native support in the php?

2. The page at http://odbc.linuxave.net/, stated as the source for the 
ODBCSocketServer server, is not on-line now. Does anybody knoes if this 
will be fixed soon? Is there another source for the ODBCSocketServer server?



Ignacio Estrada wrote:

 Hi, you can see the ODBCSocketServer application driver.   Check  some
 related topics in the google.com search engine.
 
 Atte. Ignacio Estrada F.
 Centro Nacional de Control de Energia
 Area de Control Occidental
 025+6463, 025+6464, 025+6469
 
 


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

2001-09-03 Thread Mark Roedel

 -Original Message-
 From: Alfredo Yong [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, September 03, 2001 11:05 AM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP] MDB
 
 
 2. The page at http://odbc.linuxave.net/, stated as the 
 source for the ODBCSocketServer server, is not on-line
 now. Does anybody knoes if this will be fixed soon? Is
 there another source for the ODBCSocketServer server?

http://odbc.sourceforge.net/

---
Mark Roedel   | Blessed is he who has learned to laugh
Systems Programmer|  at himself, for he shall never cease
LeTourneau University |  to be entertained.
Longview, Texas, USA  |  -- John Powell 

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




RE: [PHP] Problem with PHP_SELF

2001-09-03 Thread Joe Sheble \(Wizaerd\)

I couldn't help but frown at this message...  This is typical of this and
hundreds of other lists... instead of learning the language, people just
jump in, try to write code, and then when something doesn't work, it's the
language's fault...  It absolutely amazes me that such a huge number of
people don't bother reading the manual or even attempt learning the
basics...

global variables have to be declared in functions.  It's a basic fact, and
should've been learned before even attempting a line of code...


 -Original Message-
 From: David Otton [mailto:[EMAIL PROTECTED]]
 Sent: Monday, September 03, 2001 3:21 PM
 To: David Otton
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP] Problem with PHP_SELF


 On Mon, 03 Sep 2001 15:11:04 -0700, you wrote:

 Following up my own post (in case someone finds this in the archives):

 Is there any situation where such variables would be available to
 phpinfo(), but not the rest of the script?

 You can't see $PHP_SELF within a function until you declare it global.

 This language really frustrates me sometimes...


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




Re: [PHP] Problem with PHP_SELF

2001-09-03 Thread David Otton

On Mon, 3 Sep 2001 09:16:00 -0700, you wrote:

I couldn't help but frown at this message...  This is typical of this and
hundreds of other lists... instead of learning the language, people just
jump in, try to write code, and then when something doesn't work, it's the
language's fault...  It absolutely amazes me that such a huge number of
people don't bother reading the manual or even attempt learning the
basics...

The tone of your message is well-deserved... I switched to help me
mode long before I should have because I was under pressure of time.

global variables have to be declared in functions.  It's a basic fact, and
should've been learned before even attempting a line of code...

In fact, the function in question /already/ had a bunch of my own
variables declared global in it... I thoughtlessly jumped to the
conclusion that the install was at fault because i have reason not to
trust it.

My other point still stands though (I think) - that marking a variable
as global to pull it in to scope is a clunky, ass-backwards way of
doing things.

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] Pulling a random image

2001-09-03 Thread Brad R. C.

Hello everyone... I have been working on this random function for awhile
now.. and it is close to being complete. It works as for a random function.
But what my goal was is to make it where it goes through all the images
before showing a random twice. Kind of like you put all the images in a
bucket, and random select one out of the bucket while you eyes are closed,
once you take it out of the bucket you put it on the table till there is no
images left in the bucket, then you fill the bucket again and start over.

Now... I thought the following function did that, but for some reason it is
not... I might have just missed a line of code, or misspelled something, but
I come to you guys/gals to be more second pair of fresh eyes to see if you
can find where I made a mistake.

Thanks..

-code snippet
function getRandomUser()
{
 static $itemarray;
 if (empty($itemarray)) {
  $connection = mysql_pconnect(SQL_SERVER, SQL_UID, SQL_PWD);
  mysql_select_db(SQL_DB, $connection);
  $sql = select * from user where valid = 1 and inrotation = 1;
  $query = mysql_query($sql);
 while($thisrow = mysql_fetch_array($query)) {
  $itemarray[] = $thisrow;
  }
 }
 if (sizeof($itemarray) == 0)
  return Array('userid'='-1', photo_name='', photo_num='',
counter='', size='');
  srand((double)microtime()*100);
  $row = rand(0, sizeof($itemarray)- 1);
 $toreturn = $itemarray[$row];
 $itemarray = array_splice($itemarray,$row,1);

 return $toreturn;
}
-code snippet

thanks guys... :)

Brad C



[PHP] Help on e-mail attachments retrieval adn ZIP uncompression.

2001-09-03 Thread Carlos Fernando Scheidecker Antunes

Hello Everybody,

I have a software writen in Delphi which I am migrating to Kylix but I would like to 
do it in PHP instead.

What the software does is to access an e-mail address and retrieve the messages saving 
the files ending with .zip to a local directory. After that, it decompresses the ZIP 
files and read their txt contents and import the contents to a MySQL database. Each 
ZIP file has a TXT file.

So what I need to know and the help I am asking you for is :

1) How to retrieve messages from a POP3 mailbox and save only the ZIP files 
attachments?

2) How to decompress the ZIP files?

Thank you,

Carlos Fernando.

Linux User #207984




RE: [PHP] Help on e-mail attachments retrieval adn ZIP uncompression.

2001-09-03 Thread Richard Heyes

 1) How to retrieve messages from a POP3 mailbox and save only 
 the ZIP files attachments?

A couple of ways.

1. Use the imap (it does pop3 too) extension to connect to the mail
server, parse the mails and extract the zip files.

2. Use mime decoding php scripts. There's one I've just committed to
PEAR, which you can get by going to cvs.php.net -- php4 -- pear --
mail -- mimeDecode.php. It's beta quality at the moment, but should get
better. Also, this is just a class/object, so it will require
incorporating into your own scripts.

 2) How to decompress the ZIP files?

If you're on unix, exec('unzip ...'). Or if windows, you can use the cmd
line version of winzip.

-- 
Richard Heyes

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

2001-09-03 Thread Moody

Try writing a custom error handler. Chech out
http://www.zend.com/zend/spotlight/error.php for a good article on the
subject. Pay particular attention to the bit at the end about output
buffering since I assume that what you would want to do is send a redirect
header to the browser if the script fails to work.

Tim Ward [EMAIL PROTECTED] wrote
 I've gone an annoying problem. On our site I've trapped file does not
 exist errors at Apache level to send out my own error screen with a
company
 logo, link to home page and a mailto link, but this doesn't work for any
 request for a page that would be parsed by php if it existed. In this case
a
 valid html page (containing the php error) is returned. The problem seems
to
 be that as far as Apache is concerned there isn't an error. I haven't
found
 anything in php that allows me to trap errors like this. Error reporting
 levels aren't helpful as I still need the error trapped.

 I'm sure I'm not the first person who has come across this, and I'm hoping
 someone out there has found a way around it.

 I'm running PHP 4.0.0, Apache 1.3 on NT (yes I know, but our network
manager
 has promised me a linux box)

 Tim Ward
 Senior Systems Engineer

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





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




[PHP] separate files?

2001-09-03 Thread Michael Kimsal

Honestly, that seems like one damn big file to me.  Are you using all
those functions in every single file?  If not, you're loading and 
(re)compiling
a hell of a lot of code on every page request.  If you're done developing,
it may be time to split that up into more logical files (all db 
functions in one,
all functions relating to page X in another, etc.)



speedboy wrote:

What do people do with required files? I have a file called config.php
which contains all my functions. It is 329526 bytes. Should I split this
up into other files? I don't think so, but what do others think?





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




[PHP] detection of relevance

2001-09-03 Thread BRACK

I have made a detetor of relevance in found results in form of 
colored ine od length depended on relevance. I did it this way:

In query I inserted match (...,...,...) against ('%$var%') as relevance
in while loop I inserted 
$relevance = $row[relevance];
$rel = round($relevance);
print img src=\images/rel.gif\ border=\0\ height=\7\ 
width=\$rel.0.\ alt=\relevance\\n; 

And everything works fine but I'm wondering if anyone has better 
idea, because I'm just a newbie, never did it before and this page is 
my first try, this code is my idea but I don't conside myself smart 
in PHP.

Thank you,

Youri

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

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




[PHP] FULLTEXT search sorting results

2001-09-03 Thread BRACK

Hi,

I asked recently to help with the selection for FULLTEXT search 
and now with your help I found how to do that but I still have 
problem with advansed search.

This is what I have right now:

$result =  mysql_query(SELECT skits.*,category.* from 
skits,category where (skits.title like '%$title_search%'  
skits.descr like '%$descr_search%'  skits.skits like 
'%$act_search%'  skits.lang like '%$lang_search%'  
category.kat_name like '%$category_search%') and 
(skits.category like category.cat_id) ORDER by skits.category 
limit $limit,10);  

It sorts results by category, I want them to be sorted by relevance 
and there are three columns in my table are in FULLTEXT index - 
skits.title, skits.descr,skits.skits so I do this - 

if ($title_search !=   $descr_search=   $act_search = ):
$relev = $title_search;
elseif ():// this is for every condition, just do not want to type it all.
$...
endifl

$result =  mysql_query(SELECT skits.*,category.*,match 
(skits.title,skits.descr,skits.skits) against ('$relev') as  from 
skits,category where (skits.title like '%$title_search%'  
skits.descr like '%$descr_search%'  skits.skits like 
'%$act_search%'  skits.lang like '%$lang_search%'  
category.kat_name like '%$category_search%') and 
(skits.category like category.cat_id) ORDER by relevance desc 
limit $limit,10); 

But the proble is that this either don't find any results or select all 
records. What to do to make advenced search sorted by relevance?

Thank you,

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

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




[PHP] Re: database searching

2001-09-03 Thread Hugh Bothwell


Melih Onvural [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 i want to randomly choose a column in a database with a quote in it, by
the
 number of the column.
 i have a random seed working, but it won't pull only one column, but all
 columns. How can I choose
 just one column, and print one column at a time?

SELECT text FROM quotes ORDER BY RAND() LIMIT 1



-- 
PHP General Mailing List (http://www.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_encode doesn't work....

2001-09-03 Thread Christopher William Wesley

On Mon, 3 Sep 2001, Dhaval Desai wrote:

 session_encode($dhaval);
...
 when I check out the c:\tmp\ directory and  check out
 the session data I can still read the same as
 dhaval=trythisout and it's not encoded...is it coz the

session_encode() returns a string for you to use in a PHP script.  It
doesn't encode or encrypt the session data on the server.  If you need to
encode or encrypt the data on the server, you have to create an encoding
or encrypting scheme within your PHP scripts.

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net



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




[PHP] Re: Pulling a random image

2001-09-03 Thread Hugh Bothwell


Brad R. C. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 But what my goal was is to make it where it goes through all the images
 before showing a random twice.

... if you actually want to do this, you will have to keep track
of which items you have seen in the last rotation.


 Now... I thought the following function did that, but for some reason it
is
 not...

Nope.  You are just (inefficiently) choosing one item at random.

An equivalent-but-faster approach would be
SELECT * FROM user
WHERE valid=1 AND inrotation=1
ORDER BY RAND() LIMIT 1


If you really need random-order, once-per-cycle images,
you could achieve it by adding a 'views' field to the table;
initialize all entries to the same value (ie 0).  Each time an image
is displayed, increment the views; when you choose an image,
choose from the pool where the views value is minimal, ie.

SELECT id,imgname FROM user
WHERE valid=1 AND inrotation=1 AND views=MIN(views)
ORDER BY RAND() LIMIT 1

UPDATE user SET views=views+1
WHERE id=$id

How's that?



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




Re: [PHP] newbie : how to access functions in seperate files???

2001-09-03 Thread web-dev

speedboy wrote:
 
 What do people do with required files? I have a file called config.php
 which contains all my functions. It is 329526 bytes. Should I split this
 up into other files? I don't think so, but what do others think?

I too am curious about a recommended or best practice. I create a
function file that contains numerous functions for generating forms that
are used more than once in a site and it becomes large when the forms
are complex. But the alternative is to bloat the individual files by
including the function code on each page that uses it. Or, if you split
the one, large file into some number of smaller files, it increases the
administrative burden of knowing what is in each smaller file and
requiring the correct sub-file in the right context rather than
routinely requiring the one catch-all file every time one or more
function is needed.

Kris O.

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




RE: [PHP] newbie : how to access functions in seperate files???

2001-09-03 Thread Lukas Smith

  What do people do with required files? I have a file called config.php
  which contains all my functions. It is 329526 bytes. Should I split this
  up into other files? I don't think so, but what do others think?

 I too am curious about a recommended or best practice.

what you want todo is split them up by purpose
so you can include as needed

also check the differences on
include (include_once) versus require (require_once)

greets,
Lukas Smith
[EMAIL PROTECTED]


DybNet Internet Solutions GbR
Alt Moabit 89
10559 Berlin
Tel. : +49 30 83 22 50 00
Fax : +49 30 83 22 50 07
www.dybnet.de [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: Current status of things

2001-09-03 Thread Harald Radi

 Yeah. Now that I understand more about COM and IDispatch 
 things are going smoothly.
 Question: how do I close a connection to the COM object?

in general you simply call -release() on the component. if you call
release() as often as addref() (note that addref() is called implicitly
on instanciation) the component should be closed by windows. windows 2k
can also pool instances of components (i don't know if this is the case
for dcom), so if you release an instance windows will still keep it
alive and assign it to the next process that requests it.

in php references are counted internally and each php-thread calls the
components addref() only once, regardless how often you call
$obj-addref(); so all references will be released when the script
terminates (this should prevent user errors) so a component gets closed
when the script shuts down (beside the underlying instance pooling) so
you don't need to close the connection by hand.

if you have to close components in a specified order or if script
execution takes very long you can simply call

$obj-release();
$obj = null; // note that $obj = null; alone wouldn't close the
connection immediately, because the garbage collector
 // runs very seldom. most of the time $obj would get
released on script shutdown.



harald.


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




[PHP] ob_start()

2001-09-03 Thread Jeroen Olthof

Can I increase speed by using this to buffer output ?

kind regards
Jeroen Olthof



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

2001-09-03 Thread ignacio . estrada


Respecto al punto 1 la respuesta es SI, ya que no es necesario involucrar
PHP en este lado.
Atte. Ignacio Estrada F.
Centro Nacional de Control de Energia
Area de Control Occidental
025+6463, 025+6464, 025+6469


   
  
Alfredo Yong   
  
alfredo_yong_php@To: [EMAIL PROTECTED]
  
yahoo.comcc:  
  
  Subject: Re: [PHP] MDB   
  
03/09/2001 10:05   
  
   
  
   
  




Man, this is a real value!

I was in a trouble thinking how to publish data coming from the
administration area. Thinking in programming visual basic interfaces,
generate SQL inserts, etc. But now you can simply publish it and thats
all! Browsing with google, I found this well written article from Tim
Uckun ODBC Socket Server
http://www.phpbuilder.com/columns/timuckun20001207.php3?print_mode=1


Dos cositas:

1. This works for any ODBC filter installed on the windows server? So,
we can browse and update excel, text, SQL Server, etc, without having to
compile native support in the php?

2. The page at http://odbc.linuxave.net/, stated as the source for the
ODBCSocketServer server, is not on-line now. Does anybody knoes if this
will be fixed soon? Is there another source for the ODBCSocketServer
server?



Ignacio Estrada wrote:

 Hi, you can see the ODBCSocketServer application driver.   Check  some
 related topics in the google.com search engine.

 Atte. Ignacio Estrada F.
 Centro Nacional de Control de Energia
 Area de Control Occidental
 025+6463, 025+6464, 025+6469




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

2001-09-03 Thread skater

help!!!

I'm recursivley reading and editing every .htm and .html file in a 1000 page
website and upgrading it to contain linked CSS, Javascript includes and PHP
includes. the script works fine and all, trouble is that PHP doesn't.

Sometimes the script will run fine, other times PHP will decide to read the
same file 10-20 times and then do the same recursivly, other times it'll say
it's in one directory, and be reading files from another.

i'm running PHP verson 4.0.4pl1 off a 2000 server and IIS



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

2001-09-03 Thread Rasmus Lerdorf

Why not just configure your server to use an auto_prepend_file ?

On Mon, 3 Sep 2001, skater wrote:

 help!!!

 I'm recursivley reading and editing every .htm and .html file in a 1000 page
 website and upgrading it to contain linked CSS, Javascript includes and PHP
 includes. the script works fine and all, trouble is that PHP doesn't.

 Sometimes the script will run fine, other times PHP will decide to read the
 same file 10-20 times and then do the same recursivly, other times it'll say
 it's in one directory, and be reading files from another.

 i'm running PHP verson 4.0.4pl1 off a 2000 server and IIS






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

2001-09-03 Thread skater

what does that entail?


Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why not just configure your server to use an auto_prepend_file ?



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




RE: [PHP] Re: Pulling a random image

2001-09-03 Thread Brad R. C.

You know what.. that might just work the way I need it to... will try it out
tonight, thanks!!! :)

Brad C.

-Original Message-
From: Hugh Bothwell [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 03, 2001 1:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Pulling a random image



Brad R. C. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 But what my goal was is to make it where it goes through all the images
 before showing a random twice.

... if you actually want to do this, you will have to keep track
of which items you have seen in the last rotation.


 Now... I thought the following function did that, but for some reason it
is
 not...

Nope.  You are just (inefficiently) choosing one item at random.

An equivalent-but-faster approach would be
SELECT * FROM user
WHERE valid=1 AND inrotation=1
ORDER BY RAND() LIMIT 1


If you really need random-order, once-per-cycle images,
you could achieve it by adding a 'views' field to the table;
initialize all entries to the same value (ie 0).  Each time an image
is displayed, increment the views; when you choose an image,
choose from the pool where the views value is minimal, ie.

SELECT id,imgname FROM user
WHERE valid=1 AND inrotation=1 AND views=MIN(views)
ORDER BY RAND() LIMIT 1

UPDATE user SET views=views+1
WHERE id=$id

How's that?



--
PHP General Mailing List (http://www.php.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] replacing a carriage return with an html break

2001-09-03 Thread nate

Hi all,

I am filling out a form text area, and submitting it to the next page which just 
prints what I submitted, but it doesnt print any returns, i used when i filled out the 
previous text area

I found on php.net there is a ereg_replace funtion and a trim function but I am unsure 
if either one will work and im not sure how to use them.

Thanks,
nate



[PHP] Re: Problem with PHP_SELF

2001-09-03 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (David Otton) wrote:

 I get a error - Warning: Undefined variable: PATH_INFO in
 [scriptname] on line 13
 
 Is there any situation where such variables would be available to
 phpinfo(), but not the rest of the script?

Yes, where $PATH_INFO is called from within a function without being 
declared as global first.  See the manual's chapter on variable scope.

-- 
CC

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




Re: [PHP] replacing a carriage return with an html break

2001-09-03 Thread Christopher William Wesley

On Mon, 3 Sep 2001 [EMAIL PROTECTED] wrote:

 I am filling out a form text area, and submitting it to the next
 page which just prints what I submitted, but it doesnt print any
 returns, i used when i filled out the previous text area

Try using nl2br() in the output script (page).

http://php.net/nl2br

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


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




Re: [PHP] Recursivly Updating Files

2001-09-03 Thread Franklin van Velthuizen

Skater wrote:
 what does that entail?
 
 
 Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
Why not just configure your server to use an auto_prepend_file ?

 
 

Reading the manual every now and then wouldn't hurt... really, it 
wouldn't :).

snip
auto_prepend_file string
Specifies the name of a file that is automatically parsed before the 
main file. The file is included as if it was called with the include() 
function, so include_path is used.

The special value none disables auto-prepending.
/snip


-- 
Franklin van Velthuizen  [EMAIL PROTECTED]   +46-(0)70-6786613
Ebiris Applications AB   http://www.ebiris.se/  +46-(0)19-109910


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




Re: [PHP] Re: Pulling a random image

2001-09-03 Thread Mark Charette

what does that entail?

Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Why not just configure your server to use an auto_prepend_file ?

Reading the documentation that's easily available.


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

2001-09-03 Thread skater

okay, sorry, had a blonde moment!!!

it's more than just having a prepend and appending file onto it, i'm
changing existing CSS into linked ones, existing Javascripts into includes,
and taking the whole thing out of frames by using PHP includes in a table.
each page needs to be edited and have certain bits taken out and changed.
i've done this with regular expressions and it solves the problem, but PHP
seems to have problems recursivley.

without warning and completely randomly, PHP will read the same file or
directory [x] amount of times... it's really annoying because after reading
8000 files in a 1000 file site, the script times out...


Franklin Van Velthuizen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Skater wrote:
  what does that entail?
 
 
  Rasmus Lerdorf [EMAIL PROTECTED] wrote in message
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
 Why not just configure your server to use an auto_prepend_file ?
 
 
 

 Reading the manual every now and then wouldn't hurt... really, it
 wouldn't :).

 snip
 auto_prepend_file string
 Specifies the name of a file that is automatically parsed before the
 main file. The file is included as if it was called with the include()
 function, so include_path is used.

 The special value none disables auto-prepending.
 /snip


 --
 Franklin van Velthuizen  [EMAIL PROTECTED]   +46-(0)70-6786613
 Ebiris Applications AB   http://www.ebiris.se/  +46-(0)19-109910




-- 
PHP General Mailing List (http://www.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] replacing a carriage return with an html break

2001-09-03 Thread Chris Hobbs

[EMAIL PROTECTED] wrote:

 I am filling out a form text area, and submitting it to the next page which just 
prints what I submitted, but it doesnt print any returns, i used when i filled out 
the previous text area
 
 I found on php.net there is a ereg_replace funtion and a trim function but I am 
unsure if either one will work and im not sure how to use them.


Try: http://www.php.net/manual/en/function.nl2br.php


-- 
___  ____    _
Chris Hobbs   / \ \/ / |  | |/ ___\|  __ \
Head Geek| (___  \ \  / /| |  | | (___ | |  | |
WebMaster \___ \  \ \/ / | |  | |\___ \| |  | |
PostMaster) |  \  /  | |__| |) | |__| |
   \/\/\/ \/|_/
   http://www.silvervalley.k12.ca.us
   [EMAIL PROTECTED]


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




[PHP] PHP Authentication on Apache

2001-09-03 Thread Lynn Holt

Hi all,
Trying PHP for the first time. Snached the
authentication code from the docs and put it in phpauth.php.
When I surf to it,  it just asks for my
user and password again and again  If I hit Cancel, it prints the
little message just fine. Here's the code in case I'm the
only one to RTFM:

---
Example 17-1. HTTP Authentication example

?php
  if(!isset($PHP_AUTH_USER)) {
header(WWW-Authenticate: Basic realm=\My Realm\);
header(HTTP/1.0 401 Unauthorized);
echo Text to send if user hits Cancel button\n;
exit;
  } else {
echo pHello $PHP_AUTH_USER./p;
echo pYou entered $PHP_AUTH_PW as your password./p;
  }
?
-
I have php 4.0.6  installed as a module(DSO) in apache 1.3.20 and
everything else I've tried seems to work.

Any Ideas? Anybody know if this is supposed to work?
Should I stick with AuthPG and forget PHP authentication?
BTW I don't have AuthType set in .htaccess or httpd.conf.

Lynn
Getting old isn't hard,
all you got to do is live long enough..or fast enough.

-- 
PHP General Mailing List (http://www.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 PHP4 existed in 1995 we would of taken over the world by now

2001-09-03 Thread Bob

Hi Maxim,

Hotmail was hot because nobody had ever seen free webmail and it spread by word
of mouth.  I don't know but did anyone see a hotmail commerical???

What I am saying is that if php is always following or copying the technology
that happened a couple years ago then what's the point?  php will then always be
known as the low cost option and project managers won't even give it a second
look.  What I am looking for is the cool factor.  I know technology needs time
to improve but what's going to be cool in PHP5???  It's like a race that never
finishes and who is winning?  ASP or PHP?

Maxim Derkachev wrote:

 Hello Bob,

 Monday, September 03, 2001, 1:08:40 PM, you wrote:
 B If in 1995 you tell a project manager that I can program
 B hotmail.com in a couple weeks and that it would be a lot faster then cgi
 B then they would of been forced to use it and all the marketing would not
 B matter.
 Then (maybe) hotmail could have been written in php, but again, it
 would be hotmail, not squirrelmail. We know hotmail as it is now not because
 it is written in perl/asp/php/jsp/whatever, but because it is simply a
 successful project. Marketing and promotion here means more than the
 underlying engine - without it there would be no hotmail or yahoo, but
 something else, like, say, coldmail and hoooya, better promoted.

 Meanwhile, there were no microwave oven in 1950. It simply could not
 exist in 1950. Like PHP, ASP, JSP, etc. could not exist in 1985 in the
 current form. Technology needs time to improve.

 --
 Best regards,
 Maxim Derkachev mailto:[EMAIL PROTECTED]
 System administrator  programmer,
 Symbol-Plus Publishing Ltd.
 phone: +7 (812) 324-53-53
 www.books.ru, www.symbol.ru


_
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] If PHP4 existed in 1995 we would of taken over the worldby now

2001-09-03 Thread Rasmus Lerdorf

 What I am saying is that if php is always following or copying the technology
 that happened a couple years ago then what's the point?  php will then always be
 known as the low cost option and project managers won't even give it a second
 look.  What I am looking for is the cool factor.  I know technology needs time
 to improve but what's going to be cool in PHP5???  It's like a race that never
 finishes and who is winning?  ASP or PHP?

Uh?  The first version of PHP was released over a year before the first
version of ASP.  Heck, there were even M$ developers on the first PHP
mailing list that at one point sent out a survey asking the PHP community
what they wanted to see in an HTML-embedded scripting language.

But sure, PHP will always be the low cost option.  No real way around
that being an open source project, and frankly that is a big feature and
certainly not a liability.

-Rasmus


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




Re: [PHP] If PHP4 existed in 1995 we would of taken over the worldby now

2001-09-03 Thread Christopher William Wesley

On Mon, 3 Sep 2001, Bob wrote:

 look.  What I am looking for is the cool factor.  I know technology needs time
 to improve but what's going to be cool in PHP5???  It's like a race that never
 finishes and who is winning?  ASP or PHP?

PHP5 will still run on your Free OS, your CLI OS, your Pay OS, your GUI
OS, etc.  ASP (of the VBSchidtz flavor) will only run on your Illegal
Monopoly OS.  It's so cool it burns!  Flexibility, portability, and
cost-effectiveness ... you won't get burned.

Ras ... ROCK ON!!

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


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




Re: [PHP] I dont see whats wrong!

2001-09-03 Thread Alexander Skwar

So sprach »Kyle Smith« am 2001-09-03 um 14:50:49 -0700 :
 i get this error message
 Parse error: parse error in 
/web/sites/197/lk6/www.stupeedstudios.f2s.com/sendcam.php on line 53
 
 for
 
 $message = $alias. \r\n.$name. \r\n. $email. \r\n. $site. \r\n. $cam. 
\r\n. $quote.;

After the $quote, you've got a . - remove this, and it might work.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 14 hours 38 minutes

--
PHP General Mailing List (http://www.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] I dont see whats wrong!

2001-09-03 Thread Alexander Skwar

So sprach »Andy Woolley« am 2001-09-03 um 16:37:08 +0100 :
 Might not work in all cases though but it's certainly easier to read.

Also easy to read:

$msg = array(
$foo,
$bar,
$blah,
$blub
);

echo implode(\r\n, $msg);

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 14 hours 39 minutes

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




[PHP] php4 and apache 1.3.20

2001-09-03 Thread Christian Darsow

hi!

i'm trying to install php4 and apache 1.3.20.
so, installing apache works and installing php4 works, too.
but when i'm now trying to build a new apache with the php4 module
it gives up:
./config.status --activate-module=src/modules/php4/libphp4.a

make ---
leaving directory 'usr/local/etc/apache_1.3.20/src'
...
leaving directory 'usr/local/etc/apache_1.3.20/'
[build] Error 2

does anybody has an idea?
merci beaucoup and  thankx so much!

cheers, christian



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




Re: [PHP] Disbale function in certain virtual host

2001-09-03 Thread Nicolas Ross

I tried that one, and it didn't work...

Nicolas


 VirtualHost foo
 php_admin_value disable_functions strlen
 /VirtualHost

 On Fri, 31 Aug 2001, Nicolas Ross wrote:

  I am searching a way of disabling certain functions in a particular
Virtual
  Host.
 
  I search through the archive of this list and I found a begening of a
  solution. I can disable functions in php.ini, but I can't use them in
vhost
  I want to. If I don't disable functions in php.ini, I cannot disable
  functions through httpd.conf with php_value or php_admin_value...
 
  Does some one have an Idea ?
 
  Nicolas Ross
 
 
 




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




[PHP] PHP and OLE objects

2001-09-03 Thread Joshua Ecklund

Hi all,

I am having a problem with a PHP script, in which I am using a self-written
OLE object to provide data to the script.  I have two other OLE DLLs that I
also use in PHP scripts which work fine.  I wrote all of the DLLs in Borland
Delphi, btw.  (I am running PHP 4.0.6 and Apache 1.3.20 on Windows 2000 Pro)

For some reason, whenever I try to access one of the Char/String variables
(in only this DLL) from PHP, it returns a warning: Error in
php_OLECHAR_to_char().  I have been trying to fix this problem for some
time now, and am having no luck finding a source.  I have had this message
before, but it was easily fixed by setting a default value for the strings
(in the DLLs) to a single ascii-32, so that the return would not be blank.

The only difference between this object and the others is that the low-level
delphi code uses pointer variables to set up the data access, whereas the
others do not.  I have used this object in other non-PHP projects (and tests
:) and it works as it is intended to.  Also, all other types of variables in
the object are intact.

Can anyone suggest a source of this problem?  On what conditions does
php_OLECHAR_to_char() error out?

Thanks in advance,
Joshua Ecklund - mProwler




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




[PHP] Am I right or wrong?

2001-09-03 Thread Seb Frost

My ISP has a limit on my site of 10,000MB of data transfer per month.

4 days into september and I'm already at 2,500MB.  It would seem they're
including requests by their own PHP server.

I have a folder of ~80kb images that are dynamically resized using PHP into
~1.4kb thumbnails.  Now for each one the PHP server sends an HTTP request
for the 80kb image, and this is being counted against my 10,000MB.

Should it?  Am I in the right in thinking that it shouldn't?

regards,

- seb frost
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




[PHP] insert into problems.

2001-09-03 Thread Martin

Can someone tell me whats wrong with this...  im getting a  Syntax error in
INSERT INTO statement ... but i cant find anything wrong with the sql
code., or have i missed something..?

?

$text = yadayada;

$date= today...;

$connectionstring = odbc_connect(MYSKODB, Sa, );

odbc_do($connectionstring, INSERT INTO lappar (text,datum) VALUES
('$text','$date'));

odbc_close($connectionstring);

?

/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] Am I doing this right? (PHP3/Login system)

2001-09-03 Thread Joel Ricker

I'm tring to get a login system going using PHP3 and MySQL.  I'll have two
tables -- one containing the username and passwords of each user plus a
variable called Access which will hold what other parts of the scripts
they'll have access to and another containing the actual logged in sessions.
I'm trying to do this without using cookies so I'll be passng $sess_id
around by get and post.

These are my notes of what I'm thinking.  Does anybody see any major
problems with this?

1.  If $sess_id doesn't exist, check for a username/password combination.
a. if username/password exist, check validity
i. if not valid, display error message/login
b. if username/password doesn't exist
i. display login.
c. if username/password exist and valid (MySQL table check)
i. create session id
ii. find REMOTE_ADDR
iii. fetch user information (Access, etc).
iv. serialize REMOTE_ADDR, userinformation for table
v. store session id, serialized information, and timestamp in
sessions table.
iv. continue
2.  If $sess_id does exist, check table for session information.
a. if session exists
i. pull serialized data
ii. find REMOTE_ADDR and compare to current.
!. if not correct, display login
iii. update timestamp in session table
iv. continue
b. if session doesn't exist
i. display login.

Joel


-- 
PHP General Mailing List (http://www.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] Am I right or wrong?

2001-09-03 Thread Stig-Ørjan Smelror

 My ISP has a limit on my site of 10,000MB of data transfer per month.
 
 4 days into september and I'm already at 2,500MB.  It would seem
 they're including requests by their own PHP server.
 
 I have a folder of ~80kb images that are dynamically resized using PHP
 into ~1.4kb thumbnails.  Now for each one the PHP server sends an HTTP
 request for the 80kb image, and this is being counted against my
 10,000MB.
 
 Should it?  Am I in the right in thinking that it shouldn't?
 
 regards,
 


Everybody will always try to screw you some way or another...
Always look at the small print ;)

And you're right... it's wrong of them... imho.

-- 
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/




-- 
PHP General Mailing List (http://www.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] Am I right or wrong?

2001-09-03 Thread Cristopher Daniluk

It's wrong of them?!?! Not to sound irrational here, but you're DOWNLOADING
the file every time, even if you are downloading it every time. Why are you
opening it through HTTP? Why not directly via the FS? If you're local to the
machine, that seems more intelligent. If you're not local to the machine
then you're using not only CPU resource, but network resource, and even more
so should be responsible. It is very difficult for an ISP to differentiate
between what was an external request and what was you requesting something
from yourself. Even if it was simple, I'm not sure they have any obligation
or responsibility to do it.

Regards,


Cristopher Daniluk
President  CEO
email: [EMAIL PROTECTED]
direct: 330/530-2373

Digital Services Network, Inc
Unleashing Your Potential
voice: 800/845-4822
web: http://www.dsnet.net/


-Original Message-
From: Stig-Ørjan Smelror [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 03, 2001 8:33 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Am I right or wrong?


 My ISP has a limit on my site of 10,000MB of data transfer per month.

 4 days into september and I'm already at 2,500MB.  It would seem
 they're including requests by their own PHP server.

 I have a folder of ~80kb images that are dynamically resized using PHP
 into ~1.4kb thumbnails.  Now for each one the PHP server sends an HTTP
 request for the 80kb image, and this is being counted against my
 10,000MB.

 Should it?  Am I in the right in thinking that it shouldn't?

 regards,



Everybody will always try to screw you some way or another...
Always look at the small print ;)

And you're right... it's wrong of them... imho.

--
Stig-Ørjan Smelror
Systemutvikler

Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N-0123 Oslo, Norway

tel. +47 22 09 28 80
fax. +47 22 09 28 81
http://www.lincom.no/




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




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


[PHP] Re: PHP Authentication on Apache

2001-09-03 Thread Alfredo Yong

Yes. It works. It is great.

if(!isset($PHP_AUTH_USER) or $PHP_AUTH_USER != myuser or $PHP_AUTH_PW 
!= mypassword) {
 Header(WWW-Authenticate: Basic realm=\Only authorizeds web\);
 Header(HTTP/1.0 401 Unauthorized);
 echo ha!\n;
 exit;
   }




Lynn Holt wrote:

 Hi all,
   Trying PHP for the first time. Snached the
 authentication code from the docs and put it in phpauth.php.
 When I surf to it,  it just asks for my
 user and password again and again  If I hit Cancel, it prints the
 little message just fine. Here's the code in case I'm the
 only one to RTFM:
 
 ---
 Example 17-1. HTTP Authentication example
 
 ?php
   if(!isset($PHP_AUTH_USER)) {
 header(WWW-Authenticate: Basic realm=\My Realm\);
 header(HTTP/1.0 401 Unauthorized);
 echo Text to send if user hits Cancel button\n;
 exit;
   } else {
 echo pHello $PHP_AUTH_USER./p;
 echo pYou entered $PHP_AUTH_PW as your password./p;
   }
 ?
 -
 I have php 4.0.6  installed as a module(DSO) in apache 1.3.20 and
 everything else I've tried seems to work.
 
 Any Ideas? Anybody know if this is supposed to work?
 Should I stick with AuthPG and forget PHP authentication?
 BTW I don't have AuthType set in .htaccess or httpd.conf.
 
 Lynn
 Getting old isn't hard,
 all you got to do is live long enough..or fast enough.
 


-- 
PHP General Mailing List (http://www.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] Am I right or wrong?

2001-09-03 Thread Christopher William Wesley

On Tue, 4 Sep 2001, Seb Frost wrote:

 I have a folder of ~80kb images that are dynamically resized using PHP into
 ~1.4kb thumbnails.  Now for each one the PHP server sends an HTTP request
 for the 80kb image, and this is being counted against my 10,000MB.

 Should it?  Am I in the right in thinking that it shouldn't?
So, your PHP scripts are on one server, and your big images are on a
separate server?  If so, you are generating traffic between the two
servers ... at which point you need to consult your service contract.
Your contract should tell you for what traffic (including between which
servers, across which networks) you will be billed.  It's kind of strict
to charge for traffic across a local network ... I wish you luck fighting
your ISP if the contract doesn't define for which traffic you'll be
billed.

Aside from the ISP issue ... dynamically resizing 80K images on the fly is
frightful thing.  Creating thumbnails [once/at regular intervals] would be
a wise step to take.  It takes the load off the web server and will cut
your network traffic.  The tradeoff is disk space usage ... but you can
store 57 1.4KB thumbnails in the same space as one 80KB image :)  Good
trade!

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net


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




Re: [PHP] Re: probs with exec, pls help (still)

2001-09-03 Thread David Robley

On Mon,  3 Sep 2001 19:36, taz wrote:
 Hi

 I've put the full path in for mysql, i've included -h -u -p and
 included the paths of the txt  table files

 Still don't work.

 I'm logged in as root, working on my own box (linux) .
 I'm really struggling with this one.
 Has anyone out there done this ??

 Many TIA
 Terry
 - Original Message -
 From: _lallous [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, September 03, 2001 9:24 AM
 Subject: [PHP] Re: probs with exec, pls help

  should'nt I guess
  I should at least specify full path of mysqlimport as in:
  exec(/usr/local/mysql/bin/mysqlimport -u -p dada dasda)
 
  Taz [EMAIL PROTECTED] wrote in message
  002801c133f3$1e2204e0$0feafea9@reynolds">news:002801c133f3$1e2204e0$0feafea9@reynolds...
  Should this work, if not, why not
 
  ?php exec(mysqlimport -u root -ppasword test one.txt) ?
 
  the import works fine from the command line

Have you checked that mysqlimport and the directory in which it resides 
has execute permissions for everyone?

Also, check the contents of the array returned by exec, and also the 
return status of the command.

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

   IBM: It may be slow, but at least it's expensive.

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




[PHP] Thankyou, whoever

2001-09-03 Thread Seb Frost

Someone on this list yesterday exposed a large hole on one of my php
scripts.  Dunno who you are but thankyou.  I could have lost sales in that
loophole :-)

I know it was off of this list because that's the only place I made that
link public.  Some lucky guy on BT openworld - wish I could get that here!

- seb
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




[PHP] Attaching stuff

2001-09-03 Thread Max Mouse

I want to be able to include a graphic or something of that sort in a form
mail (using mail() from form). Is this possible?

Max



-- 
PHP General Mailing List (http://www.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] Am I right or wrong?

2001-09-03 Thread Seb Frost

Hmmm, I suppose the files and the php server may be on different machines -
hadn't thought of that :-)  I guess I need to make a compromise on my script
then.

- seb

-Original Message-
From: Chris Wesley [mailto:[EMAIL PROTECTED]]On Behalf Of
Christopher William Wesley
Sent: 04 September 2001 01:59
To: Seb Frost
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Am I right or wrong?


On Tue, 4 Sep 2001, Seb Frost wrote:

 I have a folder of ~80kb images that are dynamically resized using PHP
into
 ~1.4kb thumbnails.  Now for each one the PHP server sends an HTTP request
 for the 80kb image, and this is being counted against my 10,000MB.

 Should it?  Am I in the right in thinking that it shouldn't?
So, your PHP scripts are on one server, and your big images are on a
separate server?  If so, you are generating traffic between the two
servers ... at which point you need to consult your service contract.
Your contract should tell you for what traffic (including between which
servers, across which networks) you will be billed.  It's kind of strict
to charge for traffic across a local network ... I wish you luck fighting
your ISP if the contract doesn't define for which traffic you'll be
billed.

Aside from the ISP issue ... dynamically resizing 80K images on the fly is
frightful thing.  Creating thumbnails [once/at regular intervals] would be
a wise step to take.  It takes the load off the web server and will cut
your network traffic.  The tradeoff is disk space usage ... but you can
store 57 1.4KB thumbnails in the same space as one 80KB image :)  Good
trade!

~Chris   /\
 \ / Pine Ribbon Campaign
Microsoft Security Specialist X  Against Outlook
The moron in Oxymoron.   / \ http://www.thebackrow.net

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.274 / Virus Database: 144 - Release Date: 23/08/2001


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




RE: [PHP] Attaching stuff

2001-09-03 Thread Jason Murray

Yep,

But you need to use a MIME email with file attachments.

Simple way to produce a MIME email:

http://planetkiller.shadow.net.au/mime-php.txt

Jason

-- 
Jason Murray
[EMAIL PROTECTED]
Web Developer, Melbourne IT
Work now, freak later!

 -Original Message-
 From: Max Mouse [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 04, 2001 2:09 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Attaching stuff
 
 
 I want to be able to include a graphic or something of that 
 sort in a form
 mail (using mail() from form). Is this possible?
 
 Max
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: 
 [EMAIL PROTECTED]
 

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




  1   2   >