[PHP] Reading files from a directory

2001-08-23 Thread Niklas Lampén

I have problem with reading files from directory.

This is the code:

\n";
};
?>

That is ALL code on a script file.
These are the file in directory:

.
..
array_maker.php4
map.php4
renamer.php4
border_bl.gif
border_bm.gif
border_br.gif
border_ml.gif
border_mr.gif
border_ul.gif
border_um.gif
border_ur.gif
grid.gif
map_config.php4
map_dot.php4
handle.php4
map_dot.gif
core
md_998634933_071758800998634933.gif
md_998634937_060465500998634937.gif
md_998634941_025996400998634941.gif

If I have more than five of the files named like
"md_123456789_12345.gif" page returns Internal Server Error (500). What
can cause this? Is there a solution?


Niklas



[PHP] text wrap in table

2001-08-23 Thread Adrian D'Costa

Hi,

I am creating a program for a newspaper to publish their article
online.  There is a form what allows them to cut and past from their
editors (word, pagemaker, staroffice).  The data is being entered
correctly.  

The problem is when I try and get the data from the table the whole matter
scrolls off the screen.  I need it to be formatted as the client cut and
pastes it (headings, paras, etc).  Below is my table and part of my
program.

mysql> desc newsarticles;
+--+--+--+-+++
| Field| Type | Null | Key | Default| Extra  |
+--+--+--+-+++
| id   | int(5)   |  | PRI | NULL   | auto_increment |
| nid  | int(5)   |  | MUL | 0  ||
| headline | varchar(100) |  | |||
| article  | mediumtext   |  | |||
| date | date |  | | -00-00 ||
| imgpath  | varchar(200) | YES  | | NULL   ||
+--+--+--+-+++



headline; ?>



headline; ?>
description; ?>


article; ?>
 >






I use the  to display with the line breaks.  If I take of the
 it does not wrap but does not give the breaks.  To my thinking maybe
while entering the data we should give break the lines physically.  This
is part of my entry form.


HeadLine




Article




Upload Image







How do I get the text not to wrap and to preserve the formatting given by
the client.

Adrian


-- 
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-DEV] Re: Re: sysvsem extention question

2001-08-23 Thread Sascha Schumann

> parent process right before fork.  There is no parent
> initializer for a php module author

MINIT() is called from the parent process in forking servers.
The mm storage handler uses this hook to instantiate a shared
memory segment and propagate the handle to all child
processes.

- Sascha Experience IRCG
  http://schumann.cx/http://schumann.cx/ircg


-- 
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 / MySQL Hosting Charges

2001-08-23 Thread Raphael Pirker

You can see hosts offer the package for around $10/month, so if it's inside
a package they shouldn't charge more than US$2-US$4/month. If it's an extra
feature, however, they may well charge around $5/month for the add-on and
possibly also a setup fee, because it's not in their actual product list.
anything above that could possibly be considered as expensive. For example I
get

350MB
mySQL/PHP/Python/CGI
Logs etc
100x POP, unlimited forwards
1x Domain
+ lots more

for around $20/month

HTH,

Raphael



-- 
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 / MySQL Hosting Charges

2001-08-23 Thread Chris Aitken

Hi All,


Just a quick non-technical question.

I live in Australia and a friend of mine has a website hosted here in Oz, 
and he pays his set amount per month which simply is for Hosting, cgi-bin 
and log file access for his website.

Hes wanting to have the ability to use PHP and MySQL on his site and his 
provider has quoted him the cost to add to his current monthly charges to 
give him a MySQL username/password/database and PHP ability.

Both he and I feel its a bit pricey for what they want to charge so I 
figured I would ask the list to see what other people consider a reasonable 
price to add PHP and MySQL access to his current www/cgi-bin/logs website.

I wont mention the prices hes been quoted yet because I want to see some 
uninfluenced posts.


Cheers in advance.



Chris


--
 Chris Aitken - Administration/Database Designer - IDEAL Internet
  email: [EMAIL PROTECTED]  phone: +61 2 4628   fax: +61 2 4628 8890
  __-__
   *** Big Brother ***
It just shows that the dull will rule the world. And we will be watching 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]




RE: [PHP] Header

2001-08-23 Thread Jason Murray

> I want to open some html page from php in if..else..endif 
> condition but i dont't know how or which command I must use. 
> Please help me
>
> if i uses this in IF section :
>
> $path = "/route/index.htm";
> Header("Location: http://$SERVER_NAME$path");
>
> result in browser is : Warning: Cannot add header information
> - headers
> already sent by (output started at
> e:\programovanie\php\patenty\query.php:8)
> in e:\server\route\query.php on line 20

It looks like you've already started output in the script (on line 8).

You can't send a header once you've started to send web page content. 
That's why headers and body contents exist :)

Jason

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

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

2001-08-23 Thread Roman

I want to open some html page from php in if..else..endif condition but i
dont't know
how or which command I must use. Please help me

if i uses this in IF section :

$path = "/route/index.htm";
Header("Location: http://$SERVER_NAME$path");

result in browser is : Warning: Cannot add header information - headers
already sent by (output started at e:\programovanie\php\patenty\query.php:8)
in e:\server\route\query.php on line 20

and line 20 is : Header("Location: http://$SERVER_NAME$path");




roman


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

2001-08-23 Thread Lawrence . Sheed

The simple things...

Now I feel stupid.

Baaie dankie Rudolf.
(I'm an ex Capetownian now in Shanghai,China)

Note to self, read manual * C A R E F U L L Y *
-Original Message-
From: Rudolf Visagie [mailto:[EMAIL PROTECTED]]
Sent: August 24, 2001 1:43 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] Session Problem


Try 

session_register("count");

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 24 August 2001 04:42
To: [EMAIL PROTECTED]
Subject: [PHP] Session Problem


I can't get session variables to work

I know this has been done to death in the past, but I've looked on php.net,
and google for a solution, have tried the suggestions, and seem to fix it.

My php session settings are as follows:

NameLocal   Global settings
session.auto_start  Off Off
session.cache_expire180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no valueno value
session.cookie_lifetime 0   0
session.cookie_path /   /
session.entropy_fileno valueno value
session.entropy_length  0   0
session.gc_maxlifetime  14401440
session.gc_probability  1   1
session.namePHPSESSID   PHPSESSID
session.referer_check   no valueno value
session.save_handlerfiles   files
session.save_path   /tmp/tmp
session.serialize_handler   php php
session.use_cookies On  On

The code I'm using to test is as follows:



The output is as follows:

COUNTregistering session

Refreshing shows the same output

My /tmp directory exists and has the following permissions.
drwxrwxrwt   3 root root 4096 Aug 24 10:40 tmp


What should I be looking 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]

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

2001-08-23 Thread Rudolf Visagie

Try 

session_register("count");

Rudolf Visagie
[EMAIL PROTECTED]

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 24 August 2001 04:42
To: [EMAIL PROTECTED]
Subject: [PHP] Session Problem


I can't get session variables to work

I know this has been done to death in the past, but I've looked on php.net,
and google for a solution, have tried the suggestions, and seem to fix it.

My php session settings are as follows:

NameLocal   Global settings
session.auto_start  Off Off
session.cache_expire180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no valueno value
session.cookie_lifetime 0   0
session.cookie_path /   /
session.entropy_fileno valueno value
session.entropy_length  0   0
session.gc_maxlifetime  14401440
session.gc_probability  1   1
session.namePHPSESSID   PHPSESSID
session.referer_check   no valueno value
session.save_handlerfiles   files
session.save_path   /tmp/tmp
session.serialize_handler   php php
session.use_cookies On  On

The code I'm using to test is as follows:



The output is as follows:

COUNTregistering session

Refreshing shows the same output

My /tmp directory exists and has the following permissions.
drwxrwxrwt   3 root root 4096 Aug 24 10:40 tmp


What should I be looking 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]

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

2001-08-23 Thread Lawrence . Sheed

I can't get session variables to work

I know this has been done to death in the past, but I've looked on php.net,
and google for a solution, have tried the suggestions, and seem to fix it.

My php session settings are as follows:

NameLocal   Global settings
session.auto_start  Off Off
session.cache_expire180 180
session.cache_limiter   nocache nocache
session.cookie_domain   no valueno value
session.cookie_lifetime 0   0
session.cookie_path /   /
session.entropy_fileno valueno value
session.entropy_length  0   0
session.gc_maxlifetime  14401440
session.gc_probability  1   1
session.namePHPSESSID   PHPSESSID
session.referer_check   no valueno value
session.save_handlerfiles   files
session.save_path   /tmp/tmp
session.serialize_handler   php php
session.use_cookies On  On

The code I'm using to test is as follows:



The output is as follows:

COUNTregistering session

Refreshing shows the same output

My /tmp directory exists and has the following permissions.
drwxrwxrwt   3 root root 4096 Aug 24 10:40 tmp


What should I be looking 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] The future of PHP

2001-08-23 Thread Egan

On Thu, 23 Aug 2001 20:32:10 -0500, "Christopher CM Allen"
<[EMAIL PROTECTED]> wrote:

>hmmm, I might live in a smaller world than you but I find tons of  small to
>middle businesses that have no clue as to why or how things are done in
>applications(primarily web). Sure they know the buzz words of Java etc but
>when I come in and tell them I work with a certain tool set and that I can
>get it done for less $ and time they really don't care if I have a hammer or
>a mallet.

Many small businesses would like to do e-commerce, but can't afford
expensive consultants, expensive hardware, and expensive software
tools developed by huge corporations.

There is a vast market for web developers who use free software tools
like Linux/Apache/PHP, and offer their services to small businesses at
modest rates.

Look at all the large corporations bleeding money and cutting staff.
Mega-corporations are in decline, and their era is ending.  Long live
the small business!


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] Re: Re: sysvsem extention question

2001-08-23 Thread Jason T . Greene

> As far as creating the new module goes, it shouldn't be 'to much effort'. The basic 
>implimentation of system v semaphores
> is actualy quite simple, its the usage of sempahores that can be very confusing :-) 
>sysv sem's are often refered to as the
> most difficult to comprehend of the sysv standards.

Well they took a simple concept and made it extremly complex.
 
