Re: [PHP] Config Problems

2001-12-22 Thread Ben Ocean

None of these suggestions worked. So...what's wrong with this config script 
that it throws these errors?

configure: error: Cannot find OpenSSL's 
/usr/local/bin/config_php: --with-kerberos=/usr/krb5-1.2.2: No such file or 
directory
/usr/local/bin/config_php: --with-ldap=/usr/local/openldap-2.0.18: No such 
file or directory

Here's my config script:

#!/bin/sh
cd /usr/local/php
./configure --with-apache=/usr/src/redhat/SOURCES/apache \
--with-openssl=/usr/include/openssl \
--with-kerberos=/usr/krb/ \
--with-imap-ssl=/usr/include/openssl \
--with-ldap=/usr/local/openldap/ \
--with-mysql=/usr/local/mysql
exit 0


At 12:07 AM 12/22/01 -0500, you wrote:
>* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 00:01]:
>
> > Hi;
>
>Howdy.
>
> > I'm installing php from source and I've run into these config errors:
>
>[...]
>
> > Here's my config script:
>
> > #!/bin/sh
> > cd /usr/local/php
> > ./configure --with-apache=/usr/src/redhat/SOURCES/apache \
> > --with-openssl=/usr/share/doc/openssl \
>
>Try --with-openssl=/usr or --with-openssl=/usr/local
>
> > --with-kerberos=/usr/krb/ \
>
>Try --with-kerberos=/usr
>
> > --with-imap-ssl=/usr/share/doc/openssl \
>
>--with-imap-ssl=/usr or --with-openssl=/usr/local
>
> > --with-ldap=/usr/local/openldap/ \
>
>Probably --with-ldap=/usr here
>
> > --with-mysql=/usr/local/mysql
>
>--with-mysql=/usr/local
>
> > exit 0
>
> > I've also tried the *openssl* part pointing to /usr/include/openssl which
> > is where evp.h lives. Why these bizarre errors when the pointers point to
>
>For that, =/usr is probably what you want. It just wants to base path
>usually; it should know to look in include.
>
>--
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>All civilizations become either spacefaring or extinct.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




[PHP] Re: spliti

2001-12-22 Thread George Nicolae

$word=exlode(" ",$line);

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Yamin Prabudy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> hi guys,
> I need help here.
> I got this
> $line = "no more words to say";
>
> then I want to split them all I used
>
> spliti(" ",$line);
>
> Then want to print it out say
> echo $word[0] $word[1] $word[$i];
>
> how can I do this..
>
> Thanks in Advance



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




[PHP] might be serious .. might be not ...

2001-12-22 Thread nOop


A post I found on a forum, maybe this thing is worth reading ... there are 2
parts from this same guy ... read below ...




This might be long but shows something I must have missed ... and I'm sure
the solution is simple

On a Plesk intel sys I am having this serious problem that might affect any
form posting page (years back this was a classic DOS attack but Apache has
patched this ages ago )

---

Simple php script that does simple select * from (page is a total of 30k so
needs couple of seconds loading). A Form on that page submits on itself.
Pressing regularly the Submit button acts as usual (page returns ok). You
can see the rest ... banging like crasy on that Submit creates a fifo Mysql
Sleep queue and blocks connections with apache .

*** Now wait .. dont answer yet this is tougher than that ***

_pconnect or _connect have the same effect

I placed php non persistent .. the same

Apache keep_alive=Off .. the same

Mysqld variables wait_timeout was reduced (I saw the sleep status by
mysqladmin, and the growing sleep threads). After this timeout the sleep
threads were killed but ressources not freed. Same thig with wait_timeout.

So I got serious ... netstat shows that on every mysql sleep a socket was
opened with the script (thats just the way it should be since a child forks
on the page) but the child stays at TIME_WAIT or some ACK state. Seems as if
apache cant detect closed socket from client (pipe sig or whatever)

* mysqld restart WONT free the connections (it's apache's fault)
* httpd restart does the trick since all blocking children are killed and
the browser behaves as usual (reproducing every time the stuff above)
* mod_throttle also does the trick since I limit to 1 Concurrent
connection.. but that sux

I have been on this for 14 hours now without coffee or sweets , so please
someone tell me the one and only line i have to place in a config file to
resolve this mess

thanx



Configs are :

php 4.0.6 (basic Plesk install)

Apache 1.3.19 (Plesk install)
mod_perl, mod_throttle, mod_php4, mod_frontpage, mod_ssl, mod_setenvif,
mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires,
mod_cern_meta, mod_proxy, mod_digest, mod_auth_dbm, mod_auth_anon, mod_auth,
mod_access, mod_rewrite, mod_alias, mod_userdir, mod_speling, mod_actions,
mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info,
mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_config,
mod_define, mod_env, mod_vhost_alias, http_core

Mysql 3.23.36




The second post :





I ripped inside out that script and got out of it what follows for people
who want to know :


the _connect is done in an include file, look at the snip here :

**
include();
mysql_query();
print(); // 16k long

The blocking happens with the above

**

When I make the _connect inside the same script file (without include() ), I
NO longer get the apache blocking but my TCP stack continues growing with
CLOSE_WAIT sockets (one for each reload)... totaly nuts since it's the same
thing as before but mysql does no longer queue sleep threads .. this is
outerspace...


BETTER :
when i reduce that print() of 16k to less (like 1 k)
I NO longer get socket CLOSE_WAITS and all works ok

What it means to me :

Under mod_php if all buffer flushes have not been done before a die()
(another reload) and another apache fork is made (or child select()),
ressources are NOT freed. To make sure of this I placed a
mysql_close();sleep(2) just before the long print().
mod_php had then the time to close much more sockets than if I left the
sleep(2) out.. but still some CLOSE_WAITS were maid.

All this was on IE and Netscape. The problem is as you said, If I get a DOS
attack my comp will die, even worse If I have huge hits since TCP stack will
reach MaxClients and apache will refuse connect().

That's it




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




[PHP] Does mail() can be used to send attachments?

2001-12-22 Thread Dasmeet Singh Arora

Is it possible to send attachments using mail() command? If yes then how
is it done.
Thanks for any help.





 
-- 
http://www.pluginjokes.com
Add FREE Dynamic Jokes To Your Site!

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




[PHP] Re: Email files as attachments

2001-12-22 Thread George Nicolae

look at http://phpmailer.sourceforge.net for a useful class.

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Andrew V. Romero" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I was wondering if it is possible to attach a file using the php mailing
>
> functions?  I currently am using
> mail("[EMAIL PROTECTED]","My email subject Line",$emailMessage,
> "From: [EMAIL PROTECTED]\nReply-To: [EMAIL PROTECTED]\nX-Mailer: PHP/" .
> phpversion());
> to email simple messages, but I haven't run across a way to attach a
> file to it.
> Thanks for any information,
> Andrew V. Romero
>



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




Re: [PHP] SSI

2001-12-22 Thread Philip Olson

Things you can do:

 a) rewrite SSI as PHP
 b) rewrite SSI as PHP
 c) try using virtual()
 d) include them via http, like with file() or include() or fopen()

