[PHP] How to run a script leaving screen output of previous script

2002-03-03 Thread Alex Vargas

Hi. I want to run a php script without leaving the php that calls that
script.

Let's say I have a script called mypage.php which displays html. There is a
link to link.php, which makes some database maintenance and has no output. I
want to be able to run link.php from mypage.php, but don't want to display
anything new on screen.

As it is, when link.php runs, it displays a blank screen. I guess I could
insert a header to reload mypage.php, but I wonder if there is a way of not
leaving mypage.php at all. Is this posible?

Thanks,

-Alex



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




Re: [PHP] ID variable alsways set

2002-03-03 Thread Rasmus Lerdorf

Do a phpinfo() and check to see if you  perhaps have a cookie with the
name "id" set with the value "1".  If your look at variables_order in your
php.ini file, you will see that cookie data will override get-method data.
To force a read from the GET data, use $_GET['id'] instead of $id.

-Rasmus

On Sun, 3 Mar 2002, Chris N wrote:

> Ive just found a rather weird bug that im experiencing. Im running PHP 4.1.2
> with Apache 1.3.23 on Linux Redhat 7. When ever I try and use variable $id
> it always has a value of 1 no matter what. It only does it if its in a get,
> think a post too. I can hard code it in a script and itll have a correct
> value but in a GET it gets messed up. Ive tried running it several ways of
> having it be first in the list or last, no matter what its always 1.
>
> Example:
> url = http://www.domain.com/test.php?id=12345&name=Kalamazoo
>
> File :
>  echo "name = $name";
> echo "id = $id";
> echo "click";
> ?>
>
> Result :
> name = Kalamazoo
> id = 1
> click ( http://www.domain.com/test.php?id=12345&name=Kalamazoo )
>
> Anyone have any ideas what this could come from?
>
>
>
>
> --
> 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] ips and mysql table.

2002-03-03 Thread Kunal Jhunjhunwala

Hey,
I came across this interesting problem somebody was having. I couldnt find a
solution. Hope one of you can :

I have a mysql table which stores the IP Address of my site visitors. When I
try to sort these Ip address in the ascending or descending order the order
is completely out of order. I am currently storing the IP addresses under a
varchar column. An int column would not store the values after the second
"."

Any suggestions?
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] Re: PHP 4.1.2 and Segmentation Fault

2002-03-03 Thread Samantha Savvakis

Another backtrace that gives a bit more information :

#gdb /usr/local/bin/php core
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-sco3.2v5.0.5"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libresolv.so.1...done.
Loaded symbols for /usr/lib/libresolv.so.1
Reading symbols from /usr/local/lib/libmysqlclient.so10...done.
Loaded symbols for /usr/local/lib/libmysqlclient.so10
Reading symbols from /usr/local/lib/libxml2.so2...done.
Loaded symbols for /usr/local/lib/libxml2.so2
Reading symbols from /usr/lib/libsocket.so.2...done.
Loaded symbols for /usr/lib/libsocket.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
#0  open_file_for_scanning (file_handle=0x6e696d) at
zend_language_scanner.c:2947
2947switch (file_handle->type) {
(gdb) bt
#0  open_file_for_scanning (file_handle=0x6e696d) at
zend_language_scanner.c:2947
#1  0x80d5eee in compile_file (file_handle=0x6e696d, type=2) at
zend_language_scanner.c:3006
#2  0x80e86d3 in zend_execute_scripts (type=1986356271, retval=0x7366632f,
file_count=1818585135)
at zend.c:810
#3  0x752ffd9e in ?? ()
#4  0x805da80 in main (argc=2, argv=0x80471ac) at cgi_main.c:738
#5  0x805c9fb in _start ()
(gdb)

Samantha Savvakis <[EMAIL PROTECTED]> wrote in message news:...;
> Hi,
>
> I recently upgraded my development web server from PHP 4.0.6 to PHP 4.1.2
in
> the wake of the security alert.
>
> Details:
>
> SCO Openserver 5.0.6
> Apache 1.3.20 with SSL
> PHP 4.1.2
> Libxml 2.4.16
> Mysql 3.23.48
>
> PHP configure:
>
> ./configure \
> --with-apache=/u/apps/apache_1.3.20_wssl \
> --with-mysql=/usr/local/mysql-3.23.48 \
> --with-dom \
> --enable-track-vars \
> --enable-trans-sid \
> --with-zlib-dir=/usr/local/lib
>
> Apache Configure
>
> ./configure \
> --prefix=/usr/local/apache
> --activate-module=src/php4/libphp4.a
> --enable-module=rewrite
>
> Since the upgrade, I am receiving Segementation Faults in the log files
when
> accessing some of my existing code. It is not happening all the time, only
> occasionally. I haven't been able to pin point where the problem is.
>
> Here is the output from the backtrace - I ran the php binary on one of the
> files that segfaulted and it created a core dump.
>
> Here is the output from the gdb of the core:
>
> --
--
> ---
> # gdb /usr/local/bin/php core
>
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for
details.
> This GDB was configured as "i386-pc-sco3.2v5.0.5"...
> Core was generated by `php'.
> Program terminated with signal 11, Segmentation fault.
> Reading symbols from /usr/local/lib/libz.so.1...done.
> Loaded symbols for /usr/local/lib/libz.so.1
> Reading symbols from /usr/lib/libresolv.so.1...done.
> Loaded symbols for /usr/lib/libresolv.so.1
> Reading symbols from /usr/local/lib/libmysqlclient.so10...done.
> Loaded symbols for /usr/local/lib/libmysqlclient.so10
> Reading symbols from /usr/local/lib/libxml2.so2...done.
> Loaded symbols for /usr/local/lib/libxml2.so2
> Reading symbols from /usr/lib/libsocket.so.2...done.
> Loaded symbols for /usr/lib/libsocket.so.2
> Reading symbols from /usr/lib/libc.so.1...done.
> Loaded symbols for /usr/lib/libc.so.1
> #0  0x8105b5d in execute ()
> (gdb) bt
> #0  0x8105b5d in execute ()
> #1  0x74656e61 in ?? ()
> Cannot access memory at address 0x72746e69
> (gdb)
> --
--
> --
>
> From this, I really cannot tell what the issue is.
>
> One of the files I'm getting the fault with is using the "require"
command.
>
> If I comment out the "require" command, this file seems to work. Thing
is -
> alot of other files are using the require command on this same file, and
> they do not have a segmentation fault. I checked out the file that is
being
> required - nothing looks wrong with that. Ran: /usr/local/bin/php 
on
> the required file - all is ok. No core dump.
>
> I cannot put this release of PHP onto the production server because of
these
> problems, but I need to get the release out because of the security alert.
> :|
>
> What other details can I check?
>
> Thanks,
> Sam
>
>
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubs

Re: [PHP] convert to lowercase

2002-03-03 Thread Websitecd

I'm sorry boss, I didn't know it was added to the manual.


Regards,
Joseph A. Bannon




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




[PHP] Re: Displaying Number values

2002-03-03 Thread Samantha Savvakis

Hi,

You can achieve this by using the printf or sprintf statements.



This will print "01"

If numberval = 20 - it will only print "20".

The %02d is the key. %02 means - print 2 characters with leading zero's if
there aren't 2 characters.

%03 - 3 characters with leading zero's etc etc

Hope I've explained that ok.

Sam


Phillip S. Baker <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> Hey All,
>
> I want PHP to print out the value of a number in a variable as something
> like 01.
> However whenever I try to I only get 1.
>
> Is there a way around this?
>
> Phillip
>



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




[PHP] PHP 4.1.2 and Segmentation Fault

2002-03-03 Thread Samantha Savvakis

Hi,

I recently upgraded my development web server from PHP 4.0.6 to PHP 4.1.2 in
the wake of the security alert.

Details:

SCO Openserver 5.0.6
Apache 1.3.20 with SSL
PHP 4.1.2
Libxml 2.4.16
Mysql 3.23.48

PHP configure:

./configure \
--with-apache=/u/apps/apache_1.3.20_wssl \
--with-mysql=/usr/local/mysql-3.23.48 \
--with-dom \
--enable-track-vars \
--enable-trans-sid \
--with-zlib-dir=/usr/local/lib

Apache Configure

./configure \
--prefix=/usr/local/apache
--activate-module=src/php4/libphp4.a
--enable-module=rewrite

Since the upgrade, I am receiving Segementation Faults in the log files when
accessing some of my existing code. It is not happening all the time, only
occasionally. I haven't been able to pin point where the problem is.

Here is the output from the backtrace - I ran the php binary on one of the
files that segfaulted and it created a core dump.

Here is the output from the gdb of the core:


---
# gdb /usr/local/bin/php core

Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-sco3.2v5.0.5"...
Core was generated by `php'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libz.so.1...done.
Loaded symbols for /usr/local/lib/libz.so.1
Reading symbols from /usr/lib/libresolv.so.1...done.
Loaded symbols for /usr/lib/libresolv.so.1
Reading symbols from /usr/local/lib/libmysqlclient.so10...done.
Loaded symbols for /usr/local/lib/libmysqlclient.so10
Reading symbols from /usr/local/lib/libxml2.so2...done.
Loaded symbols for /usr/local/lib/libxml2.so2
Reading symbols from /usr/lib/libsocket.so.2...done.
Loaded symbols for /usr/lib/libsocket.so.2
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
#0  0x8105b5d in execute ()
(gdb) bt
#0  0x8105b5d in execute ()
#1  0x74656e61 in ?? ()
Cannot access memory at address 0x72746e69
(gdb)

--

>From this, I really cannot tell what the issue is.

One of the files I'm getting the fault with is using the "require" command.

If I comment out the "require" command, this file seems to work. Thing is -
alot of other files are using the require command on this same file, and
they do not have a segmentation fault. I checked out the file that is being
required - nothing looks wrong with that. Ran: /usr/local/bin/php  on
the required file - all is ok. No core dump.

I cannot put this release of PHP onto the production server because of these
problems, but I need to get the release out because of the security alert.
:|

What other details can I check?

Thanks,
Sam




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




RE: [PHP] convert to lowercase

2002-03-03 Thread Jason Murray

> What is the code to make a string into lower case?

Could you please check the manual before you ask like this?

It's strToLower().

http://www.php.net/strtolower

Jason

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

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




RE: [PHP] convert to lowercase

2002-03-03 Thread Martin Towell

strtolower()

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:55 PM
To: [EMAIL PROTECTED]
Subject: [PHP] convert to lowercase


What is the code to make a string into lower case?


Regards,
Joseph A. Bannon










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



[PHP] convert to lowercase

2002-03-03 Thread Websitecd

What is the code to make a string into lower case?


Regards,
Joseph A. Bannon










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




RE: [PHP] Displaying Number values

2002-03-03 Thread Martin Towell

printf("%02i", $num);  should work

