RE: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Andrew Hill

Doug,

Have you tried setting the variables with putenv() ?

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server


-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 08, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

> I just checked my config, and I *actually* have that line in
apachectl.
Try
> that, and if it fixes it, I'll correct the doc.

although my apache is built via rpm, i put the line (.
/home/db2inst1/sqllib/db2profile) in apachectl and started httpd w/
apachectl, bt...

unfortunately i'm still getting the

Warning: SQL error: , SQL state ËtøO@Ùÿ¿6#A@ in SQLConnect in
/var/www/html/db2php/db2lib.php on line 8

error...

i also tried to add "export DB2INSTANCE=db2inst1" in the same script and
that didn't help either.

could the problem be that i'm starting httpd (or apachectl) as root? i
know
the ". /home/db2inst1/sqllib/db2profile" is supposed to make apachectl
inherit the db2 environment variables, but.. somehow it's not
working :/

matt, thank you again :)

-doug


p.s. for the record__
./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbind
ir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/includ
e --libdir=/usr/lib --sysconfdir=/etc --with-apxs=/usr/sbin/apxs
--with-ibm-
db2








-- 
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] GD Error

2002-08-08 Thread Steve Vernon

Hiya,
How do you get GD to work on widnows 2K please?

My System has PHP installed on c:\PHP and I have got a copy of
php_gd.dll and placed it in f:\WINNT , f:\WINNT\System32 and all other
places I could think! The origional extension_dir was set to ".\" but I
deleted that to "" and then set the line "extension = php_gd.dll" to
"extension=c:\PHP\extensions\php_gd.dll" but that don't work! What am I
doing wrong? The error attatched comes up...

Please don't send me to a URL because I can't find one that is helpful!

Steve

PS My php info page is below...


PHP Version 4.1.2

SystemWindows NT 5.0 build 2195
Build DateMar 10 2002
Server APICGI
Virtual Directory Supportenabled
Configuration File (php.ini) PathF:\WINNT\php.ini
ZEND_DEBUGdisabled
Thread Safetyenabled

 This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.1.1, Copyright (c) 1998-2001 Zend Technologies





PHP 4.0 Credits



Configuration
PHP Core
DirectiveLocal ValueMaster Value
allow_call_time_pass_reference
OnOn
allow_url_fopen
11
always_populate_raw_post_data
00
arg_separator.input
&&
arg_separator.output
&&
asp_tags
OffOff
auto_append_file
no valueno value
auto_prepend_file
no valueno value
browscap
no valueno value
default_charset
no valueno value
default_mimetype
text/htmltext/html
define_syslog_variables
OffOff
disable_functions
no valueno value
display_errors
OnOn
display_startup_errors
OffOff
doc_root
no valueno value
enable_dl
OnOn
error_append_string
no valueno value
error_log
no valueno value
error_prepend_string
no valueno value
error_reporting
20472047
expose_php
OnOn
extension_dir
c:\php4c:\php4
file_uploads
11
gpc_order
GPCGPC
highlight.bg
#FF#FF
highlight.comment
#FF9900#FF9900
highlight.default
#CC#CC
highlight.html
#00#00
highlight.keyword
#006600#006600
highlight.string
#CC#CC
html_errors
OnOn
ignore_user_abort
OffOff
implicit_flush
OffOff
include_path
c:\php4\pearc:\php4\pear
log_errors
OffOff
magic_quotes_gpc
OnOn
magic_quotes_runtime
OffOff
magic_quotes_sybase
OffOff
max_execution_time
3030
open_basedir
no valueno value
output_buffering
no valueno value
output_handler
no valueno value
post_max_size
8M8M
precision
1414
register_argc_argv
OnOn
register_globals
OnOn
safe_mode
OffOff
safe_mode_exec_dir
no valueno value
safe_mode_gid
OffOff
safe_mode_include_dir
no valueno value
sendmail_from
[EMAIL PROTECTED]@localhost.com
sendmail_path
no valueno value
short_open_tag
OnOn
SMTP
localhostlocalhost
sql.safe_mode
OffOff
track_errors
OffOff
upload_max_filesize
2M2M
upload_tmp_dir
C:\PHP\uploadtempC:\PHP\uploadtemp
user_dir
no valueno value
variables_order
EGPCSEGPCS
xmlrpc_error_number
00
xmlrpc_errors
OffOff
y2k_compliance
OffOff


standard
Regex LibraryBundled library enabled
Dynamic Library Supportenabled
Internal Sendmail Support for Windowsenabled

DirectiveLocal ValueMaster Value
assert.active
11
assert.bail
00
assert.callback
no valueno value
assert.quiet_eval
00
assert.warning
11
safe_mode_allowed_env_vars
PHP_PHP_
safe_mode_protected_env_vars
LD_LIBRARY_PATHLD_LIBRARY_PATH
session.use_trans_sid
11
url_rewriter.tags
a=href,area=href,frame=src,input=src,form=fakeentrya=href,area=href,frame=sr
c,input=src,form=fakeentry


bcmath
BCMath supportenabled


calendar
Calendar supportenabled


com
DirectiveLocal ValueMaster Value
com.allow_dcom
OffOff
com.autoregister_casesensitive
OnOn
com.autoregister_typelib
OffOff
com.autoregister_verbose
OffOff
com.typelib_file
no valueno value


variant
VARIANT supportenabled


ftp
FTP supportenabled


mysql
MySQL Supportenabled
Active Persistent Links0
Active Links0
Client API version3.23.39

DirectiveLocal ValueMaster Value
mysql.allow_persistent
OnOn
mysql.default_host
no valueno value
mysql.default_password
no valueno value
mysql.default_port
no valueno value
mysql.default_socket
no valueno value
mysql.default_user
no valueno value
mysql.max_links
UnlimitedUnlimited
mysql.max_persistent
UnlimitedUnlimited


odbc
ODBC Supportenabled
Active Persistent Links0
Active Links0
ODBC libraryWin32

DirectiveLocal ValueMaster Value
odbc.allow_persistent
OnOn
odbc.check_persistent
OnOn
odbc.default_db
no valueno value
odbc.default_pw
no valueno value
odbc.default_user
no valueno value
odbc.defaultbinmode
return as isreturn as is
odbc.defaultlrl
return up to 4096 bytesreturn up to 4096 bytes
odbc.max_links
UnlimitedUnlimited
odbc.max_persistent
UnlimitedUnlimited


pcre
PCRE (Perl Compatible Regular Expressions) Supportenabled
PCRE Library Version3.4 22-Aug-2000


session
Session Supportenabled

DirectiveLocal ValueMaster Value
session.auto_start
OffOff
session.cache_expire
180180
session.cache_limiter
nocachenocache
session.cookie_domain
no valueno value
session.cookie_lifetime
00
session.cookie_path
//
session.cookie_secure
OffOff
session.entropy_file
no valueno value
session.entropy_length
00
session.gc_maxlifetime
14401440
session.gc_probability
11
session.name
PHPSESSIDPHPSESSID
session.referer_check
no valueno value
session

Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Doug Smith

Andrew,

I tried adding these lines to my php script...

putenv("LD_LIBRARY_PATH=/home/db2inst1/sqqlib/lib");
putenv("DB2INSTANCE=db2inst1");
// i assume that's the right way to create those statements

But... I didn't have any luck with that either :/ ..same error.

Thanks again,
-Doug


"Andrew Hill" <[EMAIL PROTECTED]> wrote in message
044701c23f14$d1f1b650$[EMAIL PROTECTED]">news:044701c23f14$d1f1b650$[EMAIL PROTECTED]...
Doug,

Have you tried setting the variables with putenv() ?

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server


-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

> I just checked my config, and I *actually* have that line in
apachectl.
Try
> that, and if it fixes it, I'll correct the doc.

although my apache is built via rpm, i put the line (.
/home/db2inst1/sqllib/db2profile) in apachectl and started httpd w/
apachectl, bt...

unfortunately i'm still getting the

Warning: SQL error: , SQL state ËtøO@Ùÿ¿6#A@ in SQLConnect in
/var/www/html/db2php/db2lib.php on line 8

error...

i also tried to add "export DB2INSTANCE=db2inst1" in the same script and
that didn't help either.

could the problem be that i'm starting httpd (or apachectl) as root? i
know
the ". /home/db2inst1/sqllib/db2profile" is supposed to make apachectl
inherit the db2 environment variables, but.. somehow it's not
working :/

matt, thank you again :)

-doug


p.s. for the record__
./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbind
ir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share
--includedir=/usr/includ
e --libdir=/usr/lib --sysconfdir=/etc --with-apxs=/usr/sbin/apxs
--with-ibm-
db2








--
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] sucking news out of the usenet

2002-08-08 Thread andy

Hi guys,

I am trying to build a usenet gateway which is collecting usenet posts and
puts them into a phpbb forum. Same other way around. So I did read an
excelent article on that published by Armel Fauveau at:
http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is where
the code underneath is from. So getting the articles works.

My problem is how to glue all the articles together which are relies. I am
sure there is a way to find out which reply belongs to a post. I would like
to feed the phpbb database with it.

This is an example of an article including the header:

Newsgroups: php.general Path: news.php.net Xref: news.php.net
php.general:111709 Return-Path: Mailing-List: contact
[EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
[EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8 Aug
2002 18:28:33 - Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] Reply-To: "sebastian" Date: Thu, 8 Aug 2002
20:27:21 +0200 Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced
By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176 Subject:
streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @ all!
i´m looking for an algorithm or class to stream mp3-audiofiles, such as easy
as it can be. i found nothing on php.net and downloaded some phpscripts from
hotscripts and sourceforge but they were all very cryptical and bad
documentated. please help me, many thanks sebastian .


Lots of text.. puhh! I hope this is somehow possible. Maybe one of you guys
has a good idea on that. You can just cut and past the code underneath and
try it out by yourself.

Thanx for any help on that.

Andy

-
http://www.OZforum.info
Australia Information Forum




http://www.phpbuilder.com/columns/armel20010427.php3?page=3

$cfgServer= "news.php.net";
$cfgPort= 119;
$cfgTimeOut= 10;

// open a socket
if(!$cfgTimeOut)
// without timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort);
else
// with timeout
$usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
$cfgTimeOut);

if(!$usenet_handle) {
echo "Connexion failed\n";
exit();
}
else {
echo "Connected\n";
$tmp = fgets($usenet_handle, 1024);
}

###
# page 2

//$cfgUser= "xx";
//$cfgPasswd= "yy";
$cfgNewsGroup= "php.general";

// identification required on private server
if($cfgUser) {
fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
$tmp = fgets($usenet_handle, 1024);

fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
$tmp = fgets($usenet_handle, 1024);

// check error

if($tmp != "281 Ok\r\n") {
echo "502 Authentication error\n";
exit();
}
}

// select newsgroup

fputs($usenet_handle, "GROUP ".$cfgNewsGroup."\n");
$tmp = fgets($usenet_handle, 1024);

if($tmp == "480 Authentication required for command\r\n") {
echo "$tmp\n";
exit();
}

$info = split(" ", $tmp);
$first = $info[2];
$last = $info[3];

print "First : $first\n";
print "Last : $last\n";

###
# page 3

$cfgLimit= 10;

// upload last articles

$boucle=$last-$cfgLimit;

while ($boucle <= $last) {

set_time_limit(0);

fputs($usenet_handle, "ARTICLE $boucle\n");
#fputs($usenet_handle, "BODY $boucle\n");

$article="";
$tmp = fgets($usenet_handle, 4096);

if(substr($tmp,0,3) != "220" AND substr($tmp,0,3) != "222") {
echo "+--+\n";
echo "Error on article $boucle\n";
echo "+--+\n";
}
else {
while($tmp!=".\r\n") {
$tmp = fgets($usenet_handle, 4096);

   $article = $article.$tmp;
}

echo "+--+\n";
echo "Article $boucle\n";
echo "+--+\n";
echo "$article\n";
}

$boucle++;


}

// close connexion

fclose($usenet_handle);

?>






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




RE: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Dan Vande More

I used this:

Some of his info is wrong, or I had problems with, but hey, this worked:
*
Now we know DB2 works now to test it with PHP and Apache, first login as user db2inst1 
then su to the user root, dont use su - , cause this will make the shell use the 
settings of root instead of db2inst1 and we need those settings so Apache can find the 
DB2 Instances. Now first stop apache (if started ofcourse) 
/usr/local/apache/bin/apachectl stop and start apache /usr/local/apache/bin/apachectl 
start . Now create a file in de apache docroot ( on my machine thats 
/usr/local/apache/htdocs/ ) called test.php for example and fill it with the following 
example:
*