> I would be more then willing to donate my time and efforts to that project, and i do 
>have some knowledge of how semaphores
> can be used (reader-writer, resource count and lock implimentations). However as i 
>mentioned before, my last C project is
> some years ago, also my knowledge of Zend internals is limited to the php-usage scope
> 
> do note a locked semaphore == 0, any value above 0 allows for a 'lock', this is done 
>to allow multiple client-locks
> clasical example is : if the printer manager daemon has 5 printers, it creates a 
>semaphore with a max_acquire of 5. (so
> acquire count == 5). Every client connecting, lowers that count... untill its zero. 
>Then the client blocks 'till the value
> is positive again.
> 
> Proposed API of the sysvsem
> ---
> 
> * $sem = sem_get($key,$max_acquire,$perms)
>Gets or creates a semaphore id, id is returned in $sem
> * $ret = sem_acquire($sem)
>Tries to lowerer the acquire count of the semaphore. If count is already 0, wait 
>till it is raised (by sem_release) or
> returns an error (sem_remove was called or invalid permission to get semaphore). 
>note: when the client blocks 'semzcnt' is
> increased (semzcnt = # of processes waiting for lock)
> * $ret = sem_release($sem)
> Increases the acquire count
> 
> [proposed new function]
> * $count = sem_get_waiting($sem)
> Returns the amount of processes blocking on a semaphore acquire call. I propose 
>-1 = error, 0 > incicates # of waiting
> processes.

I like this, but I am wondering if we should perhaps support  some of the more 
advanced capibilities of sysv sems, like support of operation arrays with semop and 
IPC_PRIVATE, etc.

 
> Documentation
> --
> I'd be happy to help write up some documentation, general how-to-use semaphores for 
>usage in php docs, plus some example
> implimentations..

That would be great!!


-Jason

> 
> I will see how far i can get using the existing implimentation as a template for 
>implimenting a php module.. however be
> sure i'll come knocking for help fairly soon :-)
> 
> -- Chris
> 
> Jason Greene wrote:
> 
> > There probably should be a full implementation of semaphores in php. If you
> > have a need for this, we should discuss exactly how it should be implemented.
> > I will have some free time available soon, so I can start working on this. Though 
>I have
> > a couple other projects as well. If you would be interested in contributing a CVS
> > account can be arranged. This should probably start as a separate module, and then
> > eventually replace the sysvsem extension as it is no long being actively 
>maintained.
> >
> > I have a great desire for php to function well as a standalone scripting language
> > as well as web, so I am always interested as projects like this.
> >
> > Is there anyone else who would find this useful?
> >
> > -Jason
> >
> > - Original Message -
> > From: "Tom May" <[EMAIL PROTECTED]>
> > To: "Chris Chabot" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 21, 2001 1:58 PM
> > Subject: Re: sysvsem extention question
> >
> > > First off, before you get the wrong impression of my answer, let me
> > > say that your observation "It all seems kinda kludgy and quick-hack
> > > for a specific > project, and not 'sysv semaphores implimented in
> > > php'" is right on.
> > >
> > > Chris Chabot <[EMAIL PROTECTED]> writes:
> > >
> > > > I have been playing with the idea of making some application backend
> > > > services using pcntl (for singaling and fork)+ sysvsem's (for
> > > > synchronisation).
> > >
> > > Cool.  But see below.
> > >
> > > > However while reading thru the sysvsem source code, i noticed the
> > > > behaviour of the semaphores in PHP is basicly as a 'lock' (as one would
> > > > use a file lock w/ flock()). From what i understand from my advanced
> > > > unix programming book, and the linux man pages, this is not what
> > > > semaphores are supposed to be (though they can be abused to be so).
> > > >
> > > > The way one would -expect- semaphores to function on a unix platform
> > > > is best described in "Linux Programmers Guide" at
> > > > 
>http://uiarchive.uiuc.edu/mirrors/ftp/ftp.ibiblio.org/pub/Linux/docs/linux-doc-project/programmers-guide/lpg-0.4.pdf
> > > > (page 46 and on).
> > > >
> > > > A short sumary would be: a semaphore is a resource counter (not an
> > > > absolute lock).
> > >
> > > A lock is just a degenerate case.  A slightly less degenerate case
> > > (that can't be implemented with flock) is when you wan

[PHP] Re: Re: sysvsem extention question

2001-08-23 Thread Jason T . Greene

> > Last, i don't see why the implementation as exists, requires 3
> > semaphores.

I just looked over the code, and the reason for this is it specifically designed for a 
multi-process web environment. The most common method for semaphore initialization is 
in the parent process right before fork.  There is no parent initializer for a php 
module author, and since each child has its own environment, there is no way to know 
when to initialize the semaphore. 

The way that Tom solved that problem was to create a "USAGE" semaphore which is used 
to insure that the semaphore is only initialized once. There must have been some sort 
of race condition because the purpose of the 3rd semaphore is a lock.

This is actually a sharp way to handle the problem of no central way to initialize.

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




Re: [PHP] Re: order of update??

2001-08-23 Thread David Robley

On Fri, 24 Aug 2001 04:57, Gerard Samuel wrote:
> Im currently hacking away at a current setup that uses php/mysql on a
> user table.  I have successfully inserted and selected from it, but I
> cannot update.  Yes there were quotes, but thanks for letting me know
> that the order didn't matter, that narrows my list of possibilities
> down.  Talk to you all later.
> trini0
>
> [EMAIL PROTECTED] wrote:
>  > Gerard Samuel <[EMAIL PROTECTED]> wrote:
>  >>My seem stupid to some, but when running
>  >>update tablename set x='$x', y='$y', z='$z' where a=$a;
>  >>Does it matter if it the set were in backwards order ie z, y, x ??
>  >
>  > the order does not matter. (although unless you're sure $a is an
>  > integer value, you may want to wrap it in quotes, too.)
>  >
>  > jim

As a debugging aid, use mysql_error() to trap any error messages returned 
from the database, and mysql_affected_rows to determine the number of 
rows affected by your update query. It _might_ be that your query is 
valid, but actually no rows meet the criteria for update?


-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   "His Honor is crazy," Tom admitted judgementally.

-- 
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] Mixing PHP with a FAX Gateway? HELP!!! IDEAS???

2001-08-23 Thread Jason

Hey,

If anyone has any better solutions too, let me know, I'm open to anything.



> -Original Message-
> From: Fotwun [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 5:32 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Mixing PHP with a FAX Gateway? HELP!!! IDEAS???
>
>
>
>
> Hey,
>
> I'm wondering if anyone here has any experiencing mixing webware
> with a FAX
> solution on the unix platform, particulary FreeBSD 4.2.
>
> I have 2 seperate possilble solutions here. The first involves
> faxing using
> software configured on the server. The 2nd is a PHP type
> solution, capturing
> HTML from a URL and assembling it into an attachment for email.
> Please give
> me any thoughts you can offer on these.
>
> What I currently have is a e-commerce solution I wrote in PHP. There are
> pages that are generated (sort of like a populated form) that need to be
> faxed. This is all theory I am talking right now, because I have
> never done
> anything like this, including just faxing from a server.
>
> Now, what would it entail to get our dedicated server preped to do faxing
> for starters. It's at our colo facility and gobs of bandwidth.
> Obviously we
> have no modem connected at this point, and I don't even know if an actual
> phone line would be available to us. So, what I am guessing is that there
> are services that offer dial-out gateways for faxing and such, over the
> Internet. Where, our software can send data to a faxing gateway, which in
> turn sends the fax through their lines. Anyone know of any services like
> this?
>
> Also, what type of faxing software is available on FreeBSD? How does it
> integrate with actual means of faxing (gateways/modem) etc.
>
> Basically, the whole fax over server thing is new to me, and I'm trying to
> see if anyone has any experience at all doing this. The goal is: when you
> are looking at this rendered HTML page, you have a button that says "Fax"
> and when you click on it, the web page you are looking at is faxed off,
> through the server, looking just as it appeared on the screen basically
> (which merely consists of text in tables, and a couple 's).
> The goal is
> to make this as seamless as possible.
>
> 2nd solution-
> Now, eFax offers you a service where you can send an email, containing an
> attachment, such as .html and it will render the email and attachments and
> fax them off like they look. This would not be such a bad idea,
> but we want
> to avoid people having to manually "Send Page By Email" through
> outlook each
> time. What I am thinking if I can capture the HTML that is generated from
> the script (ie- showdetails.php?order_id=432) and then create an
> attachment
> of that HTML (ie- my_attachment_to_fax.html) and then send it
> through email
> ( function mail(); ) that would be perfect. Anyone have any code on how
> capture the HTML from a URL (fopen(); ?) and then assemble that into an
> attachment (.html / correct mime type/headers) and send it off?
>
> Sound plausible?
>
> Please give me any insight to either of these methods. Thank you.
>
> Fotwun
>
>
> --
> 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] konquerer and php

2001-08-23 Thread Scott

What's happening specifically is that I have an html form with action 
"whatever.php" and when I click  on submit I get code echoed to the screen.  
As I said it works normally in Netscape, I get the php page with all the data 
displayed perfectly.
Thanks, 
SW




On Thursday 23 August 2001 20:28, you wrote:
> > I have a database browser that I made with php and mysql. When I use it
> > in
> >
> > Netscape it behaves normally.  However when I view it using Konquerer,
> > all
> >
> > kinds of php code shows up on the screen when I execute a php page.  I
> > thought that Konquerer might not be recognizing the  start and
>
> end
>
> > tags so I tried  and .  However if I use
> > these nothing at all shows up on the screen.  Can someone tell me what
> > the
> >
> > problem is?
>
> PHP files are parsed by the web server, not the web browser.
>
> You can't load a PHP file directly (ie, file:///) into Konqueror, nor
> any other browser. If you do, what you describe above will happen - you
> will see the source code.
>
> 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]




Re: [PHP] The future of PHP

2001-08-23 Thread Christopher CM Allen

>
> I'm afraid that PHP is not yet very credible in that world. The truth is
> there is not great marketing force behind PHP like there is Sun behind
> Java or Microsoft behind .Net

Good point, and how does one go about marketing a language that is
open-source?
I do it by not allowing FP like extensions on my server's. All of my custom
apps are php or if need be I switch to C/perl.
If I get pushed hard enough I will do c++ :)

By your own words though , the  volume of users of a non-marketed php,
compared to the users of  marketed Java et al. speaks for itself.
Php holds its own..
What if a group of developers/designers started marketing PHP?

> So, it is very hard to convince the anybody to bet all the farm in PHP.
> You may have the technical arguments, but is not enough, I'm afraid.
>
> You in particular, may not need to convince others to bet on PHP, but it
> is nothing like that for most people that want to live from software
> development. They have to put up with work/business opportunities that
> the market offers to live from it.

hmmm, I might live in a smaller world than you but I find tons of  small to
middle businesses that have no clue as to why or how things are done in
applications(primarily web). Sure they know the buzz words of Java etc but
when I come in and tell them I work with a certain tool set and that I can
get it done for less $ and time they really don't care if I have a hammer or
a mallet.

 >So, today, I'm afraid that you
> already still have an hard time to convince people to dedicate only to
> PHP, even those that know and believe PHP is that great.

that's the truth.

thanks,

ccma




-- 
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] Getting MySQL Query Times.

2001-08-23 Thread David Robley

On Fri, 24 Aug 2001 01:52, Gabe da Silveira wrote:
> I was looking thru the mysql functions, and there doesn't seem to be
> one that gives you the amount of time a query takes.  Is there anyway
> to get this information (since it gives it to you when you type queries
> directly into the mysql shell client)?  A script of mine is starting to
> get fairly slow (2-3 seconds for page to process) and I want to be able
> to log the query speeds so I can see if there's a database bottleneck
> or if my code is just kludgy.

It might be worth running a mysql EXPLAIN on your query, if it is a 
complex one.

-- 
David Robley  Techno-JoaT, Web Maintainer, Mail List Admin, etc
CENTRE FOR INJURY STUDIES  Flinders University, SOUTH AUSTRALIA  

   Reality is an obstacle to hallucination.

-- 
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] incorrect Timezone using mail()

2001-08-23 Thread jeffrey jeffrey

Hi,
When i use this function mail(), mail was sent successfully but when 
recipient receive the mail the date timezone is incorrect. It 
displayed  -0800 instead of +0800. Im from +0800. The timezone does not 
display correctly. I have tried different servers but still the same. 
And all clients get the wrong date. Im Using php 4.06 and win2k and 
winnt4.

Can anybody help me.

Thanks


-- 
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] Mixing PHP with a FAX Gateway? HELP!!! IDEAS???

2001-08-23 Thread Fotwun



Hey,

I'm wondering if anyone here has any experiencing mixing webware with a FAX
solution on the unix platform, particulary FreeBSD 4.2.

I have 2 seperate possilble solutions here. The first involves faxing using
software configured on the server. The 2nd is a PHP type solution, capturing
HTML from a URL and assembling it into an attachment for email. Please give
me any thoughts you can offer on these.

What I currently have is a e-commerce solution I wrote in PHP. There are
pages that are generated (sort of like a populated form) that need to be
faxed. This is all theory I am talking right now, because I have never done
anything like this, including just faxing from a server.

Now, what would it entail to get our dedicated server preped to do faxing
for starters. It's at our colo facility and gobs of bandwidth. Obviously we
have no modem connected at this point, and I don't even know if an actual
phone line would be available to us. So, what I am guessing is that there
are services that offer dial-out gateways for faxing and such, over the
Internet. Where, our software can send data to a faxing gateway, which in
turn sends the fax through their lines. Anyone know of any services like
this?

Also, what type of faxing software is available on FreeBSD? How does it
integrate with actual means of faxing (gateways/modem) etc.

Basically, the whole fax over server thing is new to me, and I'm trying to
see if anyone has any experience at all doing this. The goal is: when you
are looking at this rendered HTML page, you have a button that says "Fax"
and when you click on it, the web page you are looking at is faxed off,
through the server, looking just as it appeared on the screen basically
(which merely consists of text in tables, and a couple 's). The goal is
to make this as seamless as possible.

2nd solution-
Now, eFax offers you a service where you can send an email, containing an
attachment, such as .html and it will render the email and attachments and
fax them off like they look. This would not be such a bad idea, but we want
to avoid people having to manually "Send Page By Email" through outlook each
time. What I am thinking if I can capture the HTML that is generated from
the script (ie- showdetails.php?order_id=432) and then create an attachment
of that HTML (ie- my_attachment_to_fax.html) and then send it through email
( function mail(); ) that would be perfect. Anyone have any code on how
capture the HTML from a URL (fopen(); ?) and then assemble that into an
attachment (.html / correct mime type/headers) and send it off?

Sound plausible?

Please give me any insight to either of these methods. Thank you.

Fotwun


-- 
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] send mail to mailing list using mail() or smtp?

2001-08-23 Thread Matthew Delmarter

I would appreciate some feedback. I am writing a script to fire off
emails in HTML or text format to everyone in a mailing list. It works
no problem - but I am concerned with how many emails it can deal with
over time.

The script has no timeout setting, I am not sure if it needs one. It
fires off 100 emails, pauses for 1 minute using sleep(60), and then
fires off another 100. It sends the mail using mail(). I did my first
send the other day to 930 addresses and it worked fine.

My question - is this going to work for a few thousand emails? What
about 100,000? Would it be better to send the mail directly to the
smtp server? Can you foresee any problems?

I look forward to your reply...

Regards,

Matthew Delmarter


-- 
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] The future of PHP - object orientation

2001-08-23 Thread Orr, Steve

What kind of PHP application development frameworks, class libraries, or
templates are widely used? Is SiteManager any good? How about phplib?
Others? Doesn't the future of object oriented PHP depend on good foundation
classes? Any comments on PHP object orientation? 

Steve Orr

-- 
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: how do i remove non html special characters??

2001-08-23 Thread Yasuo Ohgaki