-Original Message-
From: Phillip S. Baker [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:39 PM
To: PHP Email List
Subject: [PHP] Displaying Number values


Hey All,

I want PHP to print out the value of a number in a variable as something 
like 01.
However whenever I try to I only get 1.

Is there a way around this?

Phillip


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



[PHP] ID variable alsways set

2002-03-03 Thread Chris N

Ive just found a rather weird bug that im experiencing. Im running PHP 4.1.2
with Apache 1.3.23 on Linux Redhat 7. When ever I try and use variable $id
it always has a value of 1 no matter what. It only does it if its in a get,
think a post too. I can hard code it in a script and itll have a correct
value but in a GET it gets messed up. Ive tried running it several ways of
having it be first in the list or last, no matter what its always 1.

Example:
url = http://www.domain.com/test.php?id=12345&name=Kalamazoo

File :
";
echo "id = $id";
echo "click";
?>

Result :
name = Kalamazoo
id = 1
click ( http://www.domain.com/test.php?id=12345&name=Kalamazoo )

Anyone have any ideas what this could come from?




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




[PHP] Displaying Number values

2002-03-03 Thread Phillip S. Baker

Hey All,

I want PHP to print out the value of a number in a variable as something 
like 01.
However whenever I try to I only get 1.

Is there a way around this?

Phillip


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




[PHP] .htaccess settings

2002-03-03 Thread Ashley M. Kirchner


Under PHP3 I was able to do the following within an .htaccess file:

php3_magic_quotes_runtime off
php3_magic_quotes_gpc on

How do I achieve the same thing under PHP4?

--
H | "Life is the art of drawing without an eraser." - John Gardner
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  Director of Internet Operations / SysAdmin. 800.441.3873 x130
  Photo Craft Laboratories, Inc.. 3550 Arapahoe Ave, #6
  http://www.pcraft.com . .  ..   Boulder, CO 80303, U.S.A.



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




Re: [PHP] How to generate an broun & white JPG with GD

2002-03-03 Thread Tom Rogers

Hi
Here is a better script to create sepia images from a jpeg, put it in the 
same place as your images and call it sepia.php.
Uselike this:
img src="/images/sepia.php/filename.jpg"

 255) $red = 255;
 $blue = intval($x / ($start_blue - ($x * 
$blue_scale)));
 $sepia[$x][0] = $red;
 $sepia[$x][1] = $blue;
 }
 $im =imagecreatefromjpeg($filename);
 for($y = 0;$y < imagesy($im);$y++){
 for($x = 0;$x < imagesx($im);$x++){
 $pixel = imagecolorat($im, $x, $y);
 $red = ($pixel & 0xFF) >> 16;
 $green = ($pixel & 0x00FF00) >> 8;
 $blue = $pixel & 0xFF;
 $alpha = $pixel & 0x7F00;
 //get a greyscale value
 $gs = intval(($red * 0.3) + ($green * 
0.59) + ($blue * 0.11));
 $p = $alpha | $sepia[$gs][1] | ($gs << 8) 
| ($sepia[$gs][0] << 16);
 imagesetpixel ($im, $x, $y, $p);
 }
 }
 Header("Content-type: image/jpeg");
 ImageJpeg($im,'',50);
 endif;
?>



Probably will only work with php-4+ and gd 2+

Tom


At 02:42 AM 3/3/02, Andy wrote:
>Hi there,
>
>I was recently browsing throught phpbuilder and did see the user pictures
>there.
>
>They are not black/white, but kind of brown white which look pretty cool and
>might save some disk space compared to true color.
>Here is the link:
>http://phpbuilder.com/columns/ying2602.php3?page=1
>
>Does anybody know how to do this with GD?
>
>Thanx for any help
>
>Andy
>
>
>
>--
>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] Storing Script information in MySQL

2002-03-03 Thread Martin Towell

sorry - it's eval()

-Original Message-
From: David Redmond [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:09 PM
To: 'Martin Towell'; [EMAIL PROTECTED]
Subject: RE: [PHP] Storing Script information in MySQL


I couldn't seem to get this working.  Contents of the "Text" field in the DB
are;

-- snip --
\n";
}
?>
-- snip --

contents of the field are being stored in a variable, $strTest, running
below produces nothing;

-- snip --

-- snip --

I've removed the PHP delimetrs within the field and changed the code to
something more basic (echo "Test";) and nothing is being produced.

Any further ideas?

Cheers

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 4 March 2002 2:59 PM
To: David Redmond; [EMAIL PROTECTED]
Subject: RE: [PHP] Storing Script information in MySQL


store it as text
when you get it back, do an exec() on it

-Original Message-
From: David Redmond [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing Script information in MySQL


Is it possible to store the contents of a PHP file within a field in a MySQL
table?
When the contents are retrieved, can they be executed by the PHP parser as
if it were part of the actual PHP file?

ie: have the following stored in the DB;

-- snip --
\n";
?>
-- snip --

Then run a PHP script to retrieve that from the DB and have below outputted
to the browser?

-- snip --
This is a test.
-- snip --

Cheers

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



[PHP] How do I make the PHP script for fdisc?

2002-03-03 Thread GENESiS DESiGNS

Hello,

I have a web form that allows someone to fdisc there drive C:\ but how to I 
make the PHP script to run that?

By the way, I'm not using this to make someone real mad, I'm just curious and I 
will NOT put this script on the net, just on my local machine. Thanks,


-GENESiS DESiGNS
-Sean Kennedy
-http://www.gdesigns.vcn.com


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




RE: [PHP] Storing Script information in MySQL

2002-03-03 Thread David Redmond

I couldn't seem to get this working.  Contents of the "Text" field in the DB
are;

-- snip --
\n";
}
?>
-- snip --

contents of the field are being stored in a variable, $strTest, running
below produces nothing;

-- snip --

-- snip --

I've removed the PHP delimetrs within the field and changed the code to
something more basic (echo "Test";) and nothing is being produced.

Any further ideas?

Cheers

-Original Message-
From: Martin Towell [mailto:[EMAIL PROTECTED]] 
Sent: Monday, 4 March 2002 2:59 PM
To: David Redmond; [EMAIL PROTECTED]
Subject: RE: [PHP] Storing Script information in MySQL


store it as text
when you get it back, do an exec() on it

-Original Message-
From: David Redmond [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing Script information in MySQL


Is it possible to store the contents of a PHP file within a field in a MySQL
table?
When the contents are retrieved, can they be executed by the PHP parser as
if it were part of the actual PHP file?

ie: have the following stored in the DB;

-- snip --
\n";
?>
-- snip --

Then run a PHP script to retrieve that from the DB and have below outputted
to the browser?

-- snip --
This is a test.
-- snip --

Cheers

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

2002-03-03 Thread Martin Towell

$output = ereg_replace("[^a-zA-Z0-9]", "", $output);
(not tested - but should work)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 4:04 PM
To: [EMAIL PROTECTED]
Subject: [PHP] remove everything


What is the code to remove everything but numbers and letters from a string?

$output = str_replace("","",$output);

Regards,
Joseph A. Bannon

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



[PHP] remove everything

2002-03-03 Thread Websitecd

What is the code to remove everything but numbers and letters from a string?

$output = str_replace("","",$output);

Regards,
Joseph A. Bannon

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




RE: [PHP] Storing Script information in MySQL

2002-03-03 Thread Martin Towell

store it as text
when you get it back, do an exec() on it

-Original Message-
From: David Redmond [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 3:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Storing Script information in MySQL


Is it possible to store the contents of a PHP file within a field in a MySQL
table?
When the contents are retrieved, can they be executed by the PHP parser as
if it were part of the actual PHP file?

ie: have the following stored in the DB;

-- snip --
\n";
?>
-- snip --

Then run a PHP script to retrieve that from the DB and have below outputted
to the browser?

-- snip --
This is a test.
-- snip --

Cheers

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



[PHP] Storing Script information in MySQL

2002-03-03 Thread David Redmond

Is it possible to store the contents of a PHP file within a field in a MySQL
table?
When the contents are retrieved, can they be executed by the PHP parser as
if it were part of the actual PHP file?

ie: have the following stored in the DB;

-- snip --
\n";
?>
-- snip --

Then run a PHP script to retrieve that from the DB and have below outputted
to the browser?

-- snip --
This is a test.
-- snip --

Cheers

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




RE: [PHP] Need help with a PHP script

2002-03-03 Thread Martin Towell

instead of $HTTP_POST_VARS, try $_POST


-Original Message-
From: PHP [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 12:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Need help with a PHP script


http://infinitep.t35.com/countmein/control.phtml\";>";
  echo "";
  echo "";
  echo "Username:";
  echo "";
  echo "Password:";
  echo " ";
  echo "";
}
?>
I can't determine what's wrong. It prints T, but nothing else!
-- 

- Roy W.

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



RE: [PHP] Need help with a PHP script

2002-03-03 Thread Douglas Maclaine-cross

I can't believe I just sent this. For those who care it's the other way
around.

-Original Message-
From: Douglas Maclaine-cross 
Sent: Monday, March 04, 2002 14:08
To: 'PHP'; [EMAIL PROTECTED]
Subject: RE: [PHP] Need help with a PHP script


echo "T".$username.$password;

is PHP 2 and earlier proper syntax for PHP 3+ is

echo "T"+$username+$password;

or

echo "T$username$password";

Doug



Re: [PHP] Pipe

2002-03-03 Thread Lars Torben Wilson

On Sun, 2002-03-03 at 19:32, Ken Tossell wrote:
> What var is the piped data placed in?
> 
> Php 4.1 executable rhlinux 2.4.17

I'm gonna assume that you mean that you're doing something like this:

% cat somefile.txt | script.php

In which case, you'd need to fopen() the file 'php://stdin' and read
from it. 


Hope this helps,

Torben


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


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




[PHP] Pipe

2002-03-03 Thread Ken Tossell

What var is the piped data placed in?

Php 4.1 executable rhlinux 2.4.17



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




RE: [PHP] Multiple Forms

2002-03-03 Thread Zak Greant

On Sun, 2002-03-03 at 20:31, Martin Towell wrote:
> 1) not unless you have them opening up a new window for each form
> 2) combine them into one form

  Also, this topic is covered quite often on this list. Check the 
  list archives for the various solutions people have used.
  http://php.net/support.php has a link to the list archive.

  --zak



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




RE: [PHP] Multiple Forms

2002-03-03 Thread Martin Towell

1) not unless you have them opening up a new window for each form
2) combine them into one form

Martin

-Original Message-
From: Ramesh Nagendra Pillai [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 2:27 PM
To: Php Mailing list
Subject: [PHP] Multiple Forms


Hai

I am having two forms in one php page I want to submit
it to second page. My query is 

1) Is it possible to submit 2 forms using single
submit button
2) If so, how to get both form details in the secon
page?

Thanx



__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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



[PHP] Multiple Forms

2002-03-03 Thread Ramesh Nagendra Pillai

Hai

I am having two forms in one php page I want to submit
it to second page. My query is 

1) Is it possible to submit 2 forms using single
submit button
2) If so, how to get both form details in the secon
page?

Thanx



__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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




[PHP] Need help with a PHP script