http://people.a2000.nl/nlvanrey/docs/install-db2-php-apache-linux.html


-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?


> I just checked my config, and I *actually* have that line in apachectl.
Try
> that, and if it fixes it, I'll correct the doc.

although my apache is built via rpm, i put the line (.
/home/db2inst1/sqllib/db2profile) in apachectl and started httpd w/
apachectl, bt...

unfortunately i'm still getting the

Warning: SQL error: , SQL state ËtøO@Ùÿ¿6#A@ in SQLConnect in
/var/www/html/db2php/db2lib.php on line 8

error...

i also tried to add "export DB2INSTANCE=db2inst1" in the same script and
that didn't help either.

could the problem be that i'm starting httpd (or apachectl) as root? i know
the ". /home/db2inst1/sqllib/db2profile" is supposed to make apachectl
inherit the db2 environment variables, but.. somehow it's not working :/

matt, thank you again :)

-doug


p.s. for the record__
./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbind
ir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/includ
e --libdir=/usr/lib --sysconfdir=/etc --with-apxs=/usr/sbin/apxs --with-ibm-
db2








-- 
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: sucking news out of the usenet

2002-08-08 Thread Philip Hallstrom

I'm not on expert on usenet, but I'd recommend reading the RFC that
defines the message headers.

In particular you're going to need to look at the Message-ID, References,
Xref, In-Reply-To, Subject, and Date headers and do what you can to try
and sort them out...

good luck!

-philip

On Thu, 8 Aug 2002, andy wrote:

> Hi guys,
>
> I am trying to build a usenet gateway which is collecting usenet posts and
> puts them into a phpbb forum. Same other way around. So I did read an
> excelent article on that published by Armel Fauveau at:
> http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is where
> the code underneath is from. So getting the articles works.
>
> My problem is how to glue all the articles together which are relies. I am
> sure there is a way to find out which reply belongs to a post. I would like
> to feed the phpbb database with it.
>
> This is an example of an article including the header:
>
> Newsgroups: php.general Path: news.php.net Xref: news.php.net
> php.general:111709 Return-Path: Mailing-List: contact
> [EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
> [EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8 Aug
> 2002 18:28:33 - Message-ID: <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] Reply-To: "sebastian" Date: Thu, 8 Aug 2002
> 20:27:21 +0200 Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced
> By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176 Subject:
> streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @ all!
> i´m looking for an algorithm or class to stream mp3-audiofiles, such as easy
> as it can be. i found nothing on php.net and downloaded some phpscripts from
> hotscripts and sourceforge but they were all very cryptical and bad
> documentated. please help me, many thanks sebastian .
>
>
> Lots of text.. puhh! I hope this is somehow possible. Maybe one of you guys
> has a good idea on that. You can just cut and past the code underneath and
> try it out by yourself.
>
> Thanx for any help on that.
>
> Andy
>
> -
> http://www.OZforum.info
> Australia Information Forum
>
>
>
>
>  # http://www.phpbuilder.com/columns/armel20010427.php3?page=3
>
> $cfgServer= "news.php.net";
> $cfgPort= 119;
> $cfgTimeOut= 10;
>
> // open a socket
> if(!$cfgTimeOut)
> // without timeout
> $usenet_handle = fsockopen($cfgServer, $cfgPort);
> else
> // with timeout
> $usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
> $cfgTimeOut);
>
> if(!$usenet_handle) {
> echo "Connexion failed\n";
> exit();
> }
> else {
> echo "Connected\n";
> $tmp = fgets($usenet_handle, 1024);
> }
>
> ###
> # page 2
>
> //$cfgUser= "xx";
> //$cfgPasswd= "yy";
> $cfgNewsGroup= "php.general";
>
> // identification required on private server
> if($cfgUser) {
> fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> // check error
>
> if($tmp != "281 Ok\r\n") {
> echo "502 Authentication error\n";
> exit();
> }
> }
>
> // select newsgroup
>
> fputs($usenet_handle, "GROUP ".$cfgNewsGroup."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> if($tmp == "480 Authentication required for command\r\n") {
> echo "$tmp\n";
> exit();
> }
>
> $info = split(" ", $tmp);
> $first = $info[2];
> $last = $info[3];
>
> print "First : $first\n";
> print "Last : $last\n";
>
> ###
> # page 3
>
> $cfgLimit= 10;
>
> // upload last articles
>
> $boucle=$last-$cfgLimit;
>
> while ($boucle <= $last) {
>
> set_time_limit(0);
>
> fputs($usenet_handle, "ARTICLE $boucle\n");
> #fputs($usenet_handle, "BODY $boucle\n");
>
> $article="";
> $tmp = fgets($usenet_handle, 4096);
>
> if(substr($tmp,0,3) != "220" AND substr($tmp,0,3) != "222") {
> echo "+--+\n";
> echo "Error on article $boucle\n";
> echo "+--+\n";
> }
> else {
> while($tmp!=".\r\n") {
> $tmp = fgets($usenet_handle, 4096);
>
>$article = $article.$tmp;
> }
>
> echo "+--+\n";
> echo "Article $boucle\n";
> echo "+--+\n";
> echo "$article\n";
> }
>
> $boucle++;
>
>
> }
>
> // close connexion
>
> fclose($usenet_handle);
>
> ?>
>
>
>
>
>
>
> --
> 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: can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Doug Smith

does this look like the ODBC SDK of unixODBC (not that i expect you to know
unixODBC)

/usr/lib/libboundparam.so.1
/usr/lib/libboundparam.so.1.0.0
/usr/lib/libesoobS.so.1
/usr/lib/libesoobS.so.1.0.0
/usr/lib/libgtrtst.so.1
/usr/lib/libgtrtst.so.1.0.0
/usr/lib/libnn.so.1
/usr/lib/libnn.so.1.0.0
/usr/lib/libodbc.so.1
/usr/lib/libodbc.so.1.0.0
/usr/lib/libodbccr.so.1
/usr/lib/libodbccr.so.1.0.0
/usr/lib/libodbcdrvcfg1S.so.1
/usr/lib/libodbcdrvcfg1S.so.1.0.0
/usr/lib/libodbcdrvcfg2S.so.1
/usr/lib/libodbcdrvcfg2S.so.1.0.0
/usr/lib/libodbcextras.so.1
/usr/lib/libodbcextras.so.1.0.0
/usr/lib/libodbcinst.so.1
(...it continues)

I found this from "$rpm -q --list unixODBC" ... somehow I was under the
assumption that IBM DB2 UDB came with a ODBC SDK -- i.e. this stuff...
/usr/IBMdb2/V7.1/lib/libdb2ccai.so.1
/usr/IBMdb2/V7.1/lib/libdb2ar.so
/usr/IBMdb2/V7.1/lib/libdb2.so
/usr/IBMdb2/V7.1/lib/libdb2qp.so
/usr/IBMdb2/V7.1/lib/libdb2apie.so
/usr/IBMdb2/V7.1/lib/libdb2jdbc.so
(which continues as well...)

or am i still missing something?

thanks again, and thanks for your patience too, i really appreciate it.

-doug