"Sunny at wde" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi all!
>
> i'm building a registration system, and i want to strip all funky
> character map symbols from the username as well. i know strip_tags()
> gets rid of html, but how do i get rid of them?? :(
>
> i just want simple a-z, A-Z and 0-9 allowed in the username.

Check with reguler expression, ereg(),etc or strspn().
You probably should not strip invalid chars, but return errror.

--
Yasuo Ohgaki


-- 
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] konquerer and php

2001-08-23 Thread Jason Murray

> I have a database browser that I made with php and mysql. When I use it in

> Netscape it behaves normally.  However when I view it using Konquerer, all

> kinds of php code shows up on the screen when I execute a php page.  I 
> thought that Konquerer might not be recognizing the  start and
end 
> tags so I tried  and .  However if I use 
> these nothing at all shows up on the screen.  Can someone tell me what the

> problem is?

PHP files are parsed by the web server, not the web browser.

You can't load a PHP file directly (ie, file:///) into Konqueror, nor
any other browser. If you do, what you describe above will happen - you
will see the source code.

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]




[PHP] konquerer and php

2001-08-23 Thread Scott

I have a database browser that I made with php and mysql.  When I use it in  
Netscape it behaves normally.  However when I view it using Konquerer, all 
kinds of php code shows up on the screen when I execute a php page.  I 
thought that Konquerer might not be recognizing the  start and end 
tags so I tried  and .  However if I use 
these nothing at all shows up on the screen.  Can someone tell me what the 
problem is?
Thanks, 
SW

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

2001-08-23 Thread Martín Marqués

On Jue 23 Ago 2001 21:21, Chris Fry wrote:
> This function does not work reliably with most databases, not just
> Informix. Caused me a lot of problems as I have a number of pages where I'd
> like to display a "No records found message".

I normally have a count(*) query to know how much records belong to the query 
(especially when I use LIMIT and that stuff).

With Informix, you'll have to use sqlca.sqlerrd[0..5]. One of the elements of 
the array is the amount of records.

> Just have to do it the hard way.
>
> I think there's a disclaimer in the docs about this being unreliable.

It once was on the informix docs, but not anymore. The source may have 
changed.


Saludos... :-)

P.D.: No problems with pg_num_rows() :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

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

2001-08-23 Thread Chris Fry

This function does not work reliably with most databases, not just Informix.
Caused me a lot of problems as I have a number of pages where I'd like to
display a "No records found message".

Just have to do it the hard way.

I think there's a disclaimer in the docs about this being unreliable.

Chris

Martín Marqués wrote:

> On Jue 23 Ago 2001 16:50, you wrote:
> > Hi all,
> >
> > I have Php 4.0.6 on Linux with Informix Dynamic Server 7.31.UD1.
> > I try to use the function ifx_num_rows after afx_query and the value
> > returned is always "0",  but i can see
> > the result with ifx_fetch_row.
> > Does Anyone know if there is a bug with this function "ifx_num_rows" ?
>
> >From the php informix manual:
>
> int ifx_num_rows (int result_id)
>  Gives the number of rows fetched so far for a query with result_id after a
> ifx_query() or ifx_do() query.
>
> Saludos... :-)
>
> --
> Porqué usar una base de datos relacional cualquiera,
> si podés usar PostgreSQL?
> -
> Martín Marqués  |[EMAIL PROTECTED]
> Programador, Administrador, DBA |   Centro de Telematica
>Universidad Nacional
> del Litoral
> -
>
> --
> 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]

--

Chris Fry
Quillsoft Pty Ltd
Specialists in Secure Internet Services and E-Commerce Solutions
10 Gray Street
Kogarah
NSW  2217
Australia

Phone: +61 2 9553 1691
Fax: +61 2 9553 1692
Mobile: 0419 414 323
eMail: [EMAIL PROTECTED]
http://www.quillsoft.com.au

You can download our Public CA Certificate from:-
https://ca.secureanywhere.com/htdocs/cacert.crt

**

This information contains confidential information intended only for
the use of the authorised recipient.  If you are not an authorised
recipient of this e-mail, please contact Quillsoft Pty Ltd by return
e-mail.
In this case, you should not read, print, re-transmit, store or act
in reliance on this e-mail or any attachments, and should destroy all
copies of them.
This e-mail and any attachments may also contain copyright material
belonging to Quillsoft Pty Ltd.
The views expressed in this e-mail or attachments are the views of
the author and not the views of Quillsoft Pty Ltd.
You should only deal with the material contained in this e-mail if
you are authorised to do so.

This notice should not be removed.



-- 
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] Array's in classes

2001-08-23 Thread Scott Mebberson

Hi Guys,

I have written a class in which it uses the global command to get the value
of a variable from outside of this class which I use within the class.

I have recently changed this variable to an array and added 5 extra keys to
this array. It is a string indexed array. In now seems as though PHP wont
import the array. It is really weird though because if I access the key of
an array such as $database["hostname"] is just echo's nothing at all to the
browser. It also echo's nothing to the browser if I use $database[0]. But,
if I echo just $database to the browser it returns "Array" ?

Does anybody have any idea of why this is happening?

Thanks

Scott.



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

2001-08-23 Thread SED

Hi Berber,

I was reading the agreement for Verisign certificate and they request a
fee for each machine and, if I remember it correctly, each domain, and
it's not a cheap one!

Regards,
Sumarlidi Einar Dadason

SED - Graphic Design

--
Phone:   (+354) 4615501
Mobile:  (+354) 8960376
Fax: (+354) 4615503
E-mail:  [EMAIL PROTECTED]
Homepage:www.sed.is
--


-Original Message-
From: Boaz Yahav [mailto:[EMAIL PROTECTED]] 
Sent: 23. ágúst 2001 21:47
To: PHP General (E-mail)
Subject: [PHP] SSL Advice


Hi

We are running a very successful PHP site with lots of traffic. We
decided to move to a configuration of a few front ends and a back SQL.
Till now it was one server and the SSL was for that server. Now we will
have 2-4 front ends which are practically the same. The machine name is
different and the SSL seems to have a problem with this.

We have a way to bypass this but I was wondering what is the right way
to go? do you buy a certificate for each server or do you only need one?

thanks

berber


-- 
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] include or require or what?

2001-08-23 Thread daniel james

I am working on a form that needs to run INSERTS into
a table, but also has other connections and functions
going on, so $php_self isn't really an option (I'm a
newbie, and switch still scares me)...

Can I effectively use an include/require(insert.php)
on the main of the form, have the form action be
insert.php but stay with the form, and if so, HOW?

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.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]




Re: [PHP] The future of PHP

2001-08-23 Thread Manuel Lemos

Hello,

Rasmus Lerdorf wrote:
> 
> > So, the jist is, what does PHP have to offer to the web in the future?  I
> > think it's still a viable option that will be around for at least another
> > 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
> > think?
> 
> Personally I would be a hell of a lot more worried if I was in the Java
> camp.  M$ with .NET and especially CLR is gunning directly for Java and
> its position in the enterprise.  PHP will roll with the punches and work
> alongside .NET and CLR and always keep up with all the latest technologies
> out there because PHP is developed by and for the web community.
> 
> Name a single interested web-related technology that PHP can't interact
> with.  I can't think of one.  And as more come out, we'll find ways to get
> PHP to talk to them.

Personally I would be a lot more worried if I have bet all the farm in a
single technology.

PHP is most suited for Web development because historically it has been
the area on which it was mostly focused.

Now, we are in the Internet downhill days. Not that Internet is loosing
importance, but a lot of people had to drop Web/Internet development
because they no longer can make as much money from it as in the past. A
lot of those people had to start doing Web development for but for
paying users like in corporations Intranet development. 

There is still a lot of that mentality in the paying users world that
only software that costs money is credible. You may claim that those are
techno-ignorant users, but you can't neglect they may constitute a
significant part of the users.

I'm afraid that PHP is not yet very credible in that world. The truth is
there is not great marketing force behind PHP like there is Sun behind
Java or Microsoft behind .Net . Actually, a great part of computing
market simply ignores PHP.

So, it is very hard to convince the anybody to bet all the farm in PHP.
You may have the technical arguments, but is not enough, I'm afraid.

You in particular, may not need to convince others to bet on PHP, but it
is nothing like that for most people that want to live from software
development. They have to put up with work/business opportunities that
the market offers to live from it. So, today, I'm afraid that you
already still have an hard time to convince people to dedicate only to
PHP, even those that know and believe PHP is that great.

Regards,
Manuel Lemos

-- 
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: Creditcard checksum and identification

2001-08-23 Thread Manuel Lemos

Hello,

Peter Ostry wrote:
> 
> Has anyone a PHP Script for the checksum of Creditcards?
> And a Script which can identify card types based on their first numbers?
> (VISA, AMEX, MASTER, DINERS, JBC, DISCOVERY)
> 
> There where a lot of JavaScript pages on the web some years ago, but I
> have lost my local copies and the pages are vanished...

You may want to try this PHP forms generation and validation class, than
among other things validates credit card numbers and can even check if a
supplied card is from a given company. It can validate on the client
side with Javascript and on the server side with PHP.

Just take a look at it here:

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

Regards,
Manuel Lemos

-- 
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: print_r question: Jim, Phil, Mike Thanx!

2001-08-23 Thread james

I appreciate your responses.  A wrapper function using the 
suggestions works fine for my immediate purposes -- viewing output in the
browser as I learn the language.

Thanx again,
James


"James" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> When I print an array out with print_r (php 4.06 on IIS 4.0) it does not
> print newlines even if newlines are embedded in the array element.  I must
> embed , instead.
>
> The manual examples use \n and the output shows that newlines are created.
>
> Am I missing something?
>
> Newbie, here.  Hope this is the right thread for such question.
>
> Thanx,
> James
>
>
>
>



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

2001-08-23 Thread Dave Freeman

On 23 Aug 01, at 11:10, Jeremy Morano wrote:

> $result = @mysql_query($sql,$connection) or die("Couldn't execute query.");
> 
> 
> while ($row = mysql_fetch_array($result)) {
> $uid = $row['uid']
> $team = $row['team'];

if ($uid == $row['uid'])
{

$option_block .= "$team";

} else {

>   $option_block .= "$team";

}

>   $option_block .= "$team";
> }

[etc]

Basically, you need to see if the value they selected is the one you're 
currently working with and add the 'selected' attribute to your  
tag.  If it's not then just keep on going through.

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[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] Need help to create HTML table with 2 columns.

2001-08-23 Thread Dave Freeman

On 23 Aug 01, at 14:30, John Bass wrote:

> 
>  $query = "SELECT image_link, web_url FROM testdata";
> $result = mysql_query ($query) or die ("Query Failed");
> while ($row = mysql_fetch_object ($result))
> {
> printf ("%s%s %s%s\n", $row->image_link, 
> $row->web_url,$row->image_link, $row->web_url);
> }
> ?>
> 

Your 'while ($row...) is reading in one row of data.  You're then outputing 
that one row of data twice.  Is that what you wanted?

You don't specifically say what it is that isn't working in this code so I'm 
really just guessing.  If you're actually after a different set of data in each 
row then you're going to need to approach it differently.

To have new data in the second column you'll basically have to add a flag 
to track if you've already put data on that row and then change the tags 
accordingly (if you've already got the start of the row, add the new column 
and end the row, otherwise start a row and add your data).

CYA, Dave


---
Outback Queensland Internet - Longreach, Outback Queensland - Australia
http://www.outbackqld.net.au  mailto:[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] Sorting and foreach of MultiDimensional Array failing

2001-08-23 Thread Montz, James C. (James Tower)

In the following code, I'm reading a variable set of random numbers into a
multi-dimensional array.

The first iteration runs properly, but when I get to my 2nd+ iteration, I
get the following errors;
Warning: Wrong datatype in sort() call in /home/usrlinux/WWW/pballs.php on
line 18
Warning: Invalid argument supplied for foreach() in
/home/usrlinux/WWW/pballs.php on line 19

Is there a specific function for sorting and foreach statements of
multidimensional arrays?  If so, why does it work properly for the first
interation,i.e. sort($num_array[1]) then subsequently fail on
sort($num_array[2])

Thank you in advance!


\n";
while ($tickcount <= $tickets)
{
 while ( $numbercount < $totnum)
  {
   $num_array[$tickcount][] = rand($min,$max);
   $numbers = array_unique($num_array[$tickcount]);
   $numbercount = count($num_array[$tickcount]);   
  }
 sort($num_array[$tickcount]);
 foreach($num_array[$tickcount] as $val)   
  {
   echo "  ";
  }
 $pb[$tickcount] = rand(1,42);
 print "";
 $tickcount++;
}
?>

___
James C. Montz
James Tower
http://www.jamestower.com 
[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] FW: upgrading PHP

2001-08-23 Thread Joseph Bannon

Has anyone come up with an upgrade proceedure for upgrading PHP to a higher
version?

Joseph


-- 
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] Dynamic Pages and Search Engines

2001-08-23 Thread Georgie