2002-03-03 Thread PHP

http://infinitep.t35.com/countmein/control.phtml\";>";
  echo "";
  echo "";
  echo "Username:";
  echo "";
  echo "Password:";
  echo " ";
  echo "";
}
?>
I can't determine what's wrong. It prints T, but nothing else!
-- 

- Roy W.

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




[PHP] IMAP, POP3 and NNTP functions - questions..

2002-03-03 Thread topside

I have a question or two regarding the IMAP, POP3 and NNTP functions.

Is there *any* way to use imap_fetchstructure() using an actually message
string instead of an imap_stream and messgae number. Basicly, I am storing
mail onto a MySQL DB. I want to be able to parse out the attatchments and
data. However, I cannot use these functions because it wants a mailbox and
not an actual peice of mail.

All I really need to be able to do is extract the data (dont need filename,
mimetype, etc) into a string, and i can use a base64 decode func to give me
the raw data. If anyone has suggestions or solutions, it would be greatly
appreciated.

Thanks,
-topside



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




[PHP] Re: Need help with a PHP script

2002-03-03 Thread Jim Winstead

Php <[EMAIL PROTECTED]> wrote:
> function Authorize() {
   global $HTTP_POST_VARS;
>  $username = $HTTP_POST_VARS['username'];
>  $password = $HTTP_POST_VARS['password'];
>  echo "T".$username.$password;
> }

(insert the line above.)

jim

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




RE: [PHP] Need help with a PHP script

2002-03-03 Thread Douglas Maclaine-cross

echo "T".$username.$password;

is PHP 2 and earlier proper syntax for PHP 3+ is

echo "T"+$username+$password;

or

echo "T$username$password";

Doug



[PHP] Need help with a PHP script

2002-03-03 Thread PHP

http://infinitep.t35.com/countmein/control.phtml\";>";
  echo "";
  echo "";
  echo "Username:";
  echo "";
  echo "Password:";
  echo " ";
  echo "";
}
?>
I can't determine what's wrong. It prints T, but nothing else!
-- 

- Roy W.

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




[PHP] Re: CURL and multiple sites at once

2002-03-03 Thread Phillip Oertel

 > curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page1.html";);
 > curl_setopt($ch, CURLOPT_FILE, $fh1);
 > curl_exec($ch); //exec1
 > curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page2.html";);
 > curl_setopt($ch, CURLOPT_FILE, $fh2);
 > curl_exec($ch); //exec2
 > curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page3.html";);
 > curl_setopt($ch, CURLOPT_FILE, $fh3);

every time you set CURLOPT_URL and CURLOPT_FILE you overwrite the last 
value. that's why only the last page will be fetched ...

write a function that fetches ONE page and call that in a loop for every 
page you want to fetch.

something like this

function fetchAndSavePage($url)
{
// put your fopen & curl code here
// convert the $url into a useful filename

$pagesToFetch = array ("page1","page2","page3");

foreach ($pagesToFetch as $url)
{
fetchAndSavePage($url);
}

good luck,
phil


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




[PHP] Convert Word Doc Header to Bold Tag

2002-03-03 Thread WANDA HANSEN

Hello,
Is there a way to convert Bold text in word to Bold text in HTML using PHP?

Thank you,
Julian



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




RE: [PHP] using remote code

2002-03-03 Thread Dan Vande More


I don't think this will work, because if it is configured correctly, that
file will be parsed by PHP before(as) apache gets it, meaning the only part
apache gives you is the result of all the code executing in that page.
Exactly like a web browser, php sees  and then
gives it to apache saying Hello, World!. Visit the function in your web
browser, and what you see will be exactly what your local script sees.
However, if php is not turned on to look through files of that type, (IE
.html .inc .phps in some cases) you can actually see the code and not the
end result, which is what you want.

Dan
-Original Message-
From: Ximon Eighteen [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, March 03, 2002 5:31 PM
To: [EMAIL PROTECTED]
Subject: [PHP] using remote code

Ignoring the issues of executing untrustworthy code can someone tell me why
this won't work and how I can achieve this?

Basically there is a remote php file on another web server that has a
function in it. I want to execute this function in my own code...

I'm guessing this probably won't work but it's a nice idea. The remote
function accesses a database on the remote machine and returns an array of
information.

The more I think about what I'm trying to do the more stupid it seems

Anyway any attempt to require or include the file works fine but then I
can't use the function because it is "undefined". The php.net docs seem to
imply that this is possible.

Can anyone say if it is possible and if so what I am doing wrong please, ta.




-- 
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] using remote code

2002-03-03 Thread Ximon Eighteen

Ignoring the issues of executing untrustworthy code can someone tell me why
this won't work and how I can achieve this?

Basically there is a remote php file on another web server that has a
function in it. I want to execute this function in my own code...

I'm guessing this probably won't work but it's a nice idea. The remote
function accesses a database on the remote machine and returns an array of
information.

The more I think about what I'm trying to do the more stupid it seems

Anyway any attempt to require or include the file works fine but then I
can't use the function because it is "undefined". The php.net docs seem to
imply that this is possible.

Can anyone say if it is possible and if so what I am doing wrong please, ta.




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




RE: [PHP] HTTP Post to another server

2002-03-03 Thread Johnson, Kirk

Search the archive on "PostToHost", or see this link:

http://www.zend.com/zend/spotlight/mimocsumissions.php#Heading6

Kirk

> -Original Message-
> From: Quentin Bennett [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 01, 2002 3:19 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] HTTP Post to another server
> 
> 
> Hi,
> 
> I want to turn some form data in to and XML document, and the 
> HTTP Post that
> data to another server. Is that possible from PHP.
> 
> As a challenge, I know it is possible in ASP!
> 
> Thanks In Advance
> 
> Quentin Bennett
> mailto:[EMAIL PROTECTED]
> 
> 
> 
> -- 
> 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] phpAdsNew

2002-03-03 Thread Georgie Casey

no, registerglobals has nothing to do with it
"Dl Neil" <[EMAIL PROTECTED]> wrote in message
158e01c1c2fc$57b0db80$c200a8c0@jrbrown...">news:158e01c1c2fc$57b0db80$c200a8c0@jrbrown...;
> Georgie,
>
> > I'm getting loads of "undefined variable" errors with this script.
> any1 know
> > why?
>
>
> You're using a recent release of PHP aren't you? Check out
> http://www.php.net/manual/en/security.registerglobals.php for an
> explanation of changes in 4.1.n.
>
> Regards,
> =dn
>



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




[PHP] Using php as a backend bridge between smtp and mysql

2002-03-03 Thread Ken Tossell

Hi, 
I need to have php called from sendmail. I have set up an address to be
aliased to "|/usr/local/bin/proc-mail" but I get an error saying "service
unavailable". All permissions correct. See php code below. This is just a
test mechanism, right now, to send the email to a mysql database for a
free-webmail system.

#!/usr/local/bin/php -q
 

Thanks.



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




[PHP] Using php as a backend bridge between smtp and mysql

2002-03-03 Thread Ken Tossell

Hi, 
I need to have php called from sendmail. I have set up an address to be
aliased to "|/usr/local/bin/proc-mail" but I get an error saying "service
unavailable". All permissions correct. See php code below. This is just a
test mechanism, right now, to send the email to a mysql database for a
free-webmail system.

#!/usr/local/bin/php -q
 

Thanks.



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




Re: [PHP] % character in sprintf

2002-03-03 Thread Lars Torben Wilson

Job Miller writes:
> 
> how do i escape the % character to appear in a sprintf
> statement?
> 
> it doesn't mention that in the sprintf php manual
> page.
> 
> 
> 
> job

Yeah it does--it's the first item in the list. :)


-- 
 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] % character in sprintf

2002-03-03 Thread Martin Towell

try %%