"Andrew Hill" <[EMAIL PROTECTED]> wrote in message
news:043601c23f0c$0d74efc0$[EMAIL PROTECTED]...
> Doug,
>
> You need an ODBC SDK - you should be able to find the libs in UnixODBC
> or simply use iODBC from www.iodbc.org
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Virtuoso Universal Server
>
> -Original Message-
> From: Doug Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 08, 2002 10:11 AM
> To: Andrew Hill
> Subject: Re: [PHP] Re: can i use --with-unixODBC instead of
> --with-ibm-db2?
>
> Thanks for the suggestion.
>
> I tried issuing the command
> # export LD_LIBRARY_PATH=/usr/IBMdb2/V7.1/include/
>  (which is where i found sql.h and sqlext.h to be living)
>
> Before I ran "make install" but, unfortunately it came up with the
> same
> errors.
>
> Well... Maybe it is time I head back to the drawing board and
> checkout iodbc -- thank you very much, I appreciate it.
>
> -Doug Smith
>
> "Andrew Hill" <[EMAIL PROTECTED]> wrote in message
> news:03f101c23eea$986d8960$[EMAIL PROTECTED]...
> > Doug,
> >
> > You can try --with-iodbc if you like, there is a howto at
> www.iodbc.org.
> > That being said, I think that you simply need to set LD_LIBRARY_PATH
> to
> > the location of your ODBC SDK, so the .h files can be found.
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software  http://www.openlinksw.com
> > Universal Data Access & Virtuoso Universal Server
> >
> > -Original Message-
> > From: Doug Smith [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 08, 2002 9:38 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Re: can i use --with-unixODBC instead of
> --with-ibm-db2?
> >
> > well i figured i'd try it...
> >
> > i run
> > $ ./configure
> > i386-redhat-linux --sysconfdir=/etc --with-unixODBC=shared
> > --with-apxs=/usr/
> > sbin/apxs
> >
> > $ make clean
> >
> > $ make install
> >
> > which returns this aweful mess :/
> >
> > Making install in odbc
> > make[2]: Entering directory `/home/doug/php-4.2.2/ext/odbc'
> > make[3]: Entering directory `/home/doug/php-4.2.2/ext/odbc'
> > /bin/sh /home/doug/php-4.2.2/libtool --silent --mode=compile
> > gcc -I. -I/home/dou
> > g/php-4.2.2/ext/odbc -I/home/doug/php-4.2.2/main
> -I/home/doug/php-4.2.2
> > -I/u
> > sr/i
> > nclude/apache -I/home/doug/php-4.2.2/Zend
> > -I/home/doug/php-4.2.2/ext/mysql/l
> > ibmy
> > sql -I/usr/local/include -I/home/doug/php-4.2.2/ext/xml/expat
> > -DLINUX=22 -D
> > EAPI
> >  -DEAPI_MM -DEAPI_MM_CORE_PATH=/var/run/httpd.mm
> > -I/home/doug/php-4.2.2/TSRM
> >  -g
> > -O2 -prefer-pic  -c php_odbc.c && touch php_odbc.slo
> > In file included from php_odbc.c:37:
> > php_odbc.h:120:17: sql.h: No such file or directory
> > php_odbc.h:121:20: sqlext.h: No such file or directory
> > make[3]: *** [php_odbc.slo] Error 1
> > make[3]: Leaving directory `/home/doug/php-4.2.2/ext/odbc'
> > make[2]: *** [install-recursive] Error 1
> > make[2]: Leaving directory `/home/doug/php-4.2.2/ext/odbc'
> > make[1]: *** [install-recursive] Error 1
> > make[1]: Leaving directory `/home/doug/php-4.2.2/ext'
> > make: *** [install-recursive] Error 1
> >
> >
> >
> > how do i let php know where the sql.h / sqlext.h files are?
> >
> > TIA -- any ideas are appreciated.
> >
> >
> >
> > ___
> > "Doug Smith" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > can i use --with-unixODBC instead of --with-ibm-db2?
> > >
> > > I've had a lot of trouble getting php to talk to IBM DB2 (see
> > > comp.databases.ibm-db2 for more info [if you want], ref "DB2 / PHP /
> > > Redhat -- Tried Many Suggestions")
> > >
> > > But, I can get unixODBC to work with DB2, no problem (via the isql
> > command,
> > > so i've got 

Re: [PHP] sucking news out of the usenet

2002-08-08 Thread Ilia A.

Andy,

I've recently written an newsgroup (NNTP) gateway between FUDforum and 
newsgroup, which allows read/write data sharing between the two. The solution 
for tracking down the reply to is done via 2 headers X-Reply-To or 
In-Reply-To or most commonly References headers. There are a number of mail 
clients that break the convention and send no such data, in which case you 
need to do match replies based on subject. The latter occurs only very rarely 
and in most cases you have a header with a unique ID against which you can 
match messages.

-- 
Ilia Alshanetsky
[EMAIL PROTECTED]
http://fud.prohost.org/forum/

On August 8, 2002 04:10 pm, andy wrote:
> Hi guys,
>
> I am trying to build a usenet gateway which is collecting usenet posts and
> puts them into a phpbb forum. Same other way around. So I did read an
> excelent article on that published by Armel Fauveau at:
> http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is where
> the code underneath is from. So getting the articles works.
>
> My problem is how to glue all the articles together which are relies. I am
> sure there is a way to find out which reply belongs to a post. I would like
> to feed the phpbb database with it.
>
> This is an example of an article including the header:
>
> Newsgroups: php.general Path: news.php.net Xref: news.php.net
> php.general:111709 Return-Path: Mailing-List: contact
> [EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
> [EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8
> Aug 2002 18:28:33 - Message-ID:
> <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
> Reply-To: "sebastian" Date: Thu, 8 Aug 2002 20:27:21 +0200 Lines: 11
> X-Priority: 3 X-MSMail-Priority: Normal
> X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE: Produced
> By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176 Subject:
> streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @ all!
> i´m looking for an algorithm or class to stream mp3-audiofiles, such as
> easy as it can be. i found nothing on php.net and downloaded some
> phpscripts from hotscripts and sourceforge but they were all very cryptical
> and bad documentated. please help me, many thanks sebastian .
>
>
> Lots of text.. puhh! I hope this is somehow possible. Maybe one of you guys
> has a good idea on that. You can just cut and past the code underneath and
> try it out by yourself.
>
> Thanx for any help on that.
>
> Andy
>
> -
> http://www.OZforum.info
> Australia Information Forum
>
>
>
>
>  # http://www.phpbuilder.com/columns/armel20010427.php3?page=3
>
> $cfgServer= "news.php.net";
> $cfgPort= 119;
> $cfgTimeOut= 10;
>
> // open a socket
> if(!$cfgTimeOut)
> // without timeout
> $usenet_handle = fsockopen($cfgServer, $cfgPort);
> else
> // with timeout
> $usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
> $cfgTimeOut);
>
> if(!$usenet_handle) {
> echo "Connexion failed\n";
> exit();
> }
> else {
> echo "Connected\n";
> $tmp = fgets($usenet_handle, 1024);
> }
>
> ###
> # page 2
>
> //$cfgUser= "xx";
> //$cfgPasswd= "yy";
> $cfgNewsGroup= "php.general";
>
> // identification required on private server
> if($cfgUser) {
> fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> // check error
>
> if($tmp != "281 Ok\r\n") {
> echo "502 Authentication error\n";
> exit();
> }
> }
>
> // select newsgroup
>
> fputs($usenet_handle, "GROUP ".$cfgNewsGroup."\n");
> $tmp = fgets($usenet_handle, 1024);
>
> if($tmp == "480 Authentication required for command\r\n") {
> echo "$tmp\n";
> exit();
> }
>
> $info = split(" ", $tmp);
> $first = $info[2];
> $last = $info[3];
>
> print "First : $first\n";
> print "Last : $last\n";
>
> ###
> # page 3
>
> $cfgLimit= 10;
>
> // upload last articles
>
> $boucle=$last-$cfgLimit;
>
> while ($boucle <= $last) {
>
> set_time_limit(0);
>
> fputs($usenet_handle, "ARTICLE $boucle\n");
> #fputs($usenet_handle, "BODY $boucle\n");
>
> $article="";
> $tmp = fgets($usenet_handle, 4096);
>
> if(substr($tmp,0,3) != "220" AND substr($tmp,0,3) != "222") {
> echo "+--+\n";
> echo "Error on article $boucle\n";
> echo "+--+\n";
> }
> else {
> while($tmp!=".\r\n") {
> $tmp = fgets($usenet_handle, 4096);
>
>$article = $article.$tmp;
> }
>
> echo "+--+\n";
> echo "Article $boucle\n";
> echo "+--+\n";
> echo "$article\n";
> }
>
> $boucle++;
>
>
> }
>
> // close connexion
>
> fclose($usenet_handle);
>
> ?>



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

[PHP] DynaPic Class funktion

2002-08-08 Thread Sascha Braun

Hello,

can somebody explain me, how this class is working and how I can use it?

m_sLastError="Invalid format: 
".stripslashes(htmlentities($format));
  return false;
 }

 //initialize
 $this->m_sFormat=strtoupper($format);
 $this->m_sPicName=$pic;
 $this->m_sLastError="";

 //thumb default resize 50%
 $this->setThumbDimension(0.5);
 $this->m_aHeaders=array("GIF"=>"Content-type: 
image/gif","PNG"=>"Content-type: image/png","JPEG"=>"Content-type: image/jpeg");
 return $this->create();
  }

  function destroy()
  {
 if($this->m_bHandled)
 {
 imagedestroy($this->m_hPic);
 $this->m_bHandled=false;
 }
  }

  function create()
  {
 $this->destroy();

 
eval("\$this->m_hPic=@imagecreatefrom".$this->m_sFormat."('".$this->m_sPicName."');");

 //check if init succeded
 if(!$this->m_hPic)
 {
  $m_sLastError="Unable to open 
".stripslashes(htmlentities($this->m_sPicName))." as 
".stripslashes(htmlentities($this->m_sFormat));
  $this->m_bHandled=false;
  return false;
 }
 else
 {
  $this->m_bHandled=true;
  return true;
 }
  }

  //property access
  function getLastError()
  {
 return $this->m_sLastError;
  }

  function setPicName($pic)
  {
 $this->m_sPicName=$pic;
 $this->m_bHandled=false;
  }

  function getPicName()
  {
 return $this->m_sPicName;
  }

  function setThumbDimension($pctg)
  {
 $size = GetImageSize($this->m_sPicName);

 $this->m_nThumbX=$size[0]*$pctg;
 $this->m_nThumbY=$size[1]*$pctg;
  }

  function getThumbDimension(&$w,&$h)
  {
 $w=$this->m_nThumbX;
 $h=$this->m_nThumbY;
  }

  function setPicFormat($format)
  {
 if(strtoupper($format)!="PNG" && strtoupper($format)!="GIF" && 
strtoupper($format)!="JPEG")
 {
  $this->m_sLastError="Invalid format: 
".stripslashes(htmlentities($format));
  return false;
 }
 else
 {
  $this->m_sFormat=strtoupper($format);
  $this->m_bHandled=false;
 }

 return true;
  }

  function getPicFormat()
  {
 return $this->m_sFormat;
  }

  //display functions
  function thumb()
  {
if($this->m_bHandled)
{
$size = GetImageSize($this->m_sPicName);
$picTmp=imagecreate($this->m_nThumbX,$this->m_nThumbY);
imagecopyresized($picTmp, $this->m_hPic, 0, 0, 0, 0, $this->m_nThumbX, 
$this->m_nThumbY, $size[0], $size[1]);
header($this->m_aHeaders[$this->m_sFormat]);
switch($this->m_sFormat)
{
 case 'JPEG':
   imagejpeg($picTmp);
   break;
 case 'GIF':
   imagegif($picTmp);
   break;
 case 'PNG':
   imagepng($picTmp);
   break;
}
imagedestroy($picTmp);
}
  }

  function full()
  {
if($this->m_bHandled)
{
header($this->m_aHeaders[$this->m_sFormat]);
switch($this->m_sFormat)
{
 case 'JPEG':
   imagejpeg($this->m_hPic);
   break;
 case 'GIF':
   imagegif($this->m_hPic);
   break;
 case 'PNG':
   imagepng($this->m_hPic);
   break;
}
}
  }

  function view($width, $height)
  {
if($this->m_bHandled)
{
$size = GetImageSize($this->m_sPicName);
$picTmp=imagecreate($width,$height);
imagecopyresized($picTmp, $this->m_hPic, 0, 0, 0, 0, $width, $height, 
$size[0], $size[1]);
header($this->m_aHeaders[$this->m_sFormat]);
switch($this->m_sFormat)
{
 case 'JPEG':
   imagejpeg($picTmp);
   break;
 case 'GIF':
   imagegif($picTmp);
   break;
 case 'PNG':
   imagepng

RE: [PHP] Re: can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Andrew Hill

Doug,

It may be - I'm a bit more familiar with iODBC.

Best regards,
Andrew Hill
Director of Technology Evangelism
OpenLink Software  http://www.openlinksw.com
Universal Data Access & Virtuoso Universal Server

-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, August 08, 2002 3:14 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: can i use --with-unixODBC instead of --with-ibm-db2?

does this look like the ODBC SDK of unixODBC (not that i expect you to
know
unixODBC)

/usr/lib/libboundparam.so.1
/usr/lib/libboundparam.so.1.0.0
/usr/lib/libesoobS.so.1
/usr/lib/libesoobS.so.1.0.0
/usr/lib/libgtrtst.so.1
/usr/lib/libgtrtst.so.1.0.0
/usr/lib/libnn.so.1
/usr/lib/libnn.so.1.0.0
/usr/lib/libodbc.so.1
/usr/lib/libodbc.so.1.0.0
/usr/lib/libodbccr.so.1
/usr/lib/libodbccr.so.1.0.0
/usr/lib/libodbcdrvcfg1S.so.1
/usr/lib/libodbcdrvcfg1S.so.1.0.0
/usr/lib/libodbcdrvcfg2S.so.1
/usr/lib/libodbcdrvcfg2S.so.1.0.0
/usr/lib/libodbcextras.so.1
/usr/lib/libodbcextras.so.1.0.0
/usr/lib/libodbcinst.so.1
(...it continues)

I found this from "$rpm -q --list unixODBC" ... somehow I was under the
assumption that IBM DB2 UDB came with a ODBC SDK -- i.e. this stuff...
/usr/IBMdb2/V7.1/lib/libdb2ccai.so.1
/usr/IBMdb2/V7.1/lib/libdb2ar.so
/usr/IBMdb2/V7.1/lib/libdb2.so
/usr/IBMdb2/V7.1/lib/libdb2qp.so
/usr/IBMdb2/V7.1/lib/libdb2apie.so
/usr/IBMdb2/V7.1/lib/libdb2jdbc.so
(which continues as well...)

or am i still missing something?

thanks again, and thanks for your patience too, i really appreciate it.

-doug

"Andrew Hill" <[EMAIL PROTECTED]> wrote in message
news:043601c23f0c$0d74efc0$[EMAIL PROTECTED]...
> Doug,
>
> You need an ODBC SDK - you should be able to find the libs in UnixODBC
> or simply use iODBC from www.iodbc.org
>
> Best regards,
> Andrew Hill
> Director of Technology Evangelism
> OpenLink Software  http://www.openlinksw.com
> Universal Data Access & Virtuoso Universal Server
>
> -Original Message-
> From: Doug Smith [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 08, 2002 10:11 AM
> To: Andrew Hill
> Subject: Re: [PHP] Re: can i use --with-unixODBC instead of
> --with-ibm-db2?
>
> Thanks for the suggestion.
>
> I tried issuing the command
> # export LD_LIBRARY_PATH=/usr/IBMdb2/V7.1/include/
>  (which is where i found sql.h and sqlext.h to be living)
>
> Before I ran "make install" but, unfortunately it came up with the
> same
> errors.
>
> Well... Maybe it is time I head back to the drawing board and
> checkout iodbc -- thank you very much, I appreciate it.
>
> -Doug Smith
>
> "Andrew Hill" <[EMAIL PROTECTED]> wrote in message
> news:03f101c23eea$986d8960$[EMAIL PROTECTED]...
> > Doug,
> >
> > You can try --with-iodbc if you like, there is a howto at
> www.iodbc.org.
> > That being said, I think that you simply need to set LD_LIBRARY_PATH
> to
> > the location of your ODBC SDK, so the .h files can be found.
> >
> > Best regards,
> > Andrew Hill
> > Director of Technology Evangelism
> > OpenLink Software  http://www.openlinksw.com
> > Universal Data Access & Virtuoso Universal Server
> >
> > -Original Message-
> > From: Doug Smith [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 08, 2002 9:38 AM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Re: can i use --with-unixODBC instead of
> --with-ibm-db2?
> >
> > well i figured i'd try it...
> >
> > i run
> > $ ./configure
> > i386-redhat-linux --sysconfdir=/etc --with-unixODBC=shared
> > --with-apxs=/usr/
> > sbin/apxs
> >
> > $ make clean
> >
> > $ make install
> >
> > which returns this aweful mess :/
> >
> > Making install in odbc
> > make[2]: Entering directory `/home/doug/php-4.2.2/ext/odbc'
> > make[3]: Entering directory `/home/doug/php-4.2.2/ext/odbc'
> > /bin/sh /home/doug/php-4.2.2/libtool --silent --mode=compile
> > gcc -I. -I/home/dou
> > g/php-4.2.2/ext/odbc -I/home/doug/php-4.2.2/main
> -I/home/doug/php-4.2.2
> > -I/u
> > sr/i
> > nclude/apache -I/home/doug/php-4.2.2/Zend
> > -I/home/doug/php-4.2.2/ext/mysql/l
> > ibmy
> > sql -I/usr/local/include -I/home/doug/php-4.2.2/ext/xml/expat
> > -DLINUX=22 -D
> > EAPI
> >  -DEAPI_MM -DEAPI_MM_CORE_PATH=/var/run/httpd.mm
> > -I/home/doug/php-4.2.2/TSRM
> >  -g
> > -O2 -prefer-pic  -c php_odbc.c && touch php_odbc.slo
> > In file included from php_odbc.c:37:
> > php_odbc.h:120:17: sql.h: No such file or directory
> > php_odbc.h:121:20: sqlext.h: No such file or directory
> > make[3]: *** [php_odbc.slo] Error 1
> > make[3]: Leaving directory `/home/doug/php-4.2.2/ext/odbc'
> > make[2]: *** [install-recursive] Error 1
> > make[2]: Leaving directory `/home/doug/php-4.2.2/ext/odbc'
> > make[1]: *** [install-recursive] Error 1
> > make[1]: Leaving directory `/home/doug/php-4.2.2/ext'
> > make: *** [install-recursive] Error 1
> >
> >
> >
> > how do i let php know where the sql.h / sqlext.h files are?
> >
> > TIA -- any ideas are appreciated.
> >
> >
> >
> > ___
> > "Doug Smith" <[EMAIL

[PHP] File Question

2002-08-08 Thread B i g D o g

I have been looking all over the manual and I have not found anything for "
__FILE__ " does anyone know where I can get more info on its use in PHP?


.: B i g D o g :.


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




Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Doug Smith

Dan,

Thank you for the link unfortunately, even after initally logging in
as db2inst1 and then su to root (w/o the dash) and stopping/starting
apachectl -- i still had no luck :/

same old error:
"Warning: SQL error: , SQL state ËtøO@ÈØÿ¿6#A@ in SQLConnect
in /var/www/html/db2php/db2lib.php on line 11"

Thank you very much though still, i appreciate the ideas :)

-Doug



"Dan Vande More" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
I used this:

Some of his info is wrong, or I had problems with, but hey, this worked:


*
Now we know DB2 works now to test it with PHP and Apache, first login as
user db2inst1 then su to the user root, dont use su - , cause this will make
the shell use the settings of root instead of db2inst1 and we need those
settings so Apache can find the DB2 Instances. Now first stop apache (if
started ofcourse) /usr/local/apache/bin/apachectl stop and start apache
/usr/local/apache/bin/apachectl start . Now create a file in de apache
docroot ( on my machine thats /usr/local/apache/htdocs/ ) called test.php
for example and fill it with the following example:


*

http://people.a2000.nl/nlvanrey/docs/install-db2-php-apache-linux.html


-Original Message-
From: Doug Smith [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 08, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?


> I just checked my config, and I *actually* have that line in apachectl.
Try
> that, and if it fixes it, I'll correct the doc.

although my apache is built via rpm, i put the line (.
/home/db2inst1/sqllib/db2profile) in apachectl and started httpd w/
apachectl, bt...

unfortunately i'm still getting the

Warning: SQL error: , SQL state ËtøO@Ùÿ¿6#A@ in SQLConnect in
/var/www/html/db2php/db2lib.php on line 8

error...

i also tried to add "export DB2INSTANCE=db2inst1" in the same script and
that didn't help either.

could the problem be that i'm starting httpd (or apachectl) as root? i know
the ". /home/db2inst1/sqllib/db2profile" is supposed to make apachectl
inherit the db2 environment variables, but.. somehow it's not working :/

matt, thank you again :)

-doug


p.s. for the record__
./configure
i386-redhat-linux --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbind
ir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/includ
e --libdir=/usr/lib --sysconfdir=/etc --with-apxs=/usr/sbin/apxs --with-ibm-
db2








--
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] File Question

