Re: [PHP] Q on php://stdin -- an answer!

2002-02-21 Thread Billy S Halsey

For anyone interested in the answer to this problem, here's what I found 
out.

I ran the script through truss and looked at what was happening. It 
seems that when trying to use fopen(php://stdin, r) or 
fopen(/dev/fd/0, r), that as it's reading from the file with 
fgets(), it does an lseek (or llseek) _to the current location_ after 
each read. It seems a bit strange that it would try to lseek to the 
current location, especially since I didn't open it r+ or w+, but 
anyway ... Since php://stdin and /dev/fd/0 are _interactive_, the man 
page in Solaris says that it uses non-buffered I/O -- i.e., you can't 
lseek/fseek it; it will return ESPIPE. However, calling popen(cat 
/dev/fd/0, r) _does_ use buffered I/O, so it is possible to 
lseek/fseek on this file descriptor that is opened. I don't know what 
other OS'es do, but that's Solaris' way of handling piped data.

Would it be possible for someone to look into or offer an explanation 
for why the code for fgets() does an lseek() after each read?

Thanks.

-bsh

Billy S Halsey wrote:

 Hi all,

 I still have been completely unable to get this to work like it 
 should. I have a simple script:

 #!/usr/local/bin/php -q
 ?php
$fp = fopen(php://stdin, r);
while (($buf = fgets($fp, 512)) != false) {
$input .= $buf;
}
echo $input;
 ?

 So if I call this echo.php, then if I try something like

cat /etc/hosts | ./echo.php

 It prints a # (first line of /etc/hosts) followed by two blank lines. 
 Then it quits. /etc/hosts does contain real data. This occurs with ANY 
 file that I try to cat.

 If you know what the problem might be, I would LOVE to hear your 
 suggestions. I didn't get any replies the first time I asked, so I'm 
 hoping that someone has something to contribute.

 I'm using PHP 4.1.1 on Solaris 8.

 Thanks in advance,

 -bsh

 Billy S Halsey wrote:

 Hi all,

 I've been trying for the last three hours to do something like this:

#!/usr/local/bin/php -q
?php
$fp = fopen(php://stdin, r);
while (!feof($fp)) {
$line = fgets($fp, 4096);
print $line;
}
fclose($fp);
?

 And then calling it with something like:

cat foo.txt | ./echofile.php

 The problem is, it will print the first line of foo.txt, and then 
 exit. No matter what I do, I can't get it to read the next line. I've 
 even added a test after the print command to see if it's at EOF, and 
 it's not. I've also changed it to do this:

while (($buf = fgets($fp, 4096)) != FALSE) {
print $buf;
}

 Still won't read more than one line of the file. The only thing I've 
 been able to do that seems to work is this:

$fp = fopen(/dev/fd/0, r);
while (!feof($fp)) ..

 [The code snippets I've quoted above are just rough sketches ... I 
 really am checking the return value from fopen() to make sure I open 
 the file, etc.]

 I'm using PHP 4.1.1 on Solaris 8. Can somebody PLEASE tell me what 
 the problem is? What stupid mistake am I making?

 Thanks.

 -bsh :-)



-- 

===
Billy S Halsey  Software Problem Resolution
Phone x55403/(858) 526-9403ESP Solaris Software
Email [EMAIL PROTECTED]Sun Microsystems, Inc
   -NO DAY BUT TODAY-
===




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Windows Logon Username Pass to PHP

2002-02-21 Thread Jack

Dear all
Is there any ways that i can pass the Windows Logon Username to PHP?
Any Built in Function that can handle this? cause i don't want the user to
logon so many times and my website is for internal only!

Thx
Jack
[EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] How to automate sending of email?

2002-02-21 Thread gaukia 345

I'm in a project where I need to:
Automate the sending of an email to, say, [EMAIL PROTECTED], 
whenever [EMAIL PROTECTED] receives an email in his mailbox from some 
Ms. [EMAIL PROTECTED] Is there a way PHP can do that? Thanx a lot.

P.S. Have been getting a lot of useful responses in this mail list. Great 
jobs guys! When I become nearly as good as you guys, I'll surely contribute 
back!

Gaukia



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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Where to look for developers?

2002-02-21 Thread Boaz Yahav

http://www.weberdev.com has a great jobs section.

Check out the 1st paragraph
http://www.weberdev.com/index.php3?GoTo=Thanks.html

berber

-Original Message-
From: Francisco Reyes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:31 AM
To: PHP list
Subject: [PHP] Where to look for developers?


Suggestions where to place an ad for a part time/per project developer?
I looked at several sites and none of them seemed heavily trafficed or
like a good place. Also the major places likes monster.com probably
charge a fee to list.

The links I found were from  the Developers and Job
Opportunities links on php.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help on PHP vs JAVA

2002-02-21 Thread Berlina

Hello to everybody,

I need some help for writting a comparison of PHP vs JAVA, and of course, I
need that PHP wins
;-D

Any ideas?
Any comparison wrote?

Advanced Thanks,
F.P.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Paths and ImageCreate(), GetImageSize()...

2002-02-21 Thread Monty

I'm having a hard time figuring out exactly how paths should be listed when
pointing to files using the ImageCreate(), ImageCopyResized(), etc.
commands.

My images are in a sub-folder called img, and my script is in another
sub-folder called scripts (at the same level as img).

It appears that GetImageSize() only works for me when I put the full URL in
front of the file name like this...

GetImageSize(http://www.mysite.com/img/photo.jpg;)

Is that the only way for this to work? The following variations all produce
an error saying it can't file the file photo.jpg:

GetImageSize(../img/photo.jpg)
GetImageSize(/img/photo.jpg)
GetImageSize(img/photo.jpg)

At least GetImageSize() works with a URL. I can't say the same for any of
the ImageCreate() functions, which when used with all of the above path
variations including the URL, produce an error stating it can't locate the
photo.jpg file. Permissions for the img folder are set to 777, and I can
load the file using IMG SRC=/img/photo.jpg with no problems. Why can't I
get these functions to find the file using the same path?

Thanks.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Help on PHP vs JAVA

2002-02-21 Thread Krzysztof Dziekiewicz

On Thu, 21 Feb 2002, Berlina wrote:

 Hello to everybody,
 
 I need some help for writting a comparison of PHP vs JAVA, and of course, I
 need that PHP wins
 ;-D

PHP and JAVA are different tools. It depends what you want to do. You can
take advanteges from both.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Trying to post

2002-02-21 Thread Monty

I've been trying to post to this newsgroup, but have had problems. If this
works, I guess the problem has gone away on its own.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Using 'Location' and variables

2002-02-21 Thread Krzysztof Dziekiewicz

On Thu, 21 Feb 2002, Jim Koutoumis wrote:

 I'm sure that this is possible, but I haven't found any info/examples on it
 yet,..
 
 What I have is a php script that processes data that been submitted by a
 FORM.

You can make this using javascript. You generate HTML form with hidden
fields and at the end execute script xxx.post() /script or something
like that.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: [PHP-DEV] Help on PHP vs JAVA

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 01:07, Berlina wrote:
 Hello to everybody,
 
 I need some help for writting a comparison of PHP vs JAVA, and of course, I
 need that PHP wins
 ;-D

Wins what? For what task? This is quite a nebulous question. And if 
you've decided which will win before you've done the research, that
research won't be worth much, will it?

However, here's one place to start: try typing words like 'comparison',
'php', and  'java' together into Google. I just found a pile of articles
on the topic in under 3 seconds of looking.

 Any ideas?
 Any comparison wrote?
 
 Advanced Thanks,
 F.P.

P.S. Please, pick *one* mailing list. This question has nothing to do 
with either php-dev or php-db.


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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Auto-Pagination of Content from DB

2002-02-21 Thread Monty

I'm not sure the best way to auto-paginated long articles that will be
stored in a MySQL database. I tried searching a few sites for sample code
but couldn't really find anything, which is why I'm asking here.

An idea I had was to split the content into an array called page and then
just access each page with echo $page[2]; My only concern is any potential
overhead if the articles are long (maybe about 10-15 pages). Also, would the
best way to split the content into pages be to use one of the string parsing
commands that looks for the next \n\n (a new paragraph)? I'm new to PHP,
so, not sure yet which command would be the best for this.

Any advice or pointers on how to best do this is appreciated!

Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] make error

2002-02-21 Thread info

Hi,
I've downloaded the newset PHP sources, made ./configure --with-mysql --with-apxs what 
was succesfully but when I type make it starts compiling but an error occures:
Making all in Zend
make[1]: Entering directory `/c/php-4.1.1/Zend'
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_language_parser.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_language_scanner.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_ini_parser.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_ini_scanner.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_alloc.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_compile.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_constants.c
/bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main   
-DEAPI_MM -DLINUX=2 -DMOD_SSL=206105 -DUSE_HSREGEX -DEAPI -DUSE_EXPAT -I../TSRM  -g 
-O2 -prefer-pic -c zend_dynamic_array.c
gcc: Internal compiler error: program cc1 got fatal signal 11
make[1]: *** [zend_dynamic_array.lo] Error 1
make[1]: Leaving directory `/c/php-4.1.1/Zend'
make: *** [all-recursive] Error 1

Can anyone help me ?
I also have problems when I delete the configure script and make a new one with 
./buildconf then it will output the following warning and ./configure --with-mysql 
--with-apxs will stop after checking whether yytext is a pointer... yes:
buildconf: checking installation...
buildconf: autoconf version 2.52 (ok)
buildconf: automake version 1.5 (ok)
buildconf: libtool version 1.4.2 (ok)
rebuilding configure
configure.in:124: warning: AC_PROG_LEX invoked multiple times
rebuilding main/php_config.h.in

./configure --with-mysql --with-apxs
checking for a BSD compatible install... /usr/bin/ginstall -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
Updated php_version.h
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i586-pc-linux-gnu
checking host system type... i586-pc-linux-gnu
checking for mawk... no
checking for gawk... gawk
checking for bison... bison -y
checking bison version... 1.25 (ok)
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix...
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking whether gcc and cc understand -c and -o together... yes
checking whether ln -s works... yes
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes
./configure: line 3394: syntax error near unexpected token `fi'
./configure: line 3394: `fi'

Anyone got an idea what is wrong here??

So long



[PHP] RE: timestamp confusion

2002-02-21 Thread Tim Ward

Time() returns unix timestamp (which is GMT), date() is interpreting that
according to the local time zone. 
Tim Ward
internet chess at www.chessish.com http://www.chessish.com 

--
From:  Justin French [SMTP:[EMAIL PROTECTED]]
Sent:  21 February 2002 03:21
To:  php
Subject:  timestamp confusion

hi,

when people add something to a table, i'm logging the time()...
later,
when I pull it out, i'm doing something like date('d M Y',$stamp),
which
all works fine, printing something like 21 Jan 2002.

problem is, i'm on a server in canada, but 99% of my users will be
in Australia.

to get an idea of the time difference, I made a simple php file
called
time on both my local test server and the live server:

?

$stamp = time();
echo $stamp.BR;
echo date('d M Y H:m:s', $stamp);

?

I ran both scripts within 5 seconds of each other, and got the
following:

local:
1014261839
21 Feb 2002 14:02:59

live:
1014260440
20 Feb 2002 21:02:40


So, if I look at the second line of the output, they're about 17
hours
behind me, but if I look at the first line [time()] (according to
the
manual, the number of seconds since that date in 1970 i think), I
get a
way different result:

1014261839 - 1014260440 = 1399 seconds difference, about 23 minutes.


I want to be able to determine the $difference between the two
stamps in
seconds, then do something like:
?
echo date('d M Y',$stamp - $difference);
?


Seems easy enough, but 1399 doesn't seem right to me!

Where have I lost the plot???


Justin French
http://indent.com.au
http://soundpimps.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas

I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats

another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a way to make it walk through the whole string, so

it would find all the links, not just the first one.
Any ideas?

Ando


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando

I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats

another matter).
I'm pretty new to php, i was thinking of doing it with ereg, something
like eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a way to make it walk through the whole string, so

it would find all the links, not just the first one.
Any ideas?

Ando




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Need help

2002-02-21 Thread DL Neil

John,

 Yeeesch! I neet help.

Yeeesch! was exactly my reaction when I read the following!

Now that you have had some responses to 'directly' address the problem may I ask why 
you would want to
maintain/work with the data in this format (top) as opposed to the eminently logical 
later presentation (below)?
It's not relational!

=dn


 The field looks a bit like this:
 
--
--

 1; Caribbean and West Indies; Guyana;4; Birney,(i) Earle; Harris,(i)
 Wilson; Hope,(i) Alec Derwent; King,(i) Bruce; James,(i) Henry;
 Olson,(i) Charles; Rushdie,(i) Salman; Purdy,(i) Al; Joyce,(i) James;
 Macleish,(i) Archibald; Cummings,(i) Edward Estlin (E.E.); Auden,(i) W.
 H.; Atwood,(i) Margaret; Tutuola,(i) Amos; Simon,(i) Claude;7;
 comparison of authors and works;
 
--
--

 Birney, Earle
 Harris, Wilson
 Hope, Alec Derwent
 King, Bruce
 James, Henry
 Olson, Charles
 Rushdie, Salman
 Purdy, Al
 Joyce, James
 Macleish, Archibald
 Cummings, Edward Estlin (E.E.)
 Auden, W. H.
 Atwood, Margaret
 Tutuola, Amos
 Simon, Claude




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Extracting hyperlinks from file

2002-02-21 Thread Andrey Hristov

Use preg_match_all('|a.*?href=(|'|)(.*?)(|')|i', $the_string,$the_matches);
var_dump($the_matches);

Regards,
Andrey Hristov

- Original Message - 
From: Ando Saabas [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 20, 2002 10:45 PM
Subject: [PHP] Extracting hyperlinks from file


 I need to produce an array of all the links(hrefs) in a remote file
 (actually those that refer to files in the same remote server, but thats
 
 another matter).
 I'm pretty new to php, i was thinking of doing it with ereg, something
 like eregi(a href[\]?=(.*), $file, $link);
 but i cannot think of a way to make it walk through the whole string, so
 
 it would find all the links, not just the first one.
 Any ideas?
 
 Ando
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Extracting hyperlinks from file

2002-02-21 Thread Andrey Hristov

ooops
sorry
The correct is :
preg_match_all('/a.*?href=(|'|)(.*?)(|')/i', $the_string,$the_matches);
 var_dump($the_matches);
- Original Message - 
From: Andrey Hristov [EMAIL PROTECTED]
To: Ando Saabas [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 1:35 PM
Subject: Re: [PHP] Extracting hyperlinks from file


 Use preg_match_all('|a.*?href=(|'|)(.*?)(|')|i', $the_string,$the_matches);
 var_dump($the_matches);
 
 Regards,
 Andrey Hristov
 
 - Original Message - 
 From: Ando Saabas [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Wednesday, February 20, 2002 10:45 PM
 Subject: [PHP] Extracting hyperlinks from file
 
 
  I need to produce an array of all the links(hrefs) in a remote file
  (actually those that refer to files in the same remote server, but thats
  
  another matter).
  I'm pretty new to php, i was thinking of doing it with ereg, something
  like eregi(a href[\]?=(.*), $file, $link);
  but i cannot think of a way to make it walk through the whole string, so
  
  it would find all the links, not just the first one.
  Any ideas?
  
  Ando
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
  
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Extracting hyperlinks from file

2002-02-21 Thread Ando Saabas

I need to produce an array of all the links(hrefs) in a remote file
(actually those that refer to files in the same remote server, but thats
another matter).
I'm pretty new to php, i was thinking of doing it with ereg, somethin
like
 eregi(a href[\]?=(.*), $file, $link);
but i cannot think of a way to make it walk through the whole string, so
it
would find all the links, not just the first one.
Any ideas?

Ando


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Extracting hyperlinks from file

2002-02-21 Thread DL Neil

Ando

 I need to produce an array of all the links(hrefs) in a remote file
 (actually those that refer to files in the same remote server, but thats

 another matter).
 I'm pretty new to php, i was thinking of doing it with ereg, something
 like eregi(a href[\]?=(.*), $file, $link);
 but i cannot think of a way to make it walk through the whole string, so

 it would find all the links, not just the first one.
 Any ideas?


Almost identical question asked and answered a few hours back: look for the thread 
[PHP] regexp on user
supplied link

Regards,
=dn



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Bizarre problem.

2002-02-21 Thread Ford, Mike [LSS]

 -Original Message-
 From: Andres Plaza R. [mailto:[EMAIL PROTECTED]]
 Sent: 20 February 2002 20:55
[...]
 
   BUT, the other day I used vi to see the debug.log, and the error
 appears like this:
 
 gcc -o conftest -g -O2  -DLINUX=22 -DMOD_SSL=208105 
 -DUSE_HSREGEX -DEAPI  -Wl,-rpath,/usr/local/ssl/lib 
 -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib 
 -L/usr/local/lib -Wl,-rpath,/usr/local/oracle/8.0.5/lib 
 -L/usr/local/oracle/8.0.5/lib conftest.c -lclntsh -lpsa 
 -lcore4 -lnlsrtl3 -lm^M -lnsl -lgd -lcurl -ldl -lcrypto -lssl 
 -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  
 -lresolv -lcrypt 15
 /usr/bin/ld: cannot find -lm^M
 collect2: ld returned 1 exit status
 
   You will notice that there is a ^M after -lm ! And, of 
 course, ld
 didn't find -lm^M . :-)
 
   Obviously, I edited the configure file, but there's no ^M.

Well, ^M is a representation of the carriage-return character -- the fact that it's 
not being displayed by your editor suggests that, in fact, it *is* a carriage-return 
which is being suppressed on the grounds that it's an invisible position-control 
character.

Look for an option in your editor to display invisible characters, or a handy 
utility that will strip out unwanted characters.  (Sorry, I'm not a UNIX guru so can't 
suggest anything more concrete!)

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning  Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] sending form values in http header?

2002-02-21 Thread marcbey

is it possible to send variables in the header to the next script with
an form?

scriptform2.php:

$ip = 192.168.0.90;
$fp = fsockopen ( $ip, 80, $errno, $errstr, 30);
$header  =POST /tests/form2.php HTTP/1.1\r\n;
$header .=Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword, */*\r\n;
$header .=Referer: http://192.168.0.90/tests/form2.php?\r\n;;
$header .=Accept-Language: de\r\n;
$header .=Content-Type: application/x-www-form-urlencoded\r\n;
$header .=Accept-Encoding: gzip, deflate\r\n;
$header .=User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)\r\n;
$header .=Host: 192.168.0.90\r\n;
$header .=Content-Length: 9\r\n;
$header .=Connection: Keep-Alive\r\n;
$header .=Cache-Control: no-cache\r\n\r\n;

$header .user=marc;

fputs ( $fp, $header, strlen( $header ) );

while ( !feof( $fp ) )
{
  echo fgets( $fp,128 );
}

fclose($fp)

and shoud connect to the script form.php and sending the variable user

html
head
?php
if ( $HTTP_POST_VARS[user] == marc )
{
 echo http_user ist marc;
}
else
{
 echo no user;
}
?
form name=form1 method=post action=?
  input type=text name=user
  input type=submit name=Submit value=Submit
/form
/body
/html

it doesent work, but why?



--
---
magic garden GmbH - Agentur für Informationsarchitektur

Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

www.magic-garden.de ¦ [EMAIL PROTECTED]

Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Trouble with Sessions

2002-02-21 Thread Todor Stoyanov

That's right
Send these headers after the session_register()

header(Cache-Control: );
header(pragma: );

Leaving the values empty will allow the browser to decide if to get the
result page from the cache. It works for me fine, but I'm not sure in case
with SSL secured page.


Richard Baskett [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Well actually I believe if you do a header pragma cache or another way of
caching the page it should work.  If I am wrong someone please correct me..
I don¹t want to give out bad advice :)

Rick

The old law about an eye for an eye leaves everybody blind. - Dr. Martin
Luther King, Jr.

 From: Steven Walker [EMAIL PROTECTED]
 Date: Wed, 20 Feb 2002 19:57:48 -0800
 To: Phillip S. Baker [EMAIL PROTECTED]
 Cc: PHP Email List [EMAIL PROTECTED]
 Subject: Re: [PHP] Trouble with Sessions

 Phillip,

 I had the same problem. It's even worse in IE5 since no error was
 displayed, just an empty form. To circumvent this, I put PHP controls
 for navigating. To go back, a button called 'modify' resubmits the data
 to the form page. On my site, if the user clicks the back button, they
 get hosed what can you do?

 Any one else know?

 Steven J. Walker
 Walker Effects
 www.walkereffects.com
 [EMAIL PROTECTED]

 On Wednesday, February 20, 2002, at 07:36  PM, Phillip S. Baker wrote:

 Hey All,

 I just converted my login process to sessions.
 It works great.

 However I am having one annoying issue come up.

 The site is a secure site. So each page has an include to check to see
 if a validated session is there. If not a login forma appears and so on.
 It all works just fine.

 However I am coming up against a problem with forms now.

 I have a searchable listing of members.
 So there is a form to search for particular members.
 I preform the search, get a listing of possible matches.

 Now I click on a member name to get more info about him bringing up
 another page.
 If I hit the back button on the browser to get the search results again
 I get the following message

 Warning: Page has Expired The page you requested was created using
 information you submitted in a form. This page is no longer available.
 As a security precaution, Internet Explorer does not automatically
 resubmit your information for you.

 To resubmit your information and view this Web page, click the Refresh
 button.

 Under my previous scheme where login was through the use of cookies.
 I did not get the above message.

 Anyone have any ideas how to get ride of this message and just allow
 the back button to work like it did before?

 (Oh I get similiar messages in NN 6.2 or NN 4.+)

 Phillip


 -- PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] sending form values in http header?

2002-02-21 Thread Simon Willison

I have no idea why your code isn't working, but if you are interested 
there is a class called Snoopy which can do exactly qhat you are 
attempting (posting values to a form, as well as grabbing pages from 
URLs and other neat tricks):

http://snoopy.sourceforge.net/

marcbey wrote:

is it possible to send variables in the header to the next script with
an form?

scriptform2.php:

$ip = 192.168.0.90;
$fp = fsockopen ( $ip, 80, $errno, $errstr, 30);
$header  =POST /tests/form2.php HTTP/1.1\r\n;
$header .=Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/vnd.ms-excel, application/msword, */*\r\n;
$header .=Referer: http://192.168.0.90/tests/form2.php?\r\n;;
$header .=Accept-Language: de\r\n;
$header .=Content-Type: application/x-www-form-urlencoded\r\n;
$header .=Accept-Encoding: gzip, deflate\r\n;
$header .=User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
5.1)\r\n;
$header .=Host: 192.168.0.90\r\n;
$header .=Content-Length: 9\r\n;
$header .=Connection: Keep-Alive\r\n;
$header .=Cache-Control: no-cache\r\n\r\n;

$header .user=marc;

fputs ( $fp, $header, strlen( $header ) );

while ( !feof( $fp ) )
{
  echo fgets( $fp,128 );
}

fclose($fp)

and shoud connect to the script form.php and sending the variable user

html
head
?php
if ( $HTTP_POST_VARS[user] == marc )
{
 echo http_user ist marc;
}
else
{
 echo no user;
}
?
form name=form1 method=post action=?
  input type=text name=user
  input type=submit name=Submit value=Submit
/form
/body
/html

it doesent work, but why?



--
---
magic garden GmbH - Agentur für Informationsarchitektur

Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)

www.magic-garden.de ¦ [EMAIL PROTECTED]

Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38








-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] header (Location: URL);