-Original Message-
From: Job Miller [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 04, 2002 10:20 AM
To: [EMAIL PROTECTED]
Subject: [PHP] % character in sprintf 



how do i escape the % character to appear in a sprintf
statement?

it doesn't mention that in the sprintf php manual
page.



job


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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



[PHP] % character in sprintf

2002-03-03 Thread Job Miller


how do i escape the % character to appear in a sprintf
statement?

it doesn't mention that in the sprintf php manual
page.



job


__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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




Re: [PHP] Re: cursor focus

2002-03-03 Thread Steven Walker

If you -could- use Javascript, it looks something like this:
document.formName.textfieldName.focus()

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

On Sunday, March 3, 2002, at 12:55  PM, Markas wrote:

> Hi, PHP will do NOTHING with cursor position in your page, because it's
> running on server. Perhaps what you've read is generating some 
> Javascript
> (which actually places the cursor) with PHP...
>
> Hmmm, if you are not running Javascript, maybe an attribute TABINDEX, 
> which
> almost every html tag has, would help, but sorry if i'm mistaken, didnt
> check that...
>
>
> Ralph Jarvis <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
>> I am not running Javascript, just PHP/HTML...
>> THe particular script I am having problems with has several decision
> points
>> and includes which I think is confusing the placement of the cursor
>>
>>
>> "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED].;
>>> This is not a php question. It is a JavaScript issue.  You need to add
>> this
>>> code to the bottom of your page:
>>>
>>> 
>>> document.forms[0].text_box_name.focus();
>>> 
>>>
>>> --
>>> Gaylen
>>> PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>>>
>>> "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
>>> news:[EMAIL PROTECTED].;
 This is really a newbie question, but here goes.

 I am running PHP4 with Apache on Redhat 6.2.

 I am sure I read this somewheres, but can't find it again. When I 
 open
> a
 webpage in a small password application that I wrote, the cursor is
> not
>> on
 the first text box I need to fill in, I need to click on the text box
> to
 begin typing. How do I get the cursor to "focus" on this text box?

 Many thanks in advance

 Ralph



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

2002-03-03 Thread DL Neil

Georgie,

> I'm getting loads of "undefined variable" errors with this script.
any1 know
> why?


You're using a recent release of PHP aren't you? Check out
http://www.php.net/manual/en/security.registerglobals.php for an
explanation of changes in 4.1.n.

Regards,
=dn


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




[PHP] phpAdsNEW HELP!!!!

2002-03-03 Thread Georgie Casey

I just download the 6.1 beta of phpAdsNew off sourceforge and installed it
on my localhost. I set everything right but when I login to admin I get a
"undefined variable, $zoneid" error from config.inc

So I just added a "global $zoneid;" line and I half got into the admin page.
But I'm still getting loads of these errors. The script is unusable because
of all the errors. Does anyone know what the problem is? Could it be
something to do with magic_quotes or something??

TIA

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



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




php-general Digest 3 Mar 2002 21:33:10 -0000 Issue 1205

2002-03-03 Thread php-general-digest-help


php-general Digest 3 Mar 2002 21:33:10 - Issue 1205

Topics (messages 86965 through 87004):

Re: Bizarre mail() problem
86965 by: andy thomas

Re: Ok Gurus Shake your nudels !!!
86966 by: Jon Feldhammer

header generation problem
86967 by: Jon Feldhammer
86982 by: Greg Donald
86988 by: Jon Feldhammer

comparing string values, etc
86968 by: Tim Martens
86969 by: DL Neil

Apache+PHP 4.1.2+mod_ssl segfaults on HTTPS protocol
86970 by: Noor Dawod

levenshtein
86971 by: adder.null.net

Re: Sending a file with fpassthru() or readfile(), causes IE to hang.
86972 by: John Chronakis
86973 by: John Chronakis

exit status
86974 by: David Apthorpe
86996 by: Lars Torben Wilson

Re: cursor focus
86975 by: Ralph Jarvis
86976 by: Thomas Seifert
86979 by: Gaylen Fraley
86997 by: Markas

Re: Web Cam Support
86977 by: karthikeyan

Form value retrieval
86978 by: karthikeyan
86980 by: karthikeyan

Re: Apache & PHPMyAdmin
86981 by: Greg Donald

Re: CheckBoxes
86983 by: bvr

ignore_user_abort
86984 by: Paul Roberts
86989 by: Rasmus Lerdorf

Re:Re:Re:[PHP] compile php with GD2
86985 by: Hendrik

Re: inspiration needed on problem s
86986 by: Nick Wilson
86991 by: Steven Walker

Translation help needed...
86987 by: Nick Wilson

Sessions Help
86990 by: Ramesh Nagendra Pillai
86992 by: Greg Donald
86993 by: Nick Wilson

Re: Hosts with PHP support
86994 by: Tom

Re: Non printable page
86995 by: Lars Torben Wilson
87001 by: Michael Kimsal

Re: Checking how many users are logged in?
86998 by: Markas

CURL and multiple sites at once
86999 by: Stefan Rusterholz

Re: A Small Bug Giving Me A Big Headache
87000 by: Markas

Changing file permissions - Help!
87002 by: mojo jojo

phpAdsNew
87003 by: Georgie Casey

Radio Button
87004 by: Chiew, Richard

Administrivia:

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

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

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


--

--- Begin Message ---



On Sun, 3 Mar 2002, andy thomas wrote:

>
>
> On Sat, 2 Mar 2002, Andrey Hristov wrote:
>
> > check you php.ini if you need to change sendmail -t -i to something other.
>
> We are still having problems with this. Doing another mailshot, the script
> crawled at 1 message every 75 seconds. After starting 10 more scripts,
> each script was putting out one message every 75 seconds. Suddenly, after
> about 40 minutes of this, all 11 scripts suddenly accelerated up to full
> speed, load av hit 8+ and the mailshot completed in less than 1 hour!
>
> I'm now doing another mail blast using just 5 parallel scripts - it's
> crawling at the moment but it will be interesting to see what happens in
> about half an hour's time.

As an update to this, after 90 minutes the first script, which processed
about 600 addresses, completed. After that the remaining four scripts,
mailing 2000 addresses each, ran at full speed.

Now what is going on? It seems the completion of the first script is some
sort of trigger for sendmail to run quicker.

Andy

> > - Original Message -
> > From: "andy thomas" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, March 02, 2002 11:04 AM
> > Subject: [PHP] Bizarre mail() problem
> >
> >
> > > I have written a script to do some massmailing - it extracts an email
> > > address from a MySQL database and uses it to send a text file as a mail
> > > message. It works but there is a 75 second delay between each message
> > > being sent out!
> > >
> > > This is baffling - there are no delays built into the script and nothing
> > > obvious in our sendmail configuration. As I've got over 38000 addresses to
> > > mail out to, this is a problem - I've got round it for now by running 10
> > > scripts simultaneously, each handling 1000 addresses and this has got mail
> > > moving.
> > >
> > > The mail() function seems to call sendmail -t -i. This just sits there for
> > > 75 seconds, then sends a message and then waits for another 75 seconds.
> > > Surely this should not happen?
> > >
> > > Here's the relevant parts of the script - the email address is in column
> > > 15 of the MySQL table, so it just extracts field 14 for the email address
> > > data:
> > >
> > > $msg_txt="message.txt";
> > >
> > > mysql_connect("localhost",$mysql_user,$mysql_pwd);
> > > $query="select * from $table";
> > > $result=mysql($dbname, $query);
> > > $rows=mysql_numrows($result);
> > >
> > > $r=0;
> > > $f=14;
> > > while ($r < $rows ) {
> > > $address=mysql_result($result,$r,$f);
> > > mail("$address","$subject","$message","From:$MailFromAddress");
> > > 

[PHP] Radio Button

2002-03-03 Thread Chiew, Richard

Hi there, i created 3 tables in mysql, which is college.students,
college.classes, and college,student_in_class. After that, I made a web
form (page) that lists all the current students, and lists all the
current classes (each with a radio button).  As a user, you can click on
a student radio button, and a class radio button and that student
becomes registered in that class (ie fill the "student_in_class" table. 

I referred to your code and tried to apply to my module, but not much
luck. Do u mind take a look of my code and tell me what did i do wrong?
Much appreciated


Welcome to Class Selection Page\n";
echo "\n";
echo "\n";


# print the student selection table
$table_row =  "";
$table_row .= " ";
$table_row .= "Students First Name";
$table_row .= "Students Last Name";
$table_row .= "Address";
$table_row .= "";
echo "$table_row\n";
while ($row = mysql_fetch_array($result)) {
$table_row =  "";
$table_row .= "";
$table_row .= "$row[firstname]";
$table_row .= "$row[lastname]";
$table_row .= "$row[address]";
$table_row .= "";
echo "$table_row\n";
}
echo "\n";

echo "\n";

mysql_free_result($result);
mysql_close($link);
}


function select_class() {
# explicity request to use these global variables
global $script_name, $databasename, $host, $user, $password;

# connect to database
$link = mysql_connect($host, $user, $password)
or die("Connection failed: " . mysql_error());

# select our table
mysql_select_db($databasename)
or die("Database selection failed [$db_name]: " .
mysql_error());

# send a query
$sql = "SELECT * FROM college.classes ORDER BY class_id";
$result = mysql_query($sql)
or die("Query failed: " . mysql_error());


echo "\n";
echo "\n";


# print the class selection table
$table_row =  "";
$table_row .= " ";
$table_row .= "Class Name";
$table_row .= "Class Start Date";
$table_row .= "Credits";
$table_row .= "";
echo "$table_row\n";
while ($row = mysql_fetch_array($result)) {
$table_row =  "";
$table_row .= "";
$table_row .= "$row[name]";
$table_row .= "$row[start_date]";
$table_row .= "$row[credits]";
$table_row .= "";
echo "$table_row\n";
}
echo "\n";

echo "\n";
echo "\n";
echo "\n";

mysql_free_result($result);
mysql_close($link);
}


function view_result() {
# explicity request to use these global variables
global $script_name, $databasename, $host, $user, $password;

# connect to database
$link = mysql_connect($host, $user, $password)
or die("Connection failed: " . mysql_error());

# select our table
mysql_select_db($databasename)
or die("Database selection failed [$db_name]: " .
mysql_error());

# send a query
$sql =  "SELECT student_id,class_id";
$sql .= "FROM college.student_in_class";
$sql .= "ORDER BY class_id";
$result = mysql_query($sql)
or die("Query failed: " . mysql_error());

echo "Student in Class\n";
echo "\n";

# print the class selection table
$table_row =  "";
$table_row .= "Students ID";
$table_row .= "Class ID";
$table_row .= "";
echo "$table_row\n";
while ($row = mysql_fetch_array($result)) {
$table_row =  "";
$table_row .= "$row[student_id]";
$table_row .= "$row[class_id]";
$table_row .= "";
echo "$table_row\n";
}
echo "\n";

echo "\n";
echo "\n";
echo "\n";

mysql_free_result($result);
mysql_close($link);
}



function save_result($student, $class) {
# explicity request to use these global variables
global $script_name, $databasename, $host, $user, $password;

# connect to database
$link = mysql_connect($host, $user, $password)
or die("Connection failed: " . mysql_error());

# select our table
mysql_select_db($databasename)
or die("Database selection failed [$db_name]: " .
mysql_error());

# send a query
$sql =  "INSERT INTO college.student_in_class";
$sql .= "SET student_id='$student',class_id='$class'";
mysql_query($sql)
or die("Query failed: " . mysql_error());

mysql_close($link);

return mysql_insert_id();
}
?>


Welcome to Class Selection P

[PHP] phpAdsNew

2002-03-03 Thread Georgie Casey

I'm getting loads of "undefined variable" errors with this script. any1 know
why?



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




[PHP] Changing file permissions - Help!

2002-03-03 Thread mojo jojo

Hi

First, thanks for reading my post...I tried to post this yesterday but it
disappeared - so if you've seen this before, please ignore it...

I am needing to change the permissions on a folder that is owned by 'usr'.
However, as I am trying to do this from a browser through php, I am browsing
as user 'nobody' and therefore I cannot change the directory permissions.

Some things to note. I know that you can change permissions through ftp or
telnet, however I am trying to design a system that can be installed simply
by uploading it and then working through a browser. Many of my customers who
will use the system use dreamweaver to upload and have never heard of chmod.
I do not want to have to manually set permissions on the directories for
them.

I am aware that php has some ftp functions and that these could possibly be
used to change the permissions. However, my ISP has not enabled these php
features and is unlikely to do so.

Is there another way? I know that you can use passthru() to chmod a dir (as
user 'nobody') - but that's about the extent of my knowledge.

Any help much appreciated.

Cheers

Pete








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




Re: [PHP] Re: Non printable page

2002-03-03 Thread Michael Kimsal

Lars Torben Wilson wrote:

> On Fri, 2002-03-01 at 20:03, michael kimsal wrote:
> 
>>Diana Castillo wrote:
>>
>>>Is there any way tomake a page that cannot be printed??
>>>
>>>
>>
>>GZIP the page and force the end user to use Netscape.  ???
>>
> 
> No, still wouldn't work. If the data ever gets displayed, then it
> is present on the viewer's machine, and can be printed.
> 
> 
> 


It was meant as a jab at Netscape.  Yes someone could take a screen shot
and print, or grab to the clipboard and print the text, but hitting 
'print' from netscape would cause it to go grab gzipped info and print 
out the zipped info - essentially printing garbage to the printer 
instead of what it's rendered on the screen earlier.


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




Re: [PHP] A Small Bug Giving Me A Big Headache

2002-03-03 Thread Markas

$SQLString = "INSERT INTO Movies (Title, Actors, Review, Reviewer, Short)
 VALUES ('$Title','$Actors','$Review','$Reviewer','$Short')";

As the manual says: Note: Unlike the two other syntaxes, variables will not
be expanded when they occur in single quoted strings. ... So maybe some your
fiels requires a numeric value, but because no extraction occurs, it
receives string?


Dr. Shim <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I did, and a rather informative error message came. I didn't know how to
> debug like that. Sorry, I'm rather new to this.
>
> It says [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT
> INTO statement.
>
>
>
>
>
> "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> Well, add this and tell us what it says:
>
> if(!$cursor) echo odbc_error($db).": ".odbc_errormsg($db);
>
> right after that odbc_exec() call.
>
> *always check for errors - and when you get one, show it!*
>
> -Rasmus
>
> On Sat, 2 Mar 2002, Dr. Shim wrote:
>
> > I've tried, and tried. Reread, and reread. I can't at all find out
what's
> > wrong with these two lines of code.
> >
> >  $SQLString = "INSERT INTO Movies (Title, Actors, Review, Reviewer,
Short)
> >  VALUES ('$Title','$Actors','$Review','$Reviewer','$Short')";
> >  $cursor = odbc_exec($db, $SQLString);
> >
> > I have an if...then conditional statement causing echo to print out an
> error
> > message if the $cursor returns false.
> >
> > The $cursor keeps returning false. I don't know why! My $db variable
> (which
> > plugs into the odbc database) is fine. Those two lines have got to be
the
> > problem.
> >
> >
> > Can you people help me out with this?
> >
> > If I have to give you my whole script (not very long) I will.
> >
> > Thanks for any help you can give me.
> >
> >
> >
> > --
> > 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] CURL and multiple sites at once

2002-03-03 Thread Stefan Rusterholz

Hi

I'm looking for the fastest way to fetch multiple pages from php. 
Currently I'm trying the curl-lib and it works fine - I just don't 
understand how to use curl that it stores multiple requests in multiple 
files.
I'll try to explain my problem more detailed:
Somewhere are the pages
http://foo.bar.com/page1.html
http://foo.bar.com/page2.html
http://foo.bar.com/page3.html
I want to fetch them with php and write them locally to the files
foobarpage1.html
foobarpage2.html
foobarpage3.html
And I try to achieve a maximal speed.
I tried following code:

$fh1 = fopen("foobarpage1.html", "w");
$fh2 = fopen("foobarpage2.html", "w");
$fh3 = fopen("foobarpage3.html", "w");

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page1.html";);
curl_setopt($ch, CURLOPT_FILE, $fh1);
curl_exec($ch); //exec1
curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page2.html";);
curl_setopt($ch, CURLOPT_FILE, $fh2);
curl_exec($ch); //exec2
curl_setopt($ch, CURLOPT_URL, "http://foo.bar.com/page3.html";);
curl_setopt($ch, CURLOPT_FILE, $fh3);
curl_exec($ch);
curl_close($ch);

fclose($fh1);
fclose($fh2);
fclose($fh3);

I just tells me that it's not capable of executing one handler multiple 
times. If I delete the lines with exec1 and exec2 it works but only 
stores the last page...

Who can help?

TIA & greets
Stefan Rusterholz


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




Re: [PHP] Checking how many users are logged in?

2002-03-03 Thread Markas

This jaust what I wanted to say... but while reading this I got to question:
Is it possible to count active sessions, if the one uses php's sessions
without writing any handler functions, just what php4 provides by default?

>
> >I have a site with logins, etc.  I was wondering if there's any way to
see
> >how many users are logged in.  I know I could change a database and add
one
> >to a number when a user logs in, and subtract one when they log off, but
> >what if they just go to another site or close their browser?
>
> I use database managed sessions and count the number of "active"
> sessions, like how many sessions have had activity in the last 5 minutes
> or so.




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




[PHP] Re: cursor focus

2002-03-03 Thread Markas

Hi, PHP will do NOTHING with cursor position in your page, because it's
running on server. Perhaps what you've read is generating some Javascript
(which actually places the cursor) with PHP...

Hmmm, if you are not running Javascript, maybe an attribute TABINDEX, which
almost every html tag has, would help, but sorry if i'm mistaken, didnt
check that...


Ralph Jarvis <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I am not running Javascript, just PHP/HTML...
> THe particular script I am having problems with has several decision
points
> and includes which I think is confusing the placement of the cursor
>
>
> "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> > This is not a php question. It is a JavaScript issue.  You need to add
> this
> > code to the bottom of your page:
> >
> > 
> > document.forms[0].text_box_name.focus();
> > 
> >
> > --
> > Gaylen
> > PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
> >
> > "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED].;
> > > This is really a newbie question, but here goes.
> > >
> > > I am running PHP4 with Apache on Redhat 6.2.
> > >
> > > I am sure I read this somewheres, but can't find it again. When I open
a
> > > webpage in a small password application that I wrote, the cursor is
not
> on
> > > the first text box I need to fill in, I need to click on the text box
to
> > > begin typing. How do I get the cursor to "focus" on this text box?
> > >
> > > Many thanks in advance
> > >
> > > Ralph
> > >
> > >
> > >
> >
> >
>
>



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




Re: [PHP] exit status

2002-03-03 Thread Lars Torben Wilson

On Sun, 2002-03-03 at 04:16, David Apthorpe wrote:
> I'm using PHP on the command line.  Is there any way to exit, whilst setting
> the exit status, without having it print out?  For example, exit(2) will
> print "2".
> 
> Thanks in advance,
> 
> David Apthorpe

This will be in PHP 4.2.0.


-- 
 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: Non printable page

2002-03-03 Thread Lars Torben Wilson

On Fri, 2002-03-01 at 20:03, michael kimsal wrote:
> Diana Castillo wrote:
> > Is there any way tomake a page that cannot be printed??
> > 
> 
> 
> GZIP the page and force the end user to use Netscape.  ???

No, still wouldn't work. If the data ever gets displayed, then it
is present on the viewer's machine, and can be printed.


-- 
 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: Hosts with PHP support

2002-03-03 Thread Tom

To all who responded: Thank You!

I realized something after I posted the message- I did a little 
research to clarify what I really need, and it boils down to this: I 
need a php installation that supports the GIF and JPEG-related 
functions (like ImageCreateFromGif), and it would also be nice if it 
offered Truetype support, so that I can use functions like 
ImageTTFText. I will check out the recommendations at this point.

Thanks very much.

Tom


>Datasnake.co.uk would be able to help you out
>
>Alastair
>
>>  -Original Message-
>>  From: Tom [mailto:[EMAIL PROTECTED]]
>>  Sent: 28 February 2002 04:57
>>  To: [EMAIL PROTECTED]
>>  Subject: [PHP] Hosting companies that offer PHP?
>>
>>
>>
>>  I think I might be about to discover that our hosting company neither
>>  supports the GD-related functions in php, nor has any plans to do so.
>>  Consequently, I may very well be looking for another hosting company,
>>  and I'd be interested in any recommendations from the php community
>>  at large, preferably of hosts that offer shell accounts.
>>
>>  Regards,
>>
>>  Tom
>>
>>  --
>>  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] Sessions Help