(a) and (b) are preferred, (c) will work as will (d) and most likely [e-z] 
:)  Also, search through the archives for other advice on the matter:

 http://marc.theaimsgroup.com/?l=php-general&s=SSI

Essentially you can't mingle SSI/PHP code in one file as the web server
wants to parse a given extension as, in this case, PHP.  PHP can do
anything SSI can do, and then a great deal more.

Read about predefined variables and include() in php manual too.

Regards,
Philip Olson


On Fri, 21 Dec 2001 [EMAIL PROTECTED] wrote:

> if you have a PHP page and you want to use SSI in it... is there a special
> method?
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


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




Re: [PHP] Does mail() can be used to send attachments?

2001-12-22 Thread Philip Olson

see:

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

a link to a tutorial/rfc exists there.  also, check the various script
archives for mail packages, most allow for attatchments.

regards,
Philip Olson

On 22 Dec 2001, Dasmeet Singh Arora wrote:

> Is it possible to send attachments using mail() command? If yes then how
> is it done.
> Thanks for any help.
> 
> 
> 
> 
> 
>  
> -- 
> http://www.pluginjokes.com
> Add FREE Dynamic Jokes To Your Site!
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


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




[PHP] Re: Does mail() can be used to send attachments?

2001-12-22 Thread George Nicolae

look at http://phpmailer.sourceforge.net for a useful class.

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Dasmeet Singh Arora" <[EMAIL PROTECTED]> wrote in message
1009010971.1987.7.camel@linux">news:1009010971.1987.7.camel@linux...
> Is it possible to send attachments using mail() command? If yes then how
> is it done.
> Thanks for any help.
>
>
>
>
>
>
> --
> http://www.pluginjokes.com
> Add FREE Dynamic Jokes To Your Site!



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




[PHP] php pop3 checker

2001-12-22 Thread M.E. Suliman

Hi

I need to create a way for users to a site to check existing POP3 mail
accounts, and fulfill all the regular webmail functions.  Anyone know how if
there are anywhere I could look for a start.  I would prefer if it is in
PHP.

Thanks in advance

Mohamed







Re: [PHP] php pop3 checker

2001-12-22 Thread Bogdan Stancescu

Check these out:
http://www.horde.org/imp/
http://twig.screwdriver.net/

Also, make sure you search Google for security problems on them - I think IMP
used to have some, but they seem to have fixed them since.

"M.E. Suliman" wrote:

> Hi
>
> I need to create a way for users to a site to check existing POP3 mail
> accounts, and fulfill all the regular webmail functions.  Anyone know how if
> there are anywhere I could look for a start.  I would prefer if it is in
> PHP.
>
> Thanks in advance
>
> Mohamed


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




[PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Michael Jurgens

Hi,

As you all may know, this is how you set an optional second argument, that
defaults to acidophilus

function makeyogurt ($flavour, $type = "acidophilus")
{ }

I'm now looking for a way to have the second (optional) argument be an array
of strings. I can't get it to work though...

In pseudo-code:

function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
{ }

Any help would be much appreciated,
Michael



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




Re: [PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Bogdan Stancescu

Can't test it now, but have you tried

function makeyogurt ($flavour, $type = list())

I assume you need it to be an array because you want to either walk it or, more
likely, perform an in_array() test on it and you found that passing non-array
variables to in_array issues an error. If initializing as an array doesn't work
you can always do this:

function makeyogurt ($flavour, $type = "") {
  while ((is_array($type)) && (list($key,$val)=each($type)))
  {
[loop]
  }
}

or this:

function makeyogurt ($flavour, $type = "") {
  if ((is_array($type)) && (in_array("strawberry_yoghurt",$type)))
  {
[loop]
  }
}

or use the stone-age method:

function makeyogurt ($flavour, $type = "") {
  if (@in_array("strawberry_yoghurt",$type))
  {
[loop]
  }
}

Bogdan

Michael Jurgens wrote:

> Hi,
>
> As you all may know, this is how you set an optional second argument, that
> defaults to acidophilus
>
> function makeyogurt ($flavour, $type = "acidophilus")
> { }
>
> I'm now looking for a way to have the second (optional) argument be an array
> of strings. I can't get it to work though...
>
> In pseudo-code:
>
> function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
> { }
>
> Any help would be much appreciated,
> Michael
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] php pop3 checker

2001-12-22 Thread Michael Jurgens

Or try Popper, a nice standard webmail solution written in PHP.
It must be on freshmeat.net

Michael

"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Check these out:
> http://www.horde.org/imp/
> http://twig.screwdriver.net/
>
> Also, make sure you search Google for security problems on them - I think
IMP
> used to have some, but they seem to have fixed them since.
>
> "M.E. Suliman" wrote:
>
> > Hi
> >
> > I need to create a way for users to a site to check existing POP3 mail
> > accounts, and fulfill all the regular webmail functions.  Anyone know
how if
> > there are anywhere I could look for a start.  I would prefer if it is in
> > PHP.
> >
> > Thanks in advance
> >
> > Mohamed
>



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




[PHP] Re: spliti[SOLUTION]

2001-12-22 Thread Bharath Bhushan Lohray



Tested and works



php-general Digest 22 Dec 2001 12:52:57 -0000 Issue 1067

2001-12-22 Thread php-general-digest-help


php-general Digest 22 Dec 2001 12:52:57 - Issue 1067

Topics (messages 78533 through 78562):

spliti
78533 by: Yamin Prabudy
78534 by: Brian Clark
78550 by: George Nicolae

oscommerce / Exchange project
78535 by: Daniel Guerrier
78537 by: Kurt Lieber

Config Problems
78536 by: Ben Ocean
78538 by: Brian Clark
78539 by: Brian Clark
78549 by: Ben Ocean

session class
78540 by: Christian Haines
78541 by: Yasuo Ohgaki

Ensuring that Form is only submitted once (session vars?)
78542 by: Andrew V. Romero
78547 by: Steven Cayford

Email files as attachments
78543 by: Andrew V. Romero
78553 by: George Nicolae

Re: web server crashing with either 4.1.0 or 4.0.6
78544 by: Yasuo Ohgaki

Re: Limit script memory usage !!
78545 by: Yasuo Ohgaki

"Talkback" or community type participation.
78546 by: Deron

./configure error. won't let me continue...
78548 by: Joelmon2001.aol.com

might be serious .. might be not ...
78551 by: nOop

Does mail() can be used to send attachments?
78552 by: Dasmeet Singh Arora
78555 by: Philip Olson
78556 by: George Nicolae

Re: SSI
78554 by: Philip Olson

php pop3 checker
78557 by: M.E. Suliman
78558 by: Bogdan Stancescu
78561 by: Michael Jurgens

Function definition: how to make default argument an empty array?
78559 by: Michael Jurgens
78560 by: Bogdan Stancescu

Re: spliti[SOLUTION]
78562 by: Bharath Bhushan Lohray

Administrivia:

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

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

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


--

--- Begin Message ---

hi guys,
I need help here.
I got this 
$line = "no more words to say";

then I want to split them all I used 

spliti(" ",$line);

Then want to print it out say
echo $word[0] $word[1] $word[$i];

how can I do this..

Thanks in Advance

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

* Yamin Prabudy ([EMAIL PROTECTED]) [Dec 21. 2001 23:17]:

> $line = "no more words to say";

> then I want to split them all I used 

> spliti(" ",$line);

http://www.php.net/explode

> Then want to print it out say
> echo $word[0] $word[1] $word[$i];

http://www.php.net/foreach

or 3.x, use a while() with:

http://www.php.net/list
http://www.php.net/each

> how can I do this..

> Thanks in Advance

HTH.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
It's been lovely, but I have to scream now.


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

$word=exlode(" ",$line);

--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Yamin Prabudy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> hi guys,
> I need help here.
> I got this
> $line = "no more words to say";
>
> then I want to split them all I used
>
> spliti(" ",$line);
>
> Then want to print it out say
> echo $word[0] $word[1] $word[$i];
>
> how can I do this..
>
> Thanks in Advance



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

Does anyone have any experience using this thing.
I installed it and it seems to work, but it's very
buggy.

After the first hit the left nav, footer no longer
appear.  I know this a bad description of the problem
but there's no rhyme nor reason to this.

__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

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

On Friday 21 December 2001 08:56 pm, Daniel Guerrier wrote:
> Does anyone have any experience using this thing.
> I installed it and it seems to work, but it's very
> buggy.

Yes, I've used it fairly extensively.  I haven't found it to be nearly as 
buggy as your message implies.  It's not perfect, but it's certainly bug-free 
enough to use on the two live shops I'm running.

> After the first hit the left nav, footer no longer
> appear.  I know this a bad description of the problem
> but there's no rhyme nor reason to this.

I'm guessing you have a config error or something else munged up with your 
PHP installation and/or TEP config file.  TEP is fussy about a few php.ini 
options, such as session_autostart and magic quotes.

Have you tried posting a message to the TEP-GENERAL list?  It's probably a 
better resource for TEP-specific questions.

--kurt

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

Hi;
I'm installing php from source and I've run into these config errors:

configure: error: Cannot find OpenSSL's 
/usr/local/bin/config_php: --with-kerberos=/usr/krb5-1.2.2: No such file or 
directory
/usr/local/bin/config_php: --with-ldap=/usr/local/openldap-2.0.18: No such 
file or directory

Here's my config scrip

Re: [PHP] PostgreSQL query taking a long time

2001-12-22 Thread Papp Gyozo

use EXPLAIN to get more information about how postgres executes this query.
I'm not sure about this, but there are some issues with fields of type int8.
It may help to cast explicitly the fields involved in join like:

 WHERE bible.book::int4 = books.id::int4

Ask it the postgres mailing list, too!
btw, what version of pg do you have?

- Original Message - 
From: "K Old" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 5:51 PM
Subject: [PHP] PostgreSQL query taking a long time


| Hello all,
| 
| I have a PostgreSQL database that is storing The Bible.  It has 31,103 
| records in it and I have a PHP page executing this query:
| SELECT
| books.book_name, bible.chapter, bible.verse, bible.versetext
| FROM asv_bible bible, book_bible books WHERE bible.book = books.id ORDER BY 
| random() LIMIT 1
| 
| The database schema is:
| 
| /* 
|   Sequences
|  */
| CREATE SEQUENCE "book_bible_seq" start 1 increment 1 maxvalue 2147483647 
| minvalue 1 cache 1;
| 
| /* 
|   Table structure for table "asv_bible"
|  */
| CREATE TABLE "asv_bible" (
|"id" int8 NOT NULL,
|"book" int8,
|"chapter" int8,
|"verse" int8,
|"versetext" text,
|CONSTRAINT "asv_bible_pkey" PRIMARY KEY ("id")
| );
| 
| 
| 
| /* 
|   Table structure for table "book_bible"
|  */
| CREATE TABLE "book_bible" (
|"id" int4 DEFAULT nextval('book_bible_seq'::text) NOT NULL,
|"book_name" varchar(20),
|CONSTRAINT "book_bible_pkey" PRIMARY KEY ("id")
| );
| 
| Right now it takes 9 seconds to return the results.  I was wondering if 
| anyone could offer any help with lowering the time it takes to run?
| 
| Or if this is the normal runtime for a database of this size, I'd just like 
| confirmation.
| 
| Thanks,
| Kevin
| 
| 
| _
| Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
| 
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
| 



Re: [PHP] array_walk() + class methods

2001-12-22 Thread Jeff Levy

Much obliged, that did the trick.

On Fri, 21 Dec 2001 05:48:31 -0500, Papp Gyozo wrote:

> array_walk($ar, array(&$object, 'methodname'));
> 
> - Original Message -
> From: "Jeff Levy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 13, 2001 1:17 PM Subject: [PHP] array_walk() +
> class methods
> 
> 
> | I'd like to call a class method with array_walk(). Is this possible? |
> | class widget {
> |   function sicballs($arg){
> | print $arg;
> |   }
> | }
> |
> | $x = new widget();
> |
> | $ar = array('my','values');
> |
> | array_walk($ar, ???)
> |
> | ...
> |
> | the only way I've been able to get this (simplified) code to work the
> way | I want it is:
> |
> | function snafu($arg) {
> |   global $x;
> |   call_user_method("sicballs", $x, $arg); | } |
> | obviously, I want to call the method direcly, without writing this |
> function, snafu()...
> |
> | anyone know?
> |
> | --
> | PHP General Mailing List (http://www.php.net/) | To unsubscribe,
> e-mail: [EMAIL PROTECTED] | For additional commands,
> e-mail: [EMAIL PROTECTED] | To contact the list
> administrators, e-mail: [EMAIL PROTECTED] |
>

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




[PHP] Help with select boxes

2001-12-22 Thread Sam

Hi all, 

I've a problem which I don't know how to get over, think it could more be an
HTML problem, but anyway.

I've a select box with long options names, this makes the box appear huge on
screen.
I was wondering how I can change the size of the box, so that when the user
clicks on the drop down, the options expand outwards.

Is this possible?


Thanks
Sam

Also I'm only on the digest so could you reply to me as well, cheers.



Re: [PHP] Config Problems

2001-12-22 Thread Brian Clark

* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 03:22]:

> None of these suggestions worked. So...what's wrong with this config script 
> that it throws these errors?

This may make no difference what so ever, but try removing config.cache,
then use my suggestions and see if you get a different result.

(No need to CC me this time)

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
English is my second language, gibberish is my first.


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




[PHP] PGP --> PHP

2001-12-22 Thread J.Mueller, pro.vider.de GmbH

Hello Everybody,

we have a problem to implement a PGP-function into
a PHP-Script. PHP 4.0.6 as CGI, Apache 1.3.11, FeeBSD 4.2

a)
PGP from the command line works:
% pgps -ato test.sig test.txt -z passphrase

b)
Calling a little PHP Script
$kommando  = "/usr/local/bin/pgps -ato test.sig test.txt -z passphrase";
exec("$kommando",$antwort);