2002-02-21 Thread Ali

Hello,

is there any possibility of redirecting a request URL using header:Location
and openning the requested URL in a new window linke target=blank in html.
Thank you.

Ali


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Weather Scripts

2002-02-21 Thread Simos Varelakis \(OLD\)


 Hi People,

 I have been looking around the web lately and have noted a number of
 sites are running what appears to be php scripts that parse their
local
 weather information and display it on their wesite.

 Well, I want to do the same, however I have been searching and found
 nothing that does what I want it to do. The only ones that I can find
 are either the output style of weather.com (ie all or nothing) or use
 their own graphics etc to display the data.

 All I want to be able to do is give the current conditions (ie partly
 cloudy) and the current temperature. I haven't decided if I then want
to
 use this info to create an image or if I will display it as straight
 text.

I want to do the same thing and I wonder if there are sites which can
give
me weather info for European cities (in xml format) for free...

Thanks in advance for your help

Simos



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: sorry about multiple posts

2002-02-21 Thread Ando

Just that i sent the message about 15 hours ago,
so i thought it didnt get through. Dunno why it took so long.

And thanks for help

Ando



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Bizarre problem.

2002-02-21 Thread Andres Plaza R.

Hi Mike!

On Thu, 21 Feb 2002, Ford, Mike   [LSS] wrote:

 Well, ^M is a representation of the carriage-return character -- the fact that it's 