2002-03-03 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Ramesh Nagendra Pillai declared
> I am very new to PHP develope Can any one please help
> me to use session variables. 
> I am able to register an variable.
> My probelm is how to get the values of that registered
> variable in the successive pages?  


Firstly, read up on them in the manual. There's loads of good stuff
there. Here's the quick answer to your question though.

page-one.php


page-two.php

- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

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

iD8DBQE8gmzyHpvrrTa6L5oRAskdAJ9zMCCJuMSSe97qfj0RbbUUOdq3hQCePJw9
pb/ZAO3x1aztJa9zyowCd0I=
=Ct9D
-END PGP SIGNATURE-

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




Re: [PHP] Sessions Help

2002-03-03 Thread Greg Donald

On Sun, 3 Mar 2002, Ramesh Nagendra Pillai wrote:

>I am very new to PHP develope Can any one please help
>me to use session variables.
>I am able to register an variable.
>My probelm is how to get the values of that registered
>variable in the successive pages?

You probably need to pass the session_name() and session_id() in the url,
or if you're submitting a form you can send them ahead as hidden
variables:

Make your links like this:

click
here

Or your hidden form fields like this:



Also, there is a specific compile time option that can influence if
this is automatic or not, --enable-trans-sid, have a look at:

http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/install.configure.php


-- 
---
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
---



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




Re: [PHP] inspiration needed on problem s

2002-03-03 Thread Steven Walker

I have often looked at problems and immediately thought that PHP is not 
capable of the solution, but then some discovery sheds light and 
suddenly many new things are possible. This fell into that category for 
me too :)

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

On Sunday, March 3, 2002, at 09:37  AM, Nick Wilson wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
>
> * and then Steven Walker declared
>> Nick,
>>
>> If I understand the problem correctly, the form reset button doesn't
>> work when the form is prefilled with POST data.
>>
>> To overcome this, I created reset button of type='submit' 
>> value='Reset'.
>> When loading the form page I test to see if submit=='Reset' or 
>> 'Submit'.
>> If it equals 'Reset', then I clear all the data.
>
> Yep, that's what I ended up doing. Can't believe I didn't work that out
> on my own!
>
> Cheers Steven
> - --
> - ---
>  www.explodingnet.com   |Projects, Forums and
> +Articles for website owners
> - -- Nick Wilson -- |and designers.
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.0.6 (GNU/Linux)
>
> iD8DBQE8gl9kHpvrrTa6L5oRAideAJ9TZIm0RFm9UQL7M9Q4JNcI9XGNygCaA3yK
> yRepNH1fZnkLyTU81w4kKZg=
> =T53I
> -END PGP SIGNATURE-
>
> --
> 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] Sessions Help

2002-03-03 Thread Ramesh Nagendra Pillai

Hai 

I am very new to PHP develope Can any one please help
me to use session variables. 
I am able to register an variable.
My probelm is how to get the values of that registered
variable in the successive pages?  

Thanx



__
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com

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




Re: [PHP] ignore_user_abort

2002-03-03 Thread Rasmus Lerdorf

Which version of PHP?  I just tested it and it works just fine for me.
How exactly do you know the script is not finishing?  Try a test like
this:

\n";
flush();
fputs($fp,"Line $i\n");
fflush($fp);
sleep(1);
}
?>

Load up this file.  You should see it start writing lines to your browser.
If you hit the stop button and break the connection with your server you
will of course stop seeing the output from the script, but if you do a
"tail -f /tmp/test" you should be able to see that the script is indeed
still running as it keeps writing line numbers to this file.

Or did you perhaps think that turning on ignore_user_abort would prevent
the user from disconnecting from the server??  There is absolutely no way
to do that.  He could simply pull his network cable, have a power failure,
get frustrated and chuck his computer out the window...  We don't have a
PHP function that can prevent this.

-Rasmus

On Sun, 3 Mar 2002, Paul Roberts wrote:

> hi
>
> I have a host with ignore_user_abort turned off in php ini.
>
> the man says
> int ignore_user_abort ( [int setting])
>
> so far i have tried 1 and true for the int setting but nothing changed, it still 
>aborted.
>
> I want it so the script finishes even the browser conection is lost.
>
> anyone know what i should use for int setting
>
> the man is not clear on this.
>
> Paul Roberts
> [EMAIL PROTECTED]
> 
>
>
> --
> 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] header generation problem

2002-03-03 Thread Jon Feldhammer