to do so, also everything works fine:

  % virtual /usr/local/bin/php /etc/test-pgp.php
  Creating output file test.sig
  X-Powered-By: PHP/4.0.6
  Content-type: text/html

c)
But when we use this very same PHP-code within a script, and call this
script through the web, it's not working anymore and the error_log
says

  Cannot open configuration file pgp.cfg
  Cannot open secret keyring "secring.skr"
  Cannot open public keyring "pubring.pkr"


Why is that and can this problem be solved ?

Thank you very much.
Juergen




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




[PHP] Premature EOS Header

2001-12-22 Thread Anthony F. Rodriguez

When I call the following script, I get "Premature End of Script Header". Why?

  
  TEST
  
  
  ";
};

@mysql_free_result($result_1);
@mysql_close($connection);
exit;
?>

Thanks!

Anthony F. Rodriguez
([EMAIL PROTECTED])




[PHP] Php & Directory structures

2001-12-22 Thread Martin Hughes

Heya,

Can PHP count the number of a certain ftile in a directory and then print
the result to the screen? I have articles on my site that are in XML/XSL
format like:

root/articles/00_head.xml
00_body.xml
01_head.xml
01_body.xml
02_head.xml
02_body.xml
etc... (with appropriate XSL stylesheets too...)

and I want to have a main "article page" with the head.xml info on it:

Article 00:
By: 
Date: 
Subject: 

and then a link to the article itself (which will be an XSL stylesheet
loading both the header info and the article body.xml).

Can php count the number of articles etc in the dir and then automatically
create the page? (or can anyone think of a better way of doing this :-))

Cheers,

Martin



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




Re: [PHP] Php & Directory structures

2001-12-22 Thread Bogdan Stancescu

Just a suggestion: use exec("ls -1 root/articles/??_head.xml",$article_files) to
find out the files -- then walk $article_files, parse the file and echo whatever
you please. :-)

Bogdan

Martin Hughes wrote:

> Heya,
>
> Can PHP count the number of a certain ftile in a directory and then print
> the result to the screen? I have articles on my site that are in XML/XSL
> format like:
>
> root/articles/00_head.xml
> 00_body.xml
> 01_head.xml
> 01_body.xml
> 02_head.xml
> 02_body.xml
> etc... (with appropriate XSL stylesheets too...)
>
> and I want to have a main "article page" with the head.xml info on it:
>
> Article 00:
> By: 
> Date: 
> Subject: 
>
> and then a link to the article itself (which will be an XSL stylesheet
> loading both the header info and the article body.xml).
>
> Can php count the number of articles etc in the dir and then automatically
> create the page? (or can anyone think of a better way of doing this :-))
>
> Cheers,
>
> Martin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] Help with select boxes

2001-12-22 Thread Andrew Brampton

I don't think what you want to do is possible..
and it is a HTML problem :)..
Maybe JScript could do it by populating the dropdown once you click it, but
I don't know if thats possible...

Andrew
- Original Message -
From: "Sam" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 22, 2001 1:42 PM
Subject: [PHP] Help with select boxes


> Hi all,
>
> I've a problem which I don't know how to get over, think it could more be
an
> HTML problem, but anyway.
>
> I've a select box with long options names, this makes the box appear huge
on
> screen.
> I was wondering how I can change the size of the box, so that when the
user
> clicks on the drop down, the options expand outwards.
>
> Is this possible?
>
>
> Thanks
> Sam
>
> Also I'm only on the digest so could you reply to me as well, cheers.
>


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




Re: [PHP] Config Problems

2001-12-22 Thread Ben Ocean

Well, that got me headed in the right direction. I ended up combining all 
the commands on one line and removing the references to openssl (I'll mess 
with that later) and it worked. I have no_idea why...
Thanks,
BenO

At 09:03 AM 12/22/01 -0500, you wrote:
>* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 03:22]:
>
> > None of these suggestions worked. So...what's wrong with this config 
> script
> > that it throws these errors?
>
>This may make no difference what so ever, but try removing config.cache,
>then use my suggestions and see if you get a different result.
>
>(No need to CC me this time)
>
>--
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>English is my second language, gibberish is my first.
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




Re: [PHP] Config Problems

2001-12-22 Thread Brian Clark

* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 11:54]:

> Well, that got me headed in the right direction. I ended up combining all 
> the commands on one line and removing the references to openssl (I'll mess 
> with that later) and it worked. I have no_idea why...

If you installed openssl from something like an rpm or deb package, you
may need to get the -dev version which contains all the libraries
configure is looking for. You may only have the shared libraries and
configure is looking for the header files, etc. If you install those,
configure might properly pick up openssl.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
$ mount -t neuro /dev/brain /mnt/head


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




Re: [PHP] Config Problems

2001-12-22 Thread Ben Ocean

At 12:24 PM 12/22/01 -0500, you wrote:
>* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 11:54]:
>
> > Well, that got me headed in the right direction. I ended up combining all
> > the commands on one line and removing the references to openssl (I'll mess
> > with that later) and it worked. I have no_idea why...
>
>If you installed openssl from something like an rpm or deb package, you
>may need to get the -dev version which contains all the libraries
>configure is looking for. You may only have the shared libraries and
>configure is looking for the header files, etc. If you install those,
>configure might properly pick up openssl.

Yeah, I know. It's not an urgent matter, but I'll probably do with that 
what I'm doing with php and mysql, etc.: rip out the rpms (rpm -e) and 
install from source with my own config files, then symlink openssl-whatever 
openssl. Just so much more control that way :))
Thanks!
BenO


>--
>Brian Clark | Avoiding the general public since 1805!
>Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
>$ mount -t neuro /dev/brain /mnt/head
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]



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




Re: [PHP] ./configure error. won't let me continue...

2001-12-22 Thread Brian Clark

* [EMAIL PROTECTED] ([EMAIL PROTECTED]) [Dec 22. 2001 02:59]:

> Hello. 

Howdy.

>I am trying to 
> ./configure
> and I have many options I want to add. I receive an error which is further 
> below. It comes after I type this endless ./configure which you see below as 
> shown via telnet:

[...]

> ***ERROR IS:***
> configure: error: can only configure for one host and one target at a time 

> What does this mean?

configure can't figure out what kind of machine it is. For example, on
this machine:

(/usr/local/src/php-4.1.0)% /bin/bash config.guess
i686-pc-linux-gnu

What do you get when you run `/bin/bash config.guess` in your php source
directory? (Judging by what you wrote, it'll tell you nothing, but just
try it and see. Make sure you are in the top level of the source directory).

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
It's OK to be paranoid when everyone is out to get you.


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




Re: [PHP] Config Problems

2001-12-22 Thread Brian Clark

* Ben Ocean ([EMAIL PROTECTED]) [Dec 22. 2001 12:38]:

> Yeah, I know. It's not an urgent matter, but I'll probably do with that 
> what I'm doing with php and mysql, etc.: rip out the rpms (rpm -e) and 
> install from source with my own config files, then symlink openssl-whatever 
> openssl. Just so much more control that way :))

Wise choice. :)

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
STATUS QUO is Latin for the mess we're in.


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