not being displayed by your editor suggests that, in fact, it *is* a carriage-return 
which is being suppressed on the grounds that it's an invisible position-control 
character.

 Look for an option in your editor to display invisible characters, or a handy 
utility that will strip out unwanted characters.  (Sorry, I'm not a UNIX guru so 
can't suggest anything more concrete!)

Yep, I know that. I edited the configure file in vi (the best
editor in UNIX :-) ), but the character didn't appear! So I used the
dos2unix program (that erase the ^M character from the files) but it
didn't find nothing. Any other idea?

I'm very surprised that the only person with that problem is me...
And I don't think I'm soing something very particular.

Thanks again...
-- 

Andres Plaza R.
 [EMAIL PROTECTED]
  http://la.mafia.cl/aplaza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Windows Logon Username Pass to PHP

2002-02-21 Thread J Wynia

This may sound kludgy. Probably is. Since it's an internal site, you can
control things a bit. The Windows Scripting Host (installed on Win 98+ and
Win2K+, available for others as download) exposes at least the username as a
property on a WScript.Network object. However, since access to that object
is outside the security of a browser, you can't use client-side code to grab
it while in a browser. You COULD create an HTA(HTML Application. Just rename
an HTML file to *.hta on an IE enabled file and double click it) file to
distribute to your users that they use as an interface to your app instead
of the browser. That lets Javascript or VBScript access the WScript.Network
object and you can grab the username and at least prefill the logon box. The
password isn't exposed as a part of the object and sites with info to grab
it are filtered under Criminal Skills I can't help on that one. Here's the
Javascript to put in an HTA file to pull out the user information (among
other info).

var WshNetwork = new ActiveXObject(WScript.Network);
   var oDrives = WshNetwork.EnumNetworkDrives();
   var oPrinters = WshNetwork.EnumPrinterConnections();
   WScript.Echo(Domain =  + WshNetwork.UserDomain);
   WScript.Echo(Computer Name =  + WshNetwork.ComputerName);
   WScript.Echo(User Name =  + WshNetwork.UserName);
   WScript.Echo();
   WScript.Echo(Network drive mappings:);
   for(i=0; ioDrives.Count(); i+=2){
  WScript.Echo(Drive  + oDrives.Item(i) +  =  + oDrives.Item(i+1));
   }
   WScript.Echo();
   WScript.Echo(Network printer mappings:);
   for(i=0; ioPrinters.Count(); i+=2){
   WScript.Echo(Port  + oPrinters.Item(i) +  =  + oPrinters.Item(i+1));
   }



Jack [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Dear all
 Is there any ways that i can pass the Windows Logon Username to PHP?
 Any Built in Function that can handle this? cause i don't want the user to
 logon so many times and my website is for internal only!

 Thx
 Jack
 [EMAIL PROTECTED]





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Include_Path :: How do you set that up???

2002-02-21 Thread Robbie Newton

I keep getting errors saying that the required file could not be found or
something because the include_Path is wrong. Right now the include path is
set to ³..², I think because I saw it like that somewhere else and thought
that was the correct way to do it. I have tried so many things and nothing
is working. 

I am running on Win2K with MySQL and PHP4. Just trying to learn this stuff
in case I ever need it. Not to mention, its free, why not learn it.


Thanks,

-Robbie


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] licensing, protection

2002-02-21 Thread Kunal Jhunjhunwala

Hey,
Any suggestions on how to write a licensing system or something similar to
protect against illegal distribution of your programs? Zend is a way, but is
very expensive.
Regards,
Kunal Jhunjhunwala

Minds think with ideas, not information. No amount of data, bandwidth, or
processing power can substitute for inspired thought. - Clifford Stoll


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Paths and ImageCreate(), GetImageSize()...

2002-02-21 Thread Jason Wong

On Thursday 21 February 2002 17:10, Monty wrote:
 I'm having a hard time figuring out exactly how paths should be listed when
 pointing to files using the ImageCreate(), ImageCopyResized(), etc.
 commands.

 My images are in a sub-folder called img, and my script is in another
 sub-folder called scripts (at the same level as img).

 It appears that GetImageSize() only works for me when I put the full URL in
 front of the file name like this...

 GetImageSize(http://www.mysite.com/img/photo.jpg;)

 Is that the only way for this to work? The following variations all produce
 an error saying it can't file the file photo.jpg:

 GetImageSize(../img/photo.jpg)
 GetImageSize(/img/photo.jpg)
 GetImageSize(img/photo.jpg)


It works for me using the *full* filesystem path to the image.


 At least GetImageSize() works with a URL. I can't say the same for any of
 the ImageCreate() functions, which when used with all of the above path
 variations including the URL, produce an error stating it can't locate the
 photo.jpg file. Permissions for the img folder are set to 777, and I
 can load the file using IMG SRC=/img/photo.jpg with no problems. Why
 can't I get these functions to find the file using the same path?

Because /img/photo.jpg is relative to your DOCUMENT_ROOT. The easiest way 
to make sure you've got the right path is prepend the DOCUMENT_ROOT 
($_SERVER['DOCUMENT_ROOT'] or $HTTP_SERVER_VARS['DOCUMENT_ROOT']).


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

/*
Humor in the Court:
Q: What is the meaning of sperm being present?
A: It indicates intercourse.
Q: Male sperm?
A. That is the only kind I know.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] RE: [PHP-DB] Help on PHP vs JAVA

2002-02-21 Thread Gurhan Ozen

That's a pretty naive question to ask. For what specific task do you want to
compare them ? Besides if you can't write a comparison article on PHP vs.
JAVa , how can you set the outcome in PHP's favor?
  I would advise you to sit down and try to do the task both in Java and PHP
, and compare both . They both are free, they both are cross-platform, but
you can compare them in terms of their capabilities to do things,
performance, speed, easiness to write and maintain the code , etc.  And the
result would differ according to the project you are working on...

Gurhan


-Original Message-
From: Berlina [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 4:08 AM
To: php-general-list; php-dev-list; php-db-list
Subject: [PHP-DB] Help on PHP vs JAVA


Hello to everybody,

I need some help for writting a comparison of PHP vs JAVA, and of course, I
need that PHP wins
;-D

Any ideas?
Any comparison wrote?

Advanced Thanks,
F.P.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: mysql_insert_id?

2002-02-21 Thread Christian Novak

Wee Chua [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 Is it possible that I would get the wrong ID (Not the ID I just inserted
in
 Auto_Increment field) by using mysql_insert_id function if someone is also
 inserting record at the same time? How does mysql_insert_id work
accurately?

 Thanks,
 Wee

You can get the last auto_inc with the following query:
SHOW TABLE STATUS 'my_table_having_an_autoinc'
and then lookup the field Auto_increment in the result set.

Best regards

Christian




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] regular expressions

2002-02-21 Thread German Castro Donoso

I have a problem with ereg function.
In php 4.0.5 i use this
if ( ereg(([0-9][0-9]*)\|(\w\w*),$opcion, $registros) ) {
...
}
and no problem. But, in php 4.1.1 don't work. I think that may be the escape
of | character.

Note: I'm looking for a | in the string. Then i need escape the |

  Any idea for fix it?



Thanks
German Castro



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: licensing, protection

2002-02-21 Thread J Wynia

There is the PHP Obfuscator that makes output code a real pain to read. It
doesn't really compile it or anything, but it's a level of protection if you
need it. http://pobs.mywalhalla.net/

Kunal Jhunjhunwala [EMAIL PROTECTED] wrote in message
005101c1bae4$6e7a6770$0301a8c0@CONFUSED">news:005101c1bae4$6e7a6770$0301a8c0@CONFUSED...
 Hey,
 Any suggestions on how to write a licensing system or something similar to
 protect against illegal distribution of your programs? Zend is a way, but
is
 very expensive.
 Regards,
 Kunal Jhunjhunwala

 Minds think with ideas, not information. No amount of data, bandwidth, or
 processing power can substitute for inspired thought. - Clifford Stoll




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Variable problem with a function calling a ext. librairy

2002-02-21 Thread Marc Andre Paquin

Hello,

I created a librairy with configuration setting: background color, font size, 
customer's name, etc. Like this:
(lib_config.inc)

$bgcolor = #ff;
$co = ABC enterprise;

A second file is building html page headders:
(lib_intra.inc)

function title($name_section,$name_page){
print brbr\n;
print font_titre3.$co/fontbrbr\n;
print font_titre2.$name_section/fontbr\n;
print font_titre2.$name_page/font\n;
print brbr\n;
}

Finnaly, I call the title function in a web page to dynamicly create the code:
(test.php)

echo title(General presentation,The annual report);

My problem (you guessed it!) is that the file lib_intra.inc is beeing processed 
by php (when callled by my web page test.php) and the 2 variables are sent ok 
but NOT the $co wich is in the 1st file (lib_config.inc). Of course my 
lib_intra.inc has a: require (lib_config.inc);

Because I dont want to duplicate infos that are used in many files, the 
lib_config.inc is important and must be called to supply the data I need.

How can I set this so all the variables will be process under php?

Thanks to all!
-- 
Marc André Paquin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] regular expressions

2002-02-21 Thread Edward van Bilderbeek - Bean IT

first of all:
why do you use:
[0-9][0-9]*...
you better use: [0-9]+ then
same goes for \w
and I guess you don't need the ('s and )'s either...

Edward

- Original Message -
From: German Castro Donoso [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 5:26 PM
Subject: [PHP] regular expressions


 I have a problem with ereg function.
 In php 4.0.5 i use this
 if ( ereg(([0-9][0-9]*)\|(\w\w*),$opcion, $registros) ) {
 ...
 }
 and no problem. But, in php 4.1.1 don't work. I think that may be the
escape
 of | character.

 Note: I'm looking for a | in the string. Then i need escape the |

   Any idea for fix it?



 Thanks
 German Castro



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: header (Location: URL);

2002-02-21 Thread Murray Chamberlain


Ali [EMAIL PROTECTED] wrote in message
001701c1bada$f5ca5780$[EMAIL PROTECTED]">news:001701c1bada$f5ca5780$[EMAIL PROTECTED]...
 Hello,

 is there any possibility of redirecting a request URL using
header:Location
 and openning the requested URL in a new window linke target=blank in
html.
 Thank you.

 Ali




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] sending form values in http header?

2002-02-21 Thread Johnson, Kirk

In the method line, the URL being POST'd to is form2.php, not form.php. Is
that the correct file name, or should that be form.php?

Kirk

 -Original Message-
 From: marcbey [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 21, 2002 5:47 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] sending form values in http header?
 
 
 is it possible to send variables in the header to the next script with
 an form?
 
 scriptform2.php:
 
 $ip = 192.168.0.90;
 $fp = fsockopen ( $ip, 80, $errno, $errstr, 30);
 $header  =POST /tests/form2.php HTTP/1.1\r\n;
 $header .=Accept: image/gif, image/x-xbitmap, image/jpeg, 
 image/pjpeg,
 application/vnd.ms-excel, application/msword, */*\r\n;
 $header .=Referer: http://192.168.0.90/tests/form2.php?\r\n;;
 $header .=Accept-Language: de\r\n;
 $header .=Content-Type: application/x-www-form-urlencoded\r\n;
 $header .=Accept-Encoding: gzip, deflate\r\n;
 $header .=User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT
 5.1)\r\n;
 $header .=Host: 192.168.0.90\r\n;
 $header .=Content-Length: 9\r\n;
 $header .=Connection: Keep-Alive\r\n;
 $header .=Cache-Control: no-cache\r\n\r\n;
 
 $header .user=marc;
 
 fputs ( $fp, $header, strlen( $header ) );
 
 while ( !feof( $fp ) )
 {
   echo fgets( $fp,128 );
 }
 
 fclose($fp)
 
 and shoud connect to the script form.php and sending the 
 variable user
 
 html
 head
 ?php
 if ( $HTTP_POST_VARS[user] == marc )
 {
  echo http_user ist marc;
 }
 else
 {
  echo no user;
 }
 ?
 form name=form1 method=post action=?
   input type=text name=user
   input type=submit name=Submit value=Submit
 /form
 /body
 /html
 
 it doesent work, but why?
 
 
 
 --
 ---
 magic garden GmbH - Agentur für Informationsarchitektur
 
 Hermannstr. 15 - 70178 Stuttgart (Am Feuersee)
 
 www.magic-garden.de ¦ [EMAIL PROTECTED]
 
 Tel. (07 11) 619 57-42 ¦ Fax (07 11) 615 01 38
 
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: regular expressions

2002-02-21 Thread Murray Chamberlain

I think you have some un-needed code there. But anyway you might need to use
a double backslash infront of the |

If that doesn't work mail me back

Muz


