php-general Digest 19 Jan 2001 16:23:51 -0000 Issue 464

Topics (messages 35560 through 35636):

Re: Variable method
        35560 by: Steve Edberg

Re: Ethics question...
        35561 by: John Hinsley
        35567 by: Michael A. Peters
        35577 by: jeremy brand
        35578 by: Rasmus Lerdorf
        35579 by: jeremy brand
        35580 by: Rasmus Lerdorf
        35582 by: jeremy brand
        35613 by: Max A. Derkachev

Re: below10host.com as webhost?
        35562 by: Jeff Lacy
        35564 by: Internet Services
        35573 by: Egan
        35601 by: Boaz Yahav

Good Reads
        35563 by: Sean Brown
        35593 by: Brian Clark
        35600 by: Boaz Yahav

Gear Head -- From Home Pages to Popularity
        35565 by: php3.developersdesk.com
        35566 by: php3.developersdesk.com

Re: a text formating & cpu question
        35568 by: php3.developersdesk.com
        35608 by: Christian Reiniger

Not quite relevant question about coding and query
        35569 by: Jacky.lilst
        35570 by: Jason Murray
        35571 by: Jacky.lilst
        35572 by: Dave Haggerty
        35575 by: php3.developersdesk.com
        35581 by: Jacky.lilst
        35583 by: Jacky.lilst
        35584 by: php3.developersdesk.com
        35631 by: Shaun Thomas

PHP site on CD-ROM
        35574 by: Philip Apostol
        35576 by: Rasmus Lerdorf

temporary unsubscribe mailing list
        35585 by: Wen Ni Leong
        35597 by: Brian Clark

Downloads, headers and binary data
        35586 by: Juan Germano
        35587 by: jeremy brand
        35622 by: Rick Hodger

Re: <? PHP vs. <?
        35588 by: Teodor Cimpoesu

Re: Setcookie problem in ie 5.0
        35589 by: Krzysztof Dziekiewicz

Re: general CGI question
        35590 by: Brian Clark

Re: File upload on linux
        35591 by: Brian Clark

Re: Error connecting to MySQL server
        35592 by: Brian Clark
        35604 by: Rosen
        35605 by: Pavel Kalian
        35606 by: Brian Clark

Re: Help with PHP Shell Scripting
        35594 by: Brian Clark

Re: Off The Topic But Please Help....
        35595 by: Brian Clark

Re: PDFLib and PHP and pdf_open_image_file
        35596 by: Brian Clark

Re: Newbie : info/tut on XML and PHP
        35598 by: Brian Clark

Re: question on time-based function
        35599 by: Brian Clark

Re: Web hosting for PHP/MySQl development
        35602 by: Boaz Yahav
        35603 by: WreckRman2

Re: stripping the keywords from a search engine... again...
        35607 by: Robin Vickery

Any good way ?
        35609 by: TV Karthick Kumar
        35615 by: Matthew Ling

problem with file upload
        35610 by: John LYC

Datasets
        35611 by: Bruno Freire
        35633 by: Bruno Freire

PATH_TRANSLATED doesn't work correctly !!!
        35612 by: Heino H. Gehlsen
        35636 by: Adam Wright

session_start problem
        35614 by: Markus H. Maussner

Re: Perl-like DBI and generic SQL
        35616 by: mlemos.acm.org

References in an array
        35617 by: Ruppel, Mathias

PHP 4 cgi upgrade problem
        35618 by: Hrishi

how to trigger incomming mail
        35619 by: Jeroen Olthof

Downloading PHP 4.0.4pl1
        35620 by: AFONSO Margarida Ramos

Re: password()
        35621 by: Håkan Askengren

Re: Cookies still store old value(Help!!)
        35623 by: Håkan Askengren

help - templating?
        35624 by: Jaxon

fputs() to save mysql db file
        35625 by: Lawrence Blades

<> Flash + PHP <>
        35626 by: Abe Asghar

Re: Smarty bug fix 1.0a
        35627 by: Monte Ohrt

Date/Time Formatting
        35628 by: Jamie

ASP Guy Looking for "Select Case" equivalent
        35629 by: Karl J. Stubsjoen
        35630 by: Adam Wright
        35632 by: Rasmus Lerdorf

Re: PHP connecting to FIlemaker Database
        35634 by: Jerry

Re: GD, PHP and Apache troubles
        35635 by: Kees Hoekzema

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]


----------------------------------------------------------------------


At 4:53 PM -0800 1/18/01, Blaine Grady wrote:
>Suppose I have:
>      $method = "doIt";
>inside a class.  How do I construct the statment, using $method, to
>call:
>      $this->doIt();
>I tried every combination I can think of but I keep getting "Call to
>unsupported or undefined function" when doIt() is a proper method.  I
>have no problem with standard functions.
>Thanks for any help.
>


Did you think of

class foo {

function bar() {

        $method = 'doIt';

        $this->$method('yes');

}

function doIt($Answer) {

        echo "Noodles are happy? $Answer";

}

}


It's been awhile, but I believe that should work. If not, give us more info:

What version of PHP?

What, exactly, DID you try?


        - steve

-- 
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+





         "Randy Johnson" <[EMAIL PROTECTED]> wrote:

> is there any benchmarks or proof that I should host a high traffic site on a
> FREEBSD/APACHE instead of a redhat Linux/Apache server?

I don't know where thetre is any proof as such, but certainly the
consensus is that FreeBSD is better than the 2.2 Linux kernel at high
loads. (And I know of no Linux devotee who would deny this). But the 2.4
kernel will drastically cut back FreeBSD's lead. Really it all depends
on what you mean by "high traffic" and whether you're ready to go to 2.4
in a production environment. (If you do, please let me know how it holds
up!)

>From the last discussions I had with them, the Linux Journal folk were
considering whether to run with a pre-release version of 2.4, so they
may have made the switch by now. And that's not what I'd call a quiet
site.

Maybe you should drop them a line?
 


-- 
******************************************************************************
Marx: "Why do Anarchists only drink herbal tea?"
Proudhon: "Because all proper tea is theft."
******************************************************************************




John Hinsley wrote:
> 
>          "Randy Johnson" <[EMAIL PROTECTED]> wrote:
> 
> > is there any benchmarks or proof that I should host a high traffic site on a
> > FREEBSD/APACHE instead of a redhat Linux/Apache server?

Apache doesn't have threading (yet).
If your business depends upon it, you may want to take a look at
Solaris/Zeus if you are really getting heavy load high traffic.

It's not free, though...

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-
Michael A. Peters
Abriasoft Senior Developer




> Apache doesn't have threading (yet).
> If your business depends upon it, you may want to take a look at
> Solaris/Zeus if you are really getting heavy load high traffic.

We serve millions of hits a day off of a small farm of FreeBSD servers
running Apache+php for our dynamic content.  Thttpd for our static
pages (images, etc).

Our farm used to be linux, but FreeBSD has been better. Linux 2.2
would flake out under extreme load and not recover.  FreeBSD gets
stressed under extreme load as well, but it recovers.  If you know
redhat better and can't use Freebsd, that is fine.  It might save
_you_ more time to use redhat as the savings in administration could
easlily be overturned if you don't know freebsd better than redhat.
Don't get me wrong, on a personal note, I love linux (the most, I
might add).

I think the single most importand piece of software that saves us the
most money is thttpd.  That all runs in a single thread and uses
select to pump out content.  Since it is a single thread, it never
chews up tons of memory forking children.  I think our farm would need
to be twice as big if we tried to use apache for our static content.
I have nothing bad to say about apache, don't get me wrong.  This is
simply the way that works best for us. Our DB lives on a separate quad
sparc and all of our content is centralized and remotely NFS mounted.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/





> I think the single most importand piece of software that saves us the
> most money is thttpd.  That all runs in a single thread and uses
> select to pump out content.  Since it is a single thread, it never
> chews up tons of memory forking children.

By the way, there is a PHP module for thttpd.

-Rasmus





> By the way, there is a PHP module for thttpd.

Thank you.  I know.  I haven't had a chance to spend time testing it.

Would anyone recommend it for mission critical environments?

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/





> > By the way, there is a PHP module for thttpd.
>
> Thank you.  I know.  I haven't had a chance to spend time testing it.
>
> Would anyone recommend it for mission critical environments?

I can't really do that since I have never tried it.

-Rasmus





> I can't really do that since I have never tried it.

I plan on testing it under extreme load eventually.  If I do before
someone else does, I'll post my results.  But for the mean time, our
set up is working perfectly, so it may be a while.

I'm a big thttpd advocate, so I'd (for no better reason) love to run
thttpd+php instead of apache if it could provide >= service under
pressure.  It most likely already does.  I know thttpd by itself is
the absolute best I have tested for high performance static content.
It kicks apache up and down the block on this regard.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/





Hello Randy,

Thursday, January 18, 2001, 9:49:37 PM, you wrote:

RJ> is there any benchmarks or proof that I should host a high traffic site on a
RJ> FREEBSD/APACHE instead of a redhat Linux/Apache server?

I can't show the figures, but I gave the feeling that FreeBSD behaves
better under heavy load. I have a production FreeBSD 4-STABLE
webserver that runs ugly 2-years-old perl scripts written by an
apprentice programmer (currently the software is being rewritten in
PHP :)). Sometimes when the site is seriously hit (sometimes i can
hardly type a letter on a console), it is going serve requests (of
course, it slows, but ...). When the load is falling after the peak,
it recovers VERY fast, and works fine then. I also have a Debian
Potato for testing. When I seriously hit it, It is NEVER recovers
itself without my intervention (maybe I lack patience ? :) ), I should
do something like killall -1 httpd to restore normal operations.