Greg Donald wrote:
> On Sun, 3 Mar 2002, Jon Feldhammer wrote:
> 
> 
>>I'm trying to create a single dynamic header for a wide range of web
>>pages which I'll just include as I need it.  There are a few things that
>>change per web page in the header, but I've settled all the issues
>>except a good way of how to modify a single image that changes based on
>>the web page being displayed.
>>
>>For example:
>>I'm displaying index.php, which includes 'header.php', the variable
>>$wpid indicates that the current web page is index.php.  Now index.php
>>needs to display: (changing index_off.gif to index_on.gif)
>>index_on.gif anotherpage_off.gif yetanotherpage_off.gif
>>
>>(the tricky part is that each image will change to on depending on what
>>page is being displayed)
>>
>>I really haven't come up with an adequate solution.  Ideas?  Thanks.
>>
> 
> I usually program dynamic image names when I encounter this.
> 
>  $image = "banner";
> if(isset($xmas_var)){
>   $image .= "_xmas";
> }
> $image .= ".gif";
> ?>
> 
> 

Well this is a solution I thought of, but then aren't you stuck doing 
this for every image that can change?  (like 20 of them in my case?)  I 
didn't think there was a better way, I was just hoping there was.

Jon


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




[PHP] Translation help needed...

2002-03-03 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi everyone.
I've been working on a program to help me (and others) knock out contact
forms quickly.

I'm looking for some help translating a few error msg's and field titles
into different languages. Currently I have English and Danish.

If you're interested you can check out the project here
www.explodingnet.com/tools/php-contact-form/

see ya...
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

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

iD8DBQE8gmCWHpvrrTa6L5oRAo/WAJ9XIDS2YP/ikkw6qxCaec4w7ce5qwCfSKTw
Krw4qFA+yvoUzYEVJ5/ZW+s=
=eygl
-END PGP SIGNATURE-

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




Re: [PHP] inspiration needed on problem s

2002-03-03 Thread Nick Wilson

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


* and then Steven Walker declared
> Nick,
> 
> If I understand the problem correctly, the form reset button doesn't
> work when the form is prefilled with POST data.
> 
> To overcome this, I created reset button of type='submit' value='Reset'.
> When loading the form page I test to see if submit=='Reset' or 'Submit'.
> If it equals 'Reset', then I clear all the data.

Yep, that's what I ended up doing. Can't believe I didn't work that out
on my own!

Cheers Steven
- -- 
- ---
 www.explodingnet.com   |Projects, Forums and
+Articles for website owners 
- -- Nick Wilson -- |and designers.

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

iD8DBQE8gl9kHpvrrTa6L5oRAideAJ9TZIm0RFm9UQL7M9Q4JNcI9XGNygCaA3yK
yRepNH1fZnkLyTU81w4kKZg=
=T53I
-END PGP SIGNATURE-

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




[PHP] Re:Re:Re:[PHP] compile php with GD2

2002-03-03 Thread Hendrik

hm,
well i allready tried it, but it didnt work, so i chose to add it as a module.
...but the problem is, that i cannot "make" php. I allways get this error:

php_gd.h:69: warning: static declaration for `gdImageColorResolve' follows non-static
gd.c:92: conflicting types for `gdIOCtx'
/usr/include/gd_io.h:18: previous declaration of `gdIOCtx'
make[3]: *** [gd.lo] Error 1
make[3]: Leaving directory `/usr/src/php-4.1.2/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/php-4.1.2/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/php-4.1.2/ext'
make: *** [all-recursive] Error 1


...and i have no idea how to solve it!
Any help more than welcome...

Regards,

Duncan 


In article <001001c1c15f$22473370$0100a8c0@red5>, php-general@ring-
wraith.com says...

> hi again,
> 
> well sorry about that, it worked when i changed it to:
> 
> ./configure --with-apxs=/usr/local/apache/bin/apxs --with-xml --with-curl 
>--with-swf=/usr/local/flash

 --enable-ftp --with-gd=/usr --with-jpeg-dir=/usr/local --with-xpm-
dir=/usr/X11R6 --with-png-dir=/usr --with-imap --with-ming=/usr/src/ming-
0.2a --enable-magic-quotes --with-mysql --enable-safe-mode --enable-
track-vars --with-ttf --enable-versioning --with-zlib

> 
> ...however, now i ran into another problem: Ming!
> The source is located /usr/src/ming-0.2a
> and the installed files are located:
> /usr/lib
> /usr/include
> 
> but neither of these 3 is accepted in the configure line.
> Or can i just leave it in the configure line and then just add the php_ming.so file, 
>copy it into the extension dir and add it to php.ini file?
> 
> Regards,
> 
> Duncan
> 

Um, lateral thinking here? The same solution that worked for GD should 
work for Ming. In other words, 

--with-ming=/usr

and configure will look under /usr for the lib and include.

-- 
David Robley
Temporary Kiwi!

Quod subigo farinam

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









[PHP] ignore_user_abort

2002-03-03 Thread Paul Roberts

hi 

I have a host with ignore_user_abort turned off in php ini.

the man says
int ignore_user_abort ( [int setting])

so far i have tried 1 and true for the int setting but nothing changed, it still 
aborted.

I want it so the script finishes even the browser conection is lost.

anyone know what i should use for int setting

the man is not clear on this.

Paul Roberts
[EMAIL PROTECTED]



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




Re: [PHP] CheckBoxes....

2002-03-03 Thread bvr


Yes, well, PHP supports that a little bit differently.

If you append '[]' to the name, an array will be returned after submit 
with the values of the checked checkboxes.





(submit..)

$test now contains array("1","3");


bvr.


Ben Turner wrote:

>Don't checkboxes, if you name them all the same name, produce a comma delimited 
>string in php of the values selected???
>
>such as for 15 checkboxes with numeric values would produce a string such as
>
>,,,1314,,,18
>
>when the form was submited??  This is the way it was handled in ASP... is there 
>something different for PHP?
>
>thanks!
>Ben
>






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




Re: [PHP] header generation problem

2002-03-03 Thread Greg Donald

On Sun, 3 Mar 2002, Jon Feldhammer wrote:

>I'm trying to create a single dynamic header for a wide range of web
>pages which I'll just include as I need it.  There are a few things that
>change per web page in the header, but I've settled all the issues
>except a good way of how to modify a single image that changes based on
>the web page being displayed.
>
>For example:
>I'm displaying index.php, which includes 'header.php', the variable
>$wpid indicates that the current web page is index.php.  Now index.php
>needs to display: (changing index_off.gif to index_on.gif)
>index_on.gif anotherpage_off.gif yetanotherpage_off.gif
>
>(the tricky part is that each image will change to on depending on what
>page is being displayed)
>
>I really haven't come up with an adequate solution.  Ideas?  Thanks.

I usually program dynamic image names when I encounter this.




-- 
---
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
---



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




Re: [PHP] Apache & PHPMyAdmin

2002-03-03 Thread Greg Donald

On Sun, 3 Mar 2002, jtjohnston wrote:

>No one seems to be home at my favourite apache newsgroup :) so I'll ask
>here.
>I'm trying to reconfigure my PHPMyAdmin.
>
>What do I add to my conf file so as in http://phpmyadmin.somehere.com/
>points
>to a specific directory on my (windows) drive?
>
>For example, how would I point http://www.somehere.com// to a
>different directory than http://somehere.com/ , or
>http://123.somehere.com// to a different directory than
>http://456.somehere.com/ ?

This has nothing to do with phpMyAdmin or PHP.  This is a DNS issue.  What
you want is a canonical domain name, some folks refer to them as 'C' names
also.  You will need to request this addition with your isp.  Also, a new
virtual host will need to be added to Apache's config file.

-- 
---
Greg Donald - http://destiney.com/
http://phprated.com/ | http://phplinks.org/ | http://phptopsites.com/
---



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




[PHP] Form value retrieval

2002-03-03 Thread karthikeyan

Hi Everybody,

  In my somename.cgi file there are few hidden fields like this with the  tag:

  




  

  Now in my php file (somename.php) i somehow need to get that hidden name and value 
and 
put it inside my php form like this :








Note : I cannot change the name of the hidden variable order into an array like 
order[1] or something like that because that variable is being used by some cgi 
program so I want to maintain the name as it is.