2002-08-08 Thread Ray Hunter

I guess my question is does PHP support additional macros like this?


.: B i g D o g :.


- Original Message -
From: "B i g D o g" <[EMAIL PROTECTED]>
To: "PHP GEN" <[EMAIL PROTECTED]>
Sent: Thursday, August 08, 2002 2:23 PM
Subject: [PHP] File Question


> I have been looking all over the manual and I have not found anything for
"
> __FILE__ " does anyone know where I can get more info on its use in PHP?
>
>
> .: B i g D o g :.
>
>
> --
> 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] sucking news out of the usenet

2002-08-08 Thread andy

that sound somehow more complicated that I have expected :-( I guess this is
a lot of work. May have to skip that for another time. Thanx for your help,

andy

-
http://www.OZforum.info
Australia Information Forum

"Ilia A." <[EMAIL PROTECTED]> schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Andy,
>
> I've recently written an newsgroup (NNTP) gateway between FUDforum and
> newsgroup, which allows read/write data sharing between the two. The
solution
> for tracking down the reply to is done via 2 headers X-Reply-To or
> In-Reply-To or most commonly References headers. There are a number of
mail
> clients that break the convention and send no such data, in which case you
> need to do match replies based on subject. The latter occurs only very
rarely
> and in most cases you have a header with a unique ID against which you can
> match messages.
>
> --
> Ilia Alshanetsky
> [EMAIL PROTECTED]
> http://fud.prohost.org/forum/
>
> On August 8, 2002 04:10 pm, andy wrote:
> > Hi guys,
> >
> > I am trying to build a usenet gateway which is collecting usenet posts
and
> > puts them into a phpbb forum. Same other way around. So I did read an
> > excelent article on that published by Armel Fauveau at:
> > http://www.phpbuilder.com/columns/armel20010427.php3?page=1 (this is
where
> > the code underneath is from. So getting the articles works.
> >
> > My problem is how to glue all the articles together which are relies. I
am
> > sure there is a way to find out which reply belongs to a post. I would
like
> > to feed the phpbb database with it.
> >
> > This is an example of an article including the header:
> >
> > Newsgroups: php.general Path: news.php.net Xref: news.php.net
> > php.general:111709 Return-Path: Mailing-List: contact
> > [EMAIL PROTECTED]; run by ezmlm Delivered-To: mailing list
> > [EMAIL PROTECTED] Received: (qmail 81897 invoked by uid 1007); 8
> > Aug 2002 18:28:33 - Message-ID:
> > <[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
> > Reply-To: "sebastian" Date: Thu, 8 Aug 2002 20:27:21 +0200 Lines: 11
> > X-Priority: 3 X-MSMail-Priority: Normal
> > X-Newsreader: Microsoft Outlook Express 6.00.2600. X-MimeOLE:
Produced
> > By Microsoft MimeOLE V6.00.2600. X-Posted-By: 141.44.162.176
Subject:
> > streaming mp3-audio??? From: [EMAIL PROTECTED] (Sebastian) hi @
all!
> > i´m looking for an algorithm or class to stream mp3-audiofiles, such as
> > easy as it can be. i found nothing on php.net and downloaded some
> > phpscripts from hotscripts and sourceforge but they were all very
cryptical
> > and bad documentated. please help me, many thanks sebastian .
> >
> >
> > Lots of text.. puhh! I hope this is somehow possible. Maybe one of you
guys
> > has a good idea on that. You can just cut and past the code underneath
and
> > try it out by yourself.
> >
> > Thanx for any help on that.
> >
> > Andy
> >
> > -
> > http://www.OZforum.info
> > Australia Information Forum
> >
> >
> >
> >
> >  > # http://www.phpbuilder.com/columns/armel20010427.php3?page=3
> >
> > $cfgServer= "news.php.net";
> > $cfgPort= 119;
> > $cfgTimeOut= 10;
> >
> > // open a socket
> > if(!$cfgTimeOut)
> > // without timeout
> > $usenet_handle = fsockopen($cfgServer, $cfgPort);
> > else
> > // with timeout
> > $usenet_handle = fsockopen($cfgServer, $cfgPort, $errno, $errstr,
> > $cfgTimeOut);
> >
> > if(!$usenet_handle) {
> > echo "Connexion failed\n";
> > exit();
> > }
> > else {
> > echo "Connected\n";
> > $tmp = fgets($usenet_handle, 1024);
> > }
> >
> > ###
> > # page 2
> >
> > //$cfgUser= "xx";
> > //$cfgPasswd= "yy";
> > $cfgNewsGroup= "php.general";
> >
> > // identification required on private server
> > if($cfgUser) {
> > fputs($usenet_handle, "AUTHINFO USER ".$cfgUser."\n");
> > $tmp = fgets($usenet_handle, 1024);
> >
> > fputs($usenet_handle, "AUTHINFO PASS ".$cfgPasswd."\n");
> > $tmp = fgets($usenet_handle, 1024);
> >
> > // check error
> >
> > if($tmp != "281 Ok\r\n") {
> > echo "502 Authentication error\n";
> > exit();
> > }
> > }
> >
> > // select newsgroup
> >
> > fputs($usenet_handle, "GROUP ".$cfgNewsGroup."\n");
> > $tmp = fgets($usenet_handle, 1024);
> >
> > if($tmp == "480 Authentication required for command\r\n") {
> > echo "$tmp\n";
> > exit();
> > }
> >
> > $info = split(" ", $tmp);
> > $first = $info[2];
> > $last = $info[3];
> >
> > print "First : $first\n";
> > print "Last : $last\n";
> >
> > ###
> > # page 3
> >
> > $cfgLimit= 10;
> >
> > // upload last articles
> >
> > $boucle=$last-$cfgLimit;
> >
> > while ($boucle <= $last) {
> >
> > set_time_limit(0);
> >
> > fputs($usenet_handle, "ARTICLE $boucle\n");
> > #fputs($usenet_handle, "BODY $boucle\n");
> >
> > $article="";
> > $tmp = fgets($usenet_handle, 4096);
> >
> > if(substr($tmp,0,3) != "220" AND substr($tmp,0,3

[PHP] getting PHP --with-imap to work on OS X? (cross-post)

2002-08-08 Thread Michael Geary

Hi folks,

I am trying to get a web-based mail system set up on my OS X machine. I 
have successfully compiled and installed Apache, Postfix, UW-IMAP, 
MySQL, and a version of PHP 4.2.2 _without_ imap support.

However, it seems that for a web mail client to work, I need to have 
imap support built in to PHP. Has anyone done this for OS X? I have 
looked everywhere, and can't find a next step. Like I said, I have 
UW-IMAP installed, and it is working correctly. Additionally, I have 
followed the instructions from PHP.NET, where it says to copy certain 
files from the c-client directory to my /usr/local/include directory. 
However, I always get errors when I "make".

Please, would someone be willing to offer detailed instructions? If I 
get this thing working, I'd be more than willing to post or mail my 
notes so that others can enjoy the fun.

Thanks in advance,

michael geary


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




Re: [PHP] PHP warning with 4.2

2002-08-08 Thread Nick Oostveen

You should be able to fix this by changing the function DECLARATION for the 
argument in question to take the variable by reference instead of by value 
(which is the default).

So it should be something like:

OCIFetchInto ( $var1, &$rvar2, $var3  )

What you are currently doing is specifying at call-time that "I want you to 
accept this variable by reference, even if you are expecting it to be 
passed by value".  This can be very dangerous from a data corruption point 
of view, which is likely why it is being deprecated.

At 11:13 AM 8/8/2002 -0700, PHP List wrote:
>Hi, after upgrading to 4.2, I seem to be getting this warning:
>
>PHP Warning:  Call-time pass-by-reference has been deprecated - argument 
>passed by value;  If you would like to pass it by reference, modify the 
>declaration of [runtime function name]().  If you would like to enable 
>call-time pass-by-reference, you can set allow_call_time_pass_reference to 
>true in your INI file.  However, future versions may not support this any 
>longer.
>
>on this line:
>OCIFetchInto ( $GLOBALS["oracle_statement"], &$row, OCI_NUM + 
>OCI_RETURN_NULLS  )
>
>if I can't use &$row anymore, what do I do? The warning says that "future 
>versions may not support this", so will this function be fixed? Or will 
>this function be dissappearing?
>
>Thanks for any help.


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




[PHP] Using ini_set with session.gc_maxlifetime

2002-08-08 Thread Neil Innes

I've got a site on a server where I can't change the php.ini setting for 
session.gc_maxlifetime, which is set at the default 1440 seconds.  My client 
wants to entend the time to an hour.  The only way I am aware of how to do 
this kind of thing is through ini_set.  However, the documentation says 
there are a number of configuration options which you can set using ini_set, 
but which don't work as expected because the options are already in effect 
before the script runs.  Is session.gc_maxlifetime one of those options?  
After all, ini_set is only supposed to be in effect for the duration of the 
script, which is not going to work if the whole point of sessions is to 
allow information to be preserved between pages (scripts).  So, can ini_set 
be used to set session.gc_maxlifetime in any meaningful way, and if not, is 
there another way to do it?

Ta,

Neil Innes


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


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




[PHP] Asking for help...

2002-08-08 Thread Ashley M. Kirchner


 Okay, I give up.  I can't figure this out.  So, instead of spamming
the list with my code, I'll ask for help and those who reply I'll send
the code to.  The problem is as follows:

 I'm building a multi page form (called form.php) which 'include's
each $step one by one (step1.inc, step2.inc, etc., etc.).

 That page (form.php) submits to a process script (process.php) which
does several things:

- checks for each form field to be filled.
  if a required field is empty, flag $error
- if the field is filled, session_register() it.
- if there is an $error, resubmit the $step back to form.php
- if there is no $error, submit $step+1 to form.php

 And the whole process gets repeated every time form.php is
resubmitted.  So, in theory, at the end of the 3 pages that I have, the
last submit will cause process.php to grab all the variable/value
combinations and (for now) sends me an email.

 Problems I'm facing:
 1) Let's say a user leaves out a field (or more) and submits the page.
process.php diligently causes an $error which sends the same $step
back to form.php.  Now the user fills in what was missing, but
DELETES another field and resubmits.  At this point, that variable
was already registered, and deleting the value from the form has no
effect.  The old value is still there and gets submitted.  I need
to check for this somehow.

 2) There are also optional fields on the form (thinks like a second
field for Address, Telephone#, etc.)  These will also need to be
registered if they have been filled.  And they are.  Problem is,
sometimes they're not (I can't seem to be able to pin down WHY).

 3) If a required field hasn't been filled in the first go around, the
whole process gets stuck.  In other words, when the same form gets
displayed again, and the user DOES fill in that field and resubmits
it, it just comes back and says that field is still missing.
Even though when I echo that variable prior to the process reaching
the point where it checks if there is anything missing, I get a
value returned - so the field IS filled.  Still, it fails when it
reaches the checks.



 I'm sure there are more, but right now that's what I'm faced with and
it's driving me insane.  So, if some brave soul out there wishes to
read my (no doubt) crappy code and tell me what I did wrong, I'll
appreciate it.  Please reply to me off-list and I'll give you the
current code.

--
W | I haven't lost my mind; it's backed up on tape somewhere.
  +
  Ashley M. Kirchner    .   303.442.6410 x130
  IT Director / SysAdmin / WebSmith . 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] File Question

2002-08-08 Thread Maxim Maletsky

Ray,

__FILE__ is the constant (there's also __LINE__) that is defined right
within the file, so its value cannot be modified.

Look up here:
http://www.php.net/manual/en/language.constants.php



Sincerely,

Maxim Maletsky

PHP Beginner
www.phpbeginner.com


> -Original Message-
> From: Ray Hunter [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 08, 2002 10:26 PM
> To: PHP GEN
> Subject: Re: [PHP] File Question
> 
> I guess my question is does PHP support additional macros like this?
> 
> 
> .: B i g D o g :.
> 
> 
> - Original Message -
> From: "B i g D o g" <[EMAIL PROTECTED]>
> To: "PHP GEN" <[EMAIL PROTECTED]>
> Sent: Thursday, August 08, 2002 2:23 PM
> Subject: [PHP] File Question
> 
> 
> > I have been looking all over the manual and I have not found
anything
> for
> "
> > __FILE__ " does anyone know where I can get more info on its use in
PHP?
> >
> >
> > .: B i g D o g :.
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php



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




Re: [PHP] Asking for help...

2002-08-08 Thread Bas Jobsen

Op donderdag 08 augustus 2002 23:22, schreef Ashley M. Kirchner:
> DELETES another field and resubmits.  At this point, that variable
> was already registered, and deleting the value from the form has no
> effect.  The old value is still there and gets submitted.  I need
> to check for this somehow.

You shouldn't register before the form is complete right and not after every 
submit. 
something
like:
'}

?>


etc







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




[PHP] $http_host use case

2002-08-08 Thread David D

Hi all,

I make 2 sites with 2 domain names that use same scripts,
Each has got its html templates in a special dir selected judgging from
$HTTP_HOST values.

I was wondering me how a web crawler (search engine robot) could refer those
pages.
Would crawler bring that parameter in order to refer well both sites...

I see a short explanation of http_host at :
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve
r
=>
'HTTP_HOST'

Contents of the Host: header from the current request, if there is one.

It makes me doubt.

My server is an apache php 1.3.20 with 1 ip so http 1.1 is mandatory, how
search engine works, did they affect this var correctly ?
Is there any crawlers that doesnt support http 1.1 again ?

If there isn't this var my site would melt down !


merci.
a+.








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




[PHP] Please help with array_diff()

2002-08-08 Thread Gandalf



Hello!

Please have a look at the following sample code and help me out if you can

$db = new db_SQL();
$sql = "SELECT Name, Email FROM whatever WHERE whatever=whatever";
$db->query( $sql );

while ($db->next_record())
{
 //This is my first array
 $foo[] = array ("name"=>$db->f("Name"), "email"=>$db->f("Email"));
}


$db2 = new db_SQL();
$sql2 = "SELECT Name, Email FROM another_table WHERE foo=bar";
$db2->query( $sql2 );

while ($db2->next_record())
{
 //This is my second array
 $bar[] = array ("name"=>$db2->f("Name"), "email"=>$db2->f("Email"));
}

// Now i want to compare the two arrays

$diff = array_diff($foo[0], $bar[0]);


//And heres where it stops working as it should

foreach ($diff as $element)
{
 echo $element."";
}




What is driving me crazy since more then 7 hours is that it ($element) will 
only output ONE difference, but i want ALL differences listed, why is this 
not working?

As far as i know i am doing nothing wrong, or am i totally stupid?

Thank you very much in advance for your time and help!

Best regards from Vienna,
Jürgen



[PHP] mysql_result

2002-08-08 Thread Sascha Braun

I need some help!

I am getting a result out of my link Database an want it to Display the result in two
collums like this:

+-++
+ Result 1+  Result 2  +
+-++
+Result 3 + Result 4   +
+-++

and so on please help!

Thanx



[PHP] Help with multiple select

2002-08-08 Thread rdkurth

I need to get the data from the table and add it to the multiple
select statement below. What I am trying to do is give the user a form
to change his pervious selections. Now doing this if there is only one thing
selected is easy. but I need a way to select multiple fields. The data
in $mins would look like this 8,13,15,20. I tried this little script
below but it does not work because of the , and I would also have to do
it for ever option value. There must be a shorter way of doing this.


$mins="2,3,5,6,7";



0

1

1


2

2


3

3

4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
19
20
21
22
23


-- 
Best regards,
Richard Kurth mailto:[EMAIL PROTECTED]


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




[PHP] shell_exec "root" question

2002-08-08 Thread Hendrik Daldrup

Hi,

i wrote a script, which runs

echo shell_exec("exim -bp");

so it simply gives me the current mail queue.
However, it only works when called by user "root", because exim won't 
let "group" or "others" execute it.
So, i cannot use it with apache, because it runs as "nobody".
Well, i saw scripts that can do so, but i have no clue how it is 
possible for them.
Does anyone have an idea?
I thought about adding a cron-job and let it update a file every 5 
minutes with the current mail queue, but that will cause unnecesary load 
and it won't be up2date.

So, any ideas are welcome,

Thanks,

Duncan


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




RE: [PHP] mysql_result

2002-08-08 Thread Maxim Maletsky



 ???


Sincerely,

Maxim Maletsky

PHP Beginner
www.phpbeginner.com


> -Original Message-
> From: Sascha Braun [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 12:18 AM
> To: PHP Mailingliste
> Subject: [PHP] mysql_result
> 
> I need some help!
> 
> I am getting a result out of my link Database an want it to Display
the
> result in two
> collums like this:
> 
> +-++
> + Result 1+  Result 2  +
> +-++
> +Result 3 + Result 4   +
> +-++
> 
> and so on please help!
> 
> Thanx


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




RE: [PHP] Help with multiple select

2002-08-08 Thread Maxim Maletsky


Try:

$mins  = "2,3,5,6,7";
$ret   = array_reverse(explode(',', $mins));

// now you have something like:
// $ret[2] = 0;
// $ret[3] = 1;
//
// etc, basically string became and array in reversed way...

then in script...


if(isset($mins[2]))
...
if(isset($mins[3]))


and so on .


but, I would really recommend you to experiment some alternative ways
with use of a loop. That would be way cleaner.


Sincerely,

Maxim Maletsky
[EMAIL PROTECTED]

PHP Beginner
www.phpbeginner.com


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 12:38 AM
> To: php-general
> Subject: [PHP] Help with multiple select
> 
> I need to get the data from the table and add it to the multiple
> select statement below. What I am trying to do is give the user a form
> to change his pervious selections. Now doing this if there is only one
> thing
> selected is easy. but I need a way to select multiple fields. The data
> in $mins would look like this 8,13,15,20. I tried this little script
> below but it does not work because of the , and I would also have to
do
> it for ever option value. There must be a shorter way of doing this.
> 
> 
> $mins="2,3,5,6,7";
> 
> 
> 
> 0
> 
> 1
> 
> 1
> 
> 
> 2
> 
> 2
> 
> 
> 3
> 
> 3
> 
> 4
> 5
> 6
> 7
> 8
> 9
> 10
> 11
> 
> 12
> 13
> 14
> 15
> 16
> 17
> 18
> 19
> 20
> 21
> 22
> 23
> 
> 
> --
> Best regards,
> Richard Kurth 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[2]: [PHP] Help with multiple select

2002-08-08 Thread rdkurth

Hello Maxim,
Is this what you are saying to do. I don't understand way this would
work and what I have hear does not work

mins="1,4,6,";
$ret   = array_reverse(explode(',', $mins));


0

0

1

1

2

2

3

3

4

4

5

5

6

6


Thursday, August 08, 2002, 3:51:46 PM, you wrote:



MM> Try:

MM> $mins  = "2,3,5,6,7";
MM> $ret   = array_reverse(explode(',', $mins));

MM> // now you have something like:
MM> // $ret[2] = 0;
MM> // $ret[3] = 1;
MM> //
MM> // etc, basically string became and array in reversed way...

MM> then in script...


MM> if(isset($mins[2]))
MM> ...
MM> if(isset($mins[3]))


MM> and so on .


MM> but, I would really recommend you to experiment some alternative ways
MM> with use of a loop. That would be way cleaner.


MM> Sincerely,

MM> Maxim Maletsky
MM> [EMAIL PROTECTED]

MM> PHP Beginner
MM> www.phpbeginner.com


>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, August 09, 2002 12:38 AM
>> To: php-general
>> Subject: [PHP] Help with multiple select
>> 
>> I need to get the data from the table and add it to the multiple
>> select statement below. What I am trying to do is give the user a form
>> to change his pervious selections. Now doing this if there is only one
>> thing
>> selected is easy. but I need a way to select multiple fields. The data
>> in $mins would look like this 8,13,15,20. I tried this little script
>> below but it does not work because of the , and I would also have to
MM> do
>> it for ever option value. There must be a shorter way of doing this.
>> 
>> 
>> $mins="2,3,5,6,7";
>> 
>> 
>> 
>> 0
>> 
>> 1
>> 
>> 1
>> 
>> 
>> 2
>> 
>> 2
>> 
>> 
>> 3
>> 
>> 3
>> 
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
>> 11
>> 
>> 12
>> 13
>> 14
>> 15
>> 16
>> 17
>> 18
>> 19
>> 20
>> 21
>> 22
>> 23
>> 
>> 
>> --
>> Best regards,
>> Richard Kurth mailto:[EMAIL PROTECTED]
>> 
>> 
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Best regards,
 rdkurthmailto:[EMAIL PROTECTED]


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




[PHP] exec problem

2002-08-08 Thread Li, Xin

Hi,

I want to launch a program which writes a file on the
server. But the process is under the owner of
"webuser" who doesn't have write permission, and I
don't want to set the directory writable to all users.
I've searched the doc and tried every way but couldn't
find a solution. Anybody knows how to solve this?

BTW, my php is a pretty old version and doesn't
support suexec and ftp functions.

Thanks a lot

Xin Li


__
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

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




RE: Re[2]: [PHP] Help with multiple select

2002-08-08 Thread Maxim Maletsky


Change $mins to $ret in the HTML code.


Sincerely,

Maxim Maletsky

PHP Beginner
www.phpbeginner.com


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 1:34 AM
> To: Maxim Maletsky; php-general
> Subject: Re[2]: [PHP] Help with multiple select
> 
> Hello Maxim,
> Is this what you are saying to do. I don't understand way this would
> work and what I have hear does not work
> 
> mins="1,4,6,";
> $ret   = array_reverse(explode(',', $mins));
> 
>  if(isset($mins[0])){?>
> 0
> 
> 0
>  if(isset($mins[1])){?>
> 1
> 
> 1
>  if(isset($mins[2])){?>
> 2
> 
> 2
>  if(isset($mins[3])){?>
> 3
> 
> 3
>  if(isset($mins[4])){?>
> 4
> 
> 4
>  if(isset($mins[5])){?>
> 5
> 
> 5
>  if(isset($mins[6])){?>
> 6
> 
> 6
> 
> 
> Thursday, August 08, 2002, 3:51:46 PM, you wrote:
> 
> 
> 
> MM> Try:
> 
> MM> $mins  = "2,3,5,6,7";
> MM> $ret   = array_reverse(explode(',', $mins));
> 
> MM> // now you have something like:
> MM> // $ret[2] = 0;
> MM> // $ret[3] = 1;
> MM> //
> MM> // etc, basically string became and array in reversed way...
> 
> MM> then in script...
> 
> 
> MM> if(isset($mins[2]))
> MM> ...
> MM> if(isset($mins[3]))
> 
> 
> MM> and so on .
> 
> 
> MM> but, I would really recommend you to experiment some alternative
ways
> MM> with use of a loop. That would be way cleaner.
> 
> 
> MM> Sincerely,
> 
> MM> Maxim Maletsky
> MM> [EMAIL PROTECTED]
> 
> MM> PHP Beginner
> MM> www.phpbeginner.com
> 
> 
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >> Sent: Friday, August 09, 2002 12:38 AM
> >> To: php-general
> >> Subject: [PHP] Help with multiple select
> >>
> >> I need to get the data from the table and add it to the multiple
> >> select statement below. What I am trying to do is give the user a
form
> >> to change his pervious selections. Now doing this if there is only
one
> >> thing
> >> selected is easy. but I need a way to select multiple fields. The
data
> >> in $mins would look like this 8,13,15,20. I tried this little
script
> >> below but it does not work because of the , and I would also have
to
> MM> do
> >> it for ever option value. There must be a shorter way of doing
this.
> >>
> >>
> >> $mins="2,3,5,6,7";
> >>
> >> 
> >> 
> >> 0
> >> 
> >> 1
> >> 
> >> 1
> >> 
> >> 
> >> 2
> >> 
> >> 2
> >> 
> >> 
> >> 3
> >> 
> >> 3
> >> 
> >> 4
> >> 5
> >> 6
> >> 7
> >> 8
> >> 9
> >> 10
> >> 11
> >> 
> >> 12
> >> 13
> >> 14
> >> 15
> >> 16
> >> 17
> >> 18
> >> 19
> >> 20
> >> 21
> >> 22
> >> 23
> >> 
> >>
> >> --
> >> Best regards,
> >> Richard Kurth mailto:[EMAIL PROTECTED]
> >>
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> 
> 
> --
> Best regards,
>  rdkurthmailto:[EMAIL PROTECTED]



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




Re[4]: [PHP] Help with multiple select

2002-08-08 Thread rdkurth

Hello Maxim,
I had done that but when I run it using the numbers 1,3,4 in the $mins
variables the fields that where selected where 0 1 and 2. If I change
it to $mins=3,5  it select 0 1 . if I use $mins="3,4,6,8,10,22"; it
select 0 through 5

Thursday, August 08, 2002, 4:46:49 PM, you wrote:



MM> Change $mins to $ret in the HTML code.


MM> Sincerely,

MM> Maxim Maletsky

MM> PHP Beginner
MM> www.phpbeginner.com


>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, August 09, 2002 1:34 AM
>> To: Maxim Maletsky; php-general
>> Subject: Re[2]: [PHP] Help with multiple select
>> 
>> Hello Maxim,
>> Is this what you are saying to do. I don't understand way this would
>> work and what I have hear does not work
>> 
>> mins="1,4,6,";
>> $ret   = array_reverse(explode(',', $mins));
>> 
>> > if(isset($mins[0])){?>
>> 0
>> 
>> 0
>> > if(isset($mins[1])){?>
>> 1
>> 
>> 1
>> > if(isset($mins[2])){?>
>> 2
>> 
>> 2
>> > if(isset($mins[3])){?>
>> 3
>> 
>> 3
>> > if(isset($mins[4])){?>
>> 4
>> 
>> 4
>> > if(isset($mins[5])){?>
>> 5
>> 
>> 5
>> > if(isset($mins[6])){?>
>> 6
>> 
>> 6
>> 
>> 
>> Thursday, August 08, 2002, 3:51:46 PM, you wrote:
>> 
>> 
>> 
>> MM> Try:
>> 
>> MM> $mins  = "2,3,5,6,7";
>> MM> $ret   = array_reverse(explode(',', $mins));
>> 
>> MM> // now you have something like:
>> MM> // $ret[2] = 0;
>> MM> // $ret[3] = 1;
>> MM> //
>> MM> // etc, basically string became and array in reversed way...
>> 
>> MM> then in script...
>> 
>> 
>> MM> if(isset($mins[2]))
>> MM> ...
>> MM> if(isset($mins[3]))
>> 
>> 
>> MM> and so on .
>> 
>> 
>> MM> but, I would really recommend you to experiment some alternative
MM> ways
>> MM> with use of a loop. That would be way cleaner.
>> 
>> 
>> MM> Sincerely,
>> 
>> MM> Maxim Maletsky
>> MM> [EMAIL PROTECTED]
>> 
>> MM> PHP Beginner
>> MM> www.phpbeginner.com
>> 
>> 
>> >> -Original Message-
>> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> >> Sent: Friday, August 09, 2002 12:38 AM
>> >> To: php-general
>> >> Subject: [PHP] Help with multiple select
>> >>
>> >> I need to get the data from the table and add it to the multiple
>> >> select statement below. What I am trying to do is give the user a
MM> form
>> >> to change his pervious selections. Now doing this if there is only
MM> one
>> >> thing
>> >> selected is easy. but I need a way to select multiple fields. The
MM> data
>> >> in $mins would look like this 8,13,15,20. I tried this little
MM> script
>> >> below but it does not work because of the , and I would also have
MM> to
>> MM> do
>> >> it for ever option value. There must be a shorter way of doing
MM> this.
>> >>
>> >>
>> >> $mins="2,3,5,6,7";
>> >>
>> >> 
>> >> 
>> >> 0
>> >> 
>> >> 1
>> >> 
>> >> 1
>> >> 
>> >> 
>> >> 2
>> >> 
>> >> 2
>> >> 
>> >> 
>> >> 3
>> >> 
>> >> 3
>> >> 
>> >> 4
>> >> 5
>> >> 6
>> >> 7
>> >> 8
>> >> 9
>> >> 10
>> >> 11
>> >> 
>> >> 12
>> >> 13
>> >> 14
>> >> 15
>> >> 16
>> >> 17
>> >> 18
>> >> 19
>> >> 20
>> >> 21
>> >> 22
>> >> 23
>> >> 
>> >>
>> >> --
>> >> Best regards,
>> >> Richard Kurth mailto:[EMAIL PROTECTED]
>> >>
>> >>
>> >> --
>> >> PHP General Mailing List (http://www.php.net/)
>> >> To unsubscribe, visit: http://www.php.net/unsub.php
>> 
>> 
>> 
>> 
>> 
>> 
>> --
>> Best regards,
>>  rdkurthmailto:[EMAIL PROTECTED]






-- 
Best regards,
 rdkurthmailto:[EMAIL PROTECTED]


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




[PHP] Matchmaking site

2002-08-08 Thread Oficina Digital

Hello, I am new to the list and don't know how kind you are helping complete beginners 
in PHP.
I intend to set a personals matchmaking site for people interested in entheogens 
(http://singlemates.yage.net)
I don't know where to begin, I have some PHP cookbooks handy and am looking to do it 
the easy way but have no idea how much work and knowledge is needed.
What I want is for people to log in (using sessions?), post and modify profile with 
uploading photos and search for personals based on location, desired place to live, 
age, kind of relationship, etc.
I intend to do it it by steps adding features as my php knowledge increase but would 
appretiate very much some tips and hints on where to begin and how to design this 
project.
Some tips on where and what I shall learn for this project would be of great help.

Thanks a lot,
hope this may help other people interested in similar works,
-Danalex



RE: Re[4]: [PHP] Help with multiple select

2002-08-08 Thread Maxim Maletsky

Can you give me thefull code (from the point you create 1,2,3 till you
compose the whole HTML block)? I will slightly rewrite it for you. Or,
simply look well inside the code and learn it well. It is not a tough
problem at all - you just got confused by array_reverse() function. 


Sincerely,

Maxim Maletsky

PHP Beginner
www.phpbeginner.com


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 2:14 AM
> To: Maxim Maletsky; php-general
> Subject: Re[4]: [PHP] Help with multiple select
> 
> Hello Maxim,
> I had done that but when I run it using the numbers 1,3,4 in the $mins
> variables the fields that where selected where 0 1 and 2. If I change
> it to $mins=3,5  it select 0 1 . if I use $mins="3,4,6,8,10,22"; it
> select 0 through 5
> 
> Thursday, August 08, 2002, 4:46:49 PM, you wrote:
> 
> 
> 
> MM> Change $mins to $ret in the HTML code.
> 
> 
> MM> Sincerely,
> 
> MM> Maxim Maletsky
> 
> MM> PHP Beginner
> MM> www.phpbeginner.com
> 
> 
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >> Sent: Friday, August 09, 2002 1:34 AM
> >> To: Maxim Maletsky; php-general
> >> Subject: Re[2]: [PHP] Help with multiple select
> >>
> >> Hello Maxim,
> >> Is this what you are saying to do. I don't understand way this
would
> >> work and what I have hear does not work
> >>
> >> mins="1,4,6,";
> >> $ret   = array_reverse(explode(',', $mins));
> >> 
> >>  >> if(isset($mins[0])){?>
> >> 0
> >> 
> >> 0
> >>  >> if(isset($mins[1])){?>
> >> 1
> >> 
> >> 1
> >>  >> if(isset($mins[2])){?>
> >> 2
> >> 
> >> 2
> >>  >> if(isset($mins[3])){?>
> >> 3
> >> 
> >> 3
> >>  >> if(isset($mins[4])){?>
> >> 4
> >> 
> >> 4
> >>  >> if(isset($mins[5])){?>
> >> 5
> >> 
> >> 5
> >>  >> if(isset($mins[6])){?>
> >> 6
> >> 
> >> 6
> >> 
> >>
> >> Thursday, August 08, 2002, 3:51:46 PM, you wrote:
> >>
> >>
> >>
> >> MM> Try:
> >>
> >> MM> $mins  = "2,3,5,6,7";
> >> MM> $ret   = array_reverse(explode(',', $mins));
> >>
> >> MM> // now you have something like:
> >> MM> // $ret[2] = 0;
> >> MM> // $ret[3] = 1;
> >> MM> //
> >> MM> // etc, basically string became and array in reversed way...
> >>
> >> MM> then in script...
> >>
> >>
> >> MM> if(isset($mins[2]))
> >> MM> ...
> >> MM> if(isset($mins[3]))
> >>
> >>
> >> MM> and so on .
> >>
> >>
> >> MM> but, I would really recommend you to experiment some
alternative
> MM> ways
> >> MM> with use of a loop. That would be way cleaner.
> >>
> >>
> >> MM> Sincerely,
> >>
> >> MM> Maxim Maletsky
> >> MM> [EMAIL PROTECTED]
> >>
> >> MM> PHP Beginner
> >> MM> www.phpbeginner.com
> >>
> >>
> >> >> -Original Message-
> >> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> >> >> Sent: Friday, August 09, 2002 12:38 AM
> >> >> To: php-general
> >> >> Subject: [PHP] Help with multiple select
> >> >>
> >> >> I need to get the data from the table and add it to the multiple
> >> >> select statement below. What I am trying to do is give the user
a
> MM> form
> >> >> to change his pervious selections. Now doing this if there is
only
> MM> one
> >> >> thing
> >> >> selected is easy. but I need a way to select multiple fields.
The
> MM> data
> >> >> in $mins would look like this 8,13,15,20. I tried this little
> MM> script
> >> >> below but it does not work because of the , and I would also
have
> MM> to
> >> MM> do
> >> >> it for ever option value. There must be a shorter way of doing
> MM> this.
> >> >>
> >> >>
> >> >> $mins="2,3,5,6,7";
> >> >>
> >> >> 
> >> >> 
> >> >> 0
> >> >> 
> >> >> 1
> >> >> 
> >> >> 1
> >> >> 
> >> >> 
> >> >> 2
> >> >> 
> >> >> 2
> >> >> 
> >> >> 
> >> >> 3
> >> >> 
> >> >> 3
> >> >> 
> >> >> 4
> >> >> 5
> >> >> 6
> >> >> 7
> >> >> 8
> >> >> 9
> >> >> 10
> >> >> 11
> >> >> 
> >> >> 12
> >> >> 13
> >> >> 14
> >> >> 15
> >> >> 16
> >> >> 17
> >> >> 18
> >> >> 19
> >> >> 20
> >> >> 21
> >> >> 22
> >> >> 23
> >> >> 
> >> >>
> >> >> --
> >> >> Best regards,
> >> >> Richard Kurth
mailto:[EMAIL PROTECTED]
> >> >>
> >> >>
> >> >> --
> >> >> PHP General Mailing List (http://www.php.net/)
> >> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> Best regards,
> >>  rdkurthmailto:[EMAIL PROTECTED]
> 
> 
> 
> 
> 
> 
> --
> Best regards,
>  rdkurthmailto:[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




[PHP] FILEMTIME

2002-08-08 Thread Mike Zagorski

Hello,

I amusing the following PHP code.. but I want to make it so that it also displays the 
time in 24 hr mode and the time is +3600 seconds. (1 hour)



How can I do this?

Thanks

Mike



Re: [PHP] Most portable back button in php

2002-08-08 Thread Justin French

I have this code on one of my sites... it sits inthe config file, so every
page is able to establish their URL.

For my site, the definition of URL is just the stuff after
http://www.domain.com/.


$script = $_SERVER['PHP_SELF'];
$script = eregi_replace('^/', '', $script);
$qs = $_SERVER['QUERY_STRING'];
$this_ref = base64_encode($script."?".$qs);


The result?  $this_ref will look like dir/dir/file.php?getvar=foo if the
current URL is http://www.mysite.com/dir/dir/file.php?getvar=foo


The if I need to pass the referrer onto another script (in my case a login
procedure), I just do this:

login here


login.php passes $_GET['return_ref'] around in the URL through the login
form, the validation, the error messages, the password reminder script, and
all sorts of other stuff, and once the user is finally logged in, I can do
this:

$return_ref = base64_decode($_GET['return_ref']);

and supply them with:

Click here to continue

... or better still, once they're logged in, I just:

header("Location: {$return_ref}");


If you wanted to do it for a full domain URL, then store your full domain as
a var $base_url, and prepend it to $this_ref

$base_url = "http://www.mydomain.com";; // without trailing slash
$script = $_SERVER['PHP_SELF'];
$qs = $_SERVER['QUERY_STRING'];
$this_ref = base64_encode($base_url.$script."?".$qs);



The only thing this doesn't cover is pages with POST variables, but I
wouldn't want it to.


Justin French



on 09/08/02 1:40 AM, Henry ([EMAIL PROTECTED]) wrote:

> I have an idea then.
> 
> How can I best generate a full URL from PHP_SELF and other variables on the
> referrer page such that I can generate the back link on the page I get to
> even if the referrer page is on a different server?
> 
> as an eample if I know that the page to go back to will be at
> http://www.myprimary.com/referrer.php and I generate a page at
> http://www.mysecondary.com/info.php I can ensure that there is the following
> html in place
> 
> http://www.myprimary.com/referrer.php";>go back
> 
> TIA
> 
> Henry
> 
> "Stas Maximov" <[EMAIL PROTECTED]> wrote in message
> news:008601c23eef$cc25f260$ec64@nexus...
>> Yes, indeed. Thanks, Justin, I forget to mention this one. It works really
>> well on forums and comments, i.e. the cases when you do POSTs. The good
>> thing here is that you passing the whole URL (taking it from PHP_SELF), so
>> you save on the decision logic in the end.
>> 
>> Regards, Stas
>> 
>> - Original Message -
>> From: "Justin French" <[EMAIL PROTECTED]>
>> To: "Stas Maximov" <[EMAIL PROTECTED]>; "Henry" <[EMAIL PROTECTED]>
>> Cc: "PHP General" <[EMAIL PROTECTED]>
>> Sent: Thursday, August 08, 2002 4:03 PM
>> Subject: Re: [PHP] Most portable back button in php
>> 
>> 
>>> Just to add in some more ideas, you can always pass the referring script
>> to
>>> the second script manually...
>>> 
>>> I do this when someone has to login, then return back to the original
> page
>>> they were on...  I just get the URL + query string, base64_encode() it,
>> then
>>> pass it around in the URL or POST until i need it, then base64_decode()
> it
>>> and header("Location: ...") the user to the right page.
>>> 
>>> Works really well, depending on your situation.
>>> 
>>> 
>>> Justin
>>> 
>>> 
>>> --
>>> 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] E-commerce site issue?

2002-08-08 Thread Justin French

on 09/08/02 3:56 AM, The Gabster ([EMAIL PROTECTED]) wrote:

> Hi all,
> 
> Using my own server (not through an ISP), how do I go about setting up an
> e-commerce site?  So I can accept credit cards for
> purchases?

Do you want to ACCEPT credit cards (process the purchases manually), or
PROCESS credit cards via the server.

There's a big difference.


Justin French


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




Re: [PHP] Matchmaking site

2002-08-08 Thread Justin French

Unless you have experience in other web based languages (other than HTML),
I'd suggest this is a difficult place to start because you'll need:

- user registration and management
- session management
- detailed searching systems
- automated matchmaking and emailing systems
- image resizing and validation systems
- content management and approval of profiles
- templating systems, code libraries and reuseable modules
- form input validation

This is a big job -- rather complex.


It's the sort of thing you can't do well with modules either... deciding to
do this, IMHO, will require lots of planning and knowledge how each one of
the above systems will integrate with the rest, because it's the only way to
avoid re-coding the thing 30 times, at great expense.

Personally, I'd look at each one of the above issues separately in depth,
trying to write things in a highly re-useable way, with extensive use of
common config files, common functions, and common templates.

Once you've got a grip on all the pieces, glueing it all together will be a
lot less painful.


Incidently, that's how I worked on my first projects :)


Justin French


on 09/08/02 9:59 AM, Oficina Digital ([EMAIL PROTECTED]) wrote:

> Hello, I am new to the list and don't know how kind you are helping complete
> beginners in PHP.
> I intend to set a personals matchmaking site for people interested in
> entheogens (http://singlemates.yage.net)
> I don't know where to begin, I have some PHP cookbooks handy and am looking to
> do it the easy way but have no idea how much work and knowledge is needed.
> What I want is for people to log in (using sessions?), post and modify profile
> with uploading photos and search for personals based on location, desired
> place to live, age, kind of relationship, etc.
> I intend to do it it by steps adding features as my php knowledge increase but
> would appretiate very much some tips and hints on where to begin and how to
> design this project.
> Some tips on where and what I shall learn for this project would be of great
> help.
> 
> Thanks a lot,
> hope this may help other people interested in similar works,
> -Danalex
> 


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




[PHP] PHP multipart form data

2002-08-08 Thread Mike Dunlop

hello,

i have php 4.2.2 compiled with --enable-ftp running (as a module in 
apache under red-hat 6.2) and I can not get file uploads through a 
web page to work!?!?

The form variable $userfile (which is the file input name) is returning false;

Any ideas how to troubleshoot this?


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




Re: [PHP] can i use --with-unixODBC instead of --with-ibm-db2?

2002-08-08 Thread Matt

It seems way too difficult to configure db2 on linux. Let alone trying to do
it on freebsd, which I hope to tackle that next week.

I tell you though, I really love mysql, it's so easy to use, and configure.
mysql just works. mysql's performance on a table I have that has roughly
250,000 rows of address entries, beats our as/400 with db2 by orders of
magnitude  and  mytest box is a  Celeron 300.

Anyway, this is where I found the solution to the gibberish line that I put
in my doc (see step 3) :
http://www7b.boulder.ibm.com/dmdd/library/techarticle/scott/0614_scott.html

You may find this of help:
http://www.phpbuilder.com/mail/php-db/2001011/0076.php

Oh, did you call your instance db2inst1?



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




[PHP] Open 10 http connections in parallel

2002-08-08 Thread NoWhErEMan

Hello,

I had to write a script  to open 10 http connections for different links and
get the response from the host.
I do it by fopen each url one by one and save the response to a separated
file. But it slow!
I wonder if i can open 10 connnect (or more) in parallel?

Thanks in advance.
NoWhErEMaN



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




Re: [PHP] DynaPic Class funktion

2002-08-08 Thread Jason Wong

On Friday 09 August 2002 04:13, Sascha Braun wrote:
> Hello,
>
> can somebody explain me, how this class is working and how I can use it?
>
>  //Images Wrapper for thumbs and other stuffs, require GDLib
> //Riccardo Pasquini, 04/04/2001, v0.1
> [EMAIL PROTECTED]

Have you tried asking the author??

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I don't know what Descartes' got,
But booze can do what Kant cannot.
-- Mike Cross
*/


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




Re: [PHP] Re: [PHP-INST] RH7.3 + PHP-4.2.2 : make install -- [install-sapi] Error 1

2002-08-08 Thread Bob Lockie


>- Original Message -
>>From: "Bob Lockie" <[EMAIL PROTECTED]>
>>Sent: Thursday, August 08, 2002 2:20 PM
>>Subject: Re: [PHP-INST] RH7.3 + PHP-4.2.2 : make install -- [install-sapi]
>Error 1
>
>
>> Run 'rm config.cache' and 'make clean' before each compile.
>
>What's the method of getting that into the standard configure script?  It
>seems to cause a lot of trouble, and questions on the list.

I have no idea why any writers of software that use config don't do a make clean and 
rm config.cache first.




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




RE: [PHP] Open 10 http connections in parallel

2002-08-08 Thread Martin Towell

use C and fork()
php (AFAIK) can't do parallel programming

-Original Message-
From: NoWhErEMan [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 12:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Open 10 http connections in parallel 


Hello,

I had to write a script  to open 10 http connections for different links and
get the response from the host.
I do it by fopen each url one by one and save the response to a separated
file. But it slow!
I wonder if i can open 10 connnect (or more) in parallel?

Thanks in advance.
NoWhErEMaN



-- 
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] Please help with array_diff()

2002-08-08 Thread Jason Wong

On Friday 09 August 2002 06:14, Gandalf wrote:

>
> $diff = array_diff($foo[0], $bar[0]);

What does $foo[0] and $bar[0] contain?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Remember that there is an outside world to see and enjoy.
-- Hans Liepmann
*/


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




RE: [PHP] Open 10 http connections in parallel

2002-08-08 Thread Steve Edberg

I've never done this before, but you probably could open these 
connections via a socket, and set them all non-blocking. Presumably 
you'd them have to write a loop that polled all connections to check 
if they'd closed, or time them out after some number of seconds. See

http://php.he.net/manual/en/function.socket-set-blocking.php
and
http://php.he.net/manual/en/ref.network.php


-steve

At 1:28 PM +1000 8/9/02, Martin Towell <[EMAIL PROTECTED]> wrote:
>use C and fork()
>php (AFAIK) can't do parallel programming
>
>-Original Message-
>From: NoWhErEMan [mailto:[EMAIL PROTECTED]]
>Sent: Friday, August 09, 2002 12:58 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Open 10 http connections in parallel
>
>
>Hello,
>
>I had to write a script  to open 10 http connections for different links and
>get the response from the host.
>I do it by fopen each url one by one and save the response to a separated
>file. But it slow!
>I wonder if i can open 10 connnect (or more) in parallel?
>
>Thanks in advance.
>NoWhErEMaN
>

-- 
++
| Steve Edberg  [EMAIL PROTECTED] |
| University of California, Davis  (530)754-9127 |
| Programming/Database/SysAdmin   http://pgfsun.ucdavis.edu/ |
++
| The end to politics as usual:  |
| The Monster Raving Loony Party (http://www.omrlp.com/) |
++

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




[PHP] Problem with selection

2002-08-08 Thread rdkurth

Could somebody look at this and tell me way it is not selecting the
option fields in the $mins variable. I have looking at this all day
and can not figure out what is wrong with it.

";
echo "";
echo $td;
for($i=0; $i<60; $i++) {
if($i<=6) {
echo "$i";
}else{
echo "$i";
if(($i%11)==0)
echo " \n\n $td";
}}
echo "";
?>


-- 
Best regards,
 rdkurth  mailto:[EMAIL PROTECTED]


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




Re: [PHP] Matchmaking site

2002-08-08 Thread Peter J. Schoenster



On 9 Aug 2002 at 0:59, Oficina Digital wrote:

> Hello, I am new to the list and don't know how kind you are helping
> complete beginners in PHP. I intend to set a personals matchmaking site
> for people interested in entheogens (http://singlemates.yage.net) I
> don't know where to begin, I have some PHP cookbooks handy and am
> looking to do it the easy way but have no idea how much work and
> knowledge is needed. What I want is for people to log in (using
> sessions?), post and modify profile with uploading photos and search for
> personals based on location, desired place to live, age, kind of
> relationship, etc. I intend to do it it by steps adding features as my
> php knowledge increase but would appretiate very much some tips and
> hints on where to begin and how to design this project. Some tips on
> where and what I shall learn for this project would be of great help.

Well I think you've made a good first step by asking others.

Iike the idea of a "core". If you cannot create an application that can grow then imho 
you did not do it right. So the idea that you can start with a limited set of features 
and grow 
your application is, imho, a good idea that is possible.

Think. Sketch. Write  don't code anything. Map it out in your mind, your 
imagination and on paper. It just so happens that I'm working on a singles type site; 
it is going to be 
one of those hot or not type sites. I've got the same idea you have. I'll start with 
something that people will find useful and then I'll grow it.

If you were to do it in Perl I could get you started rather quickly as I have an 
architecture for Perl apps but I don't, not yet, for PHP apps. Mind you, I develop in 
a virtual 
environment and so I cannot use a lot of established archtitectures which requires 
more than one usually gets on a virtual server.

Anyhow, think of the core of who your audience is and what they will do.

Audience

People
will
register
login
logout
change preferences
set preferences
upload image(s)

People
have
name
age
preferences

etc. ... build up a data model here. Just think of them and what they will do and what 
you will need to know about them for them to do those things.

I'm just thinking of the top of my head here.

BY ALL MEANS do not re-write something someone else already wrote. Look into using 
modules from Pear and look for modules you can find here:

http://pear.php.net/

Oh heck, I was looking in my bookmarks to recommend some links and I found this:

http://www.cyber.com.au/users/clancy/phplib.html

I need to read that myself. The are saying the right thing here.

Lots of classes at this site:

http://www.phpclasses.org/mirrors.html?page=%2Findex.html

At least read, just read so later, in a few years perhaps, you will have only yourself 
to blame when you go back to code that was written on the wind:

http://pear.php.net/manual/en/standards.php


Whatever you do, don't just start coding. I'm working on someone else's PHP 
application right now. Files everywhere, tricks used to source differen files, I think 
the original 
programmer (seems that at least 2 had a hand in it) just gave up. I've refused to work 
on some old stuff I wrote. Better to re-write it I said. Not so much a rewrite as a 
reorganize. If 
you spend time thinking how to organize your code in the beginning you will find that 
growing your app will be a pleasure rather than a nightmare.


Peter

http://www.coremodules.com/
Web Development and Support  at Affordable Prices
901-757-8322[EMAIL PROTECTED]




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




[PHP] RE: Open 10 http connections in parallel

2002-08-08 Thread Philip Hallstrom

What about the PCNTL functions?

http://www.php.net/manual/en/ref.pcntl.php

I haven't used them, but there's a fork function in there...

On Fri, 9 Aug 2002, Martin Towell wrote:

> use C and fork()
> php (AFAIK) can't do parallel programming
>
> -Original Message-
> From: NoWhErEMan [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 12:58 PM
> To: [EMAIL PROTECTED]
> Subject:  Open 10 http connections in parallel
>
>
> Hello,
>
> I had to write a script  to open 10 http connections for different links and
> get the response from the host.
> I do it by fopen each url one by one and save the response to a separated
> file. But it slow!
> I wonder if i can open 10 connnect (or more) in parallel?
>
> Thanks in advance.
> NoWhErEMaN
>
>
>
> --
> 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: FILEMTIME

2002-08-08 Thread Lars Olsson

Mike Zagorski wrote:
> Hello,
> 
> I amusing the following PHP code.. but I want to make it so that it also displays 
>the time in 24 hr mode and the time is +3600 seconds. (1 hour)
> 
>  $last_modified = filemtime("about.php");
> print("Last Updated ");
> print(date("m/j/Y", $last_modified));
> ?>
> 
> How can I do this?
> 
> Thanks
> 
> Mike
> 

Check out http://www.php.net/gmdate (for the timezone offset) and 
http://www.php.net/date (for the date formatting).

/lasso ([EMAIL PROTECTED])


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




[PHP] Re: PHP multipart form data

2002-08-08 Thread Lars Olsson

Mike Dunlop wrote:
> hello,
> 
> i have php 4.2.2 compiled with --enable-ftp running (as a module in 
> apache under red-hat 6.2) and I can not get file uploads through a web 
> page to work!?!?
> 
> The form variable $userfile (which is the file input name) is returning 
> false;
> 
> Any ideas how to troubleshoot this?
> 

Check your php.ini. Look for register_globals. Check if this is set to 
off (which is the default for 4.2.2). If it's off, you need to use 
$_GET['userfile'], $_POST['userfile'] or $_FILES['userfile'] (depending 
on the METHOD and ENCODING attributes of the  tag. This has been 
discussed numerous times on the list, so you shouldn't have any trouble 
finding more info about it...

This is a good starting point in the manual:
http://www.php.net/manual/en/language.variables.predefined.php

Kindly

/lasso ([EMAIL PROTECTED])


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




[PHP] posting news via php - 535 error

2002-08-08 Thread andy

Hi there,

I am trying to write a script which is posting news to a newsserver.
Unfortunatelly I do get a 535 error back which is not reported in:
http://www.faqs.org/rfcs/rfc977.html Section 3.10.2

Maybe someone of you guys has a clue of an idea what is going wrong.
connecting works, so I did not include the connect code. The code for
posting is underneath.

Thanx for any help on that.

Andy


$cfgServer= "news.php.net";
$cfgNewsGroup= "php.general";
$subject='Test';
$header='
 Newsgroups: '.$cfgNewsGroup.'
 Path: '.$cfgServer.'
 Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
 Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
 From: [EMAIL PROTECTED] (Jerry Schwarz)
 Subject: '.$subject.'
 Message-ID: <[EMAIL PROTECTED]>
 Date: Friday, 10-Aug-2002 16:14:55 EST
 Followup-To: '.$cfgNewsGroup.'
 Expires: Saturday, 1-Jan-2003 00:00:00 EST
 Date-Received: Friday, 10-Aug-2002 16:59:30 EST
 Organization: Bell Labs, Murray Hill
';

$body='\n
This is a test.
';

$message=$header.$body;

$put = fputs($usenet_handle, "POST $message\n");

echo $put;




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




[PHP] anyone can help?

2002-08-08 Thread ::: Flavio Bastos Amiel::::::>

this is not functional and i dont know why, this is stoping where if
(!$accion) is, and the wuery if you run in into the sql is
perfectREQUIRE('conexion.php');

$accion=mysql_query("SELECT * FROM empresas");

IF (!$accion); {

echo  "no se puede ver la solicitud";

}

?>



  
  $empresas";  } } ?>





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




RE: [PHP] anyone can help?

2002-08-08 Thread Martin Towell

you've got a ";" after the if

IF (!$accion); {

should be

IF (!$accion) {


-Original Message-
From: ::: Flavio Bastos Amiel::> [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002 4:34 PM
To: [EMAIL PROTECTED]
Subject: [PHP] anyone can help?


this is not functional and i dont know why, this is stoping where if
(!$accion) is, and the wuery if you run in into the sql is
perfectREQUIRE('conexion.php');

$accion=mysql_query("SELECT * FROM empresas");

IF (!$accion); {

echo  "no se puede ver la solicitud";

}

?>



  
  $empresas";  } } ?>





-- 
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] anyone can help?

2002-08-08 Thread ::: Flavio Bastos Amiel::::::>

i didnt notice that, but is the same thing, is not working :( thanks for the
fasta answer

"Martin Towell" <[EMAIL PROTECTED]> wrote in message
6416776FCC55D511BC4E0090274EFEF5034CFC9A@EXCHANGE">news:6416776FCC55D511BC4E0090274EFEF5034CFC9A@EXCHANGE...
> you've got a ";" after the if
>
> IF (!$accion); {
>
> should be
>
> IF (!$accion) {
>
>
> -Original Message-
> From: ::: Flavio Bastos Amiel::> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 09, 2002 4:34 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] anyone can help?
>
>
> this is not functional and i dont know why, this is stoping where if
> (!$accion) is, and the wuery if you run in into the sql is
> perfectREQUIRE('conexion.php');
>
> $accion=mysql_query("SELECT * FROM empresas");
>
> IF (!$accion); {
>
> echo  "no se puede ver la solicitud";
>
> }
>
> ?>
>
>
> 
>   
>IF ($accion) {
> WHILE ($r = mysql_fetch_array($accion)){
> extract($r);
> $empresas = nl2br($empresas);
>
> echo "$empresas";  } } ?>
> 
>
>
>
>
> --
> 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] now is working, but itsn't...

2002-08-08 Thread ::: Flavio Bastos Amiel::::::>

now is working, but itsn't doing the while, here's the new code



no se puede ver la solicitud";

}

?>



  seleccione
  
 






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




[PHP] Re: now is working, but itsn't...

2002-08-08 Thread ::: Flavio Bastos Amiel::::::>

im off, this is to easy, and i am sleepy! thanks for the help in time of
zombies.

THE REAL CODE! (IM SO FUCKING DUMB!)

no se puede ver la solicitud";

}

?>



  
  
 






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




Re: [PHP] posting news via php - 535 error

2002-08-08 Thread Latex Master

Hello andy,
Try to put a "." when you finished at the new line. And use utf7
encoding.

Friday, August 9, 2002, 10:11:44 AM, you wrote:

a> Hi there,

a> I am trying to write a script which is posting news to a newsserver.
a> Unfortunatelly I do get a 535 error back which is not reported in:
a> http://www.faqs.org/rfcs/rfc977.html Section 3.10.2

a> Maybe someone of you guys has a clue of an idea what is going wrong.
a> connecting works, so I did not include the connect code. The code for
a> posting is underneath.

a> Thanx for any help on that.

a> Andy


a> $cfgServer= "news.php.net";
a> $cfgNewsGroup= "php.general";
a> $subject='Test';
a> $header='
a>  Newsgroups: '.$cfgNewsGroup.'
a>  Path: '.$cfgServer.'
a>  Relay-Version: version B 2.10 2/13/83; site cbosgd.UUCP
a>  Posting-Version: version B 2.10 2/13/83; site eagle.UUCP
a>  From: [EMAIL PROTECTED] (Jerry Schwarz)
a>  Subject: '.$subject.'
a>  Message-ID: <[EMAIL PROTECTED]>
a>  Date: Friday, 10-Aug-2002 16:14:55 EST
a>  Followup-To: '.$cfgNewsGroup.'
a>  Expires: Saturday, 1-Jan-2003 00:00:00 EST
a>  Date-Received: Friday, 10-Aug-2002 16:59:30 EST
a>  Organization: Bell Labs, Murray Hill
a> ';

a> $body='\n
a> This is a test.
a> ';

a> $message=$header.$body;

a> $put = fputs($usenet_handle, "POST $message\n");

a> echo $put;






-- 
Best regards,
 Latexmailto:[EMAIL PROTECTED]


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