-- 
Best regards,
Max A. Derkachev mailto:[EMAIL PROTECTED]
Symbol-Plus Publishing Ltd.
phone: +7 (812) 324-53-53
http://www.Books.Ru -- All Books of Russia
 






I'm sorry, but why do you say webservpro doesn't make a lot of money?

I am really looking for a good host for a 'friend' of mine.   He has a small
website (<20mb) and I don't think it gets too many hits.  He doesn't have
very much money to spend on a web host, so it must be something cheap.  It
needs php (4 would be better), and at least 20 email accounts.  A mysql
database would be really, really good.  Ftp access (to upload pages) is a
must, but telnet/ssh is always a plus.  The host need to allow domain names.
I think this is about what my friend is looking for.  Does anyone have any
ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

Jeff



"Egan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> 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]
>






Have you looked at www.communitech.net ?

-----Original Message-----
From: Jeff Lacy [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 12:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] below10host.com as webhost?


I'm sorry, but why do you say webservpro doesn't make a lot of money?

I am really looking for a good host for a 'friend' of mine.   He has a small
website (<20mb) and I don't think it gets too many hits.  He doesn't have
very much money to spend on a web host, so it must be something cheap.  It
needs php (4 would be better), and at least 20 email accounts.  A mysql
database would be really, really good.  Ftp access (to upload pages) is a
must, but telnet/ssh is always a plus.  The host need to allow domain names.
I think this is about what my friend is looking for.  Does anyone have any
ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

Jeff



"Egan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> 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]







On Thu, 18 Jan 2001 23:11:28 -0600, "Jeff Lacy"
<[EMAIL PROTECTED]> wrote:

>I'm sorry, but why do you say webservpro doesn't make a lot of money?

If you analyze ISP costs as I have, I believe you may find that the
prices webservpro charges are about as low as they can go to still
provide good service, and yet make an honest profit at the end of the
day.

You may find many other providers charging $9.95 per month (or even
less!) for "unlimited" bandwidth, "unlimited" disk space, "unlimited"
POP accounts, and "unlimited" everything else you can imagine, but my
analysis tells me they cannot possibly make a profit if more than a
few of their customers actually take them up on their offer.

If you traceroute to compare network connectivity and latency among
hosting providers, I believe you will find those who have the best
also charge for most everything you use on some kind of scaled plan,
and don't go shouting "unlimited" at every customer who happens by.

>I am really looking for a good host for a 'friend' of mine.   He has a small
>website (<20mb) and I don't think it gets too many hits.  He doesn't have
>very much money to spend on a web host, so it must be something cheap.

We also offer Internet access in metro areas of the US and Canada, so
a bundle with  Internet access, web hosting, shell account, and DNS
service for his domain name can be as little as $24.95 per month.  Is
that cheap enough?

>needs php (4 would be better), and at least 20 email accounts.  A mysql
>database would be really, really good.  Ftp access (to upload pages) is a
>must, but telnet/ssh is always a plus.  The host need to allow domain names.
>I think this is about what my friend is looking for.  Does anyone have any
>ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

You may tell your "friend" we are offering (temporarily) free hosting
accounts to early testers, and we meet the requirements you mentioned
above.  We ask that testers bring no more than 2GB traffic per month
with them.

After we finish our testing program, I believe our hosting prices will
be competitive with webservpro.  That does not necessarily imply lower
prices, because we believe we offer excellent network connectivity and
bandwidth.  You get what you pay for.

To request a test account, please send email to me.  Thanks.

Egan






Look no further!!!

http://www.weberdev.com/phenominet/prices.htm

-----Original Message-----
From: Jeff Lacy [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:11 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] below10host.com as webhost?


I'm sorry, but why do you say webservpro doesn't make a lot of money?

I am really looking for a good host for a 'friend' of mine.   He has a small
website (<20mb) and I don't think it gets too many hits.  He doesn't have
very much money to spend on a web host, so it must be something cheap.  It
needs php (4 would be better), and at least 20 email accounts.  A mysql
database would be really, really good.  Ftp access (to upload pages) is a
must, but telnet/ssh is always a plus.  The host need to allow domain names.
I think this is about what my friend is looking for.  Does anyone have any
ideas (besides below10host.com or phpwebhosting.com)?  Thanks again :-)

Jeff



"Egan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Thu, 18 Jan 2001 01:54:28 -0600, "Jeff Lacy"
> <[EMAIL PROTECTED]> wrote:
>
> >anyone had thought/opinions on below10host.com as a web host?
>
> I'm speaking as a budding competitor, so keep that in mind. :-)
>
> According to their web page, below10host.com gives you 6GB per month
> for $9.95.  By way of comparison, webservpro charges $49.95 per month
> for the same 6GB.
>
> My analysis of costs tells me that at $49.95 for 6GB, webservpro does
> not have a large margin of profit in their price.  How can any hosting
> company sell the same 6GB per month for $9.95 and make enough profit
> to stay in business?
>
> At such a low price, I don't know how it's possible, unless a large
> majority of their customers consume so little of their quota so as to
> offset the loss incurred from customers who consume it all.
>
> 6GB per month is a fairly active site.  If you really have that much
> traffic, to me at least, $49.95 would seem affordable.  OTOH, if you
> have much less traffic, you could choose a lower priced plan.
>
> I believe in the adage of getting what you pay for.  Value is a
> balance between low price on the one hand, vs. high quality on the
> other.  The lowest price is not necessarily the best value.
>
> Egan
>
>
>
>
> --
> 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]




Does anyone have any suggestions on a good book for beginners. I currently
own "PHP3 Programming Browser-Based Applications" by David Medinets. I have
no regrets thus far on purchasing the book but it seems to leave a lot out
and his examples are somewhat... skewed.

Cheers






Hello Sean, 

(SB == "Sean Brown") [EMAIL PROTECTED] writes:

SB> Does anyone have any suggestions on a good book for beginners. I
SB> currently own "PHP3 Programming Browser-Based Applications" by
SB> David Medinets. I have no regrets thus far on purchasing the book
SB> but it seems to leave a lot out and his examples are somewhat...
SB> skewed.

I hear Julie Meloni's book is good for beginners, but I've never read
it. The Wrox books (red covers with photos) are good, as well.

http://www.php.net/books.php