Re: [PHP] Php & Directory structures

2001-12-22 Thread George Nicolae

u can use the function

function GetDirArray($sPath)
{
//Load Directory Into Array
$handle=opendir($sPath);
while ($file = readdir($handle)) if(($file!=".")&($file!=".."))
$retVal[(isset($retVal))?count($retVal):0] = $file;
//Clean up and sort
closedir($handle);
sort($retVal);
return $retVal;
}
//and then
count($a=GetDirArray($sPath))


--


Best regards,
George Nicolae
IT Manager
___
X-Playin - Professional Web Design
www.x-playin.f2s.com



"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Just a suggestion: use exec("ls -1
root/articles/??_head.xml",$article_files) to
> find out the files -- then walk $article_files, parse the file and echo
whatever
> you please. :-)
>
> Bogdan
>
> Martin Hughes wrote:
>
> > Heya,
> >
> > Can PHP count the number of a certain ftile in a directory and then
print
> > the result to the screen? I have articles on my site that are in XML/XSL
> > format like:
> >
> > root/articles/00_head.xml
> > 00_body.xml
> > 01_head.xml
> > 01_body.xml
> > 02_head.xml
> > 02_body.xml
> > etc... (with appropriate XSL stylesheets too...)
> >
> > and I want to have a main "article page" with the head.xml info on it:
> >
> > Article 00:
> > By: 
> > Date: 
> > Subject: 
> >
> > and then a link to the article itself (which will be an XSL stylesheet
> > loading both the header info and the article body.xml).
> >
> > Can php count the number of articles etc in the dir and then
automatically
> > create the page? (or can anyone think of a better way of doing this
:-))
> >
> > Cheers,
> >
> > Martin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



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




Re: [PHP] PGP --> PHP

2001-12-22 Thread Brian Clark

* J.Mueller, pro.vider.de GmbH ([EMAIL PROTECTED]) [Dec 22. 2001 10:03]:

> Hello Everybody,

Hiya.

> we have a problem to implement a PGP-function into
> a PHP-Script. PHP 4.0.6 as CGI, Apache 1.3.11, FeeBSD 4.2

> a)
> PGP from the command line works:
> % pgps -ato test.sig test.txt -z passphrase

> b)
> Calling a little PHP Script
> $kommando  = "/usr/local/bin/pgps -ato test.sig test.txt -z passphrase";
> exec("$kommando",$antwort);

> to do so, also everything works fine:

>   % virtual /usr/local/bin/php /etc/test-pgp.php
>   Creating output file test.sig
>   X-Powered-By: PHP/4.0.6
>   Content-type: text/html

> c)
> But when we use this very same PHP-code within a script, and call this
> script through the web, it's not working anymore and the error_log
> says

>   Cannot open configuration file pgp.cfg
>   Cannot open secret keyring "secring.skr"
>   Cannot open public keyring "pubring.pkr"

> Why is that and can this problem be solved ?

This happens because when you run this from the shell, it's picking up 
your environment. Apache has a completely different environment.

You need to create a dummy keyring for Apache's user in the location
this may provide:

Home is: ' .  $effective_user['dir'];
?>


Or you can use putenv() to make apache temporarily use another $HOME 
that has the correct keyrings.

YMMV

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
I think you need to flash your brain's firmware.


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




Re: [PHP] Premature EOS Header

2001-12-22 Thread Brian Clark

* Anthony F. Rodriguez ([EMAIL PROTECTED]) [Dec 22. 2001 10:25]:

> When I call the following script, I get "Premature End of Script Header". Why?
>  if ($password!=$row_2["password"])
> {
>   @mysql_free_result($result_1);
>   @mysql_close($connection);
>   header ("location:dis_3.htm");

It may be because of that ^^^ line. Try this:

header("Location: dis_3.htm");

Or check your server's error_log (which is bound to give you the reason
why).

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Common sense is not.


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




[PHP] PHP software tool

2001-12-22 Thread LaserJetter

Does anybody know of or can recommend any freeware text editing tools for
editing PHP code in Win32?
I can manage with Windows' Notepad but something with code highlighting etc
and of a similar footprint to notepad would be useful.



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




Re: [PHP] PHP software tool

2001-12-22 Thread Cristian Graziano

http://synedit.sourceforge.net
--
Cristian Graziano
Digimax Graphics
Mobile: 206.409.7132
www.digimaxgraphics.com
- Original Message -
From: "LaserJetter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, December 22, 2001 10:46 AM
Subject: [PHP] PHP software tool


> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?
> I can manage with Windows' Notepad but something with code highlighting
etc
> and of a similar footprint to notepad would be useful.
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP] PHP software tool

2001-12-22 Thread Brian Clark

* LaserJetter ([EMAIL PROTECTED]) [Dec 22. 2001 13:49]:

> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?
> I can manage with Windows' Notepad but something with code highlighting etc
> and of a similar footprint to notepad would be useful.

FAQ like you would not believe.




-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
HTML email needs a rant tag.


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




Re: [PHP] PHP software tool

2001-12-22 Thread -BD-

I use 1stpage from evrsoft.com  .. not a "real" php editor, but does a
pretty good job...

> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?
> I can manage with Windows' Notepad but something with code highlighting
etc
> and of a similar footprint to notepad would be useful.



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




RE: [PHP] "Talkback" or community type participation.....

2001-12-22 Thread Warren Vail

Deron,

By doing a Post to itself, this form will cause an error everytime someone
clicks the Back button on the browser (after the first post, of course).

What I do is have two forms, first invoked with a get via hot link or
redirect.

Form_1.php checks to see if variable $s has been passed (in the URL, of
course), if not it initializes and displays the form.  The Form action on
this displayed form indicates to "Post" to Form_2.php.

Form_2.php displays nothing, just processes variables on the form.  This one
would insert the row, and to avoid thread problems (multiple simultaneous
inserts, from multiple users) has a unique "autoincrement" variable as the
primary key to the table (MySQL will make the insert "thread safe").  When
the insert is successful this routine redirects the browser back to form_1
like so;

Header("Location: Form_1.php?s=$insertid");
Exit;

When control is passed to Form_1.php again, this time the variable $s is set
and the row is retrieved from the table (instead of using initialization
values) and displayed in the form giving confirmation of the updates that
were done.

Because Form_2 redirects to Form_1, Form_1 is the only one on the browser
history list(each separate instance is tracked, of course), and it is always
entered via a Get, meaning that the browser does include the passed variable
values in the history list (it doesn't do this with a Post). And the Back
button works.  In the Post error you are working toward, the browser
complains that it does not have a record of the "Post" variable values (the
Data Has Expired).

There may be other ways to deal with this, but this is one way that I have
found that works.

Good Luck,

Warren Vail

-Original Message-
From:   Deron [mailto:[EMAIL PROTECTED]]
Sent:   Friday, December 21, 2001 11:38 PM
To: [EMAIL PROTECTED]
Subject:[PHP] "Talkback" or community type participation.

Hi there!

I have this script I just made based on a tutorial I found online and was
wondering if there was a better way to do this or not. Everything works
great so far except for a couple little things. Once the $submit is clicked
and runs the INSERT data into the table... I am looking to be able to have
the page auto refresh and display the new entry as well as the form again.
Here's my current code: (I have this built into the main review page via an
include. The entire page can be viewed here:

http://www.metalages.com/2002/reviews/reviews-test.php?band=Evergrey&album=I
n%20Search%20of%20Truth

Feel free to post a dummy message, nothing is live yet, all in test mode :)