Note :  I cannot change my form method=get and use QUERYSTRING

  I have a cgi program which does job very easily like this :

  foreach $line (@orders) {print " 
\n"}

   how do i accomplish the same in php.

  Looking forward for your response.

  Regards,

karthikeyan.



[PHP] Re: cursor focus

2002-03-03 Thread Gaylen Fraley

Well, unless you've disabled JavaScript in your browser, you are running it.

--
Gaylen
PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/

"Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I am not running Javascript, just PHP/HTML...
> THe particular script I am having problems with has several decision
points
> and includes which I think is confusing the placement of the cursor
>
>
> "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> > This is not a php question. It is a JavaScript issue.  You need to add
> this
> > code to the bottom of your page:
> >
> > 
> > document.forms[0].text_box_name.focus();
> > 
> >
> > --
> > Gaylen
> > PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
> >
> > "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED].;
> > > This is really a newbie question, but here goes.
> > >
> > > I am running PHP4 with Apache on Redhat 6.2.
> > >
> > > I am sure I read this somewheres, but can't find it again. When I open
a
> > > webpage in a small password application that I wrote, the cursor is
not
> on
> > > the first text box I need to fill in, I need to click on the text box
to
> > > begin typing. How do I get the cursor to "focus" on this text box?
> > >
> > > Many thanks in advance
> > >
> > > Ralph
> > >
> > >
> > >
> >
> >
>
>



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




[PHP] Form value retrieval

2002-03-03 Thread karthikeyan

Hi Everybody,

  In my somename.cgi file  there are few hidden fields like this with the  tag:

  




  

  Now in my php file (somename.php) i somehow need to get that hidden name and value 
and 
put it inside my php form like this :








Note : I cannot change the name of the hidden variable order into an array like 
order[1] or something like that because that variable is being used by some cgi 
program so I want to maintain the name as it is.

Note :  I cannot change my form method=get and use QUERYSTRING

  I have a cgi program which does job very easily like this :

  foreach $line (@orders) {print " 
\n"}

   how do i accomplish the same in php.

  Looking forward for your response.

  Regards,

karthikeyan.



Re: [PHP] Web Cam Support

2002-03-03 Thread karthikeyan

Hi Rasmus and Others,

  Thanks for your info I will look into those link you have provided.

  How do you think yahoo is able to do it so beautifully.  When i click web
cam in Yahoo Chat it opens a pop up window and says connecting to the server
and then it shows up web cam picture and it is pretty good.  Can I achieve
something like that in my web site.

  Regards,

karthikeyan.
- Original Message -
From: Rasmus Lerdorf <[EMAIL PROTECTED]>
To: karthikeyan <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Sunday, March 03, 2002 8:06 AM
Subject: Re: [PHP] Web Cam Support


>
> I will be setting one up next week so should have more for you then.  But
> there really isn't much for PHP to do here.  Basically you need something
> like camstream to regularly create an image somewhere and then a little
> meta-refresh page that reloads that image.  You are unlikely to be able to
> stream out the video feed in any sort of realtime fashion unless you have
> a whole lot of bandwidth going into this daycare.  The best you can do is
> most likely to update the image every couple of seconds.
>
> You can find camstream here:
>
> http://www.smcc.demon.nl/camstream/index.html
>
> I am assuming you have the right kernel driver for your webcam?  Assuming
> a USB cam, see: http://www.smcc.demon.nl/webcam/
>
> -Rasmus
>
> On Sun, 3 Mar 2002, karthikeyan wrote:
>
> > Hi All,
> >
> >   I am trying to develop a web site for daycare and would like to
support
> > web cam where users(parents) can login and see what their child is
doing.
> >
> >   I have PHP, Apache, Linux Setup.  What are the things required to get
me
> > going with this.
> >
> >   Looking forward for all your response.
> >
> >   Regards,
> >
> > karthikeyan.
> >
> >
> >
> > --
> > 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] Re: cursor focus

2002-03-03 Thread Thomas Seifert

yeah, but what you want to do can only be accomplished with JavaScript.
PHP is a serverside language and you need a clientside-lang like JS.

Thomas

Ralph Jarvis wrote:
> I am not running Javascript, just PHP/HTML...
> THe particular script I am having problems with has several decision points
> and includes which I think is confusing the placement of the cursor
> 
> 
> "Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> 
>>This is not a php question. It is a JavaScript issue.  You need to add
>>
> this
> 
>>code to the bottom of your page:
>>
>>
>>document.forms[0].text_box_name.focus();
>>
>>
>>--
>>Gaylen
>>PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>>
>>"Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
>>news:[EMAIL PROTECTED].;
>>
>>>This is really a newbie question, but here goes.
>>>
>>>I am running PHP4 with Apache on Redhat 6.2.
>>>
>>>I am sure I read this somewheres, but can't find it again. When I open a
>>>webpage in a small password application that I wrote, the cursor is not
>>>
> on
> 
>>>the first text box I need to fill in, I need to click on the text box to
>>>begin typing. How do I get the cursor to "focus" on this text box?
>>>
>>>Many thanks in advance
>>>
>>>Ralph
>>>
>>>
>>>
>>>
>>
> 
> 



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




[PHP] Re: cursor focus

2002-03-03 Thread Ralph Jarvis

I am not running Javascript, just PHP/HTML...
THe particular script I am having problems with has several decision points
and includes which I think is confusing the placement of the cursor


"Gaylen Fraley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> This is not a php question. It is a JavaScript issue.  You need to add
this
> code to the bottom of your page:
>
> 
> document.forms[0].text_box_name.focus();
> 
>
> --
> Gaylen
> PHP KISGB v4.0.1 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
> "Ralph Jarvis" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED].;
> > This is really a newbie question, but here goes.
> >
> > I am running PHP4 with Apache on Redhat 6.2.
> >
> > I am sure I read this somewheres, but can't find it again. When I open a
> > webpage in a small password application that I wrote, the cursor is not
on
> > the first text box I need to fill in, I need to click on the text box to
> > begin typing. How do I get the cursor to "focus" on this text box?
> >
> > Many thanks in advance
> >
> > Ralph
> >
> >
> >
>
>



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




[PHP] exit status

2002-03-03 Thread David Apthorpe

I'm using PHP on the command line.  Is there any way to exit, whilst setting
the exit status, without having it print out?  For example, exit(2) will
print "2".

Thanks in advance,

David Apthorpe



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




Re: [PHP] Sending a file with fpassthru() or readfile(), causes IE to hang.

2002-03-03 Thread John Chronakis

And the answer came from Mircrosoft which describes this situation as a bug
in the article

Q266305 - BUG: Canceling Multiple File Downloads on Large File Causes
Internet Explorer to Stop Responding.

John Chronakis





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




Re: [PHP] Sending a file with fpassthru() or readfile(), causes IE to hang.

2002-03-03 Thread John Chronakis

After your reply I did some more tests with the following conclusions.

1. I was wrong about perl. IE behaves the same with the perl equivalent
script,
but requires the user to cancel 2 times. After the second time, you cannot
try anymore.

2. The source of the problem seems to be Internet Explorer and not the
server nor the
scripting language.
I have tested the same script under win2k with both IIs and apache
and both perl and php with the same results.
I have also tested both php and perl scripts on a linux running apache
1.3.14. Still the same problem.
After two attempts to download, then hit ok and at the "save as" dialog, hit
cancel, IE becomes useles.

I haven't tried asp, but something tells me it will make no difference.

Thanks.


John Chronakis


"Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> I don't see how this can be a PHP problem.  If you say that a similar
> script written in Perl doesn't cause this, then simply compare the output
> of the Perl one to the PHP one and make sure they are sending the same
> thing.  If your IE browser gets confused with the PHP version then it must
> be sending something different from the Perl version.  There is no way for
> IE to tell that the image came from PHP and not something else.
>
> -Rasmus
>
> On Sat, 2 Mar 2002, John Chronakis wrote:
>
> > Hello,
> >
> > I have posted the following message to php-windows but i got no answer.
> >
> > I am using IIs 5 on windows 2k sp2 with php 4.1.1.
> > There is a problem with the sctipt that follows and MSIE versions 5 to
6.
> >
> > A script sends a jpeg image to the client. It goes like this:
> >
> > --
> > $imgsrc = 'full path of the image file';
> > 
> > header ("Content-type: some/image");
> > header ("Content-disposition: attachment; filename=myimage.jpg");
> > header ("Content-length: ".filesize($imgsrc) );
> >
> > $fp = fopen( $imgsrc, "rb" );
> > if (!$fp) {
> > . Log the error .
> > exit;
> > }
> >
> > fpassthru ($fp);
> >
> > exit;
> > --
> >
> > It works fine if the user desides to save or open the image.
> > But if the user cancels the download, Internet Explorer stops
> > receiving anything from the site. Any click on a link hangs
> > (IE displays in the status bar "Web site found. Waiting for reply")
> > Links to static html files on my web server work
> > and you can also browse any other sites, but nothing on my site that is
> > parsed by php works.
> >
> > After some attemts (clicks and reloads), IIs reports the following
message:
> > "HTTP 403.9 - Access Forbidden: Too many users are connected
> > Internet Information Services"
> > Increasing the user limit on IIS, just requires a few more atemts to
show
> > this message.
> > After I close all IE instances or restart IIS, everything works fine
again.
> >
> > I have tried ignore_user_abort(1), sending expire headers, readfile()
> > instead of
> > fpassthru() etc but the problem persists.
> > Nothing changes with older versions of php or IE.
> >
> > This problem does not happen when using Netscape (any version)
> > or download managers.
> > Similar script written in perl does not have the same problem.
> >
> > Please help. It is a very-very late to switch to another scripting
language
> > for this project (even using perl or asp for the download part requires
a
> > great
> > deal of work).
> >
> > John Chronakis
> >
> >
> >
> >
> > --
> > 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] levenshtein

2002-03-03 Thread adder