(`more info' link under each)

SB> Cheers

-Brian
--
As Will Rogers would have said, "There is no such
thing as a free variable." 






Try the books section --> PHP :
http://www.weberdev.com/index.php3?GoTo=Shopping.php3

-----Original Message-----
From: Sean Brown [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 7:18 AM
To: Php-General@Lists. Php. Net
Subject: [PHP] Good Reads


Does anyone have any suggestions on a good book for beginners. I currently
own "PHP3 Programming Browser-Based Applications" by David Medinets. I have
no regrets thus far on purchasing the book but it seems to leave a lot out
and his examples are somewhat... skewed.

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]




Addressed to: [EMAIL PROTECTED]
              [EMAIL PROTECTED]

The current column for Gear Head, (AKA Mark Gibbs) in Network World
magazine is all about PHP and Zend Technonogies.  Since you hang around
on this mailing list, you may not learn much but rejoice in the thought
that his column is pointed at corporate network managers, and is quite
positive about PHP and Zend.


Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Addressed to: [EMAIL PROTECTED]
              [EMAIL PROTECTED]
              [EMAIL PROTECTED]

In his current column for Network World, Gear Hear (AKA Mark Gibbs)
talks about PHP and Zend Technologies.  Since you hang out on this
mailing list, you may not learn much, but go ahead and take a look.  It
is great to know that PHP is getting this kind of press in a major
weekly magazine for network managers.


   http://www.nwfusion.com/columnists/2001/00288015.html


        PHP4 has become wildly popular and is now a
        major language in Web scripting. According to the
        October 2000 NetCraft Web survey, PHP was
        running in more than 3.8 million domains on
        715,283 IP addresses.



He promises more on PHP next week!




Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




Addressed to: Noel Akins <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from Noel Akins <[EMAIL PROTECTED]> Thu, 18 Jan 2001 22:05:46 +0000
>
> Hello, Question 1: A long time ago, I started my first big project
> using php3 and MySQL that  would return on a query a listing of info
> from the database that was  displayed in the browser with nested
> tables. If a user really wanted to  test the limits of the database,
> he/she could get back over 3000  lines. Being that html tables were
> being used to display the info, a large  number of tables were being
> created, and would crash netscape. I pretty  much shelved this
> project for this reason. I'm now working on a similar  project that
> won't return so many lines, but I would like to be able to use
> something other than html tables to display the info in a neat
> manner. Is  there any php related things I could use to format a list
> in a  browser other than html tags? could someone point me in the
> right direction?
>

<PRE>


Or break up your table so there are many small tables rather than one
big one.


Breaking up the table is probably best.  Pre text looks pretty uggly.


> Question 2: Is there a way for php to detect the cpu speed of a users
> computer?
>

I don't think so.



Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




On Thursday 18 January 2001 23:05, Noel Akins wrote:
> Question 2:
> Is there a way for php to detect the cpu speed of a users computer?

If you're on a Linux machine you can read /proc/cpuinfo and pick out the 
speed entry.

-- 
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)

...to paraphrase Churchill, while representative  democracy may be
terrible, it's still the best system that large corporations can buy.

- David Weinberger JOHO January 25, 2000




Hi people
Using db as Mysql, I want to write a query to insert data into a table, say User 
table, and right away after I have inserted that particular record into User table, I 
want to retrive the ID for that particular record (the record that I just inserted) to 
insert into another table, say UserRequest, that require to have UserID field in there 
as well.
By the way, I configure the ID field in User table as auto increment, and unique key.
Can I just write a query to retrive UserID right after I have inserted user detail 
into Usertable? and then assign into a variable and use that value to insert into 
UserID field in another table?
like this:

$query = "insert into user values ('firstname','lastname','address','phone')";
$resultinsert = mysql_query($query);

$getID = "select userID from user"; // Will this get me the Id of the record I just 
inserted?
$resultID = mysql_query($getID);

$anotherQuery = "insert into userrequest values('userID','userRequestDetail')";
$resutlrequest = mysql_query($anotherQuery);

Will it work if i did that? If not, what should I do to achieve this?
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for yourself"




> $query = "insert into user values
('firstname','lastname','address','phone')";
> $resultinsert = mysql_query($query);
> 
> $getID = "select userID from user"; // Will this get me the 
>                                     // Id of the record I just inserted?
> $resultID = mysql_query($getID);

No, it won't - it'll return every userID in the table.

If your userIDs are sequential, you can just select "MAX(userID)" instead
of userID.

Jason




thanks for Jason:-) Lucky the ID is sequential. That was command I was
looking for.
cheers
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: Jason Murray <[EMAIL PROTECTED]>
To: 'Jacky@lilst' <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, January 18, 2001 11:56 PM
Subject: RE: [PHP] Not quite relevant question about coding and query


> > $query = "insert into user values
> ('firstname','lastname','address','phone')";
> > $resultinsert = mysql_query($query);
> >
> > $getID = "select userID from user"; // Will this get me the
> >                                     // Id of the record I just inserted?
> > $resultID = mysql_query($getID);
>
> No, it won't - it'll return every userID in the table.
>
> If your userIDs are sequential, you can just select "MAX(userID)" instead
> of userID.
>
> Jason
>
> --
> 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]
>







>-----Original Message-----
>From: Jason Murray [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 18, 2001 9:57 PM
>To: 'Jacky@lilst'; [EMAIL PROTECTED]
>Subject: RE: [PHP] Not quite relevant question about coding and query
>
>
>> $query = "insert into user values
>('firstname','lastname','address','phone')";
>> $resultinsert = mysql_query($query);
>>
>> $getID = "select userID from user"; // Will this get me the
>>                                     // Id of the record I just inserted?
>> $resultID = mysql_query($getID);
>
>No, it won't - it'll return every userID in the table.
>
>If your userIDs are sequential, you can just select "MAX(userID)" instead
>of userID.
>
>Jason
>
>--
>

Im no expert...I am learning this stuff "as we speak"....but shouldn't
mysql_insert_id() do it?

Cheers,

Dave





Addressed to: "Jacky@lilst" <[EMAIL PROTECTED]>
              "Jason Murray" <[EMAIL PROTECTED]>
              <[EMAIL PROTECTED]>

** Reply to note from "Jacky@lilst" <[EMAIL PROTECTED]> Fri, 19 Jan 2001 
13:15:13 -0600

What happens when more than one person updates the tables at nearly
the same time?

a - insert record 9

b - insert record 10

a - get max ID = 10

b - get max ID = 10

Something doesn't look right here....


What you are looking for is  mysql-insert-id()
Get the id generated from the previous INSERT operation


   http://www.php.net/manual/en/html/function.mysql-insert-id.html



>
> thanks for Jason:-) Lucky the ID is sequential. That was command I
> was looking for. cheers Jack [EMAIL PROTECTED] "There is
> nothing more rewarding than reaching the goal you set for yourself"
> ----- Original Message ----- From: Jason Murray
> <[EMAIL PROTECTED]> To: 'Jacky@lilst'
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent:
> Thursday, January 18, 2001 11:56 PM Subject: RE: [PHP] Not quite
> relevant question about coding and query
>
>
> > > $query = "insert into user values
> > ('firstname','lastname','address','phone')";
> > > $resultinsert = mysql_query($query);
> > >
> > > $getID = "select userID from user"; // Will this get me the
> > >                                     // Id of the record I just inserted?
> > > $resultID = mysql_query($getID);
> >
> > No, it won't - it'll return every userID in the table.
> >
> > If your userIDs are sequential, you can just select "MAX(userID)" instead
> > of userID.


Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




So what i should really do is like this:
$anotherQuery = "select mysql_insert_id(UserID) from user";
$resultUserID = mysql_query($anotherQuery);
is that corerct?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: Jacky@lilst <[EMAIL PROTECTED]>; Jason Murray
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 12:36 AM
Subject: Re: [PHP] Not quite relevant question about coding and query


> Addressed to: "Jacky@lilst" <[EMAIL PROTECTED]>
>               "Jason Murray" <[EMAIL PROTECTED]>
>               <[EMAIL PROTECTED]>
>
> ** Reply to note from "Jacky@lilst" <[EMAIL PROTECTED]> Fri, 19
Jan 2001 13:15:13 -0600
>
> What happens when more than one person updates the tables at nearly
> the same time?
>
> a - insert record 9
>
> b - insert record 10
>
> a - get max ID = 10
>
> b - get max ID = 10
>
> Something doesn't look right here....
>
>
> What you are looking for is  mysql-insert-id()
> Get the id generated from the previous INSERT operation
>
>
>    http://www.php.net/manual/en/html/function.mysql-insert-id.html
>
>
>
> >
> > thanks for Jason:-) Lucky the ID is sequential. That was command I
> > was looking for. cheers Jack [EMAIL PROTECTED] "There is
> > nothing more rewarding than reaching the goal you set for yourself"
> > ----- Original Message ----- From: Jason Murray
> > <[EMAIL PROTECTED]> To: 'Jacky@lilst'
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent:
> > Thursday, January 18, 2001 11:56 PM Subject: RE: [PHP] Not quite
> > relevant question about coding and query
> >
> >
> > > > $query = "insert into user values
> > > ('firstname','lastname','address','phone')";
> > > > $resultinsert = mysql_query($query);
> > > >
> > > > $getID = "select userID from user"; // Will this get me the
> > > >                                     // Id of the record I just
inserted?
> > > > $resultID = mysql_query($getID);
> > >
> > > No, it won't - it'll return every userID in the table.
> > >
> > > If your userIDs are sequential, you can just select "MAX(userID)"
instead
> > > of userID.
>
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
>





Sorry, I think it should be like this:

$queryInsert = "insert into user values ('firstname','lastname','email')";
$resultinsert = mysql_query($queryInsert);

$UserIdLatest = mysql_insert_id(userId);


Is that correct?
Jack
[EMAIL PROTECTED]
"There is nothing more rewarding than reaching the goal you set for
yourself"
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: Jacky@lilst <[EMAIL PROTECTED]>; Jason Murray
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 12:36 AM
Subject: Re: [PHP] Not quite relevant question about coding and query


> Addressed to: "Jacky@lilst" <[EMAIL PROTECTED]>
>               "Jason Murray" <[EMAIL PROTECTED]>
>               <[EMAIL PROTECTED]>
>
> ** Reply to note from "Jacky@lilst" <[EMAIL PROTECTED]> Fri, 19
Jan 2001 13:15:13 -0600
>
> What happens when more than one person updates the tables at nearly
> the same time?
>
> a - insert record 9
>
> b - insert record 10
>
> a - get max ID = 10
>
> b - get max ID = 10
>
> Something doesn't look right here....
>
>
> What you are looking for is  mysql-insert-id()
> Get the id generated from the previous INSERT operation
>
>
>    http://www.php.net/manual/en/html/function.mysql-insert-id.html
>
>
>
> >
> > thanks for Jason:-) Lucky the ID is sequential. That was command I
> > was looking for. cheers Jack [EMAIL PROTECTED] "There is
> > nothing more rewarding than reaching the goal you set for yourself"
> > ----- Original Message ----- From: Jason Murray
> > <[EMAIL PROTECTED]> To: 'Jacky@lilst'
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent:
> > Thursday, January 18, 2001 11:56 PM Subject: RE: [PHP] Not quite
> > relevant question about coding and query
> >
> >
> > > > $query = "insert into user values
> > > ('firstname','lastname','address','phone')";
> > > > $resultinsert = mysql_query($query);
> > > >
> > > > $getID = "select userID from user"; // Will this get me the
> > > >                                     // Id of the record I just
inserted?
> > > > $resultID = mysql_query($getID);
> > >
> > > No, it won't - it'll return every userID in the table.
> > >
> > > If your userIDs are sequential, you can just select "MAX(userID)"
instead
> > > of userID.
>
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
>





Addressed to: "Jacky@lilst" <[EMAIL PROTECTED]>
              [EMAIL PROTECTED]

** Reply to note from "Jacky@lilst" <[EMAIL PROTECTED]> Fri, 19 Jan 2001 
14:00:02 -0600
>
> Sorry, I think it should be like this:
>
> $queryInsert = "insert into user values ('firstname','lastname','email')";
> $resultinsert = mysql_query($queryInsert);
>
> $UserIdLatest = mysql_insert_id(userId);
>
>
> Is that correct?

Yes, that is the 'proper' way to find out the value of a auto_incremant
field.  The SELECT MAX( userid ) method will work fine in testing, but
then you get to pull your hair out when it starts to fail under heavy
load.


You might have a bit of a problem with the values() clause of the
insert.  That statement expects you to list all the entries in the
table, in the order they appear, unless you specify a list right after
the table name.  I've given up on that syntax in favor of this one:


$QueryInsert = "INSERT INTO user SET " .
               "   firstname = '$FirstName', " .
               "   lastname = '$LastName', " .
               "   email = '$Email' );

It also works with update:

$QueryUpdate = "UPDATE user SET " .
               "   firstname = '$FirstName', " .
               "   lastname = '$LastName', " .
               "   email = '$Email' .
               "WHERE userId = 1234 " );

I like the fact that you can list any fields in any order while leaving
out anything you want.





Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com




On Fri, 19 Jan 2001, Jacky@lilst wrote:

> Can I just write a query to retrive UserID right after I have inserted
> user detail into Usertable? and then assign into a variable and use
> that value to insert into UserID field in another table?
> like this:
>
> $getID = "select userID from user";
> $resultID = mysql_query($getID);

Others have explained to you why this will not work.  Still others
have suggested using:

> $getID = "select MAX(userID) from user";

But that won't work either.  If two or more people run your little
insert/find last script at the same time, this might happen:

User 1: does insert, max userid is now 10.
User 2: does insert, max userid is now 11.
User 1: does select to find last insert, gets 11.
User 2: does select to find last insert, gets 11.

Thus user 1 now has invalid data, and will corrupt your table if he
does further inserts based on this information.

The final suggestion you got:

<?PHP
  $linkID = mysql_connect("somehost", "someuser", "somepass");
  mysql_select_db("somedb", $linkID);

  $query = "insert into user (firstname, lastname, address, phone)". 
           "values('firstname','lastname','address','phone')";
  $resultinsert = mysql_query($query, $linkID);

  // If multiple inserts are done on multiple tables, just returns
  // the most recent one.
  $id = mysql_insert_id($linkID);

?>

The above code will *always* return the value you want.  Notice that
I kept track of which mysql connection I made.  This is *very*
important.  If you start using a utility that uses its own connection, or
lose track of your connect/disconnect statements, you never know which
connection you're using.

The others who told you to use mysql_insert_id also had the syntax
wrong.  You can't specify which insert id you want back.  You can only say
that you want one.  The function just returns the id of the last insert
statement that took place for the mysql connection you specify.  In other
words, this can wreak havoc with persistant connections unless you're
using the version of mysql that supports transactions.  If you're not,
you'll get the same hypothetical situation we ran into when using MAX to
find the last insert.  Still, this is the least dangerous of the two, and
will always work if connections are not persistant.

Remember, the documentation is your friend.  Download it, and if you have
*any* question about a function or family of functions, just go there.  I
found this by reading the mysql section of the documentation.

Good luck,

-- 
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
| Shaun M. Thomas                INN Database Programmer              |
| Phone: (309) 743-0812          Fax  : (309) 743-0830                |
| Email: [EMAIL PROTECTED]    AIM  : trifthen                      |
| Web  : hamster.lee.net                                              |
|                                                                     |
|     "Most of our lives are about proving something, either to       |
|     "ourselves or to someone else."                                 |
|                                           -- Anonymous              |
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+






Can I run a PHP/Apache/MySQL services on a CD-ROM.  We have PHP scripts that
handle queries on a large database.  We would like to distribute it on a
CD-ROM so they could access the database offline.  Is it possible? Or are
there any similar solutions for this?  Im thinking of a text-file database
and access it via javascript but have no much time to study on this.  If php
can be run on the cd-rom, that would be a better solution.   But any
solution you posted here will be highly appreciated.  Thanks in advance.

Philip





You would need to go through a web server for it to work.

On Fri, 19 Jan 2001, Philip Apostol wrote:

> Can I run a PHP/Apache/MySQL services on a CD-ROM.  We have PHP scripts that
> handle queries on a large database.  We would like to distribute it on a
> CD-ROM so they could access the database offline.  Is it possible? Or are
> there any similar solutions for this?  Im thinking of a text-file database
> and access it via javascript but have no much time to study on this.  If php
> can be run on the cd-rom, that would be a better solution.   But any
> solution you posted here will be highly appreciated.  Thanks in advance.
>
> Philip
>
>
> --
> 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]
>





I would like to unsubscribe the mailing list for a week which is
effective from 20th of Jan 2001 to 28th of Jan 2001.
I hope you can automatic reactive me into the mailing list after the
28th of Jan 2001.

Thank you.

>From Wendy Leong
[EMAIL PROTECTED]





Hello Wen, 

(WNL == "Wen Ni Leong") [EMAIL PROTECTED] writes:

WNL> I would like to unsubscribe the mailing list for a week which is
WNL> effective from 20th of Jan 2001 to 28th of Jan 2001. I hope you
WNL> can automatic reactive me into the mailing list after the 28th of
WNL> Jan 2001.


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

WNL> Thank you.


Your servant, ;-)

-Brian
--
Programming is an unnatural act.






Hi. I'm trying to write a script to download a mp3 file. I did this:

$filesize=filesize($filename);
header("Content-disposition: attachment;filename=".basename($filename));
header("Content-type: application/octetstream");
header("Content-Transfer-Encoding: binary");
header("Pragma: no-cache");
header("Expires: 0");
header("Content-Length: $filesize");
readfile($filename,$filesize);

I began with the first two headers but the problem is that the script works
fine with
text files but I get shorter files than the originals with mp3s, so I added
the rest trying to solve the problem.
So I tryied

$fp=fopen($filename,"r");
fread($fp,filesize($filename));
fclose($fp);

and

$fp=fopen($filename,"r");
fpassthru($fp);

None of above worked.
But I tryied using the php.exe and I got exactly what I want.
So, perhaps it is a problem with the headers. I tryied both Netscape and IE,
and also diferents content-type (audio/mpeg).
Anyone has ideas?

Juan Germano
[EMAIL PROTECTED]








your script is probably timing out.

Try doing:
set_time_limit(0); 

at the top of your script.

Jeremy

Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: [EMAIL PROTECTED]
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html for more 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    "LINUX is obsolete"  -- Andy Tanenbaum, January 29th, 1992
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       http://www.JEEP-FOR-SALE.com/ -- I need a buyer
  Get your own Free, Private email at http://www.smackdown.com/

On Fri, 19 Jan 2001, Juan Germano wrote:

> Date: Fri, 19 Jan 2001 05:38:48 -0300
> From: Juan Germano <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [PHP] Downloads, headers and binary data
> 
> Hi. I'm trying to write a script to download a mp3 file. I did this:
> 
> $filesize=filesize($filename);
> header("Content-disposition: attachment;filename=".basename($filename));
> header("Content-type: application/octetstream");
> header("Content-Transfer-Encoding: binary");
> header("Pragma: no-cache");
> header("Expires: 0");
> header("Content-Length: $filesize");
> readfile($filename,$filesize);
> 
> I began with the first two headers but the problem is that the script works
> fine with
> text files but I get shorter files than the originals with mp3s, so I added
> the rest trying to solve the problem.
> So I tryied
> 
> $fp=fopen($filename,"r");
> fread($fp,filesize($filename));
> fclose($fp);
> 
> and
> 
> $fp=fopen($filename,"r");
> fpassthru($fp);
> 
> None of above worked.
> But I tryied using the php.exe and I got exactly what I want.
> So, perhaps it is a problem with the headers. I tryied both Netscape and IE,
> and also diferents content-type (audio/mpeg).
> Anyone has ideas?
> 
> Juan Germano
> [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]
> 
> 






"Juan Germano" <[EMAIL PROTECTED]> wrote in message
004b01c081f3$46be8160$ddf90dd1@juangerm">news:004b01c081f3$46be8160$ddf90dd1@juangerm...
> Hi. I'm trying to write a script to download a mp3 file. I did this:
>
> $filesize=filesize($filename);
> header("Content-disposition: attachment;filename=".basename($filename));
> header("Content-type: application/octetstream");
> header("Content-Transfer-Encoding: binary");
> header("Pragma: no-cache");
> header("Expires: 0");
> header("Content-Length: $filesize");
> readfile($filename,$filesize);
>
> I began with the first two headers but the problem is that the script
works
> fine with
> text files but I get shorter files than the originals with mp3s, so I
added
> the rest trying to solve the problem.
> So I tryied
>
> $fp=fopen($filename,"r");
> fread($fp,filesize($filename));
> fclose($fp);

Try this, only change your fread line like so:

echo fread($fp,filesize($filename));

I have to do this to put out an image with a image/vnd.wap.wbmp header, and
it works for me.

--
Rick Hodger






Hi Alex!
On Thu, 18 Jan 2001, Alex Black wrote:

> xml problems?
> 
> _what_ xml problems?
> 
I was refering to whole story of using `<?' in xml docs.

-- teodor




On Fri, 8 Dec 2000, Rustam Nabirov wrote:

> I'm using IE5.0 on Win98, it's as simple as it gets. But still I don't see
> any cookies saved. As far as I understand, on this platform cookies get
> saved in C:\WINDOWS\Cookies, and C:\WINDOWS\Temporary Internet Files has
> only shortcuts to those cookies.

C:\Windows\Profiles\<LOGIN_NAME_IN_WINDOWS>\Cookies\






Hello Hrishi, 

(H == "Hrishi") [EMAIL PROTECTED] writes:

H> I need to know how to get apache to parse CGI output with the SSI
H> parser (the [php] script will have includes, which need to go
H> through mod_include). changing the mime-type to x-server-parsed or
H> anything hooked by mod_include doesnt help.

Why not use the CGI to write the output to a shtml (or whatever) on
disk, then after the write, send the Location header() to the file
that you just wrote.

With the right extension, as defined in your server conf files, it
should treat it as an SSI parsed document.

Is that not an option?

H> thanks,
H> Hrishi

-Brian
--
I got vision, and the rest of the world wears bifocals. -- Butch Cassidy







Hello MacBane, 

(M == "MacBane") [EMAIL PROTECTED] writes:

M> I have some file upload code but it is not woking on debian linux,
M> could some one give me a hand

<snip>

M> $the_path is set some where else

What is the value of $the_path?

M> $path = "/var/www/cms/gentext/$section/$doctype/";

This isn't even used in the code below. It's trying to copy $the_file
to $the_path. Ie. from one location, maybe /tmp if you're on Unix, to
another location. Judging by '\' you might not be on a  Unix machine.

M>  if (!@copy($the_file, $the_path."\".$the_file_name))

$the_path needs to be a valid directory -- it needs to exist, unless
you use mkdir() somewhere before it. It also must be writable by the
user the webserver is running as.

M>  {
M>            // print("<b>Something barfed, check u r path
M> $the_path$the_file_name");
M>         }

M> }

Find out what $the_path is and make sure it exists.

-Brian
--
Is it possible to feel gruntled?







Hello Rosen, 

(R == "Rosen") [EMAIL PROTECTED] writes:

R> When I try to connect to MySQL server I get message "Can't connect
R> to MySQL server (10060 )!

Where's your code?

Are you using someone else's application?

Is mysqld even running? Is it /still/ running after you get that error?

Are you trying to connect locally (localhost), or are you trying to
connect to another server running mysqld?

This can be cause by any number of things.

R> Please Help!
R> Thanks
R> Rosen Marinov


-Brian
--
An adequate bootstrap is a contradiction in terms.






When I connect via WEB based admin, there is no problems !
The MySQL Server is remote.
But when I install on my computer software ( Artronoc Admin,  DbTools )
I receive error "Can't connect to MySQL server on host ..... (10060).

Please Help !
Thanks,
Rosen Marinov



"Brian Clark" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Hello Rosen,
>
> (R == "Rosen") [EMAIL PROTECTED] writes:
>
> R> When I try to connect to MySQL server I get message "Can't connect
> R> to MySQL server (10060 )!
>
> Where's your code?
>
> Are you using someone else's application?
>
> Is mysqld even running? Is it /still/ running after you get that error?
>
> Are you trying to connect locally (localhost), or are you trying to
> connect to another server running mysqld?
>
> This can be cause by any number of things.
>
> R> Please Help!
> R> Thanks
> R> Rosen Marinov
>
>
> -Brian
> --
> An adequate bootstrap is a contradiction in terms.
>
>
>
> --
> 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]
>






Isn't it possible that you're just not allowed to connect to the MySQL host
remotely?

Pavel

----- Original Message -----
From: "Rosen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:55 AM
Subject: Re: [PHP] Error connecting to MySQL server


> When I connect via WEB based admin, there is no problems !
> The MySQL Server is remote.
> But when I install on my computer software ( Artronoc Admin,  DbTools )
> I receive error "Can't connect to MySQL server on host ..... (10060).
>
> Please Help !
> Thanks,
> Rosen Marinov
>
>
>
> "Brian Clark" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > Hello Rosen,
> >
> > (R == "Rosen") [EMAIL PROTECTED] writes:
> >
> > R> When I try to connect to MySQL server I get message "Can't connect
> > R> to MySQL server (10060 )!
> >
> > Where's your code?
> >
> > Are you using someone else's application?
> >
> > Is mysqld even running? Is it /still/ running after you get that error?
> >
> > Are you trying to connect locally (localhost), or are you trying to
> > connect to another server running mysqld?
> >
> > This can be cause by any number of things.
> >
> > R> Please Help!
> > R> Thanks
> > R> Rosen Marinov
> >
> >
> > -Brian
> > --
> > An adequate bootstrap is a contradiction in terms.
> >
> >
> >
> > --
> > 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]
>