you'll notice once the entry is submitted also, if you try to refresh the
page it wants to readd the data again. any help or guidance appreciated, I
am a self professed "still learning this stuff"! kinda guy.


Unable to connect to the " .
   "database server at this time." );
 exit();
  }

$sql = "INSERT INTO talkback (band_id, album_id,
talkback_name,talkback_email,talkback_comments) VALUES
('$currentid[0]','$currentid[1]','$talkback_name','$talkback_email','$talkba
ck_comments')";
$result = mysql_query($sql);
echo "Thank you! Information entered.\n";
  } else {

  // display form

?>

  ">
  Name/Nickname:

Email (optional):

Comments:



  


  


Deron
www.metalages.com



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



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




Re: [PHP] PHP software tool

2001-12-22 Thread LaserJetter

Does 1st page work well with PHP? The website says its good for Perl, HTML
and ASP but it doesnt mention PHP anywhere.
:-s



"-Bd-" <[EMAIL PROTECTED]> wrote in message
028901c18b1c$3c0e4d80$[EMAIL PROTECTED]">news:028901c18b1c$3c0e4d80$[EMAIL PROTECTED]...
> I use 1stpage from evrsoft.com  .. not a "real" php editor, but does a
> pretty good job...
>
> > Does anybody know of or can recommend any freeware text editing tools
for
> > editing PHP code in Win32?
> > I can manage with Windows' Notepad but something with code highlighting
> etc
> > and of a similar footprint to notepad would be useful.
>
>



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




Re: [PHP] PHP software tool

2001-12-22 Thread py

It works does fine with PHP, but my favorite is EditPlus,
py

At 07:29 PM 12/22/2001 +, you wrote:
>Does 1st page work well with PHP? The website says its good for Perl, HTML
>and ASP but it doesnt mention PHP anywhere.
>:-s
>
>
>
>"-Bd-" <[EMAIL PROTECTED]> wrote in message
>028901c18b1c$3c0e4d80$[EMAIL PROTECTED]">news:028901c18b1c$3c0e4d80$[EMAIL PROTECTED]...
> > I use 1stpage from evrsoft.com  .. not a "real" php editor, but does a
> > pretty good job...
> >
> > > Does anybody know of or can recommend any freeware text editing tools
>for
> > > editing PHP code in Win32?
> > > I can manage with Windows' Notepad but something with code highlighting
> > etc
> > > and of a similar footprint to notepad would be useful.
> >
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP] gd problem

2001-12-22 Thread Phillip B. Bruce

Hi,

   How can I tell if a web server has gd library load properly. I'm
having problem with
   the imagecreatejpeg as the graphics does not want to come up. The
code is correct.
   As other images that doesn't use this are coming up ok.

--

*** Phillip B. Bruce ***
*** http://pbbruce.home.mindspring.com   ***
*** [EMAIL PROTECTED]   ***
***  ***
*** "Have you ever noticed? Anybody going slower than***
*** you is an idiot, and anyone going faster than you***
*** is a maniac." - George Carlin***





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




Re: [PHP] Function definition: how to make default argument an empty array?

2001-12-22 Thread Michael Sims

At 01:17 PM 12/22/2001 +0100, Michael Jurgens wrote:
>I'm now looking for a way to have the second (optional) argument be an array
>of strings. I can't get it to work though...
>
>In pseudo-code:
>
>function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
>{ }

Does this work?

function makeyogurt ($flavour, $type = "") {

 $type = (array) $type;

 ...
}

or

function makeyogurt ($flavour, $type = "") {

 settype ($type, "array");

 ...
}

??


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




Re: [PHP] Question about CREATE_FUNCTION

2001-12-22 Thread Emile Bosch

since you CAN'T create functions runtime, unles you are using an eval
expression
but that's even slower that create_function..

function bla() {
}

$test = "bla";
$test();

Is not solving the problem since, it doesn't create a function at RUNTIME it
only references a function..
(it references $test to the function pointer blä)

create_function <= Php command

creates a function runtime.
But thanks for all your time anyway!

Warm regards,
Emile


"Bogdan Stancescu" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why do you draw the conclusion you're misunderstood? We are unable to
answer
> your question about speed -- so aren't we allowed to have a separate
discussion
> derrivated from your question?
>
> Bogdan
>
> Emile Bosch wrote:
>
> > thx for al the help but i need some help of a php developer i guess cuz
i am
> > misunderstood here..
>



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




Re: [PHP] Function definition: how to make default argument an emptyarray?

2001-12-22 Thread Philip Olson

> In pseudo-code:
> 
> function makeyogurt ($flavour, $type = 'EMPTY ARRAY')
> { }

  function makeyogurt ($flavour, $type = array()) {
  ...
  }

  or

  function makeyogurt ($flavour, $type = array('a','b')) {
  ...
  }

regards,
Philip Olson


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




Re: [PHP] gd problem

2001-12-22 Thread Brian Clark

* Phillip B. Bruce ([EMAIL PROTECTED]) [Dec 22. 2001 14:47]:

> Hi,

Hi.

>How can I tell if a web server has gd library load properly. I'm
> having problem with
>the imagecreatejpeg as the graphics does not want to come up. The
> code is correct.
>As other images that doesn't use this are coming up ok.

Do this:

% echo '' > /path/to/web/root/foo.php

(of course, change the path to taste)