is it possible to use levenshtein as part of a mysql select ?
i have been experimenting but seem to return no results
I would like to be able to select a row based on how near my search 
text is to the contents
i.e if the table is mysql_mail and it's fields are 'to' 'sender' 
'subject' and 'body' ( an email structure )
i would like to be able to
select sender from mysql_mail where "subject is not too different 
from what i specify"
i thought the following might work but doesn't seem to
$result = mysql_query("select sender from mysql_mail where 
levenshtein(subject,'dear john') <=2");
$echo "The number of Dear John letters is".mysql_affected_rows();


hope i am asking at the correct place

BA

-- 


[PHP] Apache+PHP 4.1.2+mod_ssl segfaults on HTTPS protocol

2002-03-03 Thread Noor Dawod

Hi,

I'm contacting you because I'm encountering a bug in recent Apache
1.3.23 and relevant mod_ssl version when compiled with PHP 4.1.2. This
might be connected directly to PHP (or to MySQL too), but maybe it is.

I've compiled Apache, mod_ssl and PHP 4.1.2 two days ago, and since then
the error log is filling with Segmentation faults whenever I try to
fetch a page using HTTPS protocol. Same page loads well with no
segmentation faults if using the HTTP protocol. Page uses PHP, but as
you can see next, it is not PHP-specific.

It is worth noting that I'm experiencing the same problem when trying to
load server-status for the server too. I don't know what's the
connection.

My server's details is:

FreeBSD 4.5-STABLE (2 weeks ago)
Apache 1.3.23
mod_ssl-2.8.6-1.3.23
PHP 4.1.2
MySQL 3.23.39 (used for PHP)

If you need further information, please let me know.

Thanks for the help.

Noor


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




Re: [PHP] comparing string values, etc

2002-03-03 Thread DL Neil

Hi Tim,

> I'm a major newbie.

I was in the navy so never made it to major!?
I'm only going to comment on your syntax and ignore the
wide/Unix-related issues:

> $noting = "";
> $checkval = "Hello
> World";
> $filename = "thefile.inc";
>
> $fd = fopen ($filename, "w");
> $contents = fread ($fd, filesize ($filename));
> if ($contents == fread ($checkval)) {
fwrite ($filename, $nothing);
...

$noting and $nothing
- typo?

if ($contents == $checkval ) {
- you don't want to read $checkval from the input file
- this comparison will be absolutely precise with no allowance for case
sensitivity, extra spaces, double instead of single quotes etc. Hope
that's ok with you!?

fwrite ($filename, $nothing);
- I've not tried this, but after reading to the end of the existing
contents will the 'new data' be added to the end of the existing
contents, or overwrite them? Please check.

Hope this gets you started,
=dn


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




[PHP] comparing string values, etc

2002-03-03 Thread Tim Martens

Hi - I'm a major newbie.

 - I have a file that pulls an include into a  for a user to edit
 - before pulling the include, I'd like to open it and check it's value
 - if the include's value is exactly equal to the string:
Hello World
then I want to overwrite that string with nothing; close the include; and
then load it (now null) into the textarea
 - else, if the include's value is not equal to the above string, just load
it into the 

However embarrassing, I'll give what I have which hasn't been working

$noting = "";
$checkval = "Hello
World";
$filename = "thefile.inc";

$fd = fopen ($filename, "w");
$contents = fread ($fd, filesize ($filename));
if ($contents == fread ($checkval)) {
fwrite ($filename, $nothing);
fclose ($fd);
include($filename);
 } else {
 fclose ($fd);
 include($filename);
}
clearstatcache();//for the next time around?

Also - does thefile.inc have to be CHMOD 666?
BTW - the server is running PHP4/Apache.

thx//t



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




[PHP] header generation problem

2002-03-03 Thread Jon Feldhammer

I'm trying to create a single dynamic header for a wide range of web 
pages which I'll just include as I need it.  There are a few things that 
change per web page in the header, but I've settled all the issues 
except a good way of how to modify a single image that changes based on 
the web page being displayed.

For example:
I'm displaying index.php, which includes 'header.php', the variable 
$wpid indicates that the current web page is index.php.  Now index.php 
needs to display: (changing index_off.gif to index_on.gif)
index_on.gif anotherpage_off.gif yetanotherpage_off.gif

(the tricky part is that each image will change to on depending on what 
page is being displayed)

I really haven't come up with an adequate solution.  Ideas?  Thanks.

Jon


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




[PHP] Re: Ok Gurus Shake your nudels !!!

2002-03-03 Thread Jon Feldhammer

Olev Rumm wrote:
> Mime problem.
> I have my web form here www.toolmecindustries.com/submform.php
> 
> Now my email recieves all the contens thruogh [EMAIL PROTECTED] (fields
> what customer filles out)
> but attachment (picture fail) is shown like encrypted
> here:
> 
> rewfg/wr;tlkmbwsl/kw;relktnh;wlkfdvbs.kdfnghb/asdfmgbn/.slfg
> rewfg/wr;tlkmbwsl/kw;relktnh;wlkfdvbs.kdfnghb/asdfmgbn/.slfg
> 
> all like that.
> 
> Now I did an account with hotmail, yahoo and some other mail services
> and sended this stuff through them - it works I recieve everything !!
> 
> Asked my ISP - they told  that it is 100% my script's problem.
> How is it possible?
> Olev
> 
> 
> 

My guess would be that the email header isn't specifying a multi input 
type email (with attachments) properly.  Or that your email client 
doesn't support the image type.  Hotmail and yahoo probably take some 
liberties and try things out to get the email to work properly, where 
"pine" or a basic email client like that won't.

Jon


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




Re: [PHP] Bizarre mail() problem

2002-03-03 Thread andy thomas



On Sun, 3 Mar 2002, andy thomas wrote:

>
>
> On Sat, 2 Mar 2002, Andrey Hristov wrote:
>
> > check you php.ini if you need to change sendmail -t -i to something other.
>
> We are still having problems with this. Doing another mailshot, the script
> crawled at 1 message every 75 seconds. After starting 10 more scripts,
> each script was putting out one message every 75 seconds. Suddenly, after
> about 40 minutes of this, all 11 scripts suddenly accelerated up to full
> speed, load av hit 8+ and the mailshot completed in less than 1 hour!
>
> I'm now doing another mail blast using just 5 parallel scripts - it's
> crawling at the moment but it will be interesting to see what happens in
> about half an hour's time.

As an update to this, after 90 minutes the first script, which processed
about 600 addresses, completed. After that the remaining four scripts,
mailing 2000 addresses each, ran at full speed.

Now what is going on? It seems the completion of the first script is some
sort of trigger for sendmail to run quicker.

Andy

> > - Original Message -
> > From: "andy thomas" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, March 02, 2002 11:04 AM
> > Subject: [PHP] Bizarre mail() problem
> >
> >
> > > I have written a script to do some massmailing - it extracts an email
> > > address from a MySQL database and uses it to send a text file as a mail
> > > message. It works but there is a 75 second delay between each message
> > > being sent out!
> > >
> > > This is baffling - there are no delays built into the script and nothing
> > > obvious in our sendmail configuration. As I've got over 38000 addresses to
> > > mail out to, this is a problem - I've got round it for now by running 10
> > > scripts simultaneously, each handling 1000 addresses and this has got mail
> > > moving.
> > >
> > > The mail() function seems to call sendmail -t -i. This just sits there for
> > > 75 seconds, then sends a message and then waits for another 75 seconds.
> > > Surely this should not happen?
> > >
> > > Here's the relevant parts of the script - the email address is in column
> > > 15 of the MySQL table, so it just extracts field 14 for the email address
> > > data:
> > >
> > > $msg_txt="message.txt";
> > >
> > > mysql_connect("localhost",$mysql_user,$mysql_pwd);
> > > $query="select * from $table";
> > > $result=mysql($dbname, $query);
> > > $rows=mysql_numrows($result);
> > >
> > > $r=0;
> > > $f=14;
> > > while ($r < $rows ) {
> > > $address=mysql_result($result,$r,$f);
> > > mail("$address","$subject","$message","From:$MailFromAddress");
> > > $r++;
> > > }
> > >
> > >
> > > Any suggestions or pointers to where I'm going wrong will be warmly
> > > received.
> > >
> > > Andy
> > >
> > >
> > > --
> > > 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 Digest 3 Mar 2002 09:24:55 -0000 Issue 1204

2002-03-03 Thread php-general-digest-help


php-general Digest 3 Mar 2002 09:24:55 - Issue 1204

Topics (messages 86918 through 86964):

Re: Where can I learn?
86918 by: Boaz Yahav

Re: BBEdit
86919 by: Boaz Yahav

Re: regex
86920 by: Boaz Yahav

Returning error code from a function
86921 by: Anas Mughal
86927 by: DL Neil
86955 by: Greg Donald

PHP4.1.2
86922 by: Thomas Holton
86925 by: Rasmus Lerdorf
86929 by: Thomas Holton

Looking For Some Help
86923 by: Josiah Wallingford
86928 by: Josiah Wallingford

Re: PHP Help
86924 by: Keith

Cannot compile PHP with APXS
86926 by: Andrey Hristov

Re: php 4.1.1 vs 4.0.6
86930 by: Scott Brown
86931 by: Rasmus Lerdorf
86933 by: Scott Brown
86940 by: Rasmus Lerdorf

Re: fopen
86932 by: DL Neil
86934 by: Demitrious S. Kelly

PHP - Tutorial
86935 by: Josiah Wallingford
86938 by: Jeff Oien
86939 by: Craig Westerman

cursor focus
86936 by: Ralph Jarvis
86948 by: Gaylen Fraley

Checking how many users are logged in?
86937 by: Leif K-Brooks
86954 by: Greg Donald

Web Cam Support
86941 by: karthikeyan
86942 by: Rasmus Lerdorf

Re: Sending a file with fpassthru() or readfile(), causes IE to hang.
86943 by: Rasmus Lerdorf

A Small Bug Giving Me A Big Headache
86944 by: Dr. Shim
86945 by: Rasmus Lerdorf
86947 by: Dr. Shim

How-to start a file download?
86946 by: Ed Fair Jr.

headers showing up in browser using PHP as CGI handler
86949 by: Matthew Scott

CheckBoxes
86950 by: Ben Turner
86951 by: Jeff Sheltren
86952 by: GENESiS DESiGNS
86953 by: Ben Turner

Re: compile php with GD2
86956 by: David Robley

Each() behaving different with PHP 4.1.2
86957 by: Greg Breland
86964 by: Yasuo Ohgaki

Re: Bizarre mail() problem
86958 by: andy thomas

4.1.2 transitional blues
86959 by: cyberskydive
86960 by: Rasmus Lerdorf

Help with the PHP patch.
86961 by: GENESiS DESiGNS

Apache & PHPMyAdmin
86962 by: jtjohnston

Re: How to generate an broun & white JPG with GD
86963 by: Tom Rogers

Administrivia:

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

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

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


--

--- Begin Message ---

http://www.weberdev.com

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Sean Kennedy [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 1:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Re: [PHP] Where can I learn?


Thank you Simon.

-Sean
-http://www.gdesigns.vcn.com

- Original Message -
From: "Simon Willison" <[EMAIL PROTECTED]>
To: "Sean Kennedy" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, February 28, 2002 4:20 AM
Subject: Re: [PHP] Where can I learn?


> Sean Kennedy wrote:
>
> >I know the basic basics of PHP that I learned from the PHP 4 Bible
book,
but I
> >would like to learn ALOT more. I'm going to continue in my book, but
does
> >anyone have a suggestion on where to learn more?
> >
> Read EVERY article in the archive of www.phpbuilder.com - it'll take a
> while but you'll learn a huge amount about PHP. www.zend.com and
> www.devshed.com also have some great articles for learning more about
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


--- End Message ---
--- Begin Message ---

And I also suggest you BACKUP!!! :)

Sincerely

  berber

Visit http://www.weberdev.com Today!!! 
To see where PHP might take you tomorrow.


-Original Message-
From: Richard Baskett [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 7:35 AM
To: Josiah Wallingford; PHP General
Subject: Re: [PHP] BBEdit


Yep sure is!  Just use a grep multi-file replace in BBEdit, and you'll
have
it! :)  Just do some tests first with the grep to make sure you have it
right before you edit all those pages :)

Rick

Once my heart was captured, reason was shown the door, deliberately and
with
a sort of frantic joy. I accepted everything, I believed everything,
without
struggle, without suffering, without regret, without false shame. How
can
one blush for what one adores? - George Sand

> From: Josiah Wallingford <[EMAIL PROTECTED]>
> Date: Wed, 27 Feb 2002 22:30:36 -0700
> To: [EMAIL PROTECTED]
> Subject: [PHP] BBEdit
> 
> I have a website with about 300 different pages. Each of those pages
has
> a different description. I need to replace all of those
> with one description. Is there a way to replace

[PHP] Re: Each() behaving different with PHP 4.1.2

2002-03-03 Thread Yasuo Ohgaki

Greg Breland wrote:
> I recently upgraded my site from PHP 4.0.6 to PHP 4.1.2.  The following
> bit of code quit working:
> 
> static $navigationLinks = array (
>   "index.php3" =>  "News",
>   "download.php3" => "Download",
>   "links.php3" => "Links",
>   "archived_news.php3" => "News Archives" );
>echo "  \n";
>echo "\n";
>  while( list( $link, $label) = each( $navigationLinks ) ) {
>echo "if( $PHP_SELF == $link ) echo " class=\"currentPage\"";
>echo ">".$label."\n";
>  }
>echo "\n";
>echo "  \n";
> 
> 
> If $navigationLinks is NOT declared as "static", then the code will work
> with PHP 4.1.2.  It works both ways with 4.0.6.  Just an FYI and
> wondering if anyone knows why?
> 
> Greg Breland
> 
> 

Create shortest & complete script and submit this bug with the script.
I don't notice this bug nor bug report, but make sure you search
bug db for the same bug.

-- 
Yasuo Ohgaki


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




Re: [PHP] How to generate an broun & white JPG with GD

2002-03-03 Thread Tom Rogers

Hi
Here is a small php script to create sepia images from a jpeg, put it in 
the same place as your images and call it sepia.php.
Uselike this:
img src="/images/sepia.php/filename.jpg"





Probably will only work with php-4+ and gd 2+

Tom


At 02:42 AM 3/3/02, Andy wrote:
>Hi there,
>
>I was recently browsing throught phpbuilder and did see the user pictures
>there.
>
>They are not black/white, but kind of brown white which look pretty cool and
>might save some disk space compared to true color.
>Here is the link:
>http://phpbuilder.com/columns/ying2602.php3?page=1
>
>Does anybody know how to do this with GD?
>
>Thanx for any help
>
>Andy
>
>
>
>--
>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