Hello Rosen, 

(R == "Rosen") [EMAIL PROTECTED] writes:

R> When I connect via WEB based admin, there is no problems ! The
R> MySQL Server is remote. But when I install on my computer software
R> ( Artronoc Admin, DbTools ) I receive error "Can't connect to MySQL
R> server on host ..... (10060).

MySQL has a database of its own (named, oddly enough, mysql ;)). That
database and it's tables control permissions.

You more than likely need to set permissions for your user so that you
are allowed to connect to the database without having to connect
through localhost (ie. what you are wanting to do).

% mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 97 to server version: 3.22.32

Type 'help' for help.

mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> describe user;
+-----------------+---------------+------+-----+---------+-------+
| Field           | Type          | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+-------+
| Host            | char(60)      |      | PRI |         |       |
| User            | char(16)      |      | PRI |         |       |
| Password        | char(16)      |      |     |         |       |
| Select_priv     | enum('N','Y') |      |     | N       |       |
| Insert_priv     | enum('N','Y') |      |     | N       |       |
| Update_priv     | enum('N','Y') |      |     | N       |       |
| Delete_priv     | enum('N','Y') |      |     | N       |       |
| Create_priv     | enum('N','Y') |      |     | N       |       |
| Drop_priv       | enum('N','Y') |      |     | N       |       |
| Reload_priv     | enum('N','Y') |      |     | N       |       |
| Shutdown_priv   | enum('N','Y') |      |     | N       |       |
| Process_priv    | enum('N','Y') |      |     | N       |       |
| File_priv       | enum('N','Y') |      |     | N       |       |
| Grant_priv      | enum('N','Y') |      |     | N       |       |
| References_priv | enum('N','Y') |      |     | N       |       |
| Index_priv      | enum('N','Y') |      |     | N       |       |
| Alter_priv      | enum('N','Y') |      |     | N       |       |
+-----------------+---------------+------+-----+---------+-------+
17 rows in set (0.00 sec)