Ok, i have a script that creates a page that will be submitted to search
engines. I had originally planned on having one line of code on the search
engine page:
include(http://localhost/freelance.php3?id=1);

But for some reason, it doesnt work. I've tried everything, changing the
php3 to php and include("freelance.php3?id=1")

The only thing that works is
header location("balh balh...
but that redirects to the freelance.php3?id=1 page and *i think* thats bad
for search engines (isnt it?)

So what I'd like some info on is why my include() function doesnt work and
does a header lcoation command make any difference to the search engines.

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] compiling php-4.0.6 with imap-4.2

2001-08-23 Thread Juan Pablo Rivera

Hi to all:

Can anybody help me, I need to compile php-4.0.6 with imap-4.2 

thaks.




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

2001-08-23 Thread Philip Olson

About the simplest way to accomplish what you want is :





\newlines don't show up in browser but will in the source, check your html
source and see how pretty it is (full of newlines).

Here's an example :

  $string = "a\nb\nc\n";

  print $string;(newlines in source)
  print nl2br($string); (newlines and 's in source)

Regarding print_r(), use  as suggested above or you _could_ do other
things but we'll worry about later :)

Regards,
Philip

On Thu, 23 Aug 2001, james wrote:

> When I print an array out with print_r (php 4.06 on IIS 4.0) it does not
> print newlines even if newlines are embedded in the array element.  I must
> embed , instead.
> 
> The manual examples use \n and the output shows that newlines are created.
> 
> Am I missing something?
> 
> Newbie, here.  Hope this is the right thread for such question.
> 
> Thanx,
> James
> 
> 
> 
> 
> 
> -- 
> 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: print_r question

2001-08-23 Thread jimw

James <[EMAIL PROTECTED]> wrote:
> When I print an array out with print_r (php 4.06 on IIS 4.0) it does not
> print newlines even if newlines are embedded in the array element.  I must
> embed , instead.

it probably is printing the newlines, but in html, newlines are
treated like any other whitespace, and do not always cause a new line.
you can wrap your output in "" to preserve the newlines.

jim

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

2001-08-23 Thread mike cullerton

one thing i do is put print_r inside  .

function my_print_r($obj) {
?> When I print an array out with print_r (php 4.06 on IIS 4.0) it does not
> print newlines even if newlines are embedded in the array element.  I must
> embed , instead.
> 
> The manual examples use \n and the output shows that newlines are created.
> 
> Am I missing something?
> 
> Newbie, here.  Hope this is the right thread for such question.
> 
> Thanx,
> James
> 
> 
> 
> 


-- mike cullerton



-- 
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] mcrypt trouble, still

2001-08-23 Thread Andrew Libby

Dominic, 
These locations can be set by in php.ini or passed as parameters to
the mcrypt functions they pretain to (notably those used to initialize).

Andy

On Thu, Aug 23, 2001 at 07:24:42AM -0500, Dominic Schanen wrote:
> Well, in response to my previous post and its reply, the server
> administrator tried reinstalling mcrypt and did the testing during the
> install and it all seemed to work for him there. However, I still get the
> error:
> 
> Warning: mcrypt module initialization failed
> 
> So, now my question is this. In the phpinfo file, all the ciphers and modes
> are listed fine and it shows that mcrypt is enabled. However, for the
> directives mcrypt.algorithms_dir and mcrypt.modes_dir, they have no local or
> master value. Is this something that needs to be set in phpinfo to point at
> the mcrypt installation? Thanks.
> 
> --
> Dominic
> 
> 
> 
> -- 
> 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]
> 

-- 
--
Andrew Libby
Director of Technology
CommNav, Inc
[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] print_r question

2001-08-23 Thread james

When I print an array out with print_r (php 4.06 on IIS 4.0) it does not
print newlines even if newlines are embedded in the array element.  I must
embed , instead.

The manual examples use \n and the output shows that newlines are created.

Am I missing something?

Newbie, here.  Hope this is the right thread for such question.

Thanx,
James





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

2001-08-23 Thread Boaz Yahav

Hi

We are running a very successful PHP site with lots of traffic. We
decided to move to a configuration of a few front ends and a back SQL.
Till now it was one server and the SSL was for that server. Now we will
have 2-4 front ends which are practically the same. The machine
name is different and the SSL seems to have a problem with this.

We have a way to bypass this but I was wondering what is the right way
to go? do you buy a certificate for each server or do you only need one?

thanks

berber


--
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: order of update??

2001-08-23 Thread Gerard Samuel

No visible errors per se.  When I run the script, it either doesn't 
update the database or if I specify the password, it deletes the entry 
in the database.  Its something on my end.  I got to look it over, Thanks

Sam Masiello wrote:
> Why "can't you update" ?  What error message are you getting?  
> 
> Sam Masiello
> Software Quality Assurance Engineer
> Synacor
> (716) 853-1362 x289
> [EMAIL PROTECTED]
> 
>  -Original Message-
> From: Gerard Samuel [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, August 23, 2001 3:28 PM
> To:   PHP
> Subject:  Re: [PHP] Re: order of update??
> 
> Im currently hacking away at a current setup that uses php/mysql on a
> user table.  I have successfully inserted and selected from it, but I
> cannot update.  Yes there were quotes, but thanks for letting me know
> that the order didn't matter, that narrows my list of possibilities
> down.  Talk to you all later.
> trini0
> 
> [EMAIL PROTECTED] wrote:
>  > Gerard Samuel <[EMAIL PROTECTED]> wrote:
>  >
>  >>My seem stupid to some, but when running
>  >>update tablename set x='$x', y='$y', z='$z' where a=$a;
>  >>Does it matter if it the set were in backwards order ie z, y, x ??
>  >>
>  >
>  > the order does not matter. (although unless you're sure $a is an
>  > integer value, you may want to wrap it in quotes, too.)
>  >
>  > jim
>  >
>  >
> 
> 
> 
> 



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

2001-08-23 Thread Martín Marqués

On Jue 23 Ago 2001 16:50, you wrote:
> Hi all,
>
> I have Php 4.0.6 on Linux with Informix Dynamic Server 7.31.UD1.
> I try to use the function ifx_num_rows after afx_query and the value
> returned is always "0",  but i can see
> the result with ifx_fetch_row.
> Does Anyone know if there is a bug with this function "ifx_num_rows" ?

>From the php informix manual:

int ifx_num_rows (int result_id)
 Gives the number of rows fetched so far for a query with result_id after a 
ifx_query() or ifx_do() query. 

Saludos... :-)

-- 
Porqué usar una base de datos relacional cualquiera,
si podés usar PostgreSQL?
-
Martín Marqués  |[EMAIL PROTECTED]
Programador, Administrador, DBA |   Centro de Telematica
   Universidad Nacional
del Litoral
-

-- 
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: order of update??

2001-08-23 Thread Sam Masiello


Why "can't you update" ?  What error message are you getting?  

Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 x289
[EMAIL PROTECTED]

 -Original Message-
From:   Gerard Samuel [mailto:[EMAIL PROTECTED]] 
Sent:   Thursday, August 23, 2001 3:28 PM
To: PHP
Subject:Re: [PHP] Re: order of update??

Im currently hacking away at a current setup that uses php/mysql on a
user table.  I have successfully inserted and selected from it, but I
cannot update.  Yes there were quotes, but thanks for letting me know
that the order didn't matter, that narrows my list of possibilities
down.  Talk to you all later.
trini0

[EMAIL PROTECTED] wrote:
 > Gerard Samuel <[EMAIL PROTECTED]> wrote:
 >
 >>My seem stupid to some, but when running
 >>update tablename set x='$x', y='$y', z='$z' where a=$a;
 >>Does it matter if it the set were in backwards order ie z, y, x ??
 >>
 >
 > the order does not matter. (although unless you're sure $a is an
 > integer value, you may want to wrap it in quotes, too.)
 >
 > jim
 >
 >




-- 
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: I get "headers already sent by" error each time I use setcookie function

2001-08-23 Thread Inércia Sensorial Trabalhando

  It will fail if the first line is a blank line. For example (numbers are
line numbers):

1.
2.

  While:

1.

  It should work...

--

Julio Nobrega

A hora está chegando:
http://toca.sourceforge.net
"Ha Minh Nguyen" <[EMAIL PROTECTED]> wrote in message
006701c12bbd$49a2bda0$[EMAIL PROTECTED]">news:006701c12bbd$49a2bda0$[EMAIL PROTECTED]...
Hi,
I don't know why I get :
"Warning: Cannot add header information - headers already sent by (output
started at c:\windows\bureau\cookie1.php:2) in c:\windows\bureau\cookie1.php
on line 6"
message
each time I use setcookie function.

The second line is :   at the end of the file.
Do you have any ideas ?

Thank you,
Ha Minh NGUYEN





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

2001-08-23 Thread Leila

Hi all,

I have Php 4.0.6 on Linux with Informix Dynamic Server 7.31.UD1.
I try to use the function ifx_num_rows after afx_query and the value
returned is always "0",  but i can see
the result with ifx_fetch_row.
Does Anyone know if there is a bug with this function "ifx_num_rows" ?

Thanks in advance.
Leila





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

2001-08-23 Thread mike cullerton

on 8/23/01 11:51 AM, Tom Malone at [EMAIL PROTECTED] wrote:

> Sorry to bother you all with this, but I have no way to test this, as I have
> no access to a Mac. Could you tell me if this little piece of code looks as
> if it would work (detect whether someone's using the Mac OS)?

ie 5.0 macos 9, powermac G3, i end up in the 'true' branch, but nothing
happens to my font that i can tell...

> 
> if (preg_match("/mac/i", "$HTTP_USER_AGENT") || preg_match("/macintosh/i",
> "$HTTP_USER_AGENT") || preg_match("/ppc/i", "$HTTP_USER_AGENT") ||
> preg_match("/PowerPC/i", "$HTTP_USER_AGENT")):
> $basefont = "Geneva";
> else:
> $basefont = "Verdana, Helvetica, Serif";
> endif;
> 
> It doesn't return an error, but that doesn't mean it works. I really
> appreciate your help. TIA
> 
> Tom Malone
> Web Designer
> http://www.tom-malone.com
> 


-- mike cullerton



-- 
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: order of update??

2001-08-23 Thread Gerard Samuel

Im currently hacking away at a current setup that uses php/mysql on a
user table.  I have successfully inserted and selected from it, but I
cannot update.  Yes there were quotes, but thanks for letting me know
that the order didn't matter, that narrows my list of possibilities
down.  Talk to you all later.
trini0

[EMAIL PROTECTED] wrote:
 > Gerard Samuel <[EMAIL PROTECTED]> wrote:
 >
 >>My seem stupid to some, but when running
 >>update tablename set x='$x', y='$y', z='$z' where a=$a;
 >>Does it matter if it the set were in backwards order ie z, y, x ??
 >>
 >
 > the order does not matter. (although unless you're sure $a is an
 > integer value, you may want to wrap it in quotes, too.)
 >
 > jim
 >
 >




-- 
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: order of update??

2001-08-23 Thread jimw

Gerard Samuel <[EMAIL PROTECTED]> wrote:
> My seem stupid to some, but when running
> update tablename set x='$x', y='$y', z='$z' where a=$a;
> Does it matter if it the set were in backwards order ie z, y, x ??

the order does not matter. (although unless you're sure $a is an
integer value, you may want to wrap it in quotes, too.)

jim

-- 
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: Newbie Question re: Select boxes

2001-08-23 Thread jimw

Lb <[EMAIL PROTECTED]> wrote:
> 1) I thought that PHP automatically created variables for all form elements
> on a page. When I run this, the dropdown box contains the first item, but
> $Report evaluates as null. I am unclear why.
> 
> 
> 1 Test Report A
> 2 Test Report B
> 3 Test Report C
> 
> 

you have set the value for each option to an empty string. you
probably mean either 'Test Report A' or
'1 Test Report A'.

> 2) Is there any way for PHP to detect the change even on the dropdown, or do
> I need to use javascript?

you have to use javascript.

jim

-- 
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] order of update??

2001-08-23 Thread Sam Masiello


The order doesn't matter, but perhaps you might want to put single quotes
around your $a at the end of your SQL statement.  You didn't mention the
error that you were getting, but this might help nonetheless :)

update tablename set x='$x', y='$y', z='$z' where a='$a';

HTH

Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 x289
[EMAIL PROTECTED]

 -Original Message-
From:   Gerard Samuel [mailto:[EMAIL PROTECTED]]
Sent:   Thursday, August 23, 2001 3:00 PM
To: PHP
Subject:[PHP] order of update??

My seem stupid to some, but when running
update tablename set x='$x', y='$y', z='$z' where a=$a;
Does it matter if it the set were in backwards order ie z, y, x ??

Just curious, Im having a problem and I dont know if its because of the
order

Thanks


--
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] Re: The future of PHP

2001-08-23 Thread Hugh Bothwell


"Christopher Cm Allen" <[EMAIL PROTECTED]> wrote in message
003201c12be2$f9309b00$[EMAIL PROTECTED]">news:003201c12be2$f9309b00$[EMAIL PROTECTED]...
> Greetings Php'ers:
> <2 cents>
> bahh to servelts-asp these are new kids on the block. Template this or
that,
> it doesnt matter, most templates are for lazy peeps anyways :)