German Castro Donoso [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a problem with ereg function.
 In php 4.0.5 i use this
 if ( ereg(([0-9][0-9]*)\|(\w\w*),$opcion, $registros) ) {
 ...
 }
 and no problem. But, in php 4.1.1 don't work. I think that may be the
escape
 of | character.

 Note: I'm looking for a | in the string. Then i need escape the |

   Any idea for fix it?



 Thanks
 German Castro





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Include_Path :: How do you set that up???

2002-02-21 Thread Murray Chamberlain

The include path should specify the file you are trying to include relative
to your file that is including.

E.g..

Consider two php file 1.php and 2.php if they are in the same directory and
you want to include 1.php with 2.php you simply add the line at the
beginning of 2.php

?
include(1.php);
.
?

I hope that helps, but I wasn't 100% sure of your question.

Muz

Robbie Newton [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I keep getting errors saying that the required file could not be found or
something because the include_Path is wrong. Right now the include path is
set to ³..², I think because I saw it like that somewhere else and thought
that was the correct way to do it. I have tried so many things and nothing
is working.

I am running on Win2K with MySQL and PHP4. Just trying to learn this stuff
in case I ever need it. Not to mention, its free, why not learn it.


Thanks,

-Robbie




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Date calculations

2002-02-21 Thread Sven Jacobs

Hey 

I need to calculate the amount of days between 2 point
point 1 is now the second point is in the past 
the format I have is in 2002-02-25 10:02:23 ( that is the format i have in
my db )
now if I have today 2002-02-25 10:02:04 and the other day is 2002-02-24
09:02:04
That means that the delta in days is 1 day ( the hours do not mather )

Somebody an idea ?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Date calculations

2002-02-21 Thread Andrey Hristov

look at the mysql docs
at www.mysql.com/doc/
there are some functions about times. it is easy to work with time intervals.

Best regards,
Andrey Hristov

- Original Message - 
From: Sven Jacobs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 5:56 PM
Subject: [PHP] Date calculations


 Hey 
 
 I need to calculate the amount of days between 2 point
 point 1 is now the second point is in the past 
 the format I have is in 2002-02-25 10:02:23 ( that is the format i have in
 my db )
 now if I have today 2002-02-25 10:02:04 and the other day is 2002-02-24
 09:02:04
 That means that the delta in days is 1 day ( the hours do not mather )
 
 Somebody an idea ?
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Date calculations

2002-02-21 Thread Edward van Bilderbeek - Bean IT

?
 $date1 = 2002-02-25 10:02:04;
 $date2 = 2002-02-24 09:02:04;

 list($date1,) = explode( , $date1);
 list($date2,) = explode( , $date2);
 list($year1, $month1, $day1) = explode(-, $date1);
 list($year2, $month2, $day2) = explode(-, $date2);

 $intdate1 = mktime('0', '0', '0', $month1, $day1, $year1);
 $intdate2 = mktime('0', '0', '0', $month2, $day2, $year2);

 $diff = abs($intdate1-$intdate2);
 // $diff is number of seconds difference
 // 1 day contains 60*60*24 seconds

 print $diff / (60*60*24);


?

Greets,
Edward


- Original Message -
From: Sven Jacobs [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 4:56 PM
Subject: [PHP] Date calculations


 Hey

 I need to calculate the amount of days between 2 point
 point 1 is now the second point is in the past
 the format I have is in 2002-02-25 10:02:23 ( that is the format i have in
 my db )
 now if I have today 2002-02-25 10:02:04 and the other day is 2002-02-24
 09:02:04
 That means that the delta in days is 1 day ( the hours do not mather )

 Somebody an idea ?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: NULL value for variable

2002-02-21 Thread Edward van Bilderbeek - Bean IT

if you move your mouse over the Download Now section... what is the
statusbar displaying??

Edward

- Original Message -
From: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 5:05 PM
Subject: RE: [PHP] Re: NULL value for variable


 I comment it out but I got this error:

 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 22
 Could not get file list: You have an error in your SQL syntax near '' at
 line 1

 Thanks for any help!.

 -Original Message-
 From: Sanduhr [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 20, 2002 6:58 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: NULL value for variable


 that global $fileId; shouldn't be there in  downloadfile.php
 Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 : Hello,
 : I am runnig php 4.1.1.  In the configuration, register_globals is
 : ON.
 : I have two programs and I want to pass the value from fileId from
one.php
 to
 : downloadfile.php.  However, in downloadfile.php $fileId is NULL.  What
am
 I
 : missing?  Thanks, -Teresa
 :
 :
 : one.php
 :   td width=33% bgcolor=#FFDCA8 height=21
 :   p style=margin-left: 10
 :   font face=Verdana size=1
 :   a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
 :  Download Now
 :   /a/font
 :   /td
 :   /tr
 :
 : downloadfile.php
 :   ?
 :   global $fileId;
 :
 :   if ( ! is_numeric($fileId) )
 :   die (Invalid PictureNumber specified: ($fileId));
 :
 :   ?
 :
 :



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Extensions and php and dll problem on win2k whit php 4.1.1

2002-02-21 Thread Mike Schmid

Hi NG

Help needed, i have make a new istallation of php 4.1.1 (with the
installer). I configured everyhing like iis php.ini. registry and permission
on th ntfs partition. I coppy all the dll`s from php (not the extensions
dll´s) to system32. I downloded to the win32 package with the extensions
pack and copy the stuff to php.

The problem now is if i run info.php i got some errors like unable to load
dynamic link libary
´c:\php\extensions/php_ifx.dll´,´c:\php\extensions/php_ingres.dll´.
If i run info.php whitout the php.ini file in winnt it works fine but i dont
have any extensions...

The output of the command promt if i run php.exe -i is, the dynamik link
libary isqlt09a.dll could not be found in the specified path c:\blahblah,
blah

where i can get the dlls... of somone can help me whit this problem

thanks Mike



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Inline or not inline

2002-02-21 Thread Chris Wright

Hi

Is it possible to have PHP spawn a second process that will run
independently of the script that started it?

This is what I'm trying to do :

1 - page.php  browser calls it, starts to execute
2 - if (condition)  fetch information from server.x via http pipe, log
to database
3 - display page.php

The problem is, step 2 is at the mercy of the speed of server.x and
provides no value to the end user (i.e. it's just going into the db) so
they shouldn't be made to wait for it.

So what I'd like to do is have step 2 run and complete while step 3 is
taking place - the only way I can think is to do something controllable,
like create a 'to do' list for another script, then have a cron
processing the to do list automatically.  But there must be a better
way... 

The data coming from server.x is dynamic, and so needs to be collected
almost at the same time.

Any ideas?

Chris

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: NULL value for variable

2002-02-21 Thread Andrey Hristov

It seems that you use global where it is not needed- outside of any function
First error because error_reporting is not set to 0 in php.ini so error_reporting 
valus includes E_WARNING.
if you set error_reporting=0 in php.ini or error_reporting(0); in the script you will 
not receive the first warning but probably
lose the second which is useful.

Best regards,
Andrey Hristov
- Original Message -
From: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 6:05 PM
Subject: RE: [PHP] Re: NULL value for variable


 I comment it out but I got this error:

 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 22
 Could not get file list: You have an error in your SQL syntax near '' at
 line 1

 Thanks for any help!.

 -Original Message-
 From: Sanduhr [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 20, 2002 6:58 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Re: NULL value for variable


 that global $fileId; shouldn't be there in  downloadfile.php
 Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 : Hello,
 : I am runnig php 4.1.1.  In the configuration, register_globals is
 : ON.
 : I have two programs and I want to pass the value from fileId from one.php
 to
 : downloadfile.php.  However, in downloadfile.php $fileId is NULL.  What am
 I
 : missing?  Thanks, -Teresa
 :
 :
 : one.php
 :   td width=33% bgcolor=#FFDCA8 height=21
 :   p style=margin-left: 10
 :   font face=Verdana size=1
 :   a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
 :  Download Now
 :   /a/font
 :   /td
 :   /tr
 :
 : downloadfile.php
 :   ?
 :   global $fileId;
 :
 :   if ( ! is_numeric($fileId) )
 :   die (Invalid PictureNumber specified: ($fileId));
 :
 :   ?
 :
 :



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Weather Scripts

2002-02-21 Thread Brian Paulson

I recently made a class that gets its info from the NOAA which is free
for public use. 

At the moment it is a little buggy and not quite complete.

You can look at it here http://spectre013.grunews.com/weather

It works for any location in the world by using the 4 character Airport
Code.

I will have the source if you want to use it, but at the moment it is in
no condition to be used on a live site.

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

-Original Message-
From: Simos Varelakis (OLD) [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 5:27 AM
To: 'Erik Price'; 'Shannon Doyle'
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Weather Scripts



 Hi People,

 I have been looking around the web lately and have noted a number of 
 sites are running what appears to be php scripts that parse their
local
 weather information and display it on their wesite.

 Well, I want to do the same, however I have been searching and found 
 nothing that does what I want it to do. The only ones that I can find 
 are either the output style of weather.com (ie all or nothing) or use 
 their own graphics etc to display the data.

 All I want to be able to do is give the current conditions (ie partly
 cloudy) and the current temperature. I haven't decided if I then want
to
 use this info to create an image or if I will display it as straight 
 text.

I want to do the same thing and I wonder if there are sites which can
give me weather info for European cities (in xml format) for free...

Thanks in advance for your help

Simos



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] unable to load dynamic library etc. etc.

2002-02-21 Thread Jeremy Reed

I keep getting this error message and cannot figure out why.  The
extension_dir is set correctly in the php.ini, I have put the .dlls into
every conceivable directory I can think of and nothing seems to work.

Anybody else had and fixed this problem?

Thanks,

Jeremy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] unable to load dynamic library etc. etc.

2002-02-21 Thread Hunter, Ray

Place all the dlls in the same directory as the php.exe file and in your
php.ini file have the extension_dir = .\ (windows).

This works for me great...

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Jeremy Reed [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] unable to load dynamic library etc. etc.


I keep getting this error message and cannot figure out why.  The
extension_dir is set correctly in the php.ini, I have put the .dlls into
every conceivable directory I can think of and nothing seems to work.

Anybody else had and fixed this problem?

Thanks,

Jeremy



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php-gtk

2002-02-21 Thread Dasmeet Singh Arora

Hello! Can anyone tell me about sites where I can find some help and 
resources on PHP GTK. Is their any visual editor available for PHP GTK?
Thanks in advance.


















-- 



'The rose is sweetest washed with morning dew
  And love is loveliest when embalmed in tears'
  - Walter Scott
  __

  http://www.pluginJokes.com - Add Free Dynamic Jokes To Your Site.
  http://nitro.fedoxpress.com - Earn Money While You Surf The Net.
  http://www.fedoXpress.com - Free, Fast  Easy Email.
  http://freeads.fedoXpress.com - Advertise Your Site For Free.
  __



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] php-gtk

2002-02-21 Thread Hunter, Ray

I do not know of any editors for php-gtk.  Here is the general list:
[EMAIL PROTECTED]

website: http://gtk.php.net

Ray Hunter
Firmware Engineer

ENTERASYS NETWORKS


-Original Message-
From: Dasmeet Singh Arora [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 8:59 PM
To: [EMAIL PROTECTED]
Subject: [PHP] php-gtk


Hello! Can anyone tell me about sites where I can find some help and 
resources on PHP GTK. Is their any visual editor available for PHP GTK?
Thanks in advance.


















-- 



'The rose is sweetest washed with morning dew
  And love is loveliest when embalmed in tears'
  - Walter Scott
  __

  http://www.pluginJokes.com - Add Free Dynamic Jokes To Your Site.
  http://nitro.fedoxpress.com - Earn Money While You Surf The Net.
  http://www.fedoXpress.com - Free, Fast  Easy Email.
  http://freeads.fedoXpress.com - Advertise Your Site For Free.
  __



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Help on PHP vs JAVA

2002-02-21 Thread John Lim

Hi

Any consultant will tell you that all you need to do is define
the comparison criteria and you can choose the winner easily.

PHP: ease of use, low cost of ownership, etc.
Java: scalability, choice of implementations, etc.

I just hope you can live with your choices!

Regards, John

Berlina [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hello to everybody,

 I need some help for writting a comparison of PHP vs JAVA, and of course,
I
 need that PHP wins
 ;-D

 Any ideas?
 Any comparison wrote?

 Advanced Thanks,
 F.P.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Bizarre problem.

2002-02-21 Thread Murray Chamberlain

I have had similar problems with compiling GMP on win32 under cygwin.

I only have two suggestions put the oracle library under /usr/mingw I saw
this on a google group forum. The other thing is, that in the manual you
will probably need some additional files for SSL. BTW I think mysql is
natively supported. in php 4.1.1




Andres Plaza R. [EMAIL PROTECTED] wrote in message
Pine.LNX.4.33.0202201730440.713-10@gloria">news:Pine.LNX.4.33.0202201730440.713-10@gloria...
 Hi everybody!

 Some days ago, I asked about a problem making configure in PHP
 4.1.1. When I try to configure PHP + Oracle:

 ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs
 --with-openssl=/usr/local/ssl --with-zlib=/usr --with-curl=/usr/local
 --with-oci8=/usr/local/oracle/8.0.5 --with-gd

 this message appears:

 |   *** ATTENTION ***|
 ||
 | Something is likely to be messed up here, because the configure|
 | script was not able to detect a simple feature on your platform.   |
 | This is often caused by incorrect configuration parameters. Please |
 | see the file debug.log for error messages. |
 ||

 and if I look the debug.log, the error is:

 gcc -o
onftest -g -O2  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI  -Wl,-rpath
,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/lo
cal/lib -Wl,-rpath,/usr/local/oracle/8.0.5/lib -L/usr/local/oracle/8.0.5/lib
conftest.c -lclntsh -lpsa -lcore4 -lnsl -lgd -lcurl -ldl -lcrypto -lssl -lcu
rl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lresolv -lcrypt 15
 /usr/bin/ld: cannot find -lm
 collect2: ld returned 1 exit status

 Everything looks strange, because I know that libm is in my system
 (Linux RH 7.2) and the other test (if I look config.log) that used libm
 didn't have problems.

 BUT, the other day I used vi to see the debug.log, and the error
 appears like this:

 gcc -o
onftest -g -O2  -DLINUX=22 -DMOD_SSL=208105 -DUSE_HSREGEX -DEAPI  -Wl,-rpath
,/usr/local/ssl/lib -L/usr/local/ssl/lib -Wl,-rpath,/usr/local/lib -L/usr/lo
cal/lib -Wl,-rpath,/usr/local/oracle/8.0.5/lib -L/usr/local/oracle/8.0.5/lib
conftest.c -lclntsh -lpsa -lcore4 -lnlsrtl3 -lm^M -lnsl -lgd -lcurl -ldl -lc
rypto -lssl -lcurl -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lnsl  -lres
olv -lcrypt 15
 /usr/bin/ld: cannot find -lm^M
 collect2: ld returned 1 exit status

 You will notice that there is a ^M after -lm ! And, of course, ld
 didn't find -lm^M . :-)

 Obviously, I edited the configure file, but there's no ^M.

 Now, the question: somebody had the same problem? Somebody had a
 solution for this? Somebody can help me?!?!?!? :-)

 Thanks in advance...
 --

 Andres Plaza R.
  [EMAIL PROTECTED]
   http://la.mafia.cl/aplaza







-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] XML compliance with forms and trans_sid when using sessions

2002-02-21 Thread James Nord

Hi,

How do I get PHP to output an HTML tag instead of and XML tag when using 
trans_sid and a form in PHP.

(eg)
 php outputs

input type=hidden name=sessionName value=sessionID /

but I don't want the trailing /

/James

-- 
Technology is a word that describes something that doesn't work yet.
Douglas Adams



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: licensing, protection

2002-02-21 Thread Ergin Aytac

try http://www.microcode.de/index.php3?LANGUAGE=english

microCODE from Databay enables you to encrypt your PHP scripts before
publication.
Thereby you can protect your code against unwanted insights or even
modification of the sources by a unauthorized third party. This is
especially required for commercial applications, where protection of
intellectual property is a primary aim.


Kunal Jhunjhunwala [EMAIL PROTECTED] schrieb im Newsbeitrag
005101c1bae4$6e7a6770$0301a8c0@CONFUSED">news:005101c1bae4$6e7a6770$0301a8c0@CONFUSED...
 Hey,
 Any suggestions on how to write a licensing system or something similar to
 protect against illegal distribution of your programs? Zend is a way, but
is
 very expensive.
 Regards,
 Kunal Jhunjhunwala

 Minds think with ideas, not information. No amount of data, bandwidth, or
 processing power can substitute for inspired thought. - Clifford Stoll




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] header (Location: URL);

2002-02-21 Thread Dennis Moore

Why not use javascript to launch a new window?

/dkm
- Original Message -
From: Ali [EMAIL PROTECTED]
To: 'Php-General (E-mail)' [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 8:23 AM
Subject: [PHP] header (Location: URL);


 Hello,

 is there any possibility of redirecting a request URL using
header:Location
 and openning the requested URL in a new window linke target=blank in
html.
 Thank you.

 Ali


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: unable to process form data

2002-02-21 Thread CC Zona

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Jeremy Reed) wrote:

 I was able to fix the 'unable to find dynamic etc.' error thanks to you
 guys.  Now I have a new problem.  It seems that I am unable to process form
 data.  Before upgrading to 4.1.1, you were able to refer to the form data
 simply by concatenating a '$' and the form element name i.e.

As of 4.1, you need to use the new arrays $_GET, $_POST, $_COOKIE, etc. or 
else turn register_globals back on. See 
http://www.php.net/release_4_1_0.php for more info.

-- 
CC

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Paths and ImageCreate(), GetImageSize()...

2002-02-21 Thread hugh danaher

what font are you using?
hugh
- Original Message -
From: Monty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 1:10 AM
Subject: [PHP] Paths and ImageCreate(), GetImageSize()...


 I'm having a hard time figuring out exactly how paths should be listed
when
 pointing to files using the ImageCreate(), ImageCopyResized(), etc.
 commands.

 My images are in a sub-folder called img, and my script is in another
 sub-folder called scripts (at the same level as img).

 It appears that GetImageSize() only works for me when I put the full URL
in
 front of the file name like this...

 GetImageSize(http://www.mysite.com/img/photo.jpg;)

 Is that the only way for this to work? The following variations all
produce
 an error saying it can't file the file photo.jpg:

 GetImageSize(../img/photo.jpg)
 GetImageSize(/img/photo.jpg)
 GetImageSize(img/photo.jpg)

 At least GetImageSize() works with a URL. I can't say the same for any of
 the ImageCreate() functions, which when used with all of the above path
 variations including the URL, produce an error stating it can't locate the
 photo.jpg file. Permissions for the img folder are set to 777, and I
can
 load the file using IMG SRC=/img/photo.jpg with no problems. Why can't I
 get these functions to find the file using the same path?

 Thanks.




 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Creating methods runtime

2002-02-21 Thread Matthew J Gray

No there really isn't.  I wrote an extension that does it for me, but
I am waiting to see what the second zend engine will have for this
rather that using my hack.  Maybe check the Zend Engine 2 mailing list
to see what the future may hold.

Matt

Mika Tuupola wrote:
 
 Is there a way to create/add methods runtime to a class via
 constructor or static factory method? I know it is possible
 to create functions runtime using eval() or create_function()
 but I havent been able to make them appear as methods for
 a class.
 
 --
 Mika Tuupola  http://www.appelsiini.net/~tuupola/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Safe mode/restricted directory file system operations

2002-02-21 Thread Dave

Apache server with PHP module
Apache user is nobody:nobody
Virtual user is user1:user1

in VirtualHost we have
VirtualHost ip.add.re.ss
DocumentRoot /www/user1
Directory /www/user1
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
/Directory
php_admin_value upload_tmp_dir /www/user1/tmp
php_admin_value open_base_dir /www/user1
/VirtualHost

All files in /www/user1 including the user1 direcrot are owned by user1:user1

Having problems with
1) file uploads into tmp...  nobody not having permission to move them into the
final location
2) symlinking directories within the /www/user1 tree
eg. unlink(/www/user1/mylink);
symlink(mylink,/www/user1/NewDirToLinkTo);
Fails with permission denied to Unlink, or Link (if the link is manually
deleted)

Removed the safe mode restrictions on this particular virtual host to try and
accomodate some of these tasks, but to no avail.  drawing a blank now from
looking at it so long.

Ideas or suggestions appreciated.

Dave


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] unable to load dynamic library etc. etc.

2002-02-21 Thread Paul Roberts

I deleted everything in the php dir and reinstalled it all.

- Original Message - 
From: Hunter, Ray [EMAIL PROTECTED]
To: 'Jeremy Reed' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 4:32 PM
Subject: RE: [PHP] unable to load dynamic library etc. etc.


 Place all the dlls in the same directory as the php.exe file and in your
 php.ini file have the extension_dir = .\ (windows).
 
 This works for me great...
 
 Ray Hunter
 Firmware Engineer
 
 ENTERASYS NETWORKS
 
 
 -Original Message-
 From: Jeremy Reed [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, February 21, 2002 9:30 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] unable to load dynamic library etc. etc.
 
 
 I keep getting this error message and cannot figure out why.  The
 extension_dir is set correctly in the php.ini, I have put the .dlls into
 every conceivable directory I can think of and nothing seems to work.
 
 Anybody else had and fixed this problem?
 
 Thanks,
 
 Jeremy
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP + Apache + IMAP-SSL + LDAP = Headache

2002-02-21 Thread J. Rashaad Jackson

Hello all:

I am attempting to utilize IMP 3.0 as web based e-mail.  In order to do
this, I had to recompile PHP with --with-imap (imap-2001a from UW),
--with-xml, and --with-xml (God know why, but that's what IMP wanted).  All
went well, everything configured and compiled happily.  Then I tried to
start Apache.  And everything broke.  Can anyone give me any insight onto
why?  I checked Google and got nothing useful.  HELP!

Here's the error I get:

server:# apachectl configtest
Syntax error on line 62 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/libphp4.so into server:
/usr/local/apache/libexec/libphp4.so: undefined symbol: tkt_string

Here's my config line:

 ./configure --with-imap-ssl=/usr/local/src/imap-2001a
 --with-ldap=/usr/local/openldap-1.2.12um7 --with-gettext --with-xml
 --with-mysql --with-mcrypt=/usr/local/lib --with-apache=../apache_1.3.22
 --enable-track-vars

Any help at all would be appreciated.  Thanks!

-- 
I have spoken.

J. Rashaad JacksonUNIX Systems Administrator
2032 Samuel T. Dana Building(W) 734.615.1422
Ann Arbor, MI 48109 (M) 734.649.6641
http://www.umich.edu/~jrashaad  (F) 734.763.8965



msg51007/pgp0.pgp
Description: PGP signature


Re: [PHP] Safe mode/restricted directory file system operations

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 10:44, Dave wrote:
 Apache server with PHP module
 Apache user is nobody:nobody
 Virtual user is user1:user1

[snip]

 Ideas or suggestions appreciated.
 
 Dave

Well, this isn't really a PHP issue, but what the hell. If you need to
do filesystem stuff as a certain user, the Apache module just ain't 
gonna do it for you. It'll always run as the httpd user. So you could
very carefully set up directory permissions so that httpd has access to
do what it needs, or you could just compile the CGI version of PHP and
use it for the pages which need to do these uid/gid-related operations.
(If used with something like suExec you can get it to act as any user
you want.) The second option is probably the safest.


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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] XML compliance with forms and trans_sid when usingsessions

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 09:45, James Nord wrote:
 Hi,
 
 How do I get PHP to output an HTML tag instead of and XML tag when using 
 trans_sid and a form in PHP.
 
 (eg)
  php outputs
 
 input type=hidden name=sessionName value=sessionID /
 
 but I don't want the trailing /
 
 /James

I already told you how in the bug system: use output buffering to 
catch the output and remove the slash. But you'd be *breaking*
compliance with this.

If you would state exactly what the problem with the slash being
there is, perhaps we could help you.


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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: NULL value for variable

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
 It seems that you use global where it is not needed- outside of any function
 First error because error_reporting is not set to 0 in php.ini so error_reporting 
valus includes E_WARNING.
 if you set error_reporting=0 in php.ini or error_reporting(0); in the script you 
will not receive the first warning but probably
 lose the second which is useful.
 
 Best regards,
 Andrey Hristov

Turning error_reporting() off while developing is probably one of the
easiest ways to make your life suck--but to each his own. :) In this
case, it's probably pointing right to the problem.

What do you get from using 'print_r($_REQUEST)'? You should be able
to access $_REQUEST['fileId'];


Torben

 - Original Message -
 From: Narvaez, Teresa [EMAIL PROTECTED]
 To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Thursday, February 21, 2002 6:05 PM
 Subject: RE: [PHP] Re: NULL value for variable
 
 
  I comment it out but I got this error:
 
  Warning: Undefined variable: fileId in
  /home/narvaez/public_html/ddownloadfile.php on line 22
  Could not get file list: You have an error in your SQL syntax near '' at
  line 1
 
  Thanks for any help!.
 
  -Original Message-
  From: Sanduhr [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, February 20, 2002 6:58 PM
  To: [EMAIL PROTECTED]
  Subject: [PHP] Re: NULL value for variable
 
 
  that global $fileId; shouldn't be there in  downloadfile.php
  Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  : Hello,
  : I am runnig php 4.1.1.  In the configuration, register_globals is
  : ON.
  : I have two programs and I want to pass the value from fileId from one.php
  to
  : downloadfile.php.  However, in downloadfile.php $fileId is NULL.  What am
  I
  : missing?  Thanks, -Teresa
  :
  :
  : one.php
  :   td width=33% bgcolor=#FFDCA8 height=21
  :   p style=margin-left: 10
  :   font face=Verdana size=1
  :   a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
  :  Download Now
  :   /a/font
  :   /td
  :   /tr
  :
  : downloadfile.php
  :   ?
  :   global $fileId;
  :
  :   if ( ! is_numeric($fileId) )
  :   die (Invalid PictureNumber specified: ($fileId));
  :
  :   ?
  :
  :
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] PHP/Java/SOAP

2002-02-21 Thread Thalis A. Kalfigopoulos


Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If so, is it 
possible to have PHP and servlet/JSP code collaborating? I'm looking into using SOAP 
(apache project's implementation) but I need some of PHP's functionality.

thanks in advance,
thalis


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PHP/Java/SOAP

2002-02-21 Thread James Hallam

We use iPlanet here, and it has Servlet support built in.  (nice config
menus, too).  PHP works fine too, it just takes a little brain power to
install it correctly..  Anyway, we do have a little servlet guarding a
secure directory, and it uses the PHP engine to grab the templates, same as
every other page on the site.  I'm sorry I can't give you the servlet code,
as I didn't develop it myself, but I just wanted to let you know that it's
been done.  It just needed a little code somewhere in the servlet telling it
to push included .php files through the engine first, before displaying
them..


-Original Message-
From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 1:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PHP/Java/SOAP



Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If
so, is it possible to have PHP and servlet/JSP code collaborating? I'm
looking into using SOAP (apache project's implementation) but I need some of
PHP's functionality.

thanks in advance,
thalis


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Uploading Files with PHP

2002-02-21 Thread Chuck \PUP\ Payne

Hi,

I am trying to set a small script that would let my clients upload file with
a Explorer or Netscape, but the problem is it would let me upload any file
that is great than a 1MB. We get an error that the file none could not be
read.

I have set the upload_tmp_dir=/tempupload is has been chmod to 777, php.ini
as been set to 20MB, I know that is a lot but we are engingeering company
that work with CADD files.

Any clues where to look? The PHP 4 Bible from IDG states that we have to
under HTTP uploads, but nothing else. Is there some where on the net that
explains better what I have to set up, turn on, or haven't done?

Thanks,

Chuck


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Specify php.ini per virtual host?

2002-02-21 Thread J Wynia

Is it possible to specify a different php.ini file for each virtual host? I
know that that -c altphp.ini syntax on the end of the commandline will
switch it, however, that doesn't exactly work like I'd hoped in Apache's
configuration. I'd like a solution that worked with either the CGI or module
version.



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] PHP/Java/SOAP

2002-02-21 Thread Matt Drake

 Is there a webserver (Tomcat?) that supports both servlets/JSP and PHP? If so, is it 
possible to have PHP and servlet/JSP code collaborating? I'm looking into using SOAP 
(apache project's implementation) but I need some of PHP's functionality.

You can use Tomcat and Apache together. There's an Apache-Tomcat HOWTO somewhere 
around. I
found it on Google.

Then you can set up PHP to run on Apache as normal. The kewl way to do things is to 
create
your XML files from a PHP script and redirect the user to the XML when your script is 
over.

HTH,
Matt


 thanks in advance,
 thalis


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Help!

2002-02-21 Thread Phillip S. Baker

Hey All,

Last night I was doing some coding.
I am not sure what happened but has anyone run into this error before.

Method Not Allowed

The requested method POST is not allowed for the URL /index.html.


Apache/1.3.19 Server at nocal.mkp.org Port 80

More data about this.
This ONLY appears with NN 4.+

The forms (which have NOTHING to do with index.html, they are all PHP files)
work and submit fine on IE 5.5, NN 6.2 and Opera 6.2

This seems like a server issue rather than a coding issue am I correct?

Phillip


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] outgoing email server

2002-02-21 Thread Cristian Cerda

How do you set up the outgoing mail server using mail() function? i just
can't find it in the manual... the idea is to send it through a mail
server that's not the one with PHP.

thanks,

--
Cristián Cerda Pé
[EMAIL PROTECTED]

Impulsando Ltda.
www.impulsando.com
San Pio X 2460  of.604
Providencia - Santiago
Tel: (56 2) 3358978



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] outgoing email server

2002-02-21 Thread Brian V Bonini

http://us4.php.net/manual/en/function.mail.php



 -Original Message-
 From: Cristian Cerda [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 21, 2002 4:36 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] outgoing email server


 How do you set up the outgoing mail server using mail() function? i just
 can't find it in the manual... the idea is to send it through a mail
 server that's not the one with PHP.

 thanks,

 --
 Cristián Cerda Pé
 [EMAIL PROTECTED]

 Impulsando Ltda.
 www.impulsando.com
 San Pio X 2460  of.604
 Providencia - Santiago
 Tel: (56 2) 3358978



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Apache 2.0.32 + PHP from CVS not working

2002-02-21 Thread Austin Gonyou

The PHP-Dev list doesn't want to hear it, so I guess I'm *stuck* back
here. 

Will someone please tell me why the latest CVS of PHP won't let Apache
2.0.32 work and when a graceful fix will be implemented?

Hmm..this sounds like it should go to the dev list...
-- 
Austin Gonyou
Systems Architect, CCNA
Coremetrics, Inc.
Phone: 512-698-7250
email: [EMAIL PROTECTED]

It is the part of a good shepherd to shear his flock, not to skin it.
Latin Proverb

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] outgoing email server

2002-02-21 Thread Brian V Bonini

I'm sorry I did not read through your entire post the first time...

You set the SMTP server in php config file:
SMTP = smtp.yourisp.com

 -Original Message-
 From: Cristian Cerda [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, February 21, 2002 4:36 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] outgoing email server


 How do you set up the outgoing mail server using mail() function? i just
 can't find it in the manual... the idea is to send it through a mail
 server that's not the one with PHP.

 thanks,

 --
 Cristián Cerda Pé
 [EMAIL PROTECTED]

 Impulsando Ltda.
 www.impulsando.com
 San Pio X 2460  of.604
 Providencia - Santiago
 Tel: (56 2) 3358978



 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] E-mail Spyder Software

2002-02-21 Thread Ben Clumeck

I know this is not a PHP question but would really appreciate comments
regarding experiences with the software E-mail Spyder or any other
experiences with other software.

Thanks,

Ben


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: NULL value for variable

2002-02-21 Thread Narvaez, Teresa

Hello, Thanks for your replies.  I still cannot access the variable fileId
:-(.  I would appreatiate any more comments.  Thanks in advance -Teresa 

Warning: Undefined index: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 6
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 7
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 8
Invalid PictureNumber specified: ()

one.php

   td width=33% bgcolor=#FFDCA8 height=21
   p style=margin-left: 10
   font face=Verdana size=1
   a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
 Download Now
  /a/font
  /td
  /tr

downloadfile.php

   ?
   print_r ($_REQUEST['fileId']);
   if ( ! is_numeric($fileId) )
  die (Invalid PictureNumber specified: ($fileId));
   ?


 -Original Message-
 From: Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
 Sent: Thursday, February 21, 2002 1:52 PM
 To:   Andrey Hristov
 Cc:   Narvaez, Teresa; [EMAIL PROTECTED]
 Subject:  Re: [PHP] Re: NULL value for variable
 
 On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
  It seems that you use global where it is not needed- outside of any
 function
  First error because error_reporting is not set to 0 in php.ini so
 error_reporting valus includes E_WARNING.
  if you set error_reporting=0 in php.ini or error_reporting(0); in the
 script you will not receive the first warning but probably
  lose the second which is useful.
  
  Best regards,
  Andrey Hristov
 
 Turning error_reporting() off while developing is probably one of the
 easiest ways to make your life suck--but to each his own. :) In this
 case, it's probably pointing right to the problem.
 
 What do you get from using 'print_r($_REQUEST)'? You should be able
 to access $_REQUEST['fileId'];
 
 
 Torben
 
  - Original Message -
  From: Narvaez, Teresa [EMAIL PROTECTED]
  To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Thursday, February 21, 2002 6:05 PM
  Subject: RE: [PHP] Re: NULL value for variable
  
  
   I comment it out but I got this error:
  
   Warning: Undefined variable: fileId in
   /home/narvaez/public_html/ddownloadfile.php on line 22
   Could not get file list: You have an error in your SQL syntax near ''
 at
   line 1
  
   Thanks for any help!.
  
   -Original Message-
   From: Sanduhr [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, February 20, 2002 6:58 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP] Re: NULL value for variable
  
  
   that global $fileId; shouldn't be there in  downloadfile.php
   Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
  
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   : Hello,
   : I am runnig php 4.1.1.  In the configuration, register_globals is
   : ON.
   : I have two programs and I want to pass the value from fileId from
 one.php
   to
   : downloadfile.php.  However, in downloadfile.php $fileId is NULL.
 What am
   I
   : missing?  Thanks, -Teresa
   :
   :
   : one.php
   :   td width=33% bgcolor=#FFDCA8 height=21
   :   p style=margin-left: 10
   :   font face=Verdana size=1
   :   a href=downloadfile.php?fileId=?php echo $row[PicNum];
 ? 
   :  Download Now
   :   /a/font
   :   /td
   :   /tr
   :
   : downloadfile.php
   :   ?
   :   global $fileId;
   :
   :   if ( ! is_numeric($fileId) )
   :   die (Invalid PictureNumber specified: ($fileId));
   :
   :   ?
   :
   :
  
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 -- 
  Torben Wilson [EMAIL PROTECTED]
  http://www.thebuttlesschaps.com
  http://www.hybrid17.com
  http://www.inflatableeye.com
  +1.604.709.0506



Re: [PHP] XML compliance with forms and trans_sid when using sessions

2002-02-21 Thread James Nord

Lars Torben Wilson wrote:

On Thu, 2002-02-21 at 09:45, James Nord wrote:

Hi,

How do I get PHP to output an HTML tag instead of and XML tag when using 
trans_sid and a form in PHP.

(eg)
 php outputs

input type=hidden name=sessionName value=sessionID /

but I don't want the trailing /

/James


I already told you how in the bug system: use output buffering to 
catch the output and remove the slash. 

Hmm I didn't get an email copy of your reply and I was expecting one :-/

But you'd be *breaking*
compliance with this.

Yes you are right about the HTML conformance my bad.

But I would only be breaking conformance for XHTML/XML output - which 
I'm not using in any case.
As you point out HTML can take it or leave it

Unfortunatly I know some that need to leave it.

If you would state exactly what the problem with the slash being
there is, perhaps we could help you.

The HTML renderer  that comes with Java (jfc) renders the '' due to the 
'/' being before it.  There may well be others (or older browser 
versions too) that choke on it .

Oh well - output buffers it is then...

/James

-- 
Technology is a word that describes something that doesn't work yet.
Douglas Adams




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Specify php.ini per virtual host?

2002-02-21 Thread Harry Yu

You can use the php_admin_value in your virtual host. 
For example:

php_admin_value safe_mode 0

This will turn safe mode off for that virtual host.

Hope this helps,

Harry

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Creating a global variable for all PHP pages?

2002-02-21 Thread Warrick Wilson

I want to define a variable that I can reference on ALL of my PHP pages.
Ideally, I'd like to do it in php.ini or some similar place so that I can
modify it as I place code on different systems, but not need to make changes
in lots of different places.

I looked at the Configuration section of the manual, did web searches, tried
getenv() and using the OS environment (we're mixed Windows and UNIX boxes,
using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping that
getenv() or _ENV[] would have worked. I tried creating something in php.ini
by simply adding a line, with no luck.

Is there some way of doing this?

Warrick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Uploading Files with PHP

2002-02-21 Thread Jim Koutoumis

Joe,

Do you know when the file size is checked ??

I think it only gets checked after the form is posted and file uploading is
finished ??

I don't know how it's possible to catch things before user uploads - now
that would be neat :-)

Jim.

Lerp [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi there :) Did you set a max file size in your upload form? See my form
 below, notice the 'MAX_FILE_SIZE' value='102400' part within hidden field.
 This should appear before the rest of the form. You can adjust this value
as
 you wish.


 form action='resumeupload.php' method='post'
enctype='multipart/form-data'
 input type='hidden' name='MAX_FILE_SIZE' value='102400'
 font color='#663399' face='verdana' size=2bUpload
 Resume:/b/font
 input type='file' name='userfile'
style='background-color:
 #FF; font-family: verdana; font-weight: bold; color: #FF;
font-size:
 9pt;'
 input type='submit' value='Upload!!!'
 style='background-color: #FF; font-family: verdana; font-weight: bold;
 color: #FF; font-size: 9pt;' name=submit
   /form


 Hope this helps, Joe :)



 Chuck Pup Payne [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  Hi,
 
  I am trying to set a small script that would let my clients upload file
 with
  a Explorer or Netscape, but the problem is it would let me upload any
file
  that is great than a 1MB. We get an error that the file none could not
 be
  read.
 
  I have set the upload_tmp_dir=/tempupload is has been chmod to 777,
 php.ini
  as been set to 20MB, I know that is a lot but we are engingeering
company
  that work with CADD files.
 
  Any clues where to look? The PHP 4 Bible from IDG states that we have to
  under HTTP uploads, but nothing else. Is there some where on the net
that
  explains better what I have to set up, turn on, or haven't done?
 
  Thanks,
 
  Chuck
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: NULL value for variable

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 14:04, Narvaez, Teresa wrote:
 Hello, Thanks for your replies.  I still cannot access the variable fileId
 :-(.  I would appreatiate any more comments.  Thanks in advance -Teresa 
 
 Warning: Undefined index: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 6
 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 7
 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 8
^^
Might that extra 'd' have something to do with it? If not...

 Invalid PictureNumber specified: ()

Can you copy and paste this as downloadfile.php and see what you
get?

pre
?php
error_reporting(E_ALL);

print_r($_SERVER);
print_r($_REQUEST);

?
/pre


Torben

 one.php
 
td width=33% bgcolor=#FFDCA8 height=21
p style=margin-left: 10
font face=Verdana size=1
a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
  Download Now
   /a/font
   /td
   /tr
 
 downloadfile.php
 
?
print_r ($_REQUEST['fileId']);
if ( ! is_numeric($fileId) )
   die (Invalid PictureNumber specified: ($fileId));
?
 
 
  -Original Message-
  From:   Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
  Sent:   Thursday, February 21, 2002 1:52 PM
  To: Andrey Hristov
  Cc: Narvaez, Teresa; [EMAIL PROTECTED]
  Subject:Re: [PHP] Re: NULL value for variable
  
  On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
   It seems that you use global where it is not needed- outside of any
  function
   First error because error_reporting is not set to 0 in php.ini so
  error_reporting valus includes E_WARNING.
   if you set error_reporting=0 in php.ini or error_reporting(0); in the
  script you will not receive the first warning but probably
   lose the second which is useful.
   
   Best regards,
   Andrey Hristov
  
  Turning error_reporting() off while developing is probably one of the
  easiest ways to make your life suck--but to each his own. :) In this
  case, it's probably pointing right to the problem.
  
  What do you get from using 'print_r($_REQUEST)'? You should be able
  to access $_REQUEST['fileId'];
  
  
  Torben
  
   - Original Message -
   From: Narvaez, Teresa [EMAIL PROTECTED]
   To: 'Sanduhr' [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Sent: Thursday, February 21, 2002 6:05 PM
   Subject: RE: [PHP] Re: NULL value for variable
   
   
I comment it out but I got this error:
   
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 22
Could not get file list: You have an error in your SQL syntax near ''
  at
line 1
   
Thanks for any help!.
   
-Original Message-
From: Sanduhr [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 6:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: NULL value for variable
   
   
that global $fileId; shouldn't be there in  downloadfile.php
Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
   
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Hello,
: I am runnig php 4.1.1.  In the configuration, register_globals is
: ON.
: I have two programs and I want to pass the value from fileId from
  one.php
to
: downloadfile.php.  However, in downloadfile.php $fileId is NULL.
  What am
I
: missing?  Thanks, -Teresa
:
:
: one.php
:   td width=33% bgcolor=#FFDCA8 height=21
:   p style=margin-left: 10
:   font face=Verdana size=1
:   a href=downloadfile.php?fileId=?php echo $row[PicNum];
  ? 
:  Download Now
:   /a/font
:   /td
:   /tr
:
: downloadfile.php
:   ?
:   global $fileId;
:
:   if ( ! is_numeric($fileId) )
:   die (Invalid PictureNumber specified: ($fileId));
:
:   ?
:
:
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
   
   -- 
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
   
  -- 
   Torben Wilson [EMAIL PROTECTED]
   http://www.thebuttlesschaps.com
   http://www.hybrid17.com
   http://www.inflatableeye.com
   +1.604.709.0506
-- 
 Torben Wilson [EMAIL PROTECTED]
 http://www.thebuttlesschaps.com
 http://www.hybrid17.com
 http://www.inflatableeye.com
 +1.604.709.0506


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] XML compliance with forms and trans_sid whenusing sessions

2002-02-21 Thread Lars Torben Wilson

On Thu, 2002-02-21 at 14:11, James Nord wrote:
 Unfortunatly I know some that need to leave it.
 
 If you would state exactly what the problem with the slash being
 there is, perhaps we could help you.
 
 The HTML renderer  that comes with Java (jfc) renders the '' due to the 
 '/' being before it.  There may well be others (or older browser 
 versions too) that choke on it .
 
 Oh well - output buffers it is then...
 
 /James
 
 -- 
 Technology is a word that describes something that doesn't work yet.
   Douglas Adams

What is the actual component which is having a hard time rendering this?


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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Creating a global variable for all PHP pages?

2002-02-21 Thread Kevin Stone

I don't know why you would need to do this in the PHP installation.  I
just create a globals.php file (call it what you like) that contains all
of my multi-script variables.  Then I include the file into each script
as needed.  The file contains CSS pointers, database functions, and
anything else I might find useful in any new script I might write.
Changes I make to the file take place globally over all scripts on my
account.

-Original Message-
From: Warrick Wilson [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 21, 2002 12:49 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Creating a global variable for all PHP pages?

I want to define a variable that I can reference on ALL of my PHP pages.
Ideally, I'd like to do it in php.ini or some similar place so that I
can
modify it as I place code on different systems, but not need to make
changes
in lots of different places.

I looked at the Configuration section of the manual, did web searches,
tried
getenv() and using the OS environment (we're mixed Windows and UNIX
boxes,
using Apache and mysql and PHP 4.1.1), and had zero luck. I was hoping
that
getenv() or _ENV[] would have worked. I tried creating something in
php.ini
by simply adding a line, with no luck.

Is there some way of doing this?

Warrick


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: regular expressions

2002-02-21 Thread Martin Towell

yeah! remember that php interprets the string first, before it gets to
reg.ex. !! That's some I keep forgetting... lol

Martin

-Original Message-
From: Murray Chamberlain [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 2:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: regular expressions


I think you have some un-needed code there. But anyway you might need to use
a double backslash infront of the |

If that doesn't work mail me back

Muz


German Castro Donoso [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a problem with ereg function.
 In php 4.0.5 i use this
 if ( ereg(([0-9][0-9]*)\|(\w\w*),$opcion, $registros) ) {
 ...
 }
 and no problem. But, in php 4.1.1 don't work. I think that may be the
escape
 of | character.

 Note: I'm looking for a | in the string. Then i need escape the |

   Any idea for fix it?



 Thanks
 German Castro





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: regular expressions

2002-02-21 Thread Douglas Maclaine-cross

Use single quotes? I think that stops it from interpreting the regular
expression before hand.

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:32
To: [EMAIL PROTECTED]
Subject: RE: [PHP] Re: regular expressions


yeah! remember that php interprets the string first, before it gets to
reg.ex. !! That's some I keep forgetting... lol

Martin

-Original Message-
From: Murray Chamberlain [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 2:48 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: regular expressions


I think you have some un-needed code there. But anyway you might need to use
a double backslash infront of the |

If that doesn't work mail me back

Muz


German Castro Donoso [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I have a problem with ereg function.
 In php 4.0.5 i use this
 if ( ereg(([0-9][0-9]*)\|(\w\w*),$opcion, $registros) ) {
 ...
 }
 and no problem. But, in php 4.1.1 don't work. I think that may be the
escape
 of | character.

 Note: I'm looking for a | in the string. Then i need escape the |

   Any idea for fix it?



 Thanks
 German Castro





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Downloading files/docs

2002-02-21 Thread Jim Koutoumis

Hi all,

I've seen some posts and info elsewhere regarding downloading files - mostly
stating problems with the way IE handles this function.

What I'm trying to do is :
1 - offer files,.. .doc, .zip and others
2 - allow the user to click on a URL, or button
3 - have the options to Open or Save
4 - NOT have MS-Word come up within the browser window if user
 chooses to Open
5 - IE save the file properly

Netscape seems to do all the rights things. But I want to get IE working,
(as best I can).

I'm using the following code-snippet within a PHP script,... browser type
gets checked earlier in the script,..

Currently, to avoid IE displaying .doc files within its window, I've
prevented the user from 'left-clicking' on the file's anchor with some
simple JS and forcing them to do a Save-As, which seems to work for IE, but
Netscape defaults to the URL for the name of the file :-(

Is there a better way to achieve all of the above ??

Is it possible to stop IE from opening the .doc within its browser window ??

Any advice would be greatly appreciated.

Thanks,

Jim.

  // get the filename
  $filename = $dataDIR . $fileid . .dat;

  if ($browserType == IE) {
  $attachment=;
  } else {
  $attachment=attachment;;
  }
$attachment=;
$fn=urldecode($realname);

header('Content-Disposition:'.$attachment.' filename='.$fn.'');
header('Content-Type: application/octet-stream');
header('Content-Description: download file from site');
header('Content-Length: '.filesize($filename) );
header('Pragma: no-cache');
header('Expires: 0');

readfile($filename);



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Creating methods runtime

2002-02-21 Thread Martin Towell

dunno about using eval() but this worked - not as elegant as I'd want it,
but it works

class test
{
  function user_func($f, $a, $b) { $z = $this-$f;  return ($z ? $z($a, $b)
: null); }
}
$blah = new test;
$blah-new_func = create_function('$a,$b', 'return $a+$b;');
echo $blah-user_func(new_func, 3, 4);
echo $blah-user_func(none, 3, 4);

HTH
Martin

-Original Message-
From: Matthew J Gray [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 4:46 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Creating methods runtime


No there really isn't.  I wrote an extension that does it for me, but
I am waiting to see what the second zend engine will have for this
rather that using my hack.  Maybe check the Zend Engine 2 mailing list
to see what the future may hold.

Matt

Mika Tuupola wrote:
 
 Is there a way to create/add methods runtime to a class via
 constructor or static factory method? I know it is possible
 to create functions runtime using eval() or create_function()
 but I havent been able to make them appear as methods for
 a class.
 
 --
 Mika Tuupola  http://www.appelsiini.net/~tuupola/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help needed - need to access a value from DB into all pages

2002-02-21 Thread WG4- Cook, Janet

Hi there,

I am struggling with a concept and can't seem to find a way to do it so
hoping you all can help.

We want to use PHP with MySql Db. 
For security reasons on the DB, it is to be accessed only through this front
end i.e. via the internal web 
Each user will have a number of levels of access to various parts of the
system, so the obvious design is one where there is only 1 real login to the
MySQL db (i.e. the system will auto log everyone in as this without them
knowing it), and then the user is validated against a table in my DB which
holds the access rights. I can get through the login OK, and get my table to
return USERID for this person. Now I need that USERID available to ALL
other pages so I can use it to determine what parts of screens to show, and
what to allow them to do.

My question is how do I make this variable available to all pages??  Do I
have to include it with the variables passed to each page or is there a
simpler way of doing it.  Can I put the variable in an include file and
include it in every page - will that work?.

Surely someone must have had a similar situation before and can tell me how
they solved it.

Many thanks

Janet




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Re: NULL value for variable

2002-02-21 Thread Edward van Bilderbeek - Bean IT

why can't i see anywhere in this code what value:
$row[PicNum];

contains?

try:
a href=downloadfile.php?fileId=1 

instead of:
a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 

if, it's working then, then your error is there...

Greets,

Edward


- Original Message -
From: Narvaez, Teresa [EMAIL PROTECTED]
To: 'Lars Torben Wilson' [EMAIL PROTECTED]; Andrey Hristov
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 11:04 PM
Subject: RE: [PHP] Re: NULL value for variable


 Hello, Thanks for your replies.  I still cannot access the variable fileId
 :-(.  I would appreatiate any more comments.  Thanks in advance -Teresa

 Warning: Undefined index: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 6
 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 7
 Warning: Undefined variable: fileId in
 /home/narvaez/public_html/ddownloadfile.php on line 8
 Invalid PictureNumber specified: ()

 one.php
 
td width=33% bgcolor=#FFDCA8 height=21
p style=margin-left: 10
font face=Verdana size=1
a href=downloadfile.php?fileId=?php echo $row[PicNum]; ? 
  Download Now
   /a/font
   /td
   /tr

 downloadfile.php
 
?
print_r ($_REQUEST['fileId']);
if ( ! is_numeric($fileId) )
   die (Invalid PictureNumber specified: ($fileId));
?


  -Original Message-
  From: Lars Torben Wilson [SMTP:[EMAIL PROTECTED]]
  Sent: Thursday, February 21, 2002 1:52 PM
  To: Andrey Hristov
  Cc: Narvaez, Teresa; [EMAIL PROTECTED]
  Subject: Re: [PHP] Re: NULL value for variable
 
  On Thu, 2002-02-21 at 08:16, Andrey Hristov wrote:
   It seems that you use global where it is not needed- outside of any
  function
   First error because error_reporting is not set to 0 in php.ini so
  error_reporting valus includes E_WARNING.
   if you set error_reporting=0 in php.ini or error_reporting(0); in the
  script you will not receive the first warning but probably
   lose the second which is useful.
  
   Best regards,
   Andrey Hristov
 
  Turning error_reporting() off while developing is probably one of the
  easiest ways to make your life suck--but to each his own. :) In this
  case, it's probably pointing right to the problem.
 
  What do you get from using 'print_r($_REQUEST)'? You should be able
  to access $_REQUEST['fileId'];
 
 
  Torben
 
   - Original Message -
   From: Narvaez, Teresa [EMAIL PROTECTED]
   To: 'Sanduhr' [EMAIL PROTECTED];
[EMAIL PROTECTED]
   Sent: Thursday, February 21, 2002 6:05 PM
   Subject: RE: [PHP] Re: NULL value for variable
  
  
I comment it out but I got this error:
   
Warning: Undefined variable: fileId in
/home/narvaez/public_html/ddownloadfile.php on line 22
Could not get file list: You have an error in your SQL syntax near
''
  at
line 1
   
Thanks for any help!.
   
-Original Message-
From: Sanduhr [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 20, 2002 6:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: NULL value for variable
   
   
that global $fileId; shouldn't be there in  downloadfile.php
Teresa Narvaez [EMAIL PROTECTED] schreef in bericht
   
  [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
: Hello,
: I am runnig php 4.1.1.  In the configuration, register_globals is
: ON.
: I have two programs and I want to pass the value from fileId from
  one.php
to
: downloadfile.php.  However, in downloadfile.php $fileId is NULL.
  What am
I
: missing?  Thanks, -Teresa
:
:
: one.php
:   td width=33% bgcolor=#FFDCA8 height=21
:   p style=margin-left: 10
:   font face=Verdana size=1
:   a href=downloadfile.php?fileId=?php echo $row[PicNum];
  ? 
:  Download Now
:   /a/font
:   /td
:   /tr
:
: downloadfile.php
:   ?
:   global $fileId;
:
:   if ( ! is_numeric($fileId) )
:   die (Invalid PictureNumber specified: ($fileId));
:
:   ?
:
:
   
   
   
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
  
  
   --
   PHP General Mailing List (http://www.php.net/)
   To unsubscribe, visit: http://www.php.net/unsub.php
  
  --
   Torben Wilson [EMAIL PROTECTED]
   http://www.thebuttlesschaps.com
   http://www.hybrid17.com
   http://www.inflatableeye.com
   +1.604.709.0506




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Help needed - need to access a value from DB into all pages

2002-02-21 Thread Michael Kimsal

Janet,

I think you probably need to investigate the concept of sessions.
You were a bit sketchy on details, but it sounds like this is what you want.

If you'd like more help, post to the list, or contact me directly at
[EMAIL PROTECTED] (aim:mgkimsal)



Wg4- Cook wrote:
 Hi there,
 
 I am struggling with a concept and can't seem to find a way to do it so
 hoping you all can help.

 My question is how do I make this variable available to all pages??  Do I
 have to include it with the variables passed to each page or is there a
 simpler way of doing it.  Can I put the variable in an include file and
 include it in every page - will that work?.
 
 Surely someone must have had a similar situation before and can tell me how
 they solved it.
 
 Many thanks
 
 Janet
 





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] session_start() causes Connection to Close.

2002-02-21 Thread Gavin McCullagh

Hi,

I'm using php-4.1.1 with 

Configure Command
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-dbase'
'-- with-mysql=/usr/local/mysql' '--with-mm' '--with-openssl'
'--enable-sockets' '- -with-zlib' '--with-curl' '--enable-discard-path'

apache (w modssl): 

gavin@myhost apache bin/httpd -V   
Server version: Apache/1.3.23 (Unix)
Server built:   Feb 10 2002 20:43:12
Server's Module Magic Number: 19990320:11
Server compiled with
-D EAPI
-D HAVE_MMAP
-D HAVE_SHMGET
-D USE_SHMGET_SCOREBOARD
-D USE_MMAP_FILES
-D HAVE_FCNTL_SERIALIZED_ACCEPT
-D HAVE_SYSVSEM_SERIALIZED_ACCEPT
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D HTTPD_ROOT=/usr/local/apache
-D SUEXEC_BIN=/usr/local/apache/bin/suexec
-D DEFAULT_PIDLOG=logs/httpd.pid
-D DEFAULT_SCOREBOARD=logs/httpd.scoreboard
-D DEFAULT_LOCKFILE=logs/httpd.lock
-D DEFAULT_XFERLOG=logs/access_log
-D DEFAULT_ERRORLOG=logs/error_log
-D TYPES_CONFIG_FILE=conf/mime.types
-D SERVER_CONFIG_FILE=conf/httpd.conf
-D ACCESS_CONFIG_FILE=conf/access.conf
-D RESOURCE_CONFIG_FILE=conf/srm.conf


I have an SSL site running.  All of a sudden it's started misbehaving on a
a certain page.  The page involves s some mysql connections and curl use.
however, the first line of the script is:

?php
session_start();
...
...

And I get Host Closed Connection from the browser unless this
session_start() is commented out  Obviously this knackers up the rest of
the script.

Is there something I'm missing here?  If needs be I'll send more info.
Also, the browser is Opera for linux.  This was working four days ago.
I've redeveloped it in parallel and now the new and old (unchanged)
versions have both stopped on the same page.

Sorry if this is something obvious but I just can't see it.

Thanks
Gavin

PS here's my session info from php_info:

session 
Session Support enabled
Directive   Local Value Master Value
session.auto_start  Off Off
session.cache_expire180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no valueno value
session.cookie_lifetime 0   0
session.cookie_path /   /
session.cookie_secure   Off Off
session.entropy_fileno valueno value
session.entropy_length  0   0
session.gc_maxlifetime  14401440
session.gc_probability  1   1
session.namePHPSESSID   PHPSESSID
session.referer_check   no valueno value
session.save_handlerfiles   files
session.save_path   /tmp/tmp
session.serialize_handler php   php
session.use_cookies On  On



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Help needed - need to access a value from DB into all pages

2002-02-21 Thread Martin Towell

I can think of three ways you could do this.

1. as a cookie
2. using sessions
3. put it in every link

Martin

-Original Message-
From: WG4- Cook, Janet [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:59 AM
To: PHP db list; PHP List
Subject: [PHP] Help needed - need to access a value from DB into all
pages


Hi there,

I am struggling with a concept and can't seem to find a way to do it so
hoping you all can help.

We want to use PHP with MySql Db. 
For security reasons on the DB, it is to be accessed only through this front
end i.e. via the internal web 
Each user will have a number of levels of access to various parts of the
system, so the obvious design is one where there is only 1 real login to the
MySQL db (i.e. the system will auto log everyone in as this without them
knowing it), and then the user is validated against a table in my DB which
holds the access rights. I can get through the login OK, and get my table to
return USERID for this person. Now I need that USERID available to ALL
other pages so I can use it to determine what parts of screens to show, and
what to allow them to do.

My question is how do I make this variable available to all pages??  Do I
have to include it with the variables passed to each page or is there a
simpler way of doing it.  Can I put the variable in an include file and
include it in every page - will that work?.

Surely someone must have had a similar situation before and can tell me how
they solved it.

Many thanks

Janet




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] phpmyadmin

2002-02-21 Thread jtjohnston

I know this is a bit off the wall for most, but for what purpose do you
use phpmyadmin  mysql?
What are your projects?
Does anyone know of any good articles that discuss databasing, PHP,
MySQL and or PHPMyAdmin for academic purposes?
I'm a university researcher and want to collect some data.

John Taylor-Johnston
-

  ' ' '   Université de Sherbrooke:
 ô¿ô   http://compcanlit.ca/
   -


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Variable problem with a function calling a ext. librairy

2002-02-21 Thread David Robley

In article [EMAIL PROTECTED], [EMAIL PROTECTED] 
says...
 Hello,
 
 I created a librairy with configuration setting: background color, font size, 
 customer's name, etc. Like this:
 (lib_config.inc)
 
 $bgcolor = #ff;
 $co = ABC enterprise;
 
 A second file is building html page headders:
 (lib_intra.inc)
 
 function title($name_section,$name_page){
 print brbr\n;
 print font_titre3.$co/fontbrbr\n;
 print font_titre2.$name_section/fontbr\n;
 print font_titre2.$name_page/font\n;
 print brbr\n;
 }
 
 Finnaly, I call the title function in a web page to dynamicly create the code:
 (test.php)
 
 echo title(General presentation,The annual report);
 
 My problem (you guessed it!) is that the file lib_intra.inc is beeing processed 
 by php (when callled by my web page test.php) and the 2 variables are sent ok 
 but NOT the $co wich is in the 1st file (lib_config.inc). Of course my 
 lib_intra.inc has a: require (lib_config.inc);
 
 Because I dont want to duplicate infos that are used in many files, the 
 lib_config.inc is important and must be called to supply the data I need.
 
 How can I set this so all the variables will be process under php?
 
 Thanks to all!
 

You are trying to access the value of $co in a function; you'll need to 
declare it as a global value within the function or pass it to the 
function as a parameter.

-- 
David Robley
Temporary Kiwi!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Stronghold/Apache fails to load PHP Module

2002-02-21 Thread Mark Brotherton

Hi.

I've compiled my own version of PHP to be used as the PHP4 handler for 
Stronghold/Apache.

Compolition succeeds, but when I attempt to restart Stronghold with the 
new module, the following is reported:

 Syntax error on line 234 of /usr/local/stronghold/conf/httpd.conf:
 Cannot load /usr/local/stronghold/modules/libexec/libphp4.so into 
server: /usr/local/stronghold/modules/libexec/libphp4.so: undefined 
symbol: PNVersion
 Server could not be started

So my question is, where is PHP attempting to get PNVersion from?

Thanks!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] ImageMagick and Convert In Php

2002-02-21 Thread Rick

Hello All, 

Ok , I am about to loose my mind... this list is my last option i think  :) 

this is what i have tried : 
system(convert -pen black -draw 'text 120,60 YourText Here'  imageA.jpg imageB.jpg);
The above does not work , the most i can get it imageA.jpg Becomes imageB.jpg but the 
text does not get drawn

I striped the slashes, this does not work either, i su - to what my webserver runs on 
to see if i can run the system command 
via console, it works just fine , so i tried : 

$a = escapeshellcmd('-pen black -draw');
$b = escapeshellarg('text 120,20  YourTextHere);
$c = escapeshellcmd(test.jpg doggy.jpg);
system(convert $a $b $c);

Same as the above, imageA becomes imageB and thats it. Permissions for testing are 
-rwxrwxrwx 

a basic test with system(convert -scale 500x600 imageA.jpg imageB.jpg); = Works 
Perfect

I am sorry for coming to the list for help , but i am at a final loss, i have also 
tried shell_exec and exec to clear anything up. I have hit the imagemagick mail list 
and i got  Php Might have some issues so if anyone can lend a hand to get that 
system command to work , i would be most appreciative.

Best Wishes
Rick Wilson 



  1   2   >