mysql> describe db;
+-----------------+---------------+------+-----+---------+-------+
| Field           | Type          | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+-------+
| Host            | char(60)      |      | PRI |         |       |
| Db              | char(32)      |      | PRI |         |       |
| User            | char(16)      |      | PRI |         |       |
| Select_priv     | enum('N','Y') |      |     | N       |       |
| Insert_priv     | enum('N','Y') |      |     | N       |       |
| Update_priv     | enum('N','Y') |      |     | N       |       |
| Delete_priv     | enum('N','Y') |      |     | N       |       |
| Create_priv     | enum('N','Y') |      |     | N       |       |
| Drop_priv       | enum('N','Y') |      |     | N       |       |
| Grant_priv      | enum('N','Y') |      |     | N       |       |
| References_priv | enum('N','Y') |      |     | N       |       |
| Index_priv      | enum('N','Y') |      |     | N       |       |
| Alter_priv      | enum('N','Y') |      |     | N       |       |
+-----------------+---------------+------+-----+---------+-------+
13 rows in set (0.01 sec)

mysql> describe host;
+-----------------+---------------+------+-----+---------+-------+
| Field           | Type          | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------+-------+
| Host            | char(60)      |      | PRI |         |       |
| Db              | char(32)      |      | PRI |         |       |
| Select_priv     | enum('N','Y') |      |     | N       |       |
| Insert_priv     | enum('N','Y') |      |     | N       |       |
| Update_priv     | enum('N','Y') |      |     | N       |       |
| Delete_priv     | enum('N','Y') |      |     | N       |       |
| Create_priv     | enum('N','Y') |      |     | N       |       |
| Drop_priv       | enum('N','Y') |      |     | N       |       |
| Grant_priv      | enum('N','Y') |      |     | N       |       |
| References_priv | enum('N','Y') |      |     | N       |       |
| Index_priv      | enum('N','Y') |      |     | N       |       |
| Alter_priv      | enum('N','Y') |      |     | N       |       |
+-----------------+---------------+------+-----+---------+-------+
12 rows in set (0.00 sec)

mysql>


You need to start here, and read the whole online chapter on the MySQL
Access Privilege System:

http://www.mysql.com/documentation/mysql/bychapter/manual_Privilege_system.html#Privilege_system


And you will need root (mysql) access to modify those tables. If you
get your database access through a www hosting provider, you will most
certainly have to ask them to grant you those permissions.

R> Please Help !
R> Thanks,
R> Rosen Marinov

-Brian
--
Don't have good ideas if you aren't willing
to be responsible for them.







Hello Justin, 

(JY == "Justin Yu") [EMAIL PROTECTED] writes:

JY> When I tried connecting to Postgres through a shell script that I
JY> wrote, I get the following error:

JY> "Fatal error: Call to undefined function: pg_connect()"

Because you don't have pgsql (PostgreSQL) support built into your
version of PHP. But you know that by now.