Heck, I'm lazy; that's why I use PHP  ;-)
Like everything else, you use the tool for the job.

JSP has its good points, mainly for higher-end
applications.  If I need continuous communication
between client and server, I'll use it instead.

But for getting a simple page going,
PHP is quicker.



-- 
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] Variables not changing problem...

2001-08-23 Thread Nicholas A. Zukin

I'm using the function below to create a listing of name/value pairs 
to use in Flash.  The first time it runs it works fine, but then 
after the first time, it uses the originally used variables.  So if 
the URL looks like this:

mydomain.com/hum_images.php?hub_section=product&hub_subsection1=FOOTWEAR

The first time it will output correctly and the debugging lines will 
properly output:

FOOTWEAR
product

However, if I then enter:

mydomain.com/hum_images.php?hub_section=product&hub_subsection1=APPAREL

function selectHubImages ($hub_section, $hub_subsection1) {

global $db;

$result = mysql_db_query ($db, "SELECT navigations.nav_label, 
navigations.nav_parent, navigations.nav_name, navigations.nav_menu, 
product_items.product_section, product_items.product_parent, 
product_items.product_name, RAND() AS 'random' FROM product_items, 
navigations WHERE navigations.nav_name = product_items.product_name 
AND product_items.product_section = '$hub_section' AND 
product_items.product_parent = '$hub_subsection1' ORDER by random");

$n = 1;

echo "$hub_subsection1"; // for debugging
echo "$hub_section"; // for debugging

while ($row = mysql_fetch_object ($result) and $n <= 5) {

echo "thumb" . $n . "=" . $row->product_name . "&";
echo "thumb_subsection_two" . $n . "=" . 
$row->nav_parent . "&";
echo "thumb_label" . $n . "=" . $row->nav_label . "&";

$n = $n + 1;

}

echo "thumb_vartot=" . ($n - 1);

echo "&done=1&backspace=";

mysql_free_result ($result);

}

-- 
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: Need help to create HTML table with 2 columns.

2001-08-23 Thread Hugh Bothwell


"John Bass" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi All,
>
> I am trying to generate a table with two columns.  Each column should
print
> 2 fields named image_link and web_url.  Have spent over week looking
> documentations and trying different coding but nothing is working.  Any
help
> will be greatly appreciated.

The other answers are generally correct but a bit hard to follow.
Try this:

";
}

// === fn addColumn ==
function addColumn($str) {
global $col, $numcols;

// first column? start row
if ($col == 0)
echo "\n\t";

// echo cell contents
echo "\n\t\t$str";

// last column? end row and reset
$col++;
if ($col == $numcols) {
echo "\n\t";
$col = 0;
}
}

//  fn endTable ===
function endTable() {
global $col, $numcols;

// pad the table as necessary
for ($i = $col; $i < $numcols; $i++)
addColumn(' ');

// end table
echo "\n";
}


// === MAIN =

mysql_connect("host", "user", "pwd")
or die("Error connecting: ".mysql_error());

$query = "SELECT image_link,web_url FROM testdata";
$result = mysql_db_query("db", $query)
or die("Error querying: ".mysql_error());

startTable(2);
while ($row = mysql_fetch_array($result))
addColumn( $row["image_link"].''.$row["web_url"] );
endTable();
?>

How's that?



-- 
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] order of update??

2001-08-23 Thread Gerard Samuel

My seem stupid to some, but when running
update tablename set x='$x', y='$y', z='$z' where a=$a;
Does it matter if it the set were in backwards order ie z, y, x ??

Just curious, Im having a problem and I dont know if its because of the 
order

Thanks


-- 
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] Your invitation to the Legal Solutions Europe 2001 Conference

2001-08-23 Thread Webmaster

Hi

My apologies for writing to you unannounced. I came across your name whilst 
researching some data for the above event and I thought it might be of interest to 
you. For more info see below or visit www.lseurope.com

This is Europe's largest and most prestigious IT solutions event. It incorporates a 
comprehensive conference programme and a free to attend exhibition. The Legal 
Solutions conference will focus on how to develop and integrate an IT strategy into 
the overall framework of a law firm's key disciplines, including knowledge management, 
marketing, intranets, extranets, web technologies, and communications.
The  conference will feature keynote presentations from some of the world's 
acknowledged law firm management strategists such as:

David Maister
Prof Joost Breuker
Andrew Levison
Alan Hodgart 

and case studies from firms with the profile of:
Clifford Chance
Nauta Dutilh
Freshfield Bruckhaus Deringer.

I hope that you find the conference of interest and look forward to hearing from you.
Should you wish to register, please visit www.lseurope.com or reply to this email 
including your daytime telephone number and your address details.

Thank you.

Nick Hussey

P.S.: If you wish to be removed from our mailing list, please visit 
http://www.ark-interactive.com/cgi-bin/po4001/manager.pl?action=delete&email=php-general%40lists.php.net&group1=Roberto-law7-10

www.ark-interactive.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] Newbie Question re: Select boxes

2001-08-23 Thread LB

1) I thought that PHP automatically created variables for all form elements
on a page. When I run this, the dropdown box contains the first item, but
$Report evaluates as null. I am unclear why.


 1 Test Report A
 2 Test Report B
 3 Test Report C



2) Is there any way for PHP to detect the change even on the dropdown, or do
I need to use javascript?

Thanks in advance, still trying to get a grip on this.

lb




-- 
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 not deliver mail

2001-08-23 Thread Christof Coetzee

ID: 12932
Updated by: derick
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Bogus
Bug Type: *Mail Related
Operating System: win2k
PHP Version: 4.0.4pl1
New Comment:


[2001-08-23 14:18:01] [EMAIL PROTECTED]

I have a mail account that points to my mail server, my domain name is 
www.cdesoftware.co.za and my e-mail address is [EMAIL PROTECTED]
Problem: I have client submission forms on websites running on our server 
that calls a PHP script for sendind the info on this form to a mail 
address specified in a hidden field in the web page form. The php script 
delivers all mail that must be sent to anyname.cdesoftware.co.za, but not 
any other mail address on any other server.

Please help me with this a possible

Thank you 
Christof





-- 
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: Dynamic check boxes...

2001-08-23 Thread Hugh Bothwell


"Jeff Lewis" <[EMAIL PROTECTED]> wrote in message
009201c12bff$de696af0$76a1a8c0@LEWISJCIT">news:009201c12bff$de696af0$76a1a8c0@LEWISJCIT...
> I have a form where users can enter a link
> (kind of a free for al links type of thing)
> When they add their site to the database
> a 0 is added to the "approved" field.
>
> When I load an admin script I can check
> all of the ones that have a 0 in that field.
> I want to have checkboxes form down the
> side of them so I can check the ones I want
> approved.
>
> Is it possible to have them all update with the
> click of one submit button?

There are two obvious approaches to this:

First, with JavaScript, you could write a
'select all' button, which checks all the checkboxes,
then submits the form normally.

Or, you could have a submission button
that tells PHP to approve all listed items
whether checked or not, ie





The problem with this is that unchecked checkboxes
simply don't appear when the form is submitted; you
need some way to get a full list of the IDs in question.


A quick fix I have found is as follows, for each option:




NOTE: the name is NOT an array, and the hidden
field must come before the checkbox.
This way, if the checkbox is not checked, the 'No'
value comes through; otherwise it is over-written
by 'Yes'.


Another option would be to keep a comma-delimited
list of IDs and write 'em all into a single hidden
field, ie






Hope this helps...



-- 
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] The future of PHP

2001-08-23 Thread Elias Santiago


Almost all modern technologies are the evolution of previous ones:

C -> C++,Perl, PHP, Python;   Basic -> QBasic -> VBasic/ASP;

Even new languages like Rebol are based (in one way or another) to previous
languages.  Anyone could develop a parser/interpreter for any new language
they could devise. Eventually each language develops it's own
characteristics.






"Gabe Da Silveira" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Let's not forget the ecosystem in which these different technologies
> thrive.  It's all based on who's paying whom to do what.  The reality of
> the situation is that the people in charge don't know (or care) about
> all these different technologies.  They may make some broad decisions
> (linux vs win), but you can bet they often rely on individual techies to
> help guide them to the solution they need.  As technology advances, you
> can bet the divide between management and development will only widen.
> All that matters now is the end result.  With the disparity in developer
> skill, the difficulty in estimating development time accurately, and the
> increase in processing power there's a lot of room for developers to
> make their own decisions.
>
> In this kind of environment, there is a lot of room for different
> programming languages.  PHP has the benefits of lightning fast
> development cycles.  Java has the advantage of being a strict, modern,
> fault-tolerant language that lends itself to well-written code.  ASP has
> advantage of MS 'programming for dummies'-style devlopment tools.  Perl
> has the advantage of its text processing abilities.  C has the speed
> advantage by staying barebones and relatively low level for a verbose
> language.
>
> In order for one of these technologies to die, something has to come
> along with all the advantages and no new disadvantages.  Somehow I don't
> see this happening to open-source projects like PHP, or MySQL.  It's
> much easier to improve them then to develop something better.  I see it
> much more likely that these projects could fork to encompass different
> goals.
>
>
>
>
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Dave) wrote:
>
> > >He would see JSP at 19.9% and PHP at 11.2 and say that proves his
point.
> >
> > And flash developers will claim that the only way to create a site is
have
> > the
> > whole thing Flash and crap flying across the client screen all the
time...
> > Untill the modem access market drops below 50% of the users on the
net...
> > hard
> > time convincing me that 100's of kb in Flash is worth it.
> >
> > He obviously is sold on JSP...  let him sink with his ship.  PHP isn't
going
> > anywhere anytime soon...  not while *nix boxes are still the most stable
> > performers for web.
>
> --
> __
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: [EMAIL PROTECTED]
> hPage: http://www.visi.com/~jiblet



-- 
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: code check

2001-08-23 Thread Gabe da Silveira

Perhaps you could put it on a webpage and ask a Mac user to see if it 
works.

BTW, there is no reason to use preg_match for that.  Instead use 
strpos(), it is MUCH faster.

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Tom Malone) wrote:

> Sorry to bother you all with this, but I have no way to test this, as I have
> no access to a Mac. Could you tell me if this little piece of code looks as
> if it would work (detect whether someone's using the Mac OS)?
> 
> if (preg_match("/mac/i", "$HTTP_USER_AGENT") || preg_match("/macintosh/i",
> "$HTTP_USER_AGENT") || preg_match("/ppc/i", "$HTTP_USER_AGENT") ||
> preg_match("/PowerPC/i", "$HTTP_USER_AGENT")):
>   $basefont = "Geneva";
> else:
>   $basefont = "Verdana, Helvetica, Serif";
> endif;
> 
> It doesn't return an error, but that doesn't mean it works. I really
> appreciate your help. TIA
> 
> Tom Malone
> Web Designer
> http://www.tom-malone.com
>

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
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] The future of PHP

2001-08-23 Thread Gabe da Silveira

Let's not forget the ecosystem in which these different technologies 
thrive.  It's all based on who's paying whom to do what.  The reality of 
the situation is that the people in charge don't know (or care) about 
all these different technologies.  They may make some broad decisions 
(linux vs win), but you can bet they often rely on individual techies to 
help guide them to the solution they need.  As technology advances, you 
can bet the divide between management and development will only widen.  
All that matters now is the end result.  With the disparity in developer 
skill, the difficulty in estimating development time accurately, and the 
increase in processing power there's a lot of room for developers to 
make their own decisions.  

In this kind of environment, there is a lot of room for different 
programming languages.  PHP has the benefits of lightning fast 
development cycles.  Java has the advantage of being a strict, modern, 
fault-tolerant language that lends itself to well-written code.  ASP has 
advantage of MS 'programming for dummies'-style devlopment tools.  Perl 
has the advantage of its text processing abilities.  C has the speed 
advantage by staying barebones and relatively low level for a verbose 
language.

In order for one of these technologies to die, something has to come 
along with all the advantages and no new disadvantages.  Somehow I don't 
see this happening to open-source projects like PHP, or MySQL.  It's 
much easier to improve them then to develop something better.  I see it 
much more likely that these projects could fork to encompass different 
goals.




In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Dave) wrote:

> >He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.
> 
> And flash developers will claim that the only way to create a site is have 
> the
> whole thing Flash and crap flying across the client screen all the time...
> Untill the modem access market drops below 50% of the users on the net...  
> hard
> time convincing me that 100's of kb in Flash is worth it.
> 
> He obviously is sold on JSP...  let him sink with his ship.  PHP isn't going
> anywhere anytime soon...  not while *nix boxes are still the most stable
> performers for web.

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
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] The future of PHP

2001-08-23 Thread Jim Jagielski

This whole discussion is kind of bogus anyway :)

It's like saying that the age of Pliers is over because you bought
a set of Wrenches. PHP is a different tool that JSP. PHP is a much
more comprehensive tool that JSP, which is really geared for a very
specific task. Despite the fact that at some levels they compete,
on a *much* larger ranger of levels, they compliment.

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
   will lose both and deserve neither"

-- 
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] Dynamic check boxes...