Then open foo.php in your web browser. Look for the section titled `gd'

That should tell you everything you need to know about gd support in
your build of PHP.

-- 
Brian Clark | Avoiding the general public since 1805!
Fingerprint: 07CE FA37 8DF6 A109 8119 076B B5A2 E5FB E4D0 C7C8
Forget Napster. Why not really break the law?


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




Re: [PHP] Re: spliti[SOLUTION]

2001-12-22 Thread Philip Olson

I missed this thread but:

 a) split takes on regex, explode does not.
 b) spliti is case insensitive, spaces don't have cases.

So, in your example, might as well use explode.

  $words = explode(' ', trim($string));

Although, let's say the following existed (it will):

  $string = 'a b c  d  e f g';

Then using regex might be appropriate, and trim() is always nice.  Let's
split the above string by spaces and basically treat multiple spaces as
one:

  $words = split('[ ]+', trim($string));

Otherwise many empty elements in $words will exist.  This will also make
for a more reliable word count although it won't be perfect.

For examples on posix regex (which is taken on by split), see:

  http://www.phpbuilder.com/columns/dario19990616.php3?print_mode=1

regards,
Philip Olson


On Sat, 22 Dec 2001, Bharath Bhushan Lohray wrote:

>  $line = "no more words to say";
> $word=spliti(" ",$line);
> echo "$word[0] $word[1] $word[3]";
> ?>
> 
> Tested and works
> 


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




[PHP] PEAR E-mail

2001-12-22 Thread Gerard Onorato

Hello All,

I was wondering if anyone could point me towards some good documentation on the PEAR 
e-mail functions. I was unable to turn up anything.

Thanks,

G



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




[PHP] Re: PHP software tool

2001-12-22 Thread Mike

TextPad is another good text editor for all types of programming languages.
Unforuntatly it is not free but the demo my work for you.
http://www.textpad.com

It supports multiple languages like PHP, JAVA and HTML


-Mike

"Laserjetter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Does anybody know of or can recommend any freeware text editing tools for
> editing PHP code in Win32?
> I can manage with Windows' Notepad but something with code highlighting
etc
> and of a similar footprint to notepad would be useful.
>
>



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




[PHP] Image generation scripts

2001-12-22 Thread Step One

Hi there! 

I'm writing some stuff for a non-profit site as voluntary help. Does somebody have any 
PHP image generation scripts (GD) that could be used to "pretty" up a statistics page. 
The produced image should be a chart, pie, bars or something similar that could 
visually represent various statistical information. It would be great if one could 
specify background images etc. 

The image should be a bit more beautiful from the pie chart at 
http://skydiving-org.freeservers.com/stats.htm
A bit more customization and visual attraction would be great. 

Thanks! 
Terry

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




RE: [PHP] PEAR E-mail

2001-12-22 Thread Richard Heyes

> I was wondering if anyone could point me towards some good 
> documentation on the PEAR e-mail functions. I was unable to turn 
> up anything.

http://www.phpguru.org/pear/contents.html

Not complete yet, but better than nothing.

-- 
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams 

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




[PHP] strtoupper and HTML entities

2001-12-22 Thread mweb

Hello,

I know I can convert a string to all uppercases with the strtoupper()
function. However, what if the original string contains HTML entities?

EXAMPLE:

original string = "funkstörung"
contains lowercase o with dieresis (ö)
properly displayed by browsers
after strtoupper becomes:
"FUNKST&OUML;RUNG" which is displayed by browsers
 literally, because capital O with dieresis
 is Ö
The uppercase version correctly displayable in a browser should be:

"FUNKSTÖRUNG

How can I convert to uppercase everything except these entities? Is there a 
straightforward solution, or do I really put together a regex that puts in 
lowercase everything from the second letter after an ampersand to the first 
colon?

Thanks,

mweb


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




[PHP] probably more of a mysql question

2001-12-22 Thread Yoep

Hi,

I am using mysql with PHP.
I have one table called inventory with an index field of:
Inventory_Id int(11) NOT NULL auto_increment

Now I want to create another inventory table, for a different type say
Royal_Inventory where it also has a
Royal_Inventory_Id int(11) NOT NULL auto_increment

However, in my script I want to be able to use the two index fields as one
(in another table) yet differintiate between the two Inventories.
I was thinking if I could make the Royal_Inventory table have one char and
then the auto-increcment value it would be a good solution; like r1 or
r20012121 while inventory (not royal) would have just 1 or 20010210 .

If any of you know how to do this in mysql just send me the line I need :-)
It would be most appreciated.

Thanks,
Yoed




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




[PHP] Re: gd problem

2001-12-22 Thread Yoep

I had a very hard trouble the other week trying to do a fresh installation
of the newest PHP and Apache on the newest Suse (I think 7.3)
with the GD libaries installed!! Everytime it compiled it refused to include
the imagejpeg or imagepng support GD provides.

I ended up just putting the newsest Mandrake that already has the PHP-GD
library rpm for their apache/php build that is defualt on their servers.
I just spent a lot of time on it and thought I would spare you the trouble
if you are indeed using the newest Suse It might also have the same bug
on other installations.

Yoep

"Phillip B. Bruce" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi,
>
>How can I tell if a web server has gd library load properly. I'm
> having problem with
>the imagecreatejpeg as the graphics does not want to come up. The
> code is correct.
>As other images that doesn't use this are coming up ok.
>
> --
> 
> *** Phillip B. Bruce ***
> *** http://pbbruce.home.mindspring.com   ***
> *** [EMAIL PROTECTED]   ***
> ***  ***
> *** "Have you ever noticed? Anybody going slower than***
> *** you is an idiot, and anyone going faster than you***
> *** is a maniac." - George Carlin***
> 
>
>
>



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




[PHP] Re: Image generation scripts

2001-12-22 Thread Yoep

Terry,

Their is a cool class someone has made to make it a snatch to add graphs
charts, and so forth.
Make a search for google for "PHP graph" its the first result JPGraph.

I highly recommend it for your project.

Regards,
Yoep

"Step One" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi there!
>
> I'm writing some stuff for a non-profit site as voluntary help. Does
somebody have any PHP image generation scripts (GD) that could be used to
"pretty" up a statistics page. The produced image should be a chart, pie,
bars or something similar that could visually represent various statistical
information. It would be great if one could specify background images etc.
>
> The image should be a bit more beautiful from the pie chart at
http://skydiving-org.freeservers.com/stats.htm
> A bit more customization and visual attraction would be great.
>
> Thanks!
> Terry



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




[PHP] what is pear email

2001-12-22 Thread Rambo Amadeus

i dont understand. What is pear email, and what is it used for?


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




Re: [PHP] strtoupper and HTML entities

2001-12-22 Thread Michael Sims

At 11:32 PM 12/22/2001 +0100, mweb wrote:
>Hello,
>
>I know I can convert a string to all uppercases with the strtoupper()
>function. However, what if the original string contains HTML entities?
>
>EXAMPLE:
>
>original string = "funkstörung"

Try this:




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




RE: [PHP] what is pear email

2001-12-22 Thread Richard Heyes

> i dont understand. What is pear email, and what is it used for?

http://cvs.php.net/cvs.php/php4/pear/Mail.php

and

http://cvs.php.net/cvs.php/php4/pear/Mail

-- 
Richard Heyes
"If you have any trouble sounding condescending,
find a Unix user to show you how it's done." - Scott Adams 

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




[PHP] Jpeg to Wbmp algorithm

2001-12-22 Thread Alex Vargas

Hi. I need to convert jpegs to wbmp. Unfortunately, the PHP build available
in my server wasn't compiled with the GD library, so I have no access to
JPEG2WBMP().

Is the source code of this function available somewhere? Or does anyone know
about a PHP class to make this task? At least an algorithm to do the
jpeg-wbmp conversion?

Thanks,

Alex.


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




[PHP] accessing xml docs?

2001-12-22 Thread Shahin

i'm trying to use the following code to access a node w/ id=$idnum in
record.xml :

$doc=new DomDocument;
$doc=xmldocfile( "record.xml" );

$strXPath = "/Students[@id='$idnum']";
$context=xpath_new_context($doc);
$query = xpath_eval($context,$strXpath);
$node = $query->nodeset[0];
$strValue = $node->content;

problem is, it decides that DomDocument isn't a class, so i get a fatal
error...
when i try to skip the instantiation, it says that xmldocfile() is
undefined.

the documentation is for 4.0.0, it's an experimental function... does anyone
know how to open an XML file for data retrieval/editing in 4.0.6?  or if i'm
making a mistake in my code?  i'm pretty new to this, that could very well
be the case...

THANKS,
shahin-



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




php-general Digest 23 Dec 2001 03:44:39 -0000 Issue 1068

2001-12-22 Thread php-general-digest-help


php-general Digest 23 Dec 2001 03:44:39 - Issue 1068

Topics (messages 78563 through 78606):

Re: PostgreSQL query taking a long time
78563 by: Papp Gyozo

Re: array_walk() + class methods
78564 by: Jeff Levy

Help with select boxes
78565 by: Sam
78571 by: Andrew Brampton

Re: Config Problems
78566 by: Brian Clark
78572 by: Ben Ocean
78573 by: Brian Clark
78574 by: Ben Ocean
78576 by: Brian Clark

PGP --> PHP
78567 by: J.Mueller, pro.vider.de GmbH
78579 by: Brian Clark

Premature EOS Header
78568 by: Anthony F. Rodriguez
78580 by: Brian Clark

Php & Directory structures
78569 by: Martin Hughes
78570 by: Bogdan Stancescu
78578 by: George Nicolae

Re: ./configure error. won't let me continue...
78575 by: Brian Clark

Re: Sendemail appends domain to mail function
78577 by: Bogdan Stancescu

PHP software tool
78581 by: LaserJetter
78582 by: Cristian Graziano
78583 by: Brian Clark
78584 by: -BD-
78586 by: LaserJetter
78587 by: py
78595 by: Mike

Re: "Talkback" or community type participation.
78585 by: Warren Vail

gd problem
78588 by: Phillip B. Bruce
78592 by: Brian Clark
78600 by: Yoep

Re: Function definition: how to make default argument an empty array?
78589 by: Michael Sims
78591 by: Philip Olson

Re: Question about CREATE_FUNCTION
78590 by: Emile Bosch

Re: spliti[SOLUTION]
78593 by: Philip Olson

PEAR E-mail
78594 by: Gerard Onorato
78597 by: Richard Heyes

Image generation scripts
78596 by: Step One
78601 by: Yoep

strtoupper and HTML entities
78598 by: mweb
78603 by: Michael Sims

probably more of a mysql question
78599 by: Yoep

what is pear email
78602 by: Rambo Amadeus
78604 by: Richard Heyes

Jpeg to Wbmp algorithm
78605 by: Alex Vargas

accessing xml docs?
78606 by: Shahin

Administrivia:

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

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

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


--

--- Begin Message ---

use EXPLAIN to get more information about how postgres executes this query.
I'm not sure about this, but there are some issues with fields of type int8.
It may help to cast explicitly the fields involved in join like:

 WHERE bible.book::int4 = books.id::int4

Ask it the postgres mailing list, too!
btw, what version of pg do you have?

- Original Message - 
From: "K Old" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 21, 2001 5:51 PM
Subject: [PHP] PostgreSQL query taking a long time


| Hello all,
| 
| I have a PostgreSQL database that is storing The Bible.  It has 31,103 
| records in it and I have a PHP page executing this query:
| SELECT
| books.book_name, bible.chapter, bible.verse, bible.versetext
| FROM asv_bible bible, book_bible books WHERE bible.book = books.id ORDER BY 
| random() LIMIT 1
| 
| The database schema is:
| 
| /* 
|   Sequences
|  */
| CREATE SEQUENCE "book_bible_seq" start 1 increment 1 maxvalue 2147483647 
| minvalue 1 cache 1;
| 
| /* 
|   Table structure for table "asv_bible"
|  */
| CREATE TABLE "asv_bible" (
|"id" int8 NOT NULL,
|"book" int8,
|"chapter" int8,
|"verse" int8,
|"versetext" text,
|CONSTRAINT "asv_bible_pkey" PRIMARY KEY ("id")
| );
| 
| 
| 
| /* 
|   Table structure for table "book_bible"
|  */
| CREATE TABLE "book_bible" (
|"id" int4 DEFAULT nextval('book_bible_seq'::text) NOT NULL,
|"book_name" varchar(20),
|CONSTRAINT "book_bible_pkey" PRIMARY KEY ("id")
| );
| 
| Right now it takes 9 seconds to return the results.  I was wondering if 
| anyone could offer any help with lowering the time it takes to run?
| 
| Or if this is the normal runtime for a database of this size, I'd just like 
| confirmation.
| 
| Thanks,
| Kevin
| 
| 
| _
| Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
| 
| 
| -- 
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: [EMAIL PROTECTED]
| For additional commands, e-mail: [EMAIL PROTECTED]
| To contact the list administrators, e-mail: [EMAIL PROTECTED]
| 

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

Much obliged, that did the

[PHP] Help with permissions/ownership

2001-12-22 Thread Gaylen Fraley

I'll try to be both concise and precise with this.

I have some PHP code like this:

 if (!rename($path_to_file,$path_to_file_BACKUP))
die("$unable_to_access_file_msg $path_to_file_BACKUP");
 $buffersize = round(filesize($path_to_file_BACKUP)*1.5);
 $fp_in = fopen("$path_to_file_BACKUP","r") or
die("$unable_to_access_file_msg $path_to_file_BACKUP");
 $fp = fopen("$path_to_file",'a') or die("$unable_to_access_file_msg
$path_to_file");
 set_file_buffer($fp,$buffersize);
 fwrite($fp,"hello") or die("HELP!");
 fclose($fp);

This works, sort of.  It dies with HELP!  The rename happens exactly as
required.  However, when PHP creates the $fp file, the owner and permissions
are different.  I can chmod the permissions, through PHP
(chmod($path_to_file,0777) , but I can't seem to change the owner, using
chown (it says it is not allowed).  The original file, before being renamed
and the directory are 0777.  After the rename, the old file is still 0777,
but the new file ($fp) is 0644.  It appears that the new owner is the root
directory for the server document (in this case 1792=www), instead of the
group.  As an example, before the rename, the owner is 1444 as is the group.
When $fp is created, the owner is now 1792 but the group is still 1444 (user
name of the ftp account).

On most systems, this seems to work ok. But on some linux systems, it fails
due to the ownership.  The PHP program cannot write to the new file.  I'm
hoping that I'm overlooking some minor/major factor here, that someone
will/can point out.  How does PHP, or is it the server, get ownership?

I hope this make sense.

Thanks!

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v2.6 Guest Book http://www.gaylenandmargie.com/phpwebsite/




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




[PHP] mail function not support in php 4.1.0 with compiled with IMAP ???

2001-12-22 Thread Martin Fienkeng

I just finished installing php 4.1.0 with the following options
with-imap, with-expat, with-mysql and with-apxs
my system is Mandrake 8.1

I tried using the mail function to send mail out and this is the error I get 
"Warning: mail() is not supported in this PHP build in content on line 26"

Is it that in compiling with imap I loose the mail function? or is there 
another switch to activate this

Any help in resolving this will be greatly appreciated

Martin Fienkeng
"Just searching for more knowledge"


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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