JY> After searching the web for a solution, I realized that I have to
JY> compile PHP into its CGI version. Currently, PHP is installed as
JY> an Apache module on my machine.

Either a CGI or a DSO can have pgsql support. You just have to build
it that way.

JY> So, I tried to compile PHP by doing the following in the
JY> /usr/local/php-4.0RC1
JY> directory where the source files for PHP4.0RC1 are located:

JY> ./configure -with-pgsql
JY> make

<snip>

Try the snapshot at:

http://snaps.php.net/php4-latest.tar.gz

Make sure you have a good installation of PostgreSQL from:

http://www.postgresql.org/software.html

Configure:

./configure --with-pgsql=/path/to/postgresql/base

You may want --enable-force-cgi-redirect, you decide
(http://www.php.net/manual/en/html/security.html#security.cgi)

Then see if it builds correctly.

JY> Justin

-Brian
--
Every program is a part of some other program and rarely fits.







Hello Statbat, 

(S == "Statbat") [EMAIL PROTECTED] writes:

S> 1. In my htdocs folder, I am able to access any file which is in
S> the htdocs folder but I am not able to access any file which in the
S> sub folder of htdocs. It says file not found. Lets suppose If I
S> have a test.php file in php folder in htdocs and I access it in
S> http://localhost/php/test.php than it says file not found although
S> it is in php folder in htdocs.

Make sure you created the php sub-directory _within_ the directory
that is specified in the httpd.conf's ServerRoot line.

S> 2. How do I configure apache to handle cgi. My cgi is installed in
S> c:\perl\

Do you mean you have perl installed in c:\perl?

S> Where my cgi scripts should be placed in the apache folder.

How about a sub-directory (although it might not work until you get
#1, above, corrected)?

In httpd.conf:

#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi/ "C:/apache/cgi-bin/"

#
# "C:/Apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
<Directory "C:/apache/cgi-bin">
    AllowOverride None
    Options None
</Directory>

#
# AddHandler allows you to map certain file extensions to "handlers",
# actions unrelated to filetype. These can be either built into the server
# or added with the Action command (see below)
#
# If you want to use server side includes, or CGI outside
# ScriptAliased directories, uncomment the following lines.
#
# To use CGI scripts:
#
#AddHandler cgi-script .cgi

S> Thanks again
S> Statbat

-Brian
--
A society that will trade a little liberty for a little order
will lose both, and deserve neither. --Thomas Jefferson







Hello goood, 

(gg == "goood goood") [EMAIL PROTECTED] writes:

gg> I have an problem with PDFLib and PHP. I'm trying to include
gg> images in PDF file using pdf_open_image_file If in my source code
gg> is line:

gg>   $o=pdf_open_image_file($pdf,"gif","pict.gif");

gg> i get the error: Cannot find server or DNS Error (The page cannot
gg> be displayed). What's wrong.

This sounds more like a server or browser problem to me. I don't think
this has anything to do with the pdf* functions.

-Brian
--
You may be recognized soon. Hide.







Hello Rahul, 

(RB == "Rahul Bhide") [EMAIL PROTECTED] writes:

RB> Can you give me pointers(read urls) to "Good Sites" on tutorials
RB> or info from scratch on XML with PHP.

http://www.phpbuilder.com/columns/justin20000428.php3
http://www.phpbuilder.com/columns/joe20000907.php3
http://www.phpbuilder.com/columns/

RB> Thanks in Advance.
RB> ~Rahul

-Brian
--
Man who pee on electric fence receive shocking news.







Hello Rudy, 

(RM == "Rudy McDaniel") [EMAIL PROTECTED] writes:

RM> Anyone have any ideas on how to make a function reset every
RM> 24-hours? For example, I have a function that grabs a random quote
RM> from a file and selects a new one every time the page is reloaded.
RM> What I want, however, is for the quote to remain the same for a
RM> day and then reset at some specified time (say midnight) and grab
RM> a new random quote for the next day. It seems like their should be
RM> any easy way to do this using mktime( ) or a similar function but
RM> I'm not fully grasping it. Any ideas on how to do this would be
RM> much appreciated.

Why not just make cron (once a day) read the quotes file, pick a
random line, write the quote to a file called quoteoftheday.php, then
just include() that file into your page?

Unless you're running this one a windows machine.. in that case you
might be able to do the same thing with some scheduler instead of
cron, I'm not sure.

-Brian
--
Opportunity makes a thief. -Francis Bacon, 1598






The best around!!!

http://www.weberdev.com/phenominet/prices.htm

-----Original Message-----
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 3:37 AM
To: PHP General
Subject: [PHP] Web hosting for PHP/MySQl development


Any recommendations for a good, savvy host for doing some PHP/MySQL
development? Not looking for a free service, obviously, but somebody with:
knowledgeable tech support, good mysql/php 4/zend support, decent mail
handling, and developers tools like: telnet/ssh, emacs, procmail, crontab
access, etc. Where are you php developers doing your hosting?

I have been scouring this list archives, but everyone is focussed on free or
extremely cheap. I also know about the PHP hosts listing, but the problem
with that is you never know if the positive comments are real or not, and
only people experienced with a host can tell you if they are any good or
not!

via private mail is fine, if you want to share that good thing with one
person instead of the list...

c
--
Chris Lott


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





I would be willing to host sites for $10 a month with 100 meg, 25 Email,
yourdomain.com, FP2000 if you like, PHP 4.04 with MySQL. Contact me for more
information... No sites with extremely large bandwidth requirements please.

David Smith


-----Original Message-----
From: Boaz Yahav [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 4:28 AM
To: 'Chris Lott'; PHP General
Subject: RE: [PHP] Web hosting for PHP/MySQl development


The best around!!!

http://www.weberdev.com/phenominet/prices.htm

-----Original Message-----
From: Chris Lott [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 3:37 AM
To: PHP General
Subject: [PHP] Web hosting for PHP/MySQl development


Any recommendations for a good, savvy host for doing some PHP/MySQL
development? Not looking for a free service, obviously, but somebody with:
knowledgeable tech support, good mysql/php 4/zend support, decent mail
handling, and developers tools like: telnet/ssh, emacs, procmail, crontab
access, etc. Where are you php developers doing your hosting?

I have been scouring this list archives, but everyone is focussed on free or
extremely cheap. I also know about the PHP hosts listing, but the problem
with that is you never know if the positive comments are real or not, and
only people experienced with a host can tell you if they are any good or
not!

via private mail is fine, if you want to share that good thing with one
person instead of the list...

c
--
Chris Lott


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





>>>>> "BC" == Brian Clark <[EMAIL PROTECTED]> writes:

 > Hello Dallas,

 > (DK == "Dallas Kropka") [EMAIL PROTECTED] writes:

 DK> Posted earlier but got no response.... so here it is again...

 > I gave you a quick explanation of one way to do it earlier, but I
 > know of no tutorials off the top of my head.

 > Here is a lengthy example if you _have_ to see code:

 (...)

 > But there has to be an easier solution out there that's already
 > been ridden to death. The above is going to get nasty rather
 > quickly I'd imagine, and every search engine, more than likely, is
 > going to have a completely different query string. There's no way
 > I'm going to look.  :)

Hiyah,

This is a slightly more flexible way of doing pretty much the same thing.
You can then log the output of search_term($HTTP_REFERER) for later analysis.

I've not split the search terms up into words (I'm thinking of how boolean 
searches like 'foo AND NOT bar' would skew the results and how search phrases
like 'foo AND "bar baz"' would be split up).

Unfortunately, the analysing the logs (properly) is going to be more of a job.

        -robin

<?php

function search_term( $referer ) 
{
  // search engines we know about and what they call their search terms.
  // Add your own, I can't be bothered to look at any more.
  $engine = array (
                   "www.altavista.com" => "q",
                   "www.google.com"    => "q",
                   "search.yahoo.com"  => "p",
                   "search.excite.com" => "search",
                   "www.lycos.com"     => "query",
                   "www.lycos.co.uk"   => "query"
                   );

  // if no referer's been passed, forget it.
  if(!isset($referer) || empty($referer) ) return false;

  // split the url into logical bits.
  $url = parse_url( $referer );

  // if we don't recognise the search engine forget it.
  if(! $terms = $engine[strtolower( $url['host'] )] ) return false;

  // parse the query part of the url and put it in $REFERER_GET_VARS.
  parse_str( $url['query'], $REFERER_GET_VARS );

  // find the appropriate value and return it together with the search engine as a 
hash.
  return array(
               "engine" => strtolower( $url['host'] ),
               "term"   => $REFERER_GET_VARS[$terms]
               );
}

print_r( search_term( $HTTP_REFERER ) );

?>




Hi all

    I have written the following code, but I dont' think it's a good way to
write like this. Is there some other way to do good programming for this ?!

****************************************************************************
******************
   if ($f)
   {
    $SQL .= " (FIRST_NAME like '%$f%') AND ";
   }
   if ($l)
   {
    $SQL .= " (LAST_NAME like '%$l%') AND ";
   }
   if ($em)
   {
    $SQL .= " (HOME_EMAIL1 like '%$em%') OR (HOME_EMAIL2 like '%$em%') OR
(WORK_EMAIL1 like '%$em%') OR (WORK_EMAIL2 like '%$em%') ";
   }
****************************************************************************
******************

    Any help is appreciated very much.

    Thanks in adv.

~ Karthick






maybe I'm over simplifying... my apologies if I am but it looks like you're
testing each variable as a boolean value i.e. if(TRUE) so why not use a
switch/case statement... easier to write and saved on extraneous curly
syntax... look here

http://www.php.net/manual/en/control-structures.switch.php



-----Original Message-----
From: TV Karthick Kumar [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 19, 2001 10:40 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Any good way ?


Hi all

    I have written the following code, but I dont' think it's a good way to
write like this. Is there some other way to do good programming for this ?!

****************************************************************************
******************
   if ($f)
   {
    $SQL .= " (FIRST_NAME like '%$f%') AND ";
   }
   if ($l)
   {
    $SQL .= " (LAST_NAME like '%$l%') AND ";
   }
   if ($em)
   {
    $SQL .= " (HOME_EMAIL1 like '%$em%') OR (HOME_EMAIL2 like '%$em%') OR
(WORK_EMAIL1 like '%$em%') OR (WORK_EMAIL2 like '%$em%') ";
   }
****************************************************************************
******************

    Any help is appreciated very much.

    Thanks in adv.

~ Karthick



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




hi, i have a situation where i need to upload  3 img file within an
array that is within another array. 2 di-array
i have no problem with only variable type and value but its not working
with type="file".

here's my code

<?
for ($i=0 ; $i < 4 ; $i++)
{
    //do something

    for ($k=0 ; $k < 3 ; $k++)
   {
        print "<input type=\"checkbox\" name=\"checkans[$i][$k]\"
value=\"".$K."\" >"; //this is working
        print "<input type=\"file\" name=\"ans[$i][$k]\" >"; //this is
not
   }
}


?>

i can get  check[x][x] value;
but i cant get ans[x][x] file;

how do i do this???
thanks
john





Hi.... My name is Bruno, I'm in Brazil and I'm new in PHP...


I wanna know how can I roll in the records in a dataset.
Like...
Move First
Move last
Move next.....os something like this

Thanks..





Hi.... My name is Bruno, I'm in Brazil and I'm new in PHP...


I wanna know how can I roll in the records of a dataset.
Like...
Move First
Move last
Move next.....os something like this
Move previous

Thanks..




I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via
Apache's Action directive (directing all requests through a script).

But PHP messes PATH_TRANSLATED up and all I end up with a copy of SCRIPT_FILENAME !

I'm using PHP 4.0.3pl1 on a standard Debian 2.2r2 installation with Apache httpd 1.3.9 
with these directives in httpd.conf:
    Options +MultiViews
    Action  text/html /script.php

A resuest for "/index" should result in:
    PATH_TRANSLATED = /path/to/index.html
    PATH_TRANSLATED = /path/to/index.en.html (for the English version)
    PATH_TRANSLATED = /path/to/index.X.html (for the X version)

BUT what I get is:
    PATH_TRANSLATED = /path/to/script.php (no matter what i request !)

Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy
shown in phpinfo() under "Apache Environment" but not under "PHP Variables")


Yours hopefully
Heino H. Gehlsen





Its a PHP bug, I've attached a patch (that they persistantly ignore :).

adamw

----- Original Message -----
From: "Heino H. Gehlsen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 10:42 AM
Subject: [PHP] PATH_TRANSLATED doesn't work correctly !!!


I'm trying to use the clasic CGI environment varable PATH_TRANSLATED via
Apache's Action directive (directing all requests through a script).

But PHP messes PATH_TRANSLATED up and all I end up with a copy of
SCRIPT_FILENAME !

I'm using PHP 4.0.3pl1 on a standard Debian 2.2r2 installation with Apache
httpd 1.3.9 with these directives in httpd.conf:
    Options +MultiViews
    Action  text/html /script.php

A resuest for "/index" should result in:
    PATH_TRANSLATED = /path/to/index.html
    PATH_TRANSLATED = /path/to/index.en.html (for the English version)
    PATH_TRANSLATED = /path/to/index.X.html (for the X version)

BUT what I get is:
    PATH_TRANSLATED = /path/to/script.php (no matter what i request !)

Can anyone help me getting the real Apache PATH_TRANSLATED (which is actualy
shown in phpinfo() under "Apache Environment" but not under "PHP Variables")


Yours hopefully
Heino H. Gehlsen


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






hi...

every time i do a session_start();  with php i get in the first two lines
of the output this 
 
&PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Your data      Contact
LOGOUT  
&PHPSESSID=ba606b5a90dbb4410417b4c612aaf1c9"">Contact      LOGOUT

do i do something wrong ? can i put this message somehow off ?

everything else work fine.. sessions and so.. just this two lines are a
bit disturbing me...

markus






Hello Dean,

Dean Hall wrote:
> 
> Is metabase in the "DB" subdirectory of PEAR?

No, Metabase is available for free in a much larger PHP component site:
the PHP Classes Repository.

Almost 4.000 real PHP users have downloaded it from here:

http://phpclasses.UpperDesign.com/browse.html/package/20

You may also find some more Metabase based database components here:

http://phpclasses.upperdesign.com/browse.html/class/10

Enjoy,
Manuel Lemos




Hi there,
 
I'm just a beginner in programming PHP; so my problem is probably a mistake
in my thinking.
I'm using some arrays to display information of an internal news-server in a
web-browser, like
 
$overview = imap_fetch_overview($mbox, "1:$last", 0);
$IDs = array();
$i = 0;
 
foreach($overview as $val){
    $IDs[$i][0] = $val->message_id;
    $IDs[$i][1] = &$val;
    $i++;
}
 
echo "<table border=\"1\">";
foreach($IDs as $val){
    echo "<tr><td>" . $val[1]->subject . "</td></tr>";
}
echo "</table>";
 
Unfortunately I only get an empty table; the subject of the referenced
header is not printed in the HTML-Code. Where's the error in my thinking ?
 
Any idea ?
 
Thank you
 
Mathias
____________________________________________
 
Mathias Ruppel
Abt. TAC
SAP AG
Neurottstr. 16
69190 Walldorf
 
Tel. +49 (0) 6227 76 34 23
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
____________________________________________
 




Hello,

We have a problem with running php4 as the cgi handler for php requests.

Our setup was RH6.2/i586//Apache1.3.3(compiled locally) using PHP4.0.1pl2 as
cgi(compiled locally), with the .htaccess looking like:

<snip>
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps

Action application/x-httpd-php /cgi-bin/php4
Action application/x-httpd-php-source /cgi-bin/php4
</snip>

when we installed 4.0.3pl1 executable(with all the same options), all the php
scripts say only one thing:


Parse error: parse error yada yadda in <b>/cgi-bin/php</b>

we replaced the 4.0.1pl2 executable
(the libraries for 4.0.1 & 4.0.3 are in seperate directories, and both are
configured separately).
everything works as before with the older version.
i'm stumped.

can anyone help?

TIA,
Hrishi




hi,

I'm building a online shop where people are able to pay online. The pay part
is done by a external company who sends mail to a specifeid mail address
when orders are placed and when orders are succesfully payed. both mails
contains a order nummer in subject.
now what I want is to automaticly match those 2 mail so I can write in a
mysql database that the order is payed.
I'd made a mail address payment@....

on this mail I want to trigger mail incomming on this adres so I can start a
php script that filters this standaard mail getting the order code and put
in in a database with status incompleet
and when another mail arrives on the payment address, filter order nummer
again so I can look in the database to see if it there, to compleet the
payment

kind regards
Jeroen Olthof






 
Dear all
 
I can not download the 
 
 
<http://www.php.net/do_download.php?download_file=php-4.0.4pl1-Win32.zip&sou
rce_site=www.php.net>         PHP 4.0.4pl1 - 13 January 2001
       (3.64 Mb CGI binary plus server API versions for Apache, AOL server,
ISAPI and NSAPI. MySQL support built-in, many extensions included, packaged
as zip) 
 
from the site http://www.php.net/downloads.php
<http://www.php.net/downloads.php> 
 
When the download process is closw to the end I get the error message "File
... cannot be found"
 
Does anyone know any other way to get this file?
PS- I tried ftp but I could not access the server (maximum number of
anonymous downloads was rieched)
 
Thank you
 
Margarida Afonso




For me it´s plain text in Mysql table.
In a project with < 500 users it is easy to
to read forgotten passwords... Instead of giving away a new.
/Håkan

"Chris Lee" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:9409fm$mg$[EMAIL PROTECTED]
> Im curious to see how other php developers store their passwd's
> -plain text in db
> -use of unix password()
> -use of db password()
> -other ?
>
> Chris Lee
> Mediawaveonline.com
>







Hi
I have got a similar problem with session handling. As session handling is
handled
by cookies this should be the same problem.

I handle (as Hendry in a similar way does) user right with session handling.
IE ver 5 is no problem. I can have as many session (browers) running as I
want. All session id
are different.
The Netscape sessions however (I have tested on ver 4.51) seems to share the
same
cookie. The different browser-sessions (yes, on the same computer...) are
handled as _one_ session
by php-session handling.

And hence user B is getting the rights of user A as Hendry descibes it, if
user A has logged on before user B in a different browser. The session is
released however
when all browser-sessions have exited.

Is this a bug in Netscape or php-handling?

best regards
Håkan


"Hendry Sumilo" <[EMAIL PROTECTED]> skrev i
diskussionsgruppsmeddelandet:[EMAIL PROTECTED]
> Dear Expert,
>
> I have to store user detail and password in the cookies so that i can
detect
> if particular user is allowed to enter certain website
> Example is like this:
>
> User "A" is allowed to enter student page
> User "B" is allowed to enter lecturer page
>
> Both have to enter password with login at login page
>
> When User "A" enter ,the cookies will store User "A" name,when he enters
the
> lecturer page,he will be directed to login page again(because he is not
> allowed to enter lecturer page) and so do User "B".
> BUT THE PROBLEM HAPPENS LIKE THIS:
> When User "A" enters ,and then User "B" enters,User "B" CAN ENTER THE
> STUDENT PAGE AND THE COOKIES STORE USER USER "A" VALUE.BUT WHEN I REFRESH
IT
> ,THE COOKIES WILL STORE NOTHING AND REDIRECT TO LOGIN PAGE.
> Can i know what the problem is?
>
> Thank you very much,it is really annoying me because someone can enter
other
> page if other has used that before
>
>
> Sincerely Yours
>
> Hendry Sumilo
> [EMAIL PROTECTED]
> http://members.tripodasia.com.my/hsumilo
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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]
>






I think the code below is pretty simple...
Can anyone suggest ANY way to do the bit in my last comment block???

thanks in advance!
Jaxon

<?

//set some variables or include, etc.

$id=1;
$usr="user";
$pass="pass";
$database="database";
$sql="select * from table where id = $id";

//identify connection handle

$link_id = mysql_connect($database);

//test for connection handle

if (!$link_id)
    {
    die(sql_error());
    }

else    {
    mysql_select_db($database, $link_id)
    }

//return result set to php

$result = mysql_query($sql, $user, $pass);

//create array consisting of result set and field names
//eg $page_array[first] contain value of field 'first' for $id

$page_array = mysql_fetch_array($result);

//where field names e.g.{main_content} are found in an html layout file,
replace with result set elements
//TEMPLATE GOES HERE ?
//spit out resultant page to browser


?>





I am trying to make a tab delimited file of a mysql table so I can open
it with Excel.
I select the data - 40 fields, 808 records no prob.
I view a mysql_num_rows() query to make sure it selects all records; no prob.

I create a tab delimited format:
$result = mysql_query("SELECT * FROM $database");
$rows=mysql_num_rows($result);
        while ($row = mysql_fetch_array($result) )
        {
        $field1="$row[field1]";
        $field2="$row[field2]";  //etc....
        
        $html.="$field1 $field2 $field3....."
        }

Then I write it to a file:
        if (! ($myfile=fopen ("tables", "w")))  {echo "file could not be opened";}
        fputs ($myfile, "$html");
        fclose ($myfile);

THE PROBLEM IS...

The file that is written is missing about 400 records!
If I limit the fields to a few, I get all 808 records written no problem.
So, I imagine the problem is the file size - the 400 records equate to
about 131K.
Is there a problem using the fputs() function for larger files?

Thanks for helping me.

-- 
Lawrence Blades
Digital Technologies
P.O. Box 673
Clarksdale, MS 38614
Hm: 662-627-9539
Office: 662-624-6586
Cell: 662-902-3092




Hey Guys,

Anybody have any good links for Flash with PHP simple stuff.

Any tutorials or general links that maybe useful.

Thanks,
Abe





A bug was fixed that caused the templates to be recompiled every time.

Monte Ohrt wrote:
> 
> Release 1.0. Please welcome Smarty to the PHP template engine arena :-)
> 
> Inventors:
> Monte Ohrt
> Andrei Zmievski
> 
> http://www.phpinsider.com/php/code/Smarty/




I'm fairly new to SQL and PHP and I'm haveing trouble useing the Date
functions of Both Systems, so I'd be greatfull if someone can help.
What I'm trying to do is have an 'administrator' be able to enter info
through a form to a mySQL database. Then on a seperate page have the info
reread and displayed.  The basic outline is a News page which reads and
displays from the table and shows the  News topics preceeding and inculding
the current date (ie if I enter a future Date eg 25/12/2001 and the comment
Merry christmas, in the databaes I don't want it to appear until the date
has occured)

The Table looks as follows:
CREATE TABLE news (
 news_id          INT         NOT NULL primary key auto_increment,
 topic               VARCHAR(30) NOT NULL,
 live_date         date        NOT NULL,
 news              BLOB        NOT NULL,
 user_id           VARCHAR(20) NOT NULL);

I've used the MYSQL date type as I think this would be easier for the users
to be able to manually enter the date in is form on the admin form - also I
don't think a more accurate date/time method will be more usful.

Currently I'm using this SQL Line:
SELECT * FROM news ORDER BY live_date DESC LIMIT 4
(where Live_Date is the date to display the news after)

Also I'd like to if possible to be able to enter and display the date in
Australian / European Time format (DD,MM,YYYY)
I'm currently entering it on the form using three text fields and then
rearanging them to the Format in mySQL and indserting it as a string, but I
don't know how to 'break' up a mySQL Date value to rearange it.

Hope these arn't in the FAQ as I have spent some time looking through PHP
script sites and have been unable to find anything that can help.




Hello,

What is the equivalent command to Select Case as in:

Select case 10 + 2
    case 10
        'nope
    case 11
        'nope
    case 12
        'yep
    case > 13
        'yep - but case 12 comes first!
end select





switch

adamw

----- Original Message ----- 
From: "Karl J. Stubsjoen" <[EMAIL PROTECTED]>
To: "PHP Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 19, 2001 3:51 PM
Subject: [PHP] ASP Guy Looking for "Select Case" equivalent


> Hello,
> 
> What is the equivalent command to Select Case as in:
> 
> Select case 10 + 2
>     case 10
>         'nope
>     case 11
>         'nope
>     case 12
>         'yep
>     case > 13
>         'yep - but case 12 comes first!
> end select
> 
> 
> -- 
> 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]
> 
> 