2001-08-23 Thread Jeff Lewis

I have a form where users can enter a link (kind of a free for al links type of thing) 
 When they add their site to the database a 0 is added to the "approved" field.

When I load an admin script I can check all of the ones that have a 0 in that field.  
I want to have checkboxes form down the side of them so I can check the ones I want 
approved.  

Is it possible to have them all update with the click of one submit button?

Jeff



Re: Re[2]: [PHP] printing

2001-08-23 Thread Bill MacAllister

The way that I do it on Linux is to generate TeX output, invoke TeX 
using system(), and then just lpr the output to the printer.  The 
current production system that I am using actually uses a perl script 
invoked from a php script, really ugly, but I had the perl script from 
another project.

Here is a PHP example:

   $tex_file = "/tmp/file.tex";
   $dvi_file = "/tmp/file.dvi";

   $fp = fopen ($tex,"w");
   fputs ($fp, "This is a short story.\n");
   fputs ($fp, "\\end\n");
   fclose($fp);

   system ("tex --output-directory /tmp $tex_file >> $log_file");
   system ("dvips -P el4050 $dvi_file");

You have to understand TeX/LaTeX.  The good news is that if you use TeX 
you will end up with output that the fools that use Crystal Reports 
will drool over.

Bill

--On Tuesday, August 14, 2001 2:47 PM +0100 Fernando Avila 
<[EMAIL PROTECTED]> wrote:

> Hello Matthew,
>
> Friday, August 10, 2001, 8:55:24 PM, you wrote:
>
>
> ML> If you run windows, then see:
>
> ML> http://www.php.net/manual/en/ref.printer.php
>
>
> ML> -Original Message-
> ML> From: Fernando Avila [mailto:[EMAIL PROTECTED]]
> ML> Sent: Friday, August 10, 2001 10:18 AM
> ML> To: [EMAIL PROTECTED]
> ML> Subject: [PHP] printing
>
>
> ML> Hello php-general,
>
> ML>   I was thinking about my problem about printing reports
> ML>   CAn i do something like connecting a printer to the server
> where php ML>   and mysql runs.. And when someone send the comand to
> print the quote ML>   get printed in the server's printer?
> ML>   if it's posible maybe i will be albe to print a good quote
>
>
> And if i run linux?
> because I have a redhat 6.2 server
>
>
> Thanks
>
> --
> Best regards,
>  Fernandomailto:[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]
>



+---
| Bill MacAllister, Senior Programmer
| PRIDE Industries
| 10030 Foothills Blvd., Dept 1150
| Roseville, California 95747
| Phone: +1 916-788-2402

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

2001-08-23 Thread Tom Malone

Sorry to bother you all with this, but I have no way to test this, as I have
no access to a Mac. Could you tell me if this little piece of code looks as
if it would work (detect whether someone's using the Mac OS)?

if (preg_match("/mac/i", "$HTTP_USER_AGENT") || preg_match("/macintosh/i",
"$HTTP_USER_AGENT") || preg_match("/ppc/i", "$HTTP_USER_AGENT") ||
preg_match("/PowerPC/i", "$HTTP_USER_AGENT")):
$basefont = "Geneva";
else:
$basefont = "Verdana, Helvetica, Serif";
endif;

It doesn't return an error, but that doesn't mean it works. I really
appreciate your help. TIA

Tom Malone
Web Designer
http://www.tom-malone.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]




Re: [PHP] Re: force download in IE -- conclusion

2001-08-23 Thread Tim Frank

I have had success getting IE 5.5 for PC recognising the suggested 
filename by changing the content type to something other than 
application/octet-stream.  If it was left as that for IE 5.5(which the 
script snippet indicates) it would tend to take the filename of the 
script that executed it, or HTML file where the link to the script was 
located.

I have been using the forced download for txt and pdf files, dynamically 
generated with PHP of course, for about 2 years.  It is a pain in the ass 
to figure out the correct combinations for every different IE browser.  
Luckily it is a campus only system and the users are on PC or Linux.

Oh, and there is a bug if you try to force download in IE over an SSL 
connection WHEN USING SESSIONS.  I stumbled accross someone working on 
the SquirrelMail project who found a solution.  You just have to send 
these two extra headers to get IE force these downloads over SSL

if (ereg("MSIE", $HTTP_SERVER_VARS['HTTP_USER_AGENT'])) {
header('Pragma: ');
header('Cache-Control: cache');
}

That one had me stumped for 2 years and I had to bail out of the sessions 
and pass everything through the URL to force a download.

Hope that helps too.

Tim Frank

>> Original Message <<

On 22/08/01, 5:47:26 PM, [EMAIL PROTECTED] (Pierre-Yves) wrote regarding 
Re: [PHP] Re: force download in IE -- conclusion:


> I worked on a script like yours for a looong time now!

> I need to force the download of various type of file, doc, pdf, zip, even
> html!

> Your script works fine on Opera 5.02 and netscape 4.76 on my win NT 4.0 
box,
> but
> not on IE 5.5 On this one, it offers me to download the script file but
> instead of being
> a php file it has now an html extension !!

> Anyhow, I do have a download by email attachment button also, because I 
gave
> up on trying
> to find a script to force download

> py


> - Original Message -
> From: "David Minor" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 22, 2001 4:10 PM
> Subject: [PHP] Re: force download in IE -- conclusion


> > I ran some tests of different header configurations of 6 browser/platform
> > combinations to find out what worked and what didn't.  I didn't cover all
> of
> > the platforms available, just those that my user-base uses, so this isn't
> > complete.
> >
> > combinations tested was IE5.5, NN4, NN6 for Windows 98 and IE5.5, NN4.7
> for
> > Mac 9.1.  I tested all of these browsers using/not using 'attachment' in
> the
> > Content-Disposition header.  and also changed out the Content-Type header
> > with 'application/octet-stream', 'application/download', and '*/*'.
> >
> > Here's the summary and what I did to make things work as well as 
possible.
> > My goal is to prompt the user with a save-as dialog for an mp3 file.
> >
> > IE5.5 for Mac always uses the quicktime plugin to play the file no matter
> > what the disposition or type is.  (also no matter what the file extension
> > is.  Couldn't figure out how to trick it to download the file.)
> >
> > IE5.5 for Win98 would attempt to download the file if
> ("content-disposition:
> > attachment; filename=") attachment was there.
> >
> > All 3 of the Win98 browsers would do prompt with as few clicks as 
possible
> > when content-type was "application/octet-stream".  Therefore,  I test in
> my
> > script for the Mac users and give them "Content-type:
> application/downlaod"
> > while I give other users "Content-Type: application/octet-stream".  Of
> > course, this doesn't help the IE5.5 Mac users who still have to use
> > "Downlaod Link to Disk" routine to get a save-as prompt.
> >
> > Anyone who sees different ways this could be done, please respond.
> >
> > Here's my code:
> >
> > if (eregi("mac",$HTTP_USER_AGENT))
> >$type = "application/download";
> > else
> >$type = "application/octet-stream";
> >
> > // stream file to user
> > header("Content-Type: $type");
> > header("Content-Disposition: attachment; filename=$filename");
> > header("Content-Length: ".filesize($tmp_file));
> > header("Content-Transfer-Encoding: binary");
> > readfile($tmp_file);
> >
> >
> >
> > --
> > 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] numrows

2001-08-23 Thread Martin Kampherbeek

This is the error I get. I tested in MYSQLadmin and there it works. I think
there is something with numrows.
MySQL Query Failed. Error 1030: Got error -1 from table handler



Message-ID: <[EMAIL PROTECTED]>
Date: Thu, 23 Aug 2001 10:11:17 -0700 (PDT)
From: "ERISEN, Mehmet Kamil" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: Re: [PHP] numrows

Hello,
Chris, with all due respect, DESC is a reserved word for
SQL. is english ORDER BY ID DESC meand sort by id in
descending order.

Martin,
your SQL seems to be fine. Are you sure that you are
connected to your database.
I have run the following SQL against my database
SELECT *
 FROM users
 WHERE username <> '1'
 AND user_id < 250
 ORDER BY user_id DESC
and it returned back records.  SO SQL syntax is fine.




-- 
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: numrows

2001-08-23 Thread Martin Kampherbeek

This is the error I get.
MySQL Query Failed. Error 1030: Got error -1 from table handler




Message-ID: <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
From: "Johannes Janson" <[EMAIL PROTECTED]>
Date: Thu, 23 Aug 2001 12:40:21 +0200
Subject: Re: numrows

Hi,

>$query = "SELECT * FROM question WHERE answer<>'1' AND id>250 ORDER BY id
DESC";
>
>$result = MYSQL_QUERY($query);

add "or die(mysql_error())" see what MySQL doesn't like about the query.

cheers
johannes



-- 
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] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov

  $this->starttime=explode(' ',microtime());
// query.
  $this->endtime=explode(' ',microtime());
  $this->starttime=$this->starttime[1]+$this->starttime[0];
  $this->endtime=$this->endtime[1]+$this->endtime[0];
  $this->parse_time=$this->endtime-$this->starttime;

I've copied that from a class member but the idea is clear;

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: "Nathan Cook" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Gabe da Silveira" <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 7:57 PM
Subject: Re: [PHP] Getting MySQL Query Times.


> IMO, you are better off printing microtime
> [http://www.php.net/manual/en/function.microtime.php] before and after the
> query, and after you loop through it.  This will give you a better idea of
where
> the hangups may be.  You may also want to sprinkle mircotimes throughout
your
> code to get a good idea of processing time.
>
> Nathan Cook
> [EMAIL PROTECTED]
> - Original Message -
> From: "Gabe da Silveira" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 23, 2001 10:22 AM
> Subject: [PHP] Getting MySQL Query Times.
>
>
> > I was looking thru the mysql functions, and there doesn't seem to be one
> > that gives you the amount of time a query takes.  Is there anyway to get
> > this information (since it gives it to you when you type queries
> > directly into the mysql shell client)?  A script of mine is starting to
> > get fairly slow (2-3 seconds for page to process) and I want to be able
> > to log the query speeds so I can see if there's a database bottleneck or
> > if my code is just kludgy.
> >
> > --
> > __
> > Gabe da Silveira, Web Designer
> > Twin Cities Student Unions
> > University of Minnesota
> > http://www.coffman.umn.edu
> >
> > wFone: (612)624-7270
> > eMail: [EMAIL PROTECTED]
> > hPage: http://www.visi.com/~jiblet
> >
> > --
> > 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 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] The future of PHP

2001-08-23 Thread Jeff Pearson

Thomas,

Keeping in mind that preaching Languages is the same as religion. If someone
is decided for something, nothing you can say will change their mind; my
point in bringing up the numbers was that again, these numbers include ONLY
IT'S OWN CUSTOMERS If everyone was included in the poll, Im sure the
numbers would be totally different. But I also overlooked Dave's point that
it also only includes the Linux version of PHP.

> -Original Message-
> From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 23, 2001 10:07 AM
> To: PHP List
> Subject: Re: [PHP] The future of PHP
>
>
> On 8/23/2001 11:59 AM this was written:
>
> > On its Solaris Developer Connection site, Sun posed the question, "What
> > language do you use to develop Web-based client applications?"
> The responses
> > went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++,
> 14.2 percent;
> > Linux script language PHP, 11.2 percent; Microsoft Active
> Server Pages, 8.8
> > percent; and other, 4.3 percent. Check it out for yourself at
> > soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet.
> >
> >
> >
> > Notice it even gives info on PHP use   :-)
>
> He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.
> --
>
> Thomas Deliduka
> IT Manager
>  -
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.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] The future of PHP

2001-08-23 Thread B. van Ouwerkerk


> > Notice it even gives info on PHP use   :-)
>
>He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.

Ask the same question to PPL on this list.. I'll bet you see the opposite.

It only proves your favorite kid doesn't understand a thing about statistics.

I think PHP is great.. there is a place for everything.. even for Java :)

Bye,


B.


-- 
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] Getting MySQL Query Times.

2001-08-23 Thread Gabe da Silveira

Thank you Andrey & Nathan.  THat was probably going to be the next thing 
to research.  I think I figured out why my code got slow though.  I have 
a preg search of a large field with .* in it at the beginning of an 
if,elseif,elseif,elseif struct that I should move to the end of it.  

In article <007601c12bf4$e0b41f40$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Nathan Cook) wrote:

> IMO, you are better off printing microtime
> [http://www.php.net/manual/en/function.microtime.php] before and after the
> query, and after you loop through it.  This will give you a better idea of 
> where
> the hangups may be.  You may also want to sprinkle mircotimes throughout your
> code to get a good idea of processing time.

In article <047c01c12bf3$bdae2b40$0b01a8c0@ANDreY>,
 [EMAIL PROTECTED] (Andrey Hristov) wrote:

> Use microtime before and after the query.

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
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: The future of PHP

2001-08-23 Thread J Smith

XML is pretty standardized, but the implementation of it in various web 
browsers isn't. 

I wouldn't consider XML all that comparable to HTML. They don't serve the 
same purpose. XML is generally used to order and describe data (metadata, 
basically), and although HTML serves roughly the same purpose, HTML is much 
more focused in what it provides -- HTML is meant to be rendered in a web 
browser, while XML's use is really undefined. You can use XML for 
server-to-server communications, peer-to-peer stuff, messaging, document 
descriptions, and pretty much any generalized markup. HTML really isn't 
designed for that sort of stuff.

As for "freestyle", XML's syntax is much less open to interpretation than 
HTML's. XML is much more rigid -- forget a closing tag and your document 
becomes invalid. Screw up the order of your elements and it's invalid. If 
you forget a closing tag in HTML, you can be forgiven, but in XML, you're 
toast. Even linebreak elements in XML need closing tags.

It doesn't really matter how IE and Netscape or any other browser renders 
XML. That's what XSL is for -- transforming XML into HTML before it is sent 
to the client. (Alternatively, the XML could be sent directly to the client 
and then doing the transformation client-side.

As for XML scripting engines, again, XML is just markup, it isn't really a 
scripting engine. There is a bit of scripting-like looping structures and 
logic that can be used in XSL, but it's nowhere near the level of PHP, ASP, 
Perl, etc. Apache's Cocoon XML/XSL system does have a programming system 
built in called XSP (eXtensible Server Pages), which is basically takes 
Java embedded into XML or XSL and compiles it all as one big Java class. 
(You can add different languages to XSP, but it isn't fun. The next version 
will have "producers" that can create XML from scripting/compiled 
languages, including PHP.)

I've mixed PHP and XML (with XSLT) on my current project quite nicely. I 
started with Cocoon and XSP, but as Sablotron and PHP's XSLT extensions 
became more stable, I started using them rather than combining both Cocoon 
and PHP.

J




Elias Santiago wrote:

> He MAY be right, may not.  XML is just not so standardized (if in doubt
> look how IE and Netscape each implement it "their way") I consider XML
> like
> "freestyle HTML".   I know this technology has great potential but if
> developers don't decide on how to standardize it, it could die young.  PHP
> however (as an avid follower) is on a "fast track" and even Microsoft
> considers it a strong contender to ASP.  However, both PHP and XML
> technologies are just scripting engines.  Products like the Zend engine
> are just starting to scratch the surface for truly dynamic, cached,
> real-time
> web applications.  I'm not saying that either PHP or XML (or any other
> technology that comes along) is going to die or leave the other "in the
> dust" but look what has happened with Java, it has certainly lost
> momentum.
> 


-- 
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] The future of PHP

2001-08-23 Thread Dave

>He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.

And flash developers will claim that the only way to create a site is have the
whole thing Flash and crap flying across the client screen all the time...
Untill the modem access market drops below 50% of the users on the net...  hard
time convincing me that 100's of kb in Flash is worth it.

He obviously is sold on JSP...  let him sink with his ship.  PHP isn't going
anywhere anytime soon...  not while *nix boxes are still the most stable
performers for web.

IMO of course ;)

Dave


-- 
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: strange error

2001-08-23 Thread Dave


>if you have structure like
>
>if (isset(...)){
>...;
>}
[...]
>?>
>
>you have to insert "endif;"
>If you think you did it but still have an error, try to count your "if"
>statements and "endif;" maybe something is missing.

This is a matter of personal preference, but use formatting that is helpful to
determine where you are in your code...  and comment yourself...  it will avoid
missing } { and other common erors that eat up valuable time tracking down. HTML
cares less about the extra spaces and \n's anyway




While generally restrictive in nature, some good ideas for policing your own
code can be found at http://utvikler.start.no/code/php_coding_standard.html
(just one copy I came across).  take what you need out of there... once you
stick to a method, your occasions of tracking down loose ends will drop greatly.

Dave



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

2001-08-23 Thread ERISEN, Mehmet Kamil

Hello,
Chris, with all due respect, DESC is a reserved word for
SQL. is english ORDER BY ID DESC meand sort by id in
descending order.

Martin,
your SQL seems to be fine. Are you sure that you are
connected to your database.
I have run the following SQL against my database
SELECT * 
 FROM users 
 WHERE username <> '1' 
 AND user_id < 250 
 ORDER BY user_id DESC
and it returned back records.  SO SQL syntax is fine.








--- Chris Fry <[EMAIL PROTECTED]> wrote:
> Should be ORDER BY ID, DESC
> 
> Chris
> 
> Martin Kampherbeek wrote:
> 
> > What's wrong with this? I get the error: Warning:
> Supplied argument is not a valid MySQL result resource in
> /home/sites/site49/web/vragen/vragen.php on line 42
> >
> > $query = "SELECT * FROM question WHERE answer<>'1' AND
> id>250 ORDER BY id DESC";
> >
> > $result = MYSQL_QUERY($query);
> >
> > $number = MYSQL_NUM_ROWS($result);
> 
> --
> 
> Chris Fry
> Quillsoft Pty Ltd
> Specialists in Secure Internet Services and E-Commerce
> Solutions
> 10 Gray Street
> Kogarah
> NSW  2217
> Australia
> 
> Phone: +61 2 9553 1691
> Fax: +61 2 9553 1692
> Mobile: 0419 414 323
> eMail: [EMAIL PROTECTED]
> http://www.quillsoft.com.au
> 
> You can download our Public CA Certificate from:-
> https://ca.secureanywhere.com/htdocs/cacert.crt
> 
>
**
> 
> This information contains confidential information
> intended only for
> the use of the authorised recipient.  If you are not an
> authorised
> recipient of this e-mail, please contact Quillsoft Pty
> Ltd by return
> e-mail.
> In this case, you should not read, print, re-transmit,
> store or act
> in reliance on this e-mail or any attachments, and should
> destroy all
> copies of them.
> This e-mail and any attachments may also contain
> copyright material
> belonging to Quillsoft Pty Ltd.
> The views expressed in this e-mail or attachments are the
> views of
> the author and not the views of Quillsoft Pty Ltd.
> You should only deal with the material contained in this
> e-mail if
> you are authorised to do so.
> 
> This notice should not be removed.
> 
> 
> 
> -- 
> 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]
> 


=
Mehmet Erisen
http://www.erisen.com

__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.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]




Re: [PHP] The future of PHP

2001-08-23 Thread Thomas Deliduka

On 8/23/2001 11:59 AM this was written:

> On its Solaris Developer Connection site, Sun posed the question, "What
> language do you use to develop Web-based client applications?" The responses
> went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent;
> Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8
> percent; and other, 4.3 percent. Check it out for yourself at
> soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet.
> 
> 
> 
> Notice it even gives info on PHP use   :-)

He would see JSP at 19.9% and PHP at 11.2 and say that proves his point.
-- 

Thomas Deliduka
IT Manager
 -
New Eve Media
The Solution To Your Internet Angst
http://www.neweve.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]




RE: [PHP] The future of PHP

2001-08-23 Thread Dave

>On its Solaris Developer Connection site, Sun posed the question, "What
>language do you use to develop Web-based client applications?" The responses
>went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent;
>Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8

Nothing against Linux, but certainly limiting PHP in that statement.

>percent; and other, 4.3 percent. Check it out for yourself at
>soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet.
>
>
>
>Notice it even gives info on PHP use   :-)


-- 
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] Getting MySQL Query Times.

2001-08-23 Thread Jon Haworth

> I was looking thru the mysql functions, and there doesn't seem to be one 
> that gives you the amount of time a query takes.  Is there anyway to get 
> this information (since it gives it to you when you type queries 
> directly into the mysql shell client)?  A script of mine is starting to 
> get fairly slow (2-3 seconds for page to process) and I want to be able 
> to log the query speeds so I can see if there's a database bottleneck or 
> if my code is just kludgy.

I don't know if there's an actual function for it (although I wouldn't be
surprised, knowing PHP :-), but you could definitely do something like:

$start = mktime();
$sql = "SELECT foo FROM bar ORDER BY xyzzy";
$result = mysql_query ($sql);
// do something with the result if you want that timed as well
$end = mktime();
$total = $end - $start;
echo $total; // could format this using date() if you fancy

HTH
Jon

-- 
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] Getting MySQL Query Times.

2001-08-23 Thread Nathan Cook

IMO, you are better off printing microtime
[http://www.php.net/manual/en/function.microtime.php] before and after the
query, and after you loop through it.  This will give you a better idea of where
the hangups may be.  You may also want to sprinkle mircotimes throughout your
code to get a good idea of processing time.

Nathan Cook
[EMAIL PROTECTED]
- Original Message -
From: "Gabe da Silveira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 10:22 AM
Subject: [PHP] Getting MySQL Query Times.


> I was looking thru the mysql functions, and there doesn't seem to be one
> that gives you the amount of time a query takes.  Is there anyway to get
> this information (since it gives it to you when you type queries
> directly into the mysql shell client)?  A script of mine is starting to
> get fairly slow (2-3 seconds for page to process) and I want to be able
> to log the query speeds so I can see if there's a database bottleneck or
> if my code is just kludgy.
>
> --
> __
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: [EMAIL PROTECTED]
> hPage: http://www.visi.com/~jiblet
>
> --
> 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] Getting MySQL Query Times.

2001-08-23 Thread Andrey Hristov

Use microtime before and after the query.
  $this->starttime=explode(' ',microtime());
//  query()
  $this->endtime=explode(' ',microtime());
  $this->starttime=$this->starttime[1]+$this->starttime[0];
  $this->endtime=$this->endtime[1]+$this->endtime[0];
  $this->parse_time=$this->endtime-$this->starttime;

I've copied from working code of a class. But the idea is clear.This way is
better than time() solutuion because with microtime() you get microseconds.
But have in mind that on windows there are some problems with microtime()
and the reported time can be negative.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: "Gabe da Silveira" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 7:22 PM
Subject: [PHP] Getting MySQL Query Times.


> I was looking thru the mysql functions, and there doesn't seem to be one
> that gives you the amount of time a query takes.  Is there anyway to get
> this information (since it gives it to you when you type queries
> directly into the mysql shell client)?  A script of mine is starting to
> get fairly slow (2-3 seconds for page to process) and I want to be able
> to log the query speeds so I can see if there's a database bottleneck or
> if my code is just kludgy.
>
> --
> __
> Gabe da Silveira, Web Designer
> Twin Cities Student Unions
> University of Minnesota
> http://www.coffman.umn.edu
>
> wFone: (612)624-7270
> eMail: [EMAIL PROTECTED]
> hPage: http://www.visi.com/~jiblet
>
> --
> 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] PHP object orientation with "Application Frameworks" or "Foundation Class Libraries"

2001-08-23 Thread Orr, Steve

PHP Wizzards,

I'm a PHP newbie but I think I'm falling in love... or at least becoming
infatuated with PHP. I'm contemplating a significant PHP development effort
on a toolset for Oracle DBA's and I want to architect wisely. 

Based on prior object oriented development experience with PowerBuilder I
think starting with a good framework is very important. What kind of PHP
application development frameworks, class libraries, or templates are
available and what do you recommend? Is SiteManager any good? How about
phplib? Are there others? Any comments on PHP object orientation?

AtDhVaAnNkCsE,
Steve Orr

-- 
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: conf file access on host server

2001-08-23 Thread Andrey Hristov

Many conf variables can be setup at runtime. Just include(require) in every
script setup.php

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%
- Original Message -
From: "Diane Mulberry" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 7:12 PM
Subject: [PHP] Re: conf file access on host server


> can no one help me?
>
> "Diane Mulberry" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > hi,
> > i'm a relative new comer to php and was wondering if someone could give
me
> > some advice on hosting. specifically, access to my own conf file, and
> > whether this is entirely necessary. Does not having access to your own
> conf
> > limit what you can do in php in any way?
> > also, if you have compiler access on the server, does that mean you can
> > install your own libraries, etc?
> > I'm currently looking at www.gradwell.com and they seem pretty good. any
> > advice?
> > Thanks,
> > Diane Mulberry
> >
> >
>
>
>
> --
> 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] Script timeout

2001-08-23 Thread Julian Wood


Well just to follow up, Apache was the culprit. There is an Apache 
timeout directive that was set to 300 s that I somehow missed  on my 
first glance.

The things that timeout, as far as I know, are PHP, Apache, and several 
commands within PHP (such as fsockopen()). The Apache directive is 
called Timeout, conveniently enough. It actually indicates the amount of 
time between successive TCP packet transmissions before a timeout 
occurs, which threw me for quite a loop. I could make a script which 
took 20 minutes to complete and get no timeouts anywhere, so I was 
convinced there was something wrong with my code. The difference was 
that this 20 min script outputted data along the way, so no timeouts 
ever occurred. The problem script didn't output anything until it was 
finished processing. Christian hit it on the nail. You can set the php 
timeout within the apache config file like so: php_value 
max_execution_time 120. This time is not real time, but the time the 
script actually gets access to cpu resources, or something like that. In 
my case, a setting of 30 was about 300 s.

I don't know if the browser itself will ever timeout as long as it makes 
the initial handshake.

J

On Thursday, August 23, 2001, at 09:43 AM, Johnson, Kirk wrote:

>
>> Why timeout at 300s instead of the 30s or the 12000s which
>>> are the only two values reported?
>>
>> Looks like some HTTP timeout, i.e. either Apache or the browser is
>> getting bored. Try outputting something from time to time.
>
> Can anybody point me to information on all the possible HTTP timeouts 
> there
> are (Apache, browser, ???), or care to discuss it here? We occasionally 
> see
> "timeouts" that are not due to PHP, and I'm wondering where they are 
> coming
> from.
>
> TIA
>
> Kirk
>
> --
> 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]
>

--
Julian Wood

Programmer/Analyst
University of Calgary

-- 
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] constant arrays or something like #define in c

2001-08-23 Thread Andrey Hristov

Ok,
the solution is :
in script1.php
define("ARRAY_NAME","array1");
in script2.php
define("ARRAY_NAME","array2");

in template.php:
${ARRAY_NAME}['some_index']
I didn't tested this but think that it will work. If not post a message to
think for other way.

Andrey Hristov
IcyGEN Corporation
http://www.icygen.com
99%

- Original Message -
From: "Gregor Maier" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 6:37 PM
Subject: Re: [PHP] constant arrays or something like #define in c


> Unfortunaly that's not an option because I must be able to make the define
in
> the code:
>
> it should be like this:
> i have a   script1.php and script2.php. both include a file template.php
> in my template.php file I use arrays that should have different names
depending
> on the file that included them.
> I would then the use XYZ as the name of the array in template.php and in
> script1.php i would define XYZ as array1   and in
> script2.php i would define XYZ as array2.
>
> but thanks for the tip.
>
> On 23-Aug-2001 Andrey Hristov wrote:
> >  You can use define in some main config file which is known by all
scripts
> > of the site.
> > For example
> > define ("SESSION_NAME","mysite_sid");
> >
> > Where you want to use the array
> > ${SESSION_NAME}=array('login'=>'scott',"password"=>"tiger","age"=>"25");
> >
> >
> > ${SESSION_NAME}['login']
> > or
> > ${SESSION_NAME}['age']
> >
> >
> >
> > Hope this helps.
> >
> > Andrey Hristov
> > IcyGEN Corporation
> > http://www.icygen.com
> > 99%
> >
> > - Original Message -
> > From: "Gregor Maier" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, August 23, 2001 6:16 PM
> > Subject: [PHP] constant arrays or something like #define in c
> >
> >
> >> Hi,
> >>
> >> I'm looking for a way to get a constant array or something that is
> > similiar to
> >> a #define XYZ abc in C.
> >>
> >> I want to be able to do the following:
> >>
> >> DEFINE SOMEHOW:  abc as XYZ  (like #define XYZ abc) where abc is an
> >> array. So that XYZ is replaced by abc.
> >>
> >> so that I can use XYZ[key] in my php-code and that this translates to
> > abc[key].
> >>
> >> Or is there another possibility for this. I wouldn't mind if XYZ is not
> >> constant as long as can use XYZ instead of abc.
> >> Would it be possible to do such a thing with references?
> >>
> >> Thanks for your help.
> >>
> >> Gregor
> >>
> >> --
> >> E-Mail: Gregor Maier <[EMAIL PROTECTED]>
> >> Date: 23-Aug-2001
> >> Time: 17:09:14
> >> --
> >>
> >> --
> >> 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]
> >
>
> --
> E-Mail: Gregor Maier <[EMAIL PROTECTED]>
> Date: 23-Aug-2001
> Time: 17:32:06
> --
>
> --
> 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] File upload problem

2001-08-23 Thread Sheridan Saint-Michel

Change 
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 4:31 AM
Subject: [PHP] File upload problem


> Hello there,
>
> I am trying to create a form for uploading files to the local intranet.
> Therefore I created a form for uploading files as mentioned in the PHP
> manual. After submitting the form I want to copy the file to the intranet
> with as name the original name on the system of the client. The problem is
> that the file is not being uploaded... The code i have is:
>
>  if ($subactie == ""){
>   // File upload form showen
> echo " action='index.php?actie=formulieren&subactie=upload' method='post'>
>Upload dit bestand:  type='file'>
> 
>   ";
>   }
>
>   if ($subactie == "upload"){
>   // Upload the file
> if (!copy($userfile, $userfile_name)) {
> echo "error while uploading!"; }
> else {
>   echo "file uploaded successful!";
> }
>   }
>
> ?>
>
> The file I try to upload (c:\ws_ftp.log which I currently use as randomly
> selected testfile) does exist on the harddisk (selected via the browse
> button). When I execute the code I get the folowing output: "Warning:
Unable
> to open 'C:\\WS_FTP.LOG' for reading: No such file or directory in
> /usr/local/www/intranet.lync.nl/test/service/srv_formulieren.php on line
13
> error while uploading! "
>
> I am sure I overlooked something, but can't find it. I hope someone can
help
> me to find the problem.
>
> Some additional information: The upload_tmp dir. is set to a temp
directory
> in the root of the intranet root. The directory is owned by the same user
as
> the php/apache server is running. This user has all rights on the
directorys
> involved
>
> Thank you all in advance.
>
>
> Kind regards,
>
>
> A.D. Vijverberg
> [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 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: mail function

2001-08-23 Thread Gabe da Silveira

There are not a lot of guarantees.  A big part of the problem is that 
you can't get instant feedback.  Your mail server may queue the message 
and not even send it right away, or it could get sent, and your mail 
server doesn't find out for several minutes while the message goes out 
on the 'net and eventually bounces because the address is bad.  There is 
probably a way you can get your mail server to inform you when a message 
fails to get delivered, but beyond that you probably can't do much.

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Richard Baskett) wrote:

> I am trying to get the mail function to return anything that tells me that
> it was sent successfully or at least there were no errors, but assigning a
> variable to equal the mail function does not seem to return anything...  On
> php's site it says it should return true.  Am I going about this wrong?
> 
> Quite confused! :)
> 
> Rick
>

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
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] Getting MySQL Query Times.

2001-08-23 Thread Gabe da Silveira

I was looking thru the mysql functions, and there doesn't seem to be one 
that gives you the amount of time a query takes.  Is there anyway to get 
this information (since it gives it to you when you type queries 
directly into the mysql shell client)?  A script of mine is starting to 
get fairly slow (2-3 seconds for page to process) and I want to be able 
to log the query speeds so I can see if there's a database bottleneck or 
if my code is just kludgy.

-- 
__
Gabe da Silveira, Web Designer
Twin Cities Student Unions
University of Minnesota
http://www.coffman.umn.edu

wFone: (612)624-7270
eMail: [EMAIL PROTECTED]
hPage: http://www.visi.com/~jiblet

-- 
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: conf file access on host server

2001-08-23 Thread Diane Mulberry

can no one help me?

"Diane Mulberry" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> hi,
> i'm a relative new comer to php and was wondering if someone could give me
> some advice on hosting. specifically, access to my own conf file, and
> whether this is entirely necessary. Does not having access to your own
conf
> limit what you can do in php in any way?
> also, if you have compiler access on the server, does that mean you can
> install your own libraries, etc?
> I'm currently looking at www.gradwell.com and they seem pretty good. any
> advice?
> Thanks,
> Diane Mulberry
>
>



-- 
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] parse_url and cgi?

2001-08-23 Thread Jaxon

can someone answer the question - does parse_url in fact NOT work when using
PHP as a cgi?
i'm unable to make it work, and getting different answers from my isp, etc.

cheers,
jaxon


-- 
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] The future of PHP

2001-08-23 Thread scott [gts]

:-)

for the type of sites that i develop (non-mission-critical,
non-financial), i find PHP's simplicity and elegance more than
offsets a lack of things like strong typing and a harshly
BDSM compiler (and whatever else Java/JSP has that PHP
doesn't)

for most websites out there, Java is probably overkill, and
using it would complicate the task at hand... but as with
everything in life, JSP/XML has it's place, and PHP has it's.


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Subject: Re: [PHP] The future of PHP
> 
> I guess that there are places to use PHP and others to use Java, you
> decide what will suit better your needs.


-- 
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: strange error

2001-08-23 Thread BRACK

if you have structure like



then you need to insert "}" before "
or if you use syntax



you have to insert "endif;" 
If you think you did it but still have an error, try to count your "if" 
statements and "endif;" maybe something is missing.

Youri


-- 
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: 2 NEWBIE QUESTIONS

2001-08-23 Thread Yura

On 23 Aug 2001, at 0:16, Georgie wrote:

> 1) Is there any PHP command that'll convert a MySQL database timestamp into
> a format that humans can read?!! For example, I want to change
> "20010822001245" into "00:12.45 on the 22-08-2001"?

I believe all previous replies on this qwestion were good for you;

> 2) This is the hard question. I have a script that gets values from a
> database and then includes a php page which contains "echo $variable" code
> to get the values from the database onto the page.
> 
> What I want to do is have the PHP page code in the main script instead of
> being included externally. So i tried putting the code into a variable and
> then including, but it didnt work. Then I tried echoing the variable but the
> PHP code isnt executed.

Try to copy everything that is in your included php page except for 
"" other words everything that is between "" and replace your "include()" statement in the main script 
with what you just copied. But I don't really understand why do you 
want to put it in the main script, I would rather live it outside.

Youri
<>< <>< <>< <>< God is our provider ><> ><> ><> ><> 
http://www.body-builders.org

-- 
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] The future of PHP

2001-08-23 Thread Jeff Pearson

Sorry,

Should have given specific information. The original article I read was from
InfoWorld. It can be found at:

http://www.infoworld.com/articles/op/xml/01/07/09/010709opcringely.xml

Following is the excerpt from it:



Place in the Sun

Meanwhile the light finally dawned on archrival Sun Microsystems, as the
company discovered the awful truth: Few developers use Java Server Pages
(JSP). Rather, many use that quiet achiever, the ugly-duckling language
Perl.

On its Solaris Developer Connection site, Sun posed the question, "What
language do you use to develop Web-based client applications?" The responses
went like this: Perl, 41.3 percent; JSP, 19.9 percent; C/C++, 14.2 percent;
Linux script language PHP, 11.2 percent; Microsoft Active Server Pages, 8.8
percent; and other, 4.3 percent. Check it out for yourself at
soldc.sun.com/polls/index.jshtml -- if they haven't taken it down yet.



Notice it even gives info on PHP use   :-)


Hope this helps.


Jeff Pearson



> -Original Message-
> From: Thomas Deliduka [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 22, 2001 7:31 PM
> To: PHP List
> Subject: [PHP] The future of PHP
>
>
> A little background... Skip to "THE JIST" if you wanna make this quick.
>
> I am on this webmaster's list where most of the people are fairly new
> webmasters. They're just getting the hang of things. I am probably one of
> the only advanced ones on there (not to toot my own horn really)
> and I'm one
> of two who use PHP (the other is just learning.)
>
> I tout PHP and MySQL as awesome, which they are, but I don't say
> they're the
> only technology out there.
>
> There is another guy, a kid, who is a major Java guy and he's BIG into XML
> and JSP.
>
> Some guy on this list asked what a good dynamic web solution is, I
> immediately chimed in and said PHP was great, free, and on most all linux
> hosts.  Told him how powerful it was and what could be done with it.
>
> This kid chimes in and says, something to the affect of that if the guy
> wants to live in the past and not let his website go anywhere
> then he should
> go with PHP but JSP is the wave of the future and it's more powerful, and
> has the backing of the almighty Sun and the Open Source community
> (as if PHP
> doesn't).
>
> THE JIST
>
> So, the jist is, what does PHP have to offer to the web in the future?  I
> think it's still a viable option that will be around for at least another
> 6-7 years. This kid thinks it's shelf life is another 3.  What do ya'll
> think?
>
> --
>
> Thomas Deliduka
> IT Manager
>  -
> New Eve Media
> The Solution To Your Internet Angst
> http://www.neweve.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] The future of PHP

2001-08-23 Thread Sean C. McCarthy

Hi,

Well you are not well informed then. Java is the most popular solution
to big web sites with the need to have something fault tolerant and
stable. If you look a lot of banks have not JSP or servlets but EJB
which are transactional, persistant through connections, multithreaded
and have all the power of Java Language (safety, security, sandboxing,
etc). Containers like Weblogic are making good money out of this. 

If you want to know if somebody is using Java, just visit
www.javasoft.com or ask people like the group in charge of Tomcat (of
the Apache group), XERCES or so at java.apache.org on the Jakarta
project. Also Motorola and other companies are working hard to integrate
Java into small devices set-top boxes and devices like that.

I guess that there are places to use PHP and others to use Java, you
decide what will suit better your needs.

Sean C. McCarthy
SCI, S.L.

Kai Schaetzl wrote:
> 
> > JSP is the wave of the future
> >
> 
> As was said two years ago about Java. Does anybody still know about
> Java? ;-)
> 
> Kai
> 
> --
> 
> Kai Schätzl, Berlin, Germany
> Get your web at Conactive Internet Services: http://www.conactive.com
> IE-Center: http://ie5.de & http://msie.winware.org
> ClubWin - Help for Windows Users: http://www.clubwin.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]




  1   2   >