http://php.net/switch

On Fri, 19 Jan 2001, Karl J. Stubsjoen wrote:

> Hello,
>
> What is the equivalent command to Select Case as in:
>
> Select case 10 + 2
>     case 10
>         'nope
>     case 11
>         'nope
>     case 12
>         'yep
>     case > 13
>         'yep - but case 12 comes first!
> end select
>
>
> --
> 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]
>





In article 
<20010118202212.PEYN8655.femail8.sdc1.sfba.home.com@localhost>, 
[EMAIL PROTECTED] (Michael Stearne) wrote:

> True, but what if the poster has a FMP front-end to be used with the Web 
> version?  mySQL is non-existent on the desktop.  And FMP makes building 
> front-ends for destop apps very easy.  

This is extremely true; FMP's front end is extremely easy to use, to the 
point that almost the most naive users can create reports at their 
leisure, instead of waiting on user support to create reports for them, 
comment on the reports, have the comments acted on, etc.

We are in the process of moving all FMP databases that don't require a 
user-friendly front end to mySQL, but there are some where we just have 
to bite the bullet and keep FMP until there is a comparable SQL front 
end for the Macintosh. We have at least two databases that are served 
via print as well as via the web. In FileMaker it is trivial to make a 
very nice catalog of records (classes, for example), and easy to make a 
calendar of classes. And if our documentation person needs to make a new 
report for displaying a condensed form  of classes, or a 3-fold report,  
they can just do it, without even knowing that what they're doing is 
called a "report" and requires a "front end". :*)

Are there any easy to use SQL front ends for Unix?

Jerry
-- 
http://www.hoboes.com/jerry/
"Give a man a fish and you feed him for a day. Teach him to fish, and you've
depleted the lake."--It Isn't Murder If They're Yankees
(http://www.hoboes.com/jerry/Murder/)




hello all,

Rasmus, thanx for the advice you gave me :)
I had to alter two of the Makefiles and the libphp4.module file.
but now, finnally, it worked :D

thank you very much,
Kees Hoekzema
[EMAIL PROTECTED]

-----Oorspronkelijk bericht-----
Van: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
Verzonden: Thursday, January 18, 2001 7:18 PM
Aan: Kees Hoekzema
CC: [EMAIL PROTECTED]
Onderwerp: Re: [PHP]GD, PHP and Apache troubles


>
gcc  -DLINUX=2 -I/root/source/php-4.0.4 -I/root/source/php-4.0.4/main -I/roo
>
t/source/php-4.0.4/main -I/root/source/php-4.0.4/Zend -I/root/source/php-4.0
>
.4/Zend -I/root/source/php-4.0.4/TSRM -I/root/source/php-4.0.4/TSRM -I/root/
> source/php-4.0.4 -DUSE_EXPAT -I./lib/expat-lite -DNO_DL_NEEDED `./apaci`
> \
>       -o httpd buildmark.o modules.o modules/standard/libstandard.a
> modules/php4/libphp4.a main/libmain.a ./os/unix/libos.a ap/libap.a
>
lib/expat-lite/libexpat.a  -rdynamic -Lmodules/php4 -L../modules/php4 -L../.
>
./modules/php4 -lmodphp4   -ldl -lz -lpng -lgd -lresolv -lm -ldl -lcrypt -ln
> sl  -lresolv   -lm -lcrypt

Hrm.. Interesting.  -lpng should be listed after -lgd on that link line.
Find your libphp4.module file which PHP copied to your Apache tree and
edit the LIBS line and switch the order of those two.  Let me know if that
fixes it.

-Rasmus



Reply via email to