|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: php-general-digest-help
lists.php.netDate: Thu Aug 16 2001 - 20:19:36 CDT
php-general Digest 17 Aug 2001 01:19:36 -0000 Issue 820
Topics (messages 63017 through 63114):
Re: PHP on client-side
63017 by: Tom Malone
63018 by: Pavel Jartsev
63019 by: Justin Farnsworth
63023 by: Tom Malone
63025 by: Jan De Luyck
63032 by: Sheridan Saint-Michel
63035 by: Jay Paulson
How to resume session by id?
63020 by: Darius Ivanauskas
63027 by: Niklas Lampen
63036 by: Darius Ivanauskas
63038 by: Niklas Lampen
63044 by: Darius Ivanauskas
63055 by: Renze Munnik
php 4.0.6(win32) + gd(freetype) = Could not find/open font
63021 by: Konstantin Boshnyaga
Re: "location bar"
63022 by: Kurth Bemis
Re: Problem: Sybase, PHP and multiple result sets
63024 by: Warren Vail
cookie expire...
63026 by: Romeo Manzur
Unix vs PC test for server
63028 by: Paul S.
63030 by: Alexander Wagner
63033 by: Renze Munnik
63034 by: Jack Dempsey
63045 by: Steve Edberg
63053 by: Jack Dempsey
LDAP support in PHP compilation.
63029 by: Johan Vikerskog (ECS)
Re: [PHP-DB] MYSQL_SOCKET
63031 by: Jay Paulson
PHP Client "Proofing" System out there?
63037 by: Michael O'Neal
Zend Optimizer
63039 by: Alfredeen, Johan
63042 by: Chris Lambert
63051 by: Jonathan Hilgeman
PHP within .html files
63040 by: Paul S.
63049 by: Jon Haworth
63093 by: Marc Hanlon
63102 by: Chris Hayes
Re: MYSQL_SOCKET
63041 by: Jay Paulson
63066 by: Rasmus Lerdorf
Sort a an array?
63043 by: Allen May
63046 by: Sam Masiello
63048 by: Jon Haworth
63050 by: Sheridan Saint-Michel
global variables in functions
63047 by: Tom Hodder
Re: Online Psychology Tests
63052 by: Hugh Bothwell
Re: [PHP-WIN] Installation failed ! Please Help!
63054 by: Powell, Jim (EER)
63056 by: Phil Driscoll
63089 by: Elias Santiago
63090 by: Elias Santiago
Sending alots of mail
63057 by: Jimmy Bäckström
63059 by: Tyler Longren
63060 by: Daniel Adams
63061 by: Jome
63062 by: Jimmy Bäckström
63063 by: Tyler Longren
63064 by: Tim
63067 by: Jimmy Bäckström
63068 by: PHP List
63069 by: Tom Hodder
63070 by: Jimmy Bäckström
63077 by: Daniel Adams
63078 by: Daniel Adams
63079 by: Tyrone Mills
63083 by: Dennis Moore
63085 by: Sheridan Saint-Michel
63094 by: Jimmy Bäckström
[PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!
63058 by: Angie Tollerson
63107 by: Powell, Jim (EER)
Re: http methods
63065 by: Edney Marcel Imme
Re: php_value in htaccess, internal server error
63071 by: Egan
loose variables when url parsed through Netscape
63072 by: Tom Beidler
63074 by: Data Driven Design
63076 by: Tom Beidler
Reload a page when a user press the back button
63073 by: Mauricio T?llez Jim?nez
mysql_db_name not working
63075 by: Peter Ostry
Need to dynamically globalise variables
63080 by: Tom Hodder
63082 by: Rasmus Lerdorf
Oracle module installation
63081 by: Mike Kelland
63091 by: Rasmus Lerdorf
Re: bold current menu item
63084 by: Jason Dulberg
63086 by: Daniel Adams
Re: bold current menu item (fwd)
63087 by: Daniel Adams
Is jacascript enabled?
63088 by: Seb Frost
Interesting links
63092 by: Elias Santiago
Problem with a query? or Syntax?
63095 by: .::romina:tulisi::.
63098 by: Rasmus Lerdorf
63103 by: Chris Hayes
Win One of 25 Dream Vacation Getaways!! .
63096 by: CATHY4233.hotmail.com
63101 by: PHP List
passing variables from PHP to Perl script
63097 by: Tom Beidler
PHP and Perl script in same file?
63099 by: Tom Beidler
Urgent Question
63100 by: Chris Cocuzzo
Green eggs and Magic Quotes
63104 by: Justin
Is there a special character I here?
63105 by: Brandon Orther
63106 by: ERISEN, Mehmet Kamil
cgi - switch not working?!
63108 by: Jamie Burns
Regular Expression ? from newbie
63109 by: Craig Westerman
problem with a hacker
63110 by: craig henderson
63112 by: John Meyer
63114 by: Hugh Bothwell
Slow LDAP Queries (PHP 4.0.4p1 RH 7.1)
63111 by: Emilio Panighetti
Re: Is there a special character I here? (Regular Expressions)
63113 by: Philip Olson
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscribe
lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscribe
lists.php.net
To post to the list, e-mail:
php-general
lists.php.net
----------------------------------------------------------------------
attached mail follows:
I don't think PHP-GTK does that, does it?
Tom Malone
Web Designer
http://www.tom-malone.com
-----Original Message-----
From: Bruin, Bolke de [mailto:B.deBruin
tijdbeursmedia.nl]
Sent: Thursday, August 16, 2001 8:22 AM
To: 'tom
tom-malone.com'; PHP Users
Subject: RE: [PHP] PHP on client-side
Euhum what about PHPGTK?
Bolke
-----Oorspronkelijk bericht-----
Van: Tom Malone [mailto:tom
tom-malone.com]
Verzonden: Thursday, August 16, 2001 2:13 PM
Aan: PHP Users
Onderwerp: [PHP] PHP on client-side
Wouldn't it be nice if there was a way develop client-side (browser-based)
applications for PHP? I see so many posts about using PHP to interact with
JavaScript - wouldn't it be cool if you could just tell your PHP code where
to run - server or client (similar to what ASP does with VBScript)? I know I
can't be the first person to think about this, but I've searched and can't
find anything about it. Any ideas/suggestions/resources?
Tom Malone
Web Designer
http://www.tom-malone.com
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Tom Malone wrote: > > I don't think PHP-GTK does that, does it?
From http://gtk.php.net
Too often PHP is thought of as only an HTML-embedded web scripting language. However, it is also a very full-featured general purpose language that can be used for much more. One of the goals behind this project was to prove that PHP can be used to write client-side GUI applications.
-- Pavel a.k.a. Papi
attached mail follows:
Re below, I am just curious if anybody on this list has already written a "significant" application using PHP/Gtk. I keep looking at Gtk, but it still seems to be too much shifting sand right now. I want to use these widgets et al for some applications that I would normally use Python for.
The great disadvantage seems, of course, the difficulty to port/use something in PHP/Gtk for Windows...
_justin
Pavel Jartsev wrote: > > Tom Malone wrote: > > > > I don't think PHP-GTK does that, does it? > > >From http://gtk.php.net > > Too often PHP is thought of as only an HTML-embedded web scripting > language. However, it is also a very full-featured > general purpose language that can be used for much more. One of the > goals behind this project was to prove that PHP can > be used to write client-side GUI applications.
-- Justin Farnsworth Eye Integrated Communications 321 South Evans - Suite 203 Greenville, NC 27858 | Tel: (252) 353-0722
attached mail follows:
Do you think it's feasible to do that? Has anyone discussed it before? Are there any initiatives?
Tom Malone Web Designer http://www.tom-malone.com
-----Original Message-----
From: papi
hurstlinks.net [mailto:papi
hurstlinks.net]On Behalf Of Pavel
Jartsev
Sent: Thursday, August 16, 2001 10:08 AM
To: Tom Malone
Subject: Re: [PHP] PHP on client-side
Tom Malone wrote: > > I read the introduction to PHP-GTK at http://conf.php.net > > What I am talking about is the potential to use PHP in the browser, like > JavaScript, for functions similar to what JavaScript and VBScript are used > for. In each tag could be an attribute set to whether the PHP code contained > inside is supposed to run at the server or at the client. This is not the > same thing as PHP-GTK, is it? >
Yep, it's not. I misunderstood your question. Sorry.
-- Pavel a.k.a. Papi
attached mail follows:
It is possible, but you'd need to define the x-application/php or so mimetag in each and every client that you would want to parse the code -- thus reducing the platforms it runs on.
The fact that it is parsed on the server allows a great variaty of clients to read it - since they basically get html back.
I use php for scripts that run using crontabs on my servers, but I don't really think that PHP is usable in the same way as - for instance - JS or VBS.
Jan De Luyck
> -----Original Message-----
> From: Tom Malone [mailto:tom
hurstlinks.com]
> Sent: Thursday, August 16, 2001 4:32 PM
> To: PHP Users
> Subject: RE: [PHP] PHP on client-side
>
>
> Do you think it's feasible to do that? Has anyone discussed it
> before? Are
> there any initiatives?
>
> Tom Malone
> Web Designer
> http://www.tom-malone.com
>
> -----Original Message-----
> From: papi
hurstlinks.net [mailto:papi
hurstlinks.net]On Behalf Of Pavel
> Jartsev
> Sent: Thursday, August 16, 2001 10:08 AM
> To: Tom Malone
> Subject: Re: [PHP] PHP on client-side
>
>
> Tom Malone wrote:
> >
> > I read the introduction to PHP-GTK at http://conf.php.net
> >
> > What I am talking about is the potential to use PHP in the browser, like
> > JavaScript, for functions similar to what JavaScript and
> VBScript are used
> > for. In each tag could be an attribute set to whether the PHP code
> contained
> > inside is supposed to run at the server or at the client. This
> is not the
> > same thing as PHP-GTK, is it?
> >
>
> Yep, it's not. I misunderstood your question. Sorry.
>
> --
> Pavel a.k.a. Papi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
I think one major hurdle with this is that the browser would have to be programmed to parse the Client-Side PHP. While you might have a shot at convincing the nice folks at Mozilla to do this, IE is by far the most used browser and I don't see MS implementing PHP into their browser anytime soon.
In addition, can you imagine having to learn to write PHP with browser incompatibilities as bad as JavaScript has? I shudder at the thought.
Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com
----- Original Message -----
From: Tom Malone <tom
hurstlinks.com>
To: PHP Users <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 9:31 AM
Subject: RE: [PHP] PHP on client-side
> Do you think it's feasible to do that? Has anyone discussed it before?
Are
> there any initiatives?
>
> Tom Malone
> Web Designer
> http://www.tom-malone.com
>
> -----Original Message-----
> From: papi
hurstlinks.net [mailto:papi
hurstlinks.net]On Behalf Of Pavel
> Jartsev
> Sent: Thursday, August 16, 2001 10:08 AM
> To: Tom Malone
> Subject: Re: [PHP] PHP on client-side
>
>
> Tom Malone wrote:
> >
> > I read the introduction to PHP-GTK at http://conf.php.net
> >
> > What I am talking about is the potential to use PHP in the browser, like
> > JavaScript, for functions similar to what JavaScript and VBScript are
used
> > for. In each tag could be an attribute set to whether the PHP code
> contained
> > inside is supposed to run at the server or at the client. This is not
the
> > same thing as PHP-GTK, is it?
> >
>
> Yep, it's not. I misunderstood your question. Sorry.
>
> --
> Pavel a.k.a. Papi
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
the only problem with PHPGTK is that if you make an app with it and you pass it on to your friend they have to have php installed and running on their machine to run your app. I've heard of some people actually running a small installer that installs php on the client machine so that they can run the PHPGTK app.. but that's about all i've heard. It's still in the earily stages of development.. and i would think that in a year or two it will be very well rounded..
----- Original Message -----
From: "Justin Farnsworth" <jef
eyeintegrated.com>
To: "Pavel Jartsev" <papi
digitalfruit.ee>
Cc: <tom
tom-malone.com>; <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 8:35 AM
Subject: Re: [PHP] PHP on client-side
> Re below, I am just curious if anybody on this list
> has already written a "significant" application using
> PHP/Gtk. I keep looking at Gtk, but it still seems
> to be too much shifting sand right now. I want to
> use these widgets et al for some applications that
> I would normally use Python for.
>
> The great disadvantage seems, of course, the difficulty
> to port/use something in PHP/Gtk for Windows...
>
> _justin
>
> Pavel Jartsev wrote:
> >
> > Tom Malone wrote:
> > >
> > > I don't think PHP-GTK does that, does it?
> >
> > >From http://gtk.php.net
> >
> > Too often PHP is thought of as only an HTML-embedded web scripting
> > language. However, it is also a very full-featured
> > general purpose language that can be used for much more. One of the
> > goals behind this project was to prove that PHP can
> > be used to write client-side GUI applications.
>
> --
> Justin Farnsworth
> Eye Integrated Communications
> 321 South Evans - Suite 203
> Greenville, NC 27858 | Tel: (252) 353-0722
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
I'm getting session id neither from cookie, nor from GET/POST vars,
but by parsing url
like: http://myserver.com/script.php/ How do i resume session by given <session_id>?
Thanks in advance.
attached mail follows:
Link in HTML like <a
href="http://www.myserver.com/myfile.php?=SID>>Link</a>
And on the "myfile.php" you have to do this in the beginning of file:
session_start();
if (session_is_registered("Session")) {
/* This code is run if Session called "Session" is registered */
};
Hopefully this helps you out.
Niklas Lampen
-----Original Message-----
From: Darius Ivanauskas [mailto:darius
--
Darius Ivanaukas
nomagiclt.com
lists.php.net
Subject: [PHP] How to resume session by id?
I'm getting session id neither from cookie, nor from GET/POST vars,
but by parsing url
like: http://myserver.com/script.php/ How do i resume session by given <session_id>?
Thanks in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe
--
Darius Ivanaukas
lists.php.net
lists.php.net
To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Thu, 16 Aug 2001, Niklas Lampen wrote:
> > Link in HTML like <a > href="http://www.myserver.com/myfile.php?=SID>>Link</a> > And on the "myfile.php" you have to do this in the beginning of file: > > session_start();
In this place it starts a new session because it didn't gets session_id neither trough GET/POST nor cookie. :((((
-- Darius Ivanauskas> if (session_is_registered("Session")) { > /* This code is run if Session called "Session" is registered */ > }; > > > Hopefully this helps you out. > > > Niklas Lampen > > > > -----Original Message----- > From: Darius Ivanauskas [mailto:darius
nomagiclt.com] > Sent: 16. elokuuta 2001 16:51 > To: php-general
lists.php.net > Subject: [PHP] How to resume session by id? > > > I'm getting session id neither from cookie, nor from GET/POST vars, > but by parsing url > like: http://myserver.com/script.php/
>/blah/blah > > How do i resume session by given <session_id>? > > Thanks in advance. > -- > Darius Ivanaukas > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe > For additional commands, e-mail: php-general-helplists.php.net
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
attached mail follows:
Did you start the session like this:
$Session = array( /* values to array */ ); session_start(); session_register("Session");
-----Original Message-----
From: Darius Ivanauskas [mailto:darius
nomagiclt.com]
Sent: 16. elokuuta 2001 18:14
To: Niklas Lampen
Cc: php-general
lists.php.net
Subject: RE: [PHP] How to resume session by id?
On Thu, 16 Aug 2001, Niklas Lampen wrote:
> > Link in HTML like <a > href="http://www.myserver.com/myfile.php?=SID>>Link</a> > And on the "myfile.php" you have to do this in the beginning of file: > > session_start();
In this place it starts a new session because it didn't gets session_id neither trough GET/POST nor cookie. :((((
-- Darius Ivanauskas> if (session_is_registered("Session")) { > /* This code is run if Session called "Session" is registered */ > }; > > > Hopefully this helps you out. > > > Niklas Lampen > > > > -----Original Message----- > From: Darius Ivanauskas [mailto:darius
nomagiclt.com] > Sent: 16. elokuuta 2001 16:51 > To: php-general
lists.php.net > Subject: [PHP] How to resume session by id? > > > I'm getting session id neither from cookie, nor from GET/POST vars, > but by parsing url > like: http://myserver.com/script.php/
>/blah/blah > > How do i resume session by given <session_id>? > > Thanks in advance. > -- > Darius Ivanaukas > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe > For additional commands, e-mail: php-general-helplists.php.net
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
On Thu, 16 Aug 2001, Niklas Lampen wrote:
> Did you start the session like this: > > $Session = array( > /* values to array */ > ); > session_start(); > session_register("Session");
What we have here: registering variable $Session into current session. This code works perfectly if session id is propogated normally. Bu what i need is to set session_id and session_name so it can resume given session by given id. Normally session id is propagating through cookie. I have set [ini] session.use_cookie = 0; So it passes GET/POST session_id propagating method. And using url as i wrote before it doesn't gets session id and starts new session :(( So i need somehow to force it to use known session_id and start session using this session_id.
-- Darius Ivanauskas> > > -----Original Message----- > From: Darius Ivanauskas [mailto:darius
nomagiclt.com] > Sent: 16. elokuuta 2001 18:14 > To: Niklas Lampen > Cc: php-general
lists.php.net > Subject: RE: [PHP] How to resume session by id? > > > > > On Thu, 16 Aug 2001, Niklas Lampen wrote: > > > > > Link in HTML like <a > > href="http://www.myserver.com/myfile.php?=SID>>Link</a> > > And on the "myfile.php" you have to do this in the beginning of file: > > > > session_start(); > > In this place it starts a new session because it didn't gets session_id > neither trough GET/POST nor cookie. :(((( > > -- > Darius Ivanauskas > > > if (session_is_registered("Session")) { > > /* This code is run if Session called "Session" is registered */ > > }; > > > > > > Hopefully this helps you out. > > > > > > Niklas Lampen > > > > > > > > -----Original Message----- > > From: Darius Ivanauskas [mailto:darius
nomagiclt.com] > > Sent: 16. elokuuta 2001 16:51 > > To: php-general
lists.php.net > > Subject: [PHP] How to resume session by id? > > > > > > I'm getting session id neither from cookie, nor from GET/POST vars, > > but by parsing url > > like: http://myserver.com/script.php/
>/blah/blah > > > > How do i resume session by given <session_id>? > > > > Thanks in advance. > > -- > > Darius Ivanaukas > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe > > For additional commands, e-mail: php-general-helplists.php.net
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > > For additional commands, e-mail: php-general-help
lists.php.net > > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net > For additional commands, e-mail: php-general-help
lists.php.net > To contact the list administrators, e-mail: php-list-admin
lists.php.net >
attached mail follows:
On Thu, Aug 16, 2001 at 05:41:47PM +0200, Darius Ivanauskas wrote: > What we have here: registering variable $Session into current session. > This code works perfectly if session id is propogated normally. > Bu what i need is to set session_id and session_name so it can resume > given session by given id. Normally session id is propagating through > cookie. I have set [ini] session.use_cookie = 0; So it passes GET/POST > session_id propagating method. And using url as i wrote before it doesn't > gets session id and starts new session :(( So i need somehow to force it > to use known session_id and start session using this session_id. > > -- > Darius Ivanauskas
Why don't you use session.use_cookie. When U use cookies for your sessions, you can use whatever URL you like. PHP won't care about that, and just use the cookie in order to determine the current session.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Hello php-general!
it worked with earlier PHP versions. but now dont. i tried all paths combinations ;(
does anyone experience same problem ?
-- Best regards, Konstantin mailto:ameoba32mail.ru
attached mail follows:
At 06:14 PM 8/15/2001, Wolfgang Schneider wrote:
oops - i forgot - I use functions similar tp the ones used on php.net. when i call the function i pass $title to it....
define $title and it should work. :-)
~kurth
>On Tue, 14 Aug 2001 11:39:55 -0400, Kurth Bemis wrote: > > >just stick this in a function as I did and you'll be sailing.....its easy > >to update, and Extremely flexible. > > > >look at my code.. (rest snipped) > > >Hi Kurth, and others > >I adjusted your code for the purpose of my site (replacing he values in >the array and the homepage address, etc) ... but when I plugged it into >a page for testing; i got the following results: > >Location : Home / >Warning: Undefined variable: link in visitheadnav-1.inc on line 70 >Besucher / >Warning: Undefined index: support.php3 in visitheadnav-1.inc on line 68 >Warning: Undefined variable: title in visitheadnav-1.inc on line 73 > >The code is part of an include file named "visitheadnav-1.inc" ... and >apparently there is some "link" there in the code which is "an >undefined variable" ... but I have no idea what this error message is >about :-( The results "Home/" and "Besucher/" are actually correct >... it's just the "undefined link" problem I need to get figured out >... Here's the code I inserted into my visitheadnav-1.inc: > ><p class="fn8">Location : <a href="http://www.bibelcenter.de.">Home</a> >/ ><?php >$patharray = explode ("/",$SCRIPT_NAME); >$scriptname = basename($SCRIPT_NAME); > for ($dirsi = 1; $dirsi < count($patharray); $dirsi++) > { > $dirs = array( > 'visitor' => 'Besucher', > 'info' => 'Information', > 'bibel' => 'Bibelarbeit', > 'bibliothek' => 'Bibliothek', > 'gebet' => 'Gebetsraum', > 'links' => 'Internet Links', > 'kids' => 'Kinderecke', > 'shop' => 'Bookshop' > ); > > $linkdes = $dirs[$patharray[$dirsi]]; > $link = $link . "/$patharray[$dirsi]"; > if ($patharray[$dirsi] == $scriptname){ > $linkdes = $title; > $slash = ""; > $linkhtml = "<a >href=\"$link\">$linkdes</a>$slash"; > if ($patharray[$dirsi] == >"index.php"){ > $link = ""; > $linkdes = ""; > $slash = ""; > $linkhtml = ""; > } > }else{ > $slash = " / "; > $linkhtml = "<a >href=\"$link\">$linkdes</a>$slash"; > } >echo $linkhtml; > } >?></p> > >Any ideas, what may be wrong and causing these error messages? > > >God bless you with His grace and peace >Wolfgang > >Looking for Biblical information? COME AND SEE! >-- ONLINE Courses: http://classes.bibelcenter.de ... NEW! >-- BibelCenter: http://www.bibelcenter.de >-- Bookstore: http://www.worthy.net/BibelCenter/
attached mail follows:
I appreciate the clearer, more detailed description. Unfortunately, I probably cannot help as much with this one. If it were my problem, I would try finding and downloading the source for the Sybase modules, then look for someone to contact in the notes. I would also exhaust any contacts I have with Sybase, mostly because much of the original code for the interface modules probably came from them originally (derived from their old C interface modules).
Another approach would be to try to unload the source for the Stored Procedure, and try to split up the queries (I believe the results you are seeing are produced by a UNION, but I'm not certain). Sybase can compile its query procedures on the fly, with only slightly longer run times, or you could create a new procedure from what you find and store that one.
Good Luck,
Warren Vail
-----Original Message-----
From: Herouth Maoz [mailto:herouth
itouch.co.il]
Sent: Wednesday, August 15, 2001 12:19 AM
To: Warren Vail; php-general
lists.php.net
Subject: Re: [PHP] Problem: Sybase, PHP and multiple result sets
On Wednesday 15 August 2001 10:07, Warren Vail wrote: > The ability to select a set from a previously selected set is > possible in Sybase because the database supports creation of > temporary tables and the select insert.
No, you seem to have missed my point entirely. So I'll explain in a little more detail.
I run a stored procedure. Let's assume I run it from the interactive utility and not from PHP for the moment.
> SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3
The database returns:
foo bar === === 10 20 30 40
field1 field2 field3 ====== ====== ====== string bla 15 nothing bla 12
As you can see, it returns TWO result sets. One with two numeric columns. The next with three columns, the first two string and the last numeric.
This is, of course, just an example.
Now back to the web interface.
If I use PHP, I get only the first result set. That is, I write something along the lines of:
$rs = sybase_query( "SP_SOMETHING_OR_OTHER PARAM1 PARAM2 PARAM3", $conn );
while ( $row = sybase_fetch_row( $rs ) ) {
echo $row[0]; // and so on
}
This will only display the results of the first result set - the one with the two fields, foo and bar.
There is no way for me to reach the second table generated by the query. This is supposed to be the significant table.
Now, in ASP, there is something like
set rs = rs.NextResultSet
Which sets the rs to the second result set, the one with the three fields of mixed types, at which point you loop, just like above, and retrieve the new information. This method or an equivalent of it is not in the PHP documented set of Sybase functions.
I hope I made myself clearer. And by the way, you don't have to sell me on the uselessness of ASP, the general uselessness of Microsoft etc. - I don't use any Microsoft products, even at work.
Herouth
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Could I expire a cookie on a determinate date?? I mean tell the cookie that will expire on 17/08/2001...
-- Romeo Manzur Web Developer Esgrima 208 Fracc. Deportiva Villahermosa, Tabasco, Mexico C.P.: 86180 Tel.: (52)(9)3-51-5647
attached mail follows:
I design a website on a PC, and upload it to UNIX. Of course, there are always one or two variables that I have to keep track of as to whetherteh server is UNIX or PC. There MUST be a simple way to test
if (the OS is Windows) { $siteurl = "http:// www.website.com/ "; $mysqlpasswordfilelocation = " ... outsideroot.txt "; }else{ $siteurl = "http://127.0.0.1/"; $mysqlpasswordfilelocation = " ...outsideroot.txt "; }
???
attached mail follows:
Paul S. wrote: > I design a website on a PC, and upload it to UNIX. Of course, there > are always one or two variables that I have to keep track of as to > whetherteh server is UNIX or PC. There MUST be a simple way to test
Just do a phpinfo(). There should be an environment-variable you should be able to use. The safest way to retrieve them ist getenv().
getenv('SAPI') perhaps?
> if (the OS is Windows) { > $siteurl = "http:// www.website.com/ "; > $mysqlpasswordfilelocation = " ... outsideroot.txt "; > }else{ > $siteurl = "http://127.0.0.1/"; > $mysqlpasswordfilelocation = " ...outsideroot.txt "; > }
You could also use a config-file. This way, you could run your scripts on more than two sites.
regards Wagner
PS: My PC is running UNIX.
-- Madness takes its toll. Please have exact change.
attached mail follows:
On Thu, Aug 16, 2001 at 09:57:20PM +0700, Paul S. wrote: > I design a website on a PC, and upload it to UNIX. Of course, there are > always one or two variables that I have to keep track of as to > whetherteh server is UNIX or PC. There MUST be a simple way to test > > if (the OS is Windows) { > $siteurl = "http:// www.website.com/ "; > $mysqlpasswordfilelocation = " ... outsideroot.txt "; > }else{ > $siteurl = "http://127.0.0.1/"; > $mysqlpasswordfilelocation = " ...outsideroot.txt "; > } > > ???
Paul,
You could check one of the following variables:
$HTTP_SERVER_VARS{"OSTYPE"} $HTTP_SERVER_VARS{"SERVER_NAME"} $HTTP_SERVER_VARS{"SERVER_ADDR"} $HTTP_SERVER_VARS{"HTTP_HOST"} or $HTTP_SERVER_VARS{"DOCUMENT_ROOT"}
Check phpinfo(), it gives some really usefull info.
--* R&zE:
-- »»»»»»»»»»»»»»»»»»»»»»»» -- Renze Munnik -- DataLink BV -- -- E: renze
datalink.nl -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- ««««««««««««««««««««««««
attached mail follows:
Run a phpinfo() script and look for the $OSTYPE variable...you can use that...
jack
-----Original Message-----
From: Paul S. [mailto:paul.s
interport.net]
Sent: Thursday, August 16, 2001 10:57 AM
To: php-general
lists.php.net
Subject: [PHP] Unix vs PC test for server
I design a website on a PC, and upload it to UNIX. Of course, there are always one or two variables that I have to keep track of as to whetherteh server is UNIX or PC. There MUST be a simple way to test
if (the OS is Windows) { $siteurl = "http:// www.website.com/ "; $mysqlpasswordfilelocation = " ... outsideroot.txt "; }else{ $siteurl = "http://127.0.0.1/"; $mysqlpasswordfilelocation = " ...outsideroot.txt "; }
???
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Also -
see:
http://www.php.net/manual/en/function.php-uname.php
- it's a PHP4 function.
Alternatively, you could check the $SERVER_SOFTWARE (or $HTTP_SERVER_VARS['SERVER_SOFTWARE'], depending on your config) variable; you'd have to parse the OS out of the returned string, though.
- steve
At 4:59 PM +0200 8/16/01, Alexander Wagner <wagner
globalpark.de> wrote:
>Paul S. wrote:
>> I design a website on a PC, and upload it to UNIX. Of course, there
>> are always one or two variables that I have to keep track of as to
>> whetherteh server is UNIX or PC. There MUST be a simple way to test
>
>Just do a phpinfo(). There should be an environment-variable you should
>be able to use. The safest way to retrieve them ist getenv().
>
>getenv('SAPI') perhaps?
>
>> if (the OS is Windows) {
>> $siteurl = "http:// www.website.com/ ";
>> $mysqlpasswordfilelocation = " ... outsideroot.txt ";
>> }else{
>> $siteurl = "http://127.0.0.1/";
>> $mysqlpasswordfilelocation = " ...outsideroot.txt ";
>> }
>
>You could also use a config-file. This way, you could run your scripts
>on more than two sites.
>
>regards
>Wagner
>
>PS: My PC is running UNIX.
>
>--
>Madness takes its toll. Please have exact change.
>
-- +------------------------ Open source questions? ------------------------+ | Steve Edberg University of California, Davis | | sbedbergucdavis.edu Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+
attached mail follows:
Run a phpinfo() script and look for the $OSTYPE variable...you can use that...
jack
-----Original Message-----
From: Paul S. [mailto:paul.s
interport.net]
Sent: Thursday, August 16, 2001 10:57 AM
To: php-general
lists.php.net
Subject: [PHP] Unix vs PC test for server
I design a website on a PC, and upload it to UNIX. Of course, there are always one or two variables that I have to keep track of as to whetherteh server is UNIX or PC. There MUST be a simple way to test
if (the OS is Windows) { $siteurl = "http:// www.website.com/ "; $mysqlpasswordfilelocation = " ... outsideroot.txt "; }else{ $siteurl = "http://127.0.0.1/"; $mysqlpasswordfilelocation = " ...outsideroot.txt "; }
???
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I get the following error message:
gcc -I. -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/main -I/export/scratch/apps3/php-4.0.6 -I/export/scratch/apps3/apache_1.3.20/src/include -I/export/scratch/apps3/apache_1.3.20/src/os/unix -I/export/scratch/apps3/php-4.0.6/Zend -I/export/scratch/apps3/ldap/include -I/export/scratch/apps3/php-4.0.6/ext/mysql/libmysql -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmltok -I/export/scratch/apps3/php-4.0.6/ext/xml/expat/xmlparse -I/export/scratch/apps3/php-4.0.6/TSRM -D_POSIX_PTHREAD_SEMANTICS -DSUPPORT_UTF8 -DXML_BYTE_ORDER=21 -g -O2 -c my_getwd.c && touch my_getwd.lo my_getwd.c:58: #error "No way to get current directory" *** Error code 1 make: Fatal error: Command failed for target `my_getwd.lo' Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql/libmysql *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /export/scratch/apps3/php-4.0.6/ext/mysql *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /export/scratch/apps3/php-4.0.6/ext
Afterwards the compilation exits.
If i compile without --with-ldap everything works great but if i do it with ldap i get this error message everytime.
Can anyone please help me. I have been struggled with this all morning.
//Johan
attached mail follows:
yes i'm actually getting the MYSQL_SOCKET variable and it's looking for the mysql.sock file in /tmp however it's placed in the /var/lib/mysql directory and I don't know how to change this. I've looked in the php.ini but didn't see anything about it. I've also looked for the my.cnf file and it's not on the machine.
Thanks, Jay
----- Original Message -----
From: "Jonathan Hilgeman" <JHilgeman
ecx.com>
To: "'Jay Paulson'" <jpaulson
lbjs.com>
Sent: Wednesday, August 15, 2001 6:55 PM
Subject: RE: [PHP-DB] MYSQL_SOCKET
> I just re-read your question. Not sure if you can set it with PHP. That
> sounds like an environment variable that PHP is reading. Do you have a
page
> with the phpinfo() function in it somewhere?
>
> - Jonathan
>
> -----Original Message-----
> From: Jay Paulson [mailto:jpaulson
lbjs.com]
> Sent: Wednesday, August 15, 2001 3:08 PM
> To: php-db
lists.php.net; php
> Subject: [PHP-DB] MYSQL_SOCKET
>
>
> the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to be
> /var/lib/mysql/mysql.sock is there anyway i can set this variable in php?
>
> thanks...
>
attached mail follows:
Hi. I work at a design agency, and we're looking to find/build/create a system where we can post client comps, and the client can log in and check out the work we've done for them. Has anyone seen anything like this out there that's built already?
Please respond directly to mike
thinkmango.com, as I am on the digest.
Thanks in advance!
mto
--Michael O'Neal Web Producer/ Autocrosser ST 28 '89 Civic Si --------------------- M A N G O B O U L D E R --------------------- http://www.thinkmango.com e- mike
thinkmango.com p- 303.442.1821 f- 303.938.8507
attached mail follows:
Ok, I've searched the archives and even contacted the Zend staff on this one, and I'm still confused. I also posted this question at the Zend Optimizer Forum but have not received an answer. I'm hoping one of you has some idea of how the Zend Optimizer works and can explain it. My webhost offers PHP 4 on Linux/Apache with the Zend Optimizer (v0.99) Engine (v1.0.3) and I have checked phpinfo() to make sure it's installed and running. I would like to optimize a particular function that generates a graph image on the fly. What do I need to do make use of the Zend Optimizer? Is it used automatically or do I first need to compile the code into a binary file? If someone knows a great source of info on this (other than www.zend.com), that would be helpful too.
Thanks, Johan Alfredeen
attached mail follows:
It should perform the optimizations automatically. However, the bottleneck in your case will be your image manipulation library (GD, ImageMagic, etc..), and you most likely won't see much of a speed increase with the optimizer.
/* Chris Lambert, CTO - chris
whitecrown.net
WhiteCrown Networks - More Than White Hats
Web Application Security - www.whitecrown.net
*/
----- Original Message -----
From: Alfredeen, Johan <johanalfredeen
vp.net>
To: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 11:33 AM
Subject: [PHP] Zend Optimizer
| Ok, I've searched the archives and even contacted the Zend staff on this
| one, and I'm still confused. I also posted this question at the Zend
| Optimizer Forum but have not received an answer. I'm hoping one of you has
| some idea of how the Zend Optimizer works and can explain it. My webhost
| offers PHP 4 on Linux/Apache with the Zend Optimizer (v0.99) Engine
(v1.0.3)
| and I have checked phpinfo() to make sure it's installed and running. I
| would like to optimize a particular function that generates a graph image
on
| the fly. What do I need to do make use of the Zend Optimizer? Is it used
| automatically or do I first need to compile the code into a binary file?
If
| someone knows a great source of info on this (other than www.zend.com),
that
| would be helpful too.
|
| Thanks,
| Johan Alfredeen
|
|
| --
| PHP General Mailing List (http://www.php.net/)
| To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
| For additional commands, e-mail: php-general-help
lists.php.net
| To contact the list administrators, e-mail: php-list-admin
lists.php.net
|
|
|
attached mail follows:
Zend Optimizer will speed up the code, but I do not believe it crunches the size of files. If you need smaller files for a graph, use PNG or JPEG - not the GIF format. The GIF format is old and unoptimized in PHP/GD, so it gets really big in size unless you have something like ImageMagick to optimize it after it has been created.
PNGs are kind of like the new GIF format when working with PHP image generation. JPEG format is best reserved for photos and such.
- Jonathan
"Johan Alfredeen" <johanalfredeen
vp.net> wrote in message
news:787A25971D7FDF44B47329A97BE4AD4677C484
exposition...
> Ok, I've searched the archives and even contacted the Zend staff on this
> one, and I'm still confused. I also posted this question at the Zend
> Optimizer Forum but have not received an answer. I'm hoping one of you has
> some idea of how the Zend Optimizer works and can explain it. My webhost
> offers PHP 4 on Linux/Apache with the Zend Optimizer (v0.99) Engine
(v1.0.3)
> and I have checked phpinfo() to make sure it's installed and running. I
> would like to optimize a particular function that generates a graph image
on
> the fly. What do I need to do make use of the Zend Optimizer? Is it used
> automatically or do I first need to compile the code into a binary file?
If
> someone knows a great source of info on this (other than www.zend.com),
that
> would be helpful too.
>
> Thanks,
> Johan Alfredeen
>
attached mail follows:
My UNIX apache server that I host from seems to be preset to execute PHP code within html docs. That is, a php require statement within a ".html" file is included, executed, and sent to the browser.
Is this unusual? or standard? I ask because I would hope not to become dependent on including php code in html docs and have them switch a server setting back.
Of course, if that happens I guess I could rename my files from ".html" to ".php". But I really prefer to just having ".html" appear in the browser URL bar.
attached mail follows:
Apache can be set up to parse whatever files you like as .php (you could have .paul if you like...) - presumably your host has enabled this. If you have access to .htaccess files (or the main server config, httpd.conf), you can set this up on any Apache server with the line
AddType application/x-httpd-php .php .html
You can put as many extensions as you like in there, for example:
AddType application/x-httpd-php .php .php3 .php4 .html .phtml .foo .bar .baz .xyzzy
Although this is probably overkill :-)
HTH Jon
-----Original Message-----
From: Paul S. [mailto:paul.s
interport.net]
Sent: 16 August 2001 16:29
To: php-general
lists.php.net
Subject: [PHP] PHP within .html files
My UNIX apache server that I host from seems to be preset to execute PHP code within html docs. That is, a php require statement within a ".html" file is included, executed, and sent to the browser.
Is this unusual? or standard? I ask because I would hope not to become dependent on including php code in html docs and have them switch a server setting back.
Of course, if that happens I guess I could rename my files from ".html" to ".php". But I really prefer to just having ".html" appear in the browser URL bar.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
It's not very usual for the simple reason that many people who have access to a PHP web server don't use it, they just use normal HTML. The problem with having HTML execute as PHP is that it uses the PHP module when it mightn't need to. On my webserver the extensions which are parsed as PHP are .php and .php3, I think this is the normal setup for web servers.
Marc.
P.s. Would u not like to show your support for PHP by displaying the .php extension?
"Paul S." <paul.s
interport.net> wrote in message
news:<3B7BE6CE.A47A31D0
interport.net>...
> My UNIX apache server that I host from seems to be preset to execute PHP
> code within html docs. That is, a php require statement within a ".html"
> file is included, executed, and sent to the browser.
>
> Is this unusual? or standard? I ask because I would hope not to become
> dependent on including php code in html docs and have them switch a
> server setting back.
>
> Of course, if that happens I guess I could rename my files from ".html"
> to ".php". But I really prefer to just having ".html" appear in the
> browser URL bar.
>
>
>
attached mail follows:
> It's not very usual for the simple reason that many people who have access > to a PHP web server don't use it, they just use normal HTML. The problem > with having HTML execute as PHP is that it uses the PHP module when it > mightn't need to. On my webserver the extensions which are parsed as PHP are > .php and .php3, I think this is the normal setup for web servers. > > Marc. > > P.s. Would u not like to show your support for PHP by displaying the .php > extension?
Mayhaps with Apache it is possible to have the .html files in a subdirectory (for instance yourdomain.org/php/file.html to have the php mentioned) handled as PHP and the other dirs not. I agree that it is a waste of server time to send all html files through php.
Chris
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
well i just compiled php again and that still didn't solve the problem... i guess i just need to keep recompiling php until i get that variable set to the right thing?
thanks, jay
----- Original Message -----
From: "Rasmus Lerdorf" <rasmus
php.net>
To: "Jay Paulson" <jpaulson
lbjs.com>
Cc: <php-db
lists.php.net>; "php" <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 2:45 AM
Subject: Re: [PHP] MYSQL_SOCKET
> > the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to > > be /var/lib/mysql/mysql.sock is there anyway i can set this variable > > in php? > > >From http://php.net/mysql_connect : > > resource mysql_connect ([string hostname[:port][:/path/to/socket] [, string username [, string password]]]) > > The reason you have this discrepancy is that you didn't compile PHP > against a version of the MySQL client library that matches the version of > the MySQL server you are talking to. Probably because you didn't specify > --with-mysql=/usr when you built PHP. > > -Rasmus >
attached mail follows:
Or just specify the socket path right in your mysql_connect() call.
-Rasmus
On Thu, 16 Aug 2001, Jay Paulson wrote:
> well i just compiled php again and that still didn't solve the problem... i
> guess i just need to keep recompiling php until i get that variable set to
> the right thing?
>
> thanks,
> jay
>
> ----- Original Message -----
> From: "Rasmus Lerdorf" <rasmus
php.net>
> To: "Jay Paulson" <jpaulson
lbjs.com>
> Cc: <php-db
lists.php.net>; "php" <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 2:45 AM
> Subject: Re: [PHP] MYSQL_SOCKET
>
>
> > > the variable MYSQL_SOCKET is set to /tmp/mysql.sock and i need it to
> > > be /var/lib/mysql/mysql.sock is there anyway i can set this variable
> > > in php?
> >
> > >From http://php.net/mysql_connect :
> >
> > resource mysql_connect ([string hostname[:port][:/path/to/socket] [,
> string username [, string password]]])
> >
> > The reason you have this discrepancy is that you didn't compile PHP
> > against a version of the MySQL client library that matches the version of
> > the MySQL server you are talking to. Probably because you didn't specify
> > --with-mysql=/usr when you built PHP.
> >
> > -Rasmus
> >
>
attached mail follows:
I want to sort a result set from a mySQL query (see code below). I can't figure out how to properly sort the $result in the while loop.
I just want to alphabatize the search result.
Any suggestions how to do this?
Thanks
-Allen
umayxa3
donet_nospam.com (remove _nospam to reply)
*************************************************************************
$query = "select * from $table"; $result = mysql_query($query);
print "<form name=\"JobDesc\" method=\"post\" action=\"jobdesc.php\">\n";
print "<select name=\"wilber\">\n"; while ($row = mysql_fetch_array($result)) : print "<option value=\""; print $row["Jobtitle"]; print "\">"; print $row["Jobtitle"]; print "</option>\n"; endwhile;
attached mail follows:
Instead of trying to sort the result AFTER it returns from the query, you could use an ORDER BY clause in your query to sort the results prior to trying to output it?
You could change your query to something like:
"SELECT * FROM tablename ORDER BY fieldname"
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 x289
smasiello
synacor.com
-----Original Message-----
From: Allen May [mailto:umayxa3
donet.com]
Sent: Thursday, August 16, 2001 11:32 AM
To: php-general
lists.php.net
Subject: [PHP] Sort a an array?
I want to sort a result set from a mySQL query (see code below). I can't figure out how to properly sort the $result in the while loop.
I just want to alphabatize the search result.
Any suggestions how to do this?
Thanks
-Allen
umayxa3
donet_nospam.com (remove _nospam to reply)
*************************************************************************
$query = "select * from $table"; $result = mysql_query($query);
print "<form name=\"JobDesc\" method=\"post\" action=\"jobdesc.php\">\n";
print "<select name=\"wilber\">\n"; while ($row = mysql_fetch_array($result)) : print "<option value=\""; print $row["Jobtitle"]; print "\">"; print $row["Jobtitle"]; print "</option>\n"; endwhile;
attached mail follows:
The best way to do this, which is conveniently also the easiest, is to do it within your SQL query.
$table = "tablename"; $field = "fieldname"; $query = "select * from $table order by $field";
or, for descending sort:
$query = "select * from $table order by $field desc";
HTH Jon
-----Original Message-----
From: Allen May [mailto:umayxa3
donet.com]
Sent: 16 August 2001 16:32
To: php-general
lists.php.net
Subject: [PHP] Sort a an array?
I want to sort a result set from a mySQL query (see code below). I can't figure out how to properly sort the $result in the while loop.
I just want to alphabatize the search result.
Any suggestions how to do this?
Thanks
-Allen
umayxa3
donet_nospam.com (remove _nospam to reply)
*************************************************************************
$query = "select * from $table"; $result = mysql_query($query);
print "<form name=\"JobDesc\" method=\"post\" action=\"jobdesc.php\">\n";
print "<select name=\"wilber\">\n"; while ($row = mysql_fetch_array($result)) : print "<option value=\""; print $row["Jobtitle"]; print "\">"; print $row["Jobtitle"]; print "</option>\n"; endwhile;
attached mail follows:
Change $query = "select * from $table"; to $query = "select * from $table order by Jobtitle";
Assuming (from your code) you want them alphabatized by Jobtitle of course =P
Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com
----- Original Message -----
From: Allen May <umayxa3
donet.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 10:31 AM
Subject: [PHP] Sort a an array?
I want to sort a result set from a mySQL query (see code below). I can't figure out how to properly sort the $result in the while loop.
I just want to alphabatize the search result.
Any suggestions how to do this?
Thanks
-Allen
umayxa3
donet_nospam.com (remove _nospam to reply)
*************************************************************************
$query = "select * from $table"; $result = mysql_query($query);
print "<form name=\"JobDesc\" method=\"post\" action=\"jobdesc.php\">\n";
print "<select name=\"wilber\">\n"; while ($row = mysql_fetch_array($result)) : print "<option value=\""; print $row["Jobtitle"]; print "\">"; print $row["Jobtitle"]; print "</option>\n"; endwhile;
attached mail follows:
Hi,
I have a function like so
function updateForm() { global $link; $query = "UPDATE badgers SET lname = '$lname', fname = '$fname' WHERE ID = '$ID'"; mysql_query( $query, $link ); }
is there a simple way to access the global form values without working out which method was used and then using the global keyword on the HTTP_POST_VARS / HTTP_GET_VARS??
Regards
Tom Hodder
attached mail follows:
"Mindhunter" <mindhunter
mailbox.co.za> wrote in message
news:20010816113716.70317.qmail
pb1.pair.com...
> Does anyone know of online psychology tests where the answers are
> interpreted by a php script? Does anyone use php for this purpose?
Don't know of any offhand, but so long as it's just multiple choice, it should be very easy to do...
attached mail follows:
> First of all, the ISAPI module is not stable. It will just > cause you grief so > remove it from your filters list.
Now this is a true statement, especially with IIS, it just don't work. > > Second, make the application extensions point to php.exe (you > don't need the > %s %s stuff).
This I have to disagree with. Without the %s %s, you are rolling dice as to whether the page will work or not. I never had this problem with Apache under win32, but I have with IIS. I would definitely leave them in there.
> > If you do this to the master web site properties and tell it > to override > other script map extensions then all your web sites will map > onto php. If you > have different settings for each of the websites then you > will have to > configure each one individually. > > Cheers > > -- > Phil Driscoll
OK, and now the obvious one, are all your sites in one tree with the root directory of all of them being pointed at in the php.ini file? Or have you set up Virtual domains somehow in the php.ini file with the base of each site being pointed at? This killed me for almost 2 weeks. I had PHP installed when I changed from Apache to IIS, so all of my sites had to move to the location of the wwwroot for IIS, well, I forgot to redo the php.ini file, nothing would work, then I found that dread little variable, and everything works fine now.
Jim Powell
attached mail follows:
On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
> > Second, make the application extensions point to php.exe (you > > don't need the > > %s %s stuff). > > This I have to disagree with. Without the %s %s, you are rolling dice as > to whether the page will work or not. I never had this problem with Apache > under win32, but I have with IIS. I would definitely leave them in there.
I'll have to strongly disagree with your disagreement ;)
-- Phil Driscoll
attached mail follows:
I've had PHP 3 to 4.01 and now 4.06 running under NT4 SP6a and now with W2K & IIS 5. From my experience, the %s %s is a requirement of IIS (not PHP). This according to Microsoft rules (apparently %s %s is CASE SENSITIVE): http://support.microsoft.com/support/kb/articles/Q245/2/25.ASP
The %s %s has to do with script mappings within IIS. The closest i've found to an explanation is: http://support.microsoft.com/support/kb/articles/q190/0/11.asp
apparently the "%s %s" are not necessary for ISAPI extensions, as seen at: http://www.microsoft.com/TechNet/prodtechnol/iis/deploy/confeat/cgiis4.asp
I believe that IIS passes the script name to php.exe with the first %s. I think IIS replaces the first %s with the script name. From the second article, I suppose that if the %s is changed to %S, the name passed to php.exe would be UPPERCASE. Can anyone verify this? Apparently, the second %s is used by IIS to pass any additional parameters to the script. Like running php.exe from the command line, that would be "php script1.php parameters". I think IIS requires the %s's to emulate that behavior. I know that PHP runs fine without these, but I haven't verified if the filename of the script passed to php.exe is upper or lower case when the %s %s is dropped. I'll have to do some testing and post the results here.
Another MS page worth looking at: http://www.microsoft.com/technet/prodtechnol/iis/deploy/depovg/miglamp.asp
Who on his sane mind would drop Linux in favor of Win2K and IIS5 (with all the bugs it has, and those yet to be discovered)? http://www.microsoft.com/technet/prodtechnol/iis/deploy/depovg/lintowin.asp
"Phil Driscoll" <phil
dialsolutions.co.uk> wrote in message
news:E15XPt3-000ACq-0W
anchor-post-32.mail.demon.net...
> On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
>
> > > Second, make the application extensions point to php.exe (you
> > > don't need the
> > > %s %s stuff).
> >
> > This I have to disagree with. Without the %s %s, you are rolling dice
as
> > to whether the page will work or not. I never had this problem with
Apache
> > under win32, but I have with IIS. I would definitely leave them in
there.
>
> I'll have to strongly disagree with your disagreement ;)
>
> --
> Phil Driscoll
attached mail follows:
Found MS explanation! (at least the only place I've found the reason WHY %s %s must be used)
http://support.microsoft.com/support/kb/articles/Q276/4/94.ASP
I know, this is a KB article for Python, but look closely at the line that says: "(The two "%s" after the executable are required for console-based script interpreters but would not be required for an Internet Server API [ISAPI]-based script interpreter)."
It's the only MS explanation I've seen as to why the %s %s must be used. If anyone finds anything more in-depth please expand on my comments.
"Phil Driscoll" <phil
dialsolutions.co.uk> wrote in message
news:E15XPt3-000ACq-0W
anchor-post-32.mail.demon.net...
> On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
>
> > > Second, make the application extensions point to php.exe (you
> > > don't need the
> > > %s %s stuff).
> >
> > This I have to disagree with. Without the %s %s, you are rolling dice
as
> > to whether the page will work or not. I never had this problem with
Apache
> > under win32, but I have with IIS. I would definitely leave them in
there.
>
> I'll have to strongly disagree with your disagreement ;)
>
> --
> Phil Driscoll
attached mail follows:
Hi list! I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions?
/Jimmy
attached mail follows:
This was just discussed last week. Here's how: $connection = mysql_connect("host","user","pass"); $db = mysql_select_db("db_name", $connection); $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC"); while ($row = mysql_fetch_array($sql)) { $email = $row["email"]; $name = $row["name"]; // code to send email (use the mail() function) }
Good luck,
Tyler Longren
Captain Jack Communications
tyler
captainjack.com
www.captainjack.com
On Thu, 16 Aug 2001 18:29:04 +0200
Jimmy Bäckström <broder_b
chello.se> wrote:
> Hi list! > I'm about to write an application that takes about 5000 mailadresses > from a database, and then sends a mail to each one of them. I haven't > done this kind of apps before, so I don't know if it's a good idea. Does > anyone have any suggestions? > > /Jimmy >
attached mail follows:
I did something like that once. Mine sent only about a few hundred at a time and it was still quite a strain on the system because you have a TON of sendmail processes started and running at the same time. Just be aware of the possible system load. - dan
On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> Hi list! > I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions? > > /Jimmy >
--
attached mail follows:
I have done this, and it's not a bad idea as long as you aren't sending spam.
It's rather easy to do this, just do a mysql_query() from the database where you select the subscribers field and then do a while which sends out emails via the mail()-function.
You may experience problem with max execution time if you're using a bad mailserver but it can be solved by simply extending the max execution time in php.ini or in just the specific script.
Best regards,
Jome
----- Original Message -----
From: "Jimmy Bäckström" <broder_b
chello.se>
To: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 6:29 PM
Subject: [PHP] Sending alots of mail
Hi list! I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions?
/Jimmy
attached mail follows:
Hmm I knew that =) I just wondered if it's such a good idea. 5000 mail is very much you know.
/Jimmy
----- Original Message -----
From: Tyler Longren <tyler
captainjack.com>
To: Jimmy Bäckström <broder_b
chello.se>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 6:25 PM
Subject: Re: [PHP] Sending alots of mail
> This was just discussed last week. Here's how:
> $connection = mysql_connect("host","user","pass");
> $db = mysql_select_db("db_name", $connection);
> $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> while ($row = mysql_fetch_array($sql)) {
> $email = $row["email"];
> $name = $row["name"];
> // code to send email (use the mail() function)
> }
>
> Good luck,
> Tyler Longren
> Captain Jack Communications
> tyler
captainjack.com
> www.captainjack.com
>
>
>
> On Thu, 16 Aug 2001 18:29:04 +0200
> Jimmy Bäckström <broder_b
chello.se> wrote:
>
> > Hi list!
> > I'm about to write an application that takes about 5000 mailadresses
> > from a database, and then sends a mail to each one of them. I haven't
> > done this kind of apps before, so I don't know if it's a good idea. Does
> > anyone have any suggestions?
> >
> > /Jimmy
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Yeah...probably too much. Sending 5000 individual e-mails would really bog the system down...no matter what it is. Personally, I wouldn't do it.
Tyler Longren
Captain Jack Communications
tyler
captainjack.com
www.captainjack.com
On Thu, 16 Aug 2001 18:34:11 +0200
Jimmy Bäckström <broder_b
chello.se> wrote:
> Hmm I knew that =)
> I just wondered if it's such a good idea. 5000 mail is very much you
> know.
>
> /Jimmy
> ----- Original Message -----
> From: Tyler Longren <tyler
captainjack.com>
> To: Jimmy Bäckström <broder_b
chello.se>
> Cc: <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 6:25 PM
> Subject: Re: [PHP] Sending alots of mail
>
>
> > This was just discussed last week. Here's how:
> > $connection = mysql_connect("host","user","pass");
> > $db = mysql_select_db("db_name", $connection);
> > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > while ($row = mysql_fetch_array($sql)) {
> > $email = $row["email"];
> > $name = $row["name"];
> > // code to send email (use the mail() function)
> > }
> >
> > Good luck,
> > Tyler Longren
> > Captain Jack Communications
> > tyler
captainjack.com
> > www.captainjack.com
> >
> >
> >
> > On Thu, 16 Aug 2001 18:29:04 +0200
> > Jimmy Bäckström <broder_b
chello.se> wrote:
> >
> > > Hi list!
> > > I'm about to write an application that takes about 5000 mailadresses
> > > from a database, and then sends a mail to each one of them. I
> haven't
> > > done this kind of apps before, so I don't know if it's a good idea.
> Does
> > > anyone have any suggestions?
> > >
> > > /Jimmy
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> >
attached mail follows:
I have a system where we send periodic batches of 60,000 messages at a time, so it's definitely doable. It helps to put some throttling in there (i.e. a sleep() periodically) to be kind to your e-mail server.
- Tim
On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> Hmm I knew that =)
> I just wondered if it's such a good idea. 5000 mail is very much you know.
>
> /Jimmy
> ----- Original Message -----
> From: Tyler Longren <tyler
captainjack.com>
> To: Jimmy Bäckström <broder_b
chello.se>
> Cc: <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 6:25 PM
> Subject: Re: [PHP] Sending alots of mail
>
>
> > This was just discussed last week. Here's how:
> > $connection = mysql_connect("host","user","pass");
> > $db = mysql_select_db("db_name", $connection);
> > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > while ($row = mysql_fetch_array($sql)) {
> > $email = $row["email"];
> > $name = $row["name"];
> > // code to send email (use the mail() function)
> > }
> >
> > Good luck,
> > Tyler Longren
> > Captain Jack Communications
> > tyler
captainjack.com
> > www.captainjack.com
> >
> >
> >
> > On Thu, 16 Aug 2001 18:29:04 +0200
> > Jimmy Bäckström <broder_b
chello.se> wrote:
> >
> > > Hi list!
> > > I'm about to write an application that takes about 5000 mailadresses
> > > from a database, and then sends a mail to each one of them. I haven't
> > > done this kind of apps before, so I don't know if it's a good idea. Does
> > > anyone have any suggestions?
> > >
> > > /Jimmy
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Hmm that's what I thought about. But I think the system I'll be using uses qmail. I've heard that qmail does things better than sendmail?
/Jimmy
----- Original Message -----
From: Daniel Adams <danno
wpi.edu>
To: Jimmy Bäckström <broder_b
chello.se>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 6:21 PM
Subject: Re: [PHP] Sending alots of mail
I did something like that once. Mine sent only about a few hundred at a time and it was still quite a strain on the system because you have a TON of sendmail processes started and running at the same time. Just be aware of the possible system load. - dan
On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> Hi list! > I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions? > > /Jimmy >
--
attached mail follows:
Thats interesting. I tried to do the same thing with 5000 emails using sendmail, and I found that only about 1/2 were actually sent, it seems like the multiple calls to mail caused some of them to be ignored. I had to sleep for a couple of seconds before each call to mail() in order to get them all out.
No one else had this problem?
----- Original Message -----
From: "Tim" <infoz
earthlink.net>
To: "Jimmy Bäckström" <broder_b
chello.se>
Cc: "Tyler Longren" <tyler
captainjack.com>; <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 9:39 AM
Subject: Re: SV: [PHP] Sending alots of mail
> I have a system where we send periodic batches of 60,000 messages at a
> time, so it's definitely doable. It helps to put some throttling in
> there (i.e. a sleep() periodically) to be kind to your e-mail server.
>
> - Tim
>
> On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> > Hmm I knew that =)
> > I just wondered if it's such a good idea. 5000 mail is very much you
know.
> >
> > /Jimmy
> > ----- Original Message -----
> > From: Tyler Longren <tyler
captainjack.com>
> > To: Jimmy Bäckström <broder_b
chello.se>
> > Cc: <php-general
lists.php.net>
> > Sent: Thursday, August 16, 2001 6:25 PM
> > Subject: Re: [PHP] Sending alots of mail
> >
> >
> > > This was just discussed last week. Here's how:
> > > $connection = mysql_connect("host","user","pass");
> > > $db = mysql_select_db("db_name", $connection);
> > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > > while ($row = mysql_fetch_array($sql)) {
> > > $email = $row["email"];
> > > $name = $row["name"];
> > > // code to send email (use the mail() function)
> > > }
> > >
> > > Good luck,
> > > Tyler Longren
> > > Captain Jack Communications
> > > tyler
captainjack.com
> > > www.captainjack.com
> > >
> > >
> > >
> > > On Thu, 16 Aug 2001 18:29:04 +0200
> > > Jimmy Bäckström <broder_b
chello.se> wrote:
> > >
> > > > Hi list!
> > > > I'm about to write an application that takes about 5000 mailadresses
> > > > from a database, and then sends a mail to each one of them. I
haven't
> > > > done this kind of apps before, so I don't know if it's a good idea.
Does
> > > > anyone have any suggestions?
> > > >
> > > > /Jimmy
> > > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
You could write all the emails to a database with columns
toAddress,fromAddress,subject,body and any others you might want,
and then write a cron job to check the database every 10 mins for records
it might also be possible to read the process list into a variable and then only start new sendmail processes when there are less than certain number of sendmails runnning to balance the load.
-----Original Message-----
From: Tim [mailto:infoz
earthlink.net]
Sent: 16 August 2001 17:39
To: Jimmy Bäckström
Cc: Tyler Longren; php-general
lists.php.net
Subject: Re: SV: [PHP] Sending alots of mail
I have a system where we send periodic batches of 60,000 messages at a time, so it's definitely doable. It helps to put some throttling in there (i.e. a sleep() periodically) to be kind to your e-mail server.
- Tim
On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> Hmm I knew that =)
> I just wondered if it's such a good idea. 5000 mail is very much you know.
>
> /Jimmy
> ----- Original Message -----
> From: Tyler Longren <tyler
captainjack.com>
> To: Jimmy Bäckström <broder_b
chello.se>
> Cc: <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 6:25 PM
> Subject: Re: [PHP] Sending alots of mail
>
>
> > This was just discussed last week. Here's how:
> > $connection = mysql_connect("host","user","pass");
> > $db = mysql_select_db("db_name", $connection);
> > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > while ($row = mysql_fetch_array($sql)) {
> > $email = $row["email"];
> > $name = $row["name"];
> > // code to send email (use the mail() function)
> > }
> >
> > Good luck,
> > Tyler Longren
> > Captain Jack Communications
> > tyler
captainjack.com
> > www.captainjack.com
> >
> >
> >
> > On Thu, 16 Aug 2001 18:29:04 +0200
> > Jimmy Bäckström <broder_b
chello.se> wrote:
> >
> > > Hi list!
> > > I'm about to write an application that takes about 5000 mailadresses
> > > from a database, and then sends a mail to each one of them. I haven't
> > > done this kind of apps before, so I don't know if it's a good idea.
Does
> > > anyone have any suggestions?
> > >
> > > /Jimmy
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribelists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Can't you queue mails somehow? So that all mails isn't sent at the same time?
attached mail follows:
I've heard that qmail is better for a lot of things and easier to configure, but I've never actual used it. Perhaps I'll give it a try next time i set one up. - Dan
On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> Hmm that's what I thought about. But I think the system I'll be using uses qmail. I've heard that qmail does things better than sendmail?
>
> /Jimmy
> ----- Original Message -----
> From: Daniel Adams <danno
wpi.edu>
> To: Jimmy Bäckström <broder_b
chello.se>
> Cc: <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 6:21 PM
> Subject: Re: [PHP] Sending alots of mail
>
>
> I did something like that once. Mine sent only about a few hundred at a
> time and it was still quite a strain on the system because you have a TON
> of sendmail processes started and running at the same time. Just be aware
> of the possible system load.
> - dan
>
> On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
>
> > Hi list!
> > I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions?
> >
> > /Jimmy
> >
>
>
--
attached mail follows:
Actually I remember that I did have the same problem. I had to use sleep() also even though I was only sending a few hundred rather than a few thousand. - Dan
On Thu, 16 Aug 2001, PHP List wrote:
> Thats interesting.
> I tried to do the same thing with 5000 emails using sendmail, and I found
> that only about 1/2 were actually sent, it seems like the multiple calls to
> mail caused some of them to be ignored. I had to sleep for a couple of
> seconds before each call to mail() in order to get them all out.
>
> No one else had this problem?
>
> ----- Original Message -----
> From: "Tim" <infoz
earthlink.net>
> To: "Jimmy Bäckström" <broder_b
chello.se>
> Cc: "Tyler Longren" <tyler
captainjack.com>; <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 9:39 AM
> Subject: Re: SV: [PHP] Sending alots of mail
>
>
> > I have a system where we send periodic batches of 60,000 messages at a
> > time, so it's definitely doable. It helps to put some throttling in
> > there (i.e. a sleep() periodically) to be kind to your e-mail server.
> >
> > - Tim
> >
> > On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> > > Hmm I knew that =)
> > > I just wondered if it's such a good idea. 5000 mail is very much you
> know.
> > >
> > > /Jimmy
> > > ----- Original Message -----
> > > From: Tyler Longren <tyler
captainjack.com>
> > > To: Jimmy Bäckström <broder_b
chello.se>
> > > Cc: <php-general
lists.php.net>
> > > Sent: Thursday, August 16, 2001 6:25 PM
> > > Subject: Re: [PHP] Sending alots of mail
> > >
> > >
> > > > This was just discussed last week. Here's how:
> > > > $connection = mysql_connect("host","user","pass");
> > > > $db = mysql_select_db("db_name", $connection);
> > > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > > > while ($row = mysql_fetch_array($sql)) {
> > > > $email = $row["email"];
> > > > $name = $row["name"];
> > > > // code to send email (use the mail() function)
> > > > }
> > > >
> > > > Good luck,
> > > > Tyler Longren
> > > > Captain Jack Communications
> > > > tyler
captainjack.com
> > > > www.captainjack.com
> > > >
> > > >
> > > >
> > > > On Thu, 16 Aug 2001 18:29:04 +0200
> > > > Jimmy Bäckström <broder_b
chello.se> wrote:
> > > >
> > > > > Hi list!
> > > > > I'm about to write an application that takes about 5000 mailadresses
> > > > > from a database, and then sends a mail to each one of them. I
> haven't
> > > > > done this kind of apps before, so I don't know if it's a good idea.
> Does
> > > > > anyone have any suggestions?
> > > > >
> > > > > /Jimmy
> > > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail: php-list-admin
lists.php.net
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
>
--
attached mail follows:
I use qmail to handle all my PHP generated mail. It does a wonderful job. One small coding error sent almost 1000 e-mails to one address in about 30 seconds. It's fast!
-----Original Message-----
From: Jimmy Bäckström [mailto:broder_b
chello.se]
Sent: Thursday, August 16, 2001 9:46 AM
To: Daniel Adams
Cc: php-general
lists.php.net
Subject: SV: [PHP] Sending alots of mail
Hmm that's what I thought about. But I think the system I'll be using uses qmail. I've heard that qmail does things better than sendmail?
/Jimmy
----- Original Message -----
From: Daniel Adams <danno
wpi.edu>
To: Jimmy Bäckström <broder_b
chello.se>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 6:21 PM
Subject: Re: [PHP] Sending alots of mail
I did something like that once. Mine sent only about a few hundred at a time and it was still quite a strain on the system because you have a TON of sendmail processes started and running at the same time. Just be aware of the possible system load. - dan
On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> Hi list! > I'm about to write an application that takes about 5000 mailadresses from a database, and then sends a mail to each one of them. I haven't done this kind of apps before, so I don't know if it's a good idea. Does anyone have any suggestions? > > /Jimmy >
---- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net For additional commands, e-mail: php-general-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Another alternative is to send the email message via majordomo or some other mail list management utility. The trick is how to manage the list (subscribe and unsubscribe). You have to make the decision whether or not you want to use the MLM or your PHP/database application as the primary control. Then write your scripts to integrate the two.
/dkm
----- Original Message -----
From: "Daniel Adams" <danno
wpi.edu>
To: "Jimmy Bäckström" <broder_b
chello.se>
Cc: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 1:30 PM
Subject: Re: SV: [PHP] Sending alots of mail
> I've heard that qmail is better for a lot of things and easier to
> configure, but I've never actual used it. Perhaps I'll give it a try next
> time i set one up.
> - Dan
>
> On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
>
> > Hmm that's what I thought about. But I think the system I'll be using
uses qmail. I've heard that qmail does things better than sendmail?
> >
> > /Jimmy
> > ----- Original Message -----
> > From: Daniel Adams <danno
wpi.edu>
> > To: Jimmy Bäckström <broder_b
chello.se>
> > Cc: <php-general
lists.php.net>
> > Sent: Thursday, August 16, 2001 6:21 PM
> > Subject: Re: [PHP] Sending alots of mail
> >
> >
> > I did something like that once. Mine sent only about a few hundred at a
> > time and it was still quite a strain on the system because you have a
TON
> > of sendmail processes started and running at the same time. Just be
aware
> > of the possible system load.
> > - dan
> >
> > On Thu, 16 Aug 2001, Jimmy Bäckström wrote:
> >
> > > Hi list!
> > > I'm about to write an application that takes about 5000 mailadresses
from a database, and then sends a mail to each one of them. I haven't done
this kind of apps before, so I don't know if it's a good idea. Does anyone
have any suggestions?
> > >
> > > /Jimmy
> > >
> >
> >
>
> --
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Doesn't that make your script take A REALLY LONG TIME to run? If you do sleep(1) after each call to mail() and send out 1000 e-mails that would be a little over 16 and a half minutes of sleep.
At 5000 you are up to over 80 minutes.
Isn't this a problem?
Sheridan Saint-Michel Website Administrator FoxJet, an ITW Company www.foxjet.com
----- Original Message -----
From: Daniel Adams <danno
wpi.edu>
To: PHP List <php_list
ibcnetwork.net>
Cc: php <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 12:31 PM
Subject: Re: SV: [PHP] Sending alots of mail
> Actually I remember that I did have the same problem. I had to use
> sleep() also even though I was only sending a few hundred rather than a
> few thousand.
> - Dan
>
> On Thu, 16 Aug 2001, PHP List wrote:
>
> > Thats interesting.
> > I tried to do the same thing with 5000 emails using sendmail, and I
found
> > that only about 1/2 were actually sent, it seems like the multiple calls
to
> > mail caused some of them to be ignored. I had to sleep for a couple of
> > seconds before each call to mail() in order to get them all out.
> >
> > No one else had this problem?
> >
> > ----- Original Message -----
> > From: "Tim" <infoz
earthlink.net>
> > To: "Jimmy Bäckström" <broder_b
chello.se>
> > Cc: "Tyler Longren" <tyler
captainjack.com>; <php-general
lists.php.net>
> > Sent: Thursday, August 16, 2001 9:39 AM
> > Subject: Re: SV: [PHP] Sending alots of mail
> >
> >
> > > I have a system where we send periodic batches of 60,000 messages at a
> > > time, so it's definitely doable. It helps to put some throttling in
> > > there (i.e. a sleep() periodically) to be kind to your e-mail server.
> > >
> > > - Tim
> > >
> > > On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> > > > Hmm I knew that =)
> > > > I just wondered if it's such a good idea. 5000 mail is very much you
> > know.
> > > >
> > > > /Jimmy
> > > > ----- Original Message -----
> > > > From: Tyler Longren <tyler
captainjack.com>
> > > > To: Jimmy Bäckström <broder_b
chello.se>
> > > > Cc: <php-general
lists.php.net>
> > > > Sent: Thursday, August 16, 2001 6:25 PM
> > > > Subject: Re: [PHP] Sending alots of mail
> > > >
> > > >
> > > > > This was just discussed last week. Here's how:
> > > > > $connection = mysql_connect("host","user","pass");
> > > > > $db = mysql_select_db("db_name", $connection);
> > > > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > > > > while ($row = mysql_fetch_array($sql)) {
> > > > > $email = $row["email"];
> > > > > $name = $row["name"];
> > > > > // code to send email (use the mail() function)
> > > > > }
> > > > >
> > > > > Good luck,
> > > > > Tyler Longren
> > > > > Captain Jack Communications
> > > > > tyler
captainjack.com
> > > > > www.captainjack.com
> > > > >
> > > > >
> > > > >
> > > > > On Thu, 16 Aug 2001 18:29:04 +0200
> > > > > Jimmy Bäckström <broder_b
chello.se> wrote:
> > > > >
> > > > > > Hi list!
> > > > > > I'm about to write an application that takes about 5000
mailadresses
> > > > > > from a database, and then sends a mail to each one of them. I
> > haven't
> > > > > > done this kind of apps before, so I don't know if it's a good
idea.
> > Does
> > > > > > anyone have any suggestions?
> > > > > >
> > > > > > /Jimmy
> > > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> > > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> > > >
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > For additional commands, e-mail: php-general-help
lists.php.net
> > > To contact the list administrators, e-mail:
php-list-admin
lists.php.net
> >
> >
> >
>
> --
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
Well, I'll have to change the max execution time in the script. You can do that dynamically, or in the php.ini file.
/Jimmy
----- Original Message -----
From: Sheridan Saint-Michel <webmaster
foxjet.com>
To: php-general <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 8:20 PM
Subject: Re: SV: [PHP] Sending alots of mail
>
> Doesn't that make your script take A REALLY LONG TIME to run?
> If you do sleep(1) after each call to mail() and send out 1000 e-mails
> that would be a little over 16 and a half minutes of sleep.
>
> At 5000 you are up to over 80 minutes.
>
> Isn't this a problem?
>
> Sheridan Saint-Michel
> Website Administrator
> FoxJet, an ITW Company
> www.foxjet.com
>
>
> ----- Original Message -----
> From: Daniel Adams <danno
wpi.edu>
> To: PHP List <php_list
ibcnetwork.net>
> Cc: php <php-general
lists.php.net>
> Sent: Thursday, August 16, 2001 12:31 PM
> Subject: Re: SV: [PHP] Sending alots of mail
>
>
> > Actually I remember that I did have the same problem. I had to use
> > sleep() also even though I was only sending a few hundred rather than a
> > few thousand.
> > - Dan
> >
> > On Thu, 16 Aug 2001, PHP List wrote:
> >
> > > Thats interesting.
> > > I tried to do the same thing with 5000 emails using sendmail, and I
> found
> > > that only about 1/2 were actually sent, it seems like the multiple calls
> to
> > > mail caused some of them to be ignored. I had to sleep for a couple of
> > > seconds before each call to mail() in order to get them all out.
> > >
> > > No one else had this problem?
> > >
> > > ----- Original Message -----
> > > From: "Tim" <infoz
earthlink.net>
> > > To: "Jimmy Bäckström" <broder_b
chello.se>
> > > Cc: "Tyler Longren" <tyler
captainjack.com>; <php-general
lists.php.net>
> > > Sent: Thursday, August 16, 2001 9:39 AM
> > > Subject: Re: SV: [PHP] Sending alots of mail
> > >
> > >
> > > > I have a system where we send periodic batches of 60,000 messages at a
> > > > time, so it's definitely doable. It helps to put some throttling in
> > > > there (i.e. a sleep() periodically) to be kind to your e-mail server.
> > > >
> > > > - Tim
> > > >
> > > > On 16 Aug 2001 18:34:11 +0200, Jimmy Bäckström wrote:
> > > > > Hmm I knew that =)
> > > > > I just wondered if it's such a good idea. 5000 mail is very much you
> > > know.
> > > > >
> > > > > /Jimmy
> > > > > ----- Original Message -----
> > > > > From: Tyler Longren <tyler
captainjack.com>
> > > > > To: Jimmy Bäckström <broder_b
chello.se>
> > > > > Cc: <php-general
lists.php.net>
> > > > > Sent: Thursday, August 16, 2001 6:25 PM
> > > > > Subject: Re: [PHP] Sending alots of mail
> > > > >
> > > > >
> > > > > > This was just discussed last week. Here's how:
> > > > > > $connection = mysql_connect("host","user","pass");
> > > > > > $db = mysql_select_db("db_name", $connection);
> > > > > > $sql = mysql_query("SELECT * FROM table_name ORDER BY email ASC");
> > > > > > while ($row = mysql_fetch_array($sql)) {
> > > > > > $email = $row["email"];
> > > > > > $name = $row["name"];
> > > > > > // code to send email (use the mail() function)
> > > > > > }
> > > > > >
> > > > > > Good luck,
> > > > > > Tyler Longren
> > > > > > Captain Jack Communications
> > > > > > tyler
captainjack.com
> > > > > > www.captainjack.com
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, 16 Aug 2001 18:29:04 +0200
> > > > > > Jimmy Bäckström <broder_b
chello.se> wrote:
> > > > > >
> > > > > > > Hi list!
> > > > > > > I'm about to write an application that takes about 5000
> mailadresses
> > > > > > > from a database, and then sends a mail to each one of them. I
> > > haven't
> > > > > > > done this kind of apps before, so I don't know if it's a good
> idea.
> > > Does
> > > > > > > anyone have any suggestions?
> > > > > > >
> > > > > > > /Jimmy
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > PHP General Mailing List (http://www.php.net/)
> > > > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > > > To contact the list administrators, e-mail:
> > > php-list-admin
lists.php.net
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > > > For additional commands, e-mail: php-general-help
lists.php.net
> > > > To contact the list administrators, e-mail:
> php-list-admin
lists.php.net
> > >
> > >
> > >
> >
> > --
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-general-help
lists.php.net
> > To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
attached mail follows:
Jim, Could you give us an example and explanation as to why no %s %s is unstable? How has this failed you ? because I've never had a problem with not having it in there that I know of. PHP has always executed for me properly, NT 4.0 and w2k. But if it is unstable I don't want to find out later. Thanks!
Angie Tollerson
Alliance Technologies
Web Programmer
(515)245-7628
tollerson
alliancetechnologies.net
>>> Phil Driscoll <phil
dialsolutions.co.uk> 08/16/01 12:20PM >>>
On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
> > Second, make the application extensions point to php.exe (you > > don't need the > > %s %s stuff). > > This I have to disagree with. Without the %s %s, you are rolling dice as > to whether the page will work or not. I never had this problem with Apache > under win32, but I have with IIS. I would definitely leave them in there.
I'll have to strongly disagree with your disagreement ;)
-- Phil Driscoll-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe
lists.php.net For additional commands, e-mail: php-windows-help
lists.php.net To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I hate it when the messages don't reply to the lists!
> -----Original Message-----
> From: Powell, Jim (EER)
> Sent: Thursday, August 16, 2001 12:45 PM
> To: 'Angie Tollerson'
> Subject: RE: [PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation failed !
> Please Help!
>
>
> OK, pretty straight forward, I went through my list of
> failures, and Almost all of them (the ones that failed
> without the %s %s) used extensions to PHP (ming, crypt, etc,
> etc). They simply would return a CGI error bad header
> returned (or something along those lines, I forget what IIS
> put in there). Other things like mySQL and the other built
> in functions seemed to work fine without them (them = %s %s),
> so I guess it would depend on what you use PHP for as to
> whether the %s %s is needed.
>
> Of course Mr. Santiago has the official reason (at least from
> Microsoft's perspective) in another e-mail.
>
> Jim Powell
>
> > -----Original Message-----
> > From: Angie Tollerson [mailto:Tollerson
alliancetechnologies.net]
> > Sent: Thursday, August 16, 2001 5:25 PM
> > To: phil
dialsolutions.co.uk; php-general
lists.php.net;
> > php-windows
lists.php.net; PowellJF
navair.navy.mil
> > Subject: [PHP-WIN] Re: [PHP] Re: [PHP-WIN] Installation
> > failed ! Please
> > Help!
> >
> >
> > Jim,
> > Could you give us an example and explanation as to why no %s
> > %s is unstable? How has this failed you ? because I've never
> > had a problem with not having it in there that I know of.
> > PHP has always executed for me properly, NT 4.0 and w2k. But
> > if it is unstable I don't want to find out later. Thanks!
> >
> >
> > Angie Tollerson
> > Alliance Technologies
> > Web Programmer
> > (515)245-7628
> > tollerson
alliancetechnologies.net
> >
> > >>> Phil Driscoll <phil
dialsolutions.co.uk> 08/16/01 12:20PM >>>
> > On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote:
> >
> > > > Second, make the application extensions point to php.exe (you
> > > > don't need the
> > > > %s %s stuff).
> > >
> > > This I have to disagree with. Without the %s %s, you are
> > rolling dice as
> > > to whether the page will work or not. I never had this
> > problem with Apache
> > > under win32, but I have with IIS. I would definitely leave
> > them in there.
> >
> > I'll have to strongly disagree with your disagreement ;)
> >
> > --
> > Phil Driscoll
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-windows-unsubscribe
lists.php.net
> > For additional commands, e-mail: php-windows-help
lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin
lists.php.net
> >
> >
>
attached mail follows:
Hi. Can anyone send me examples from http methods? (PUT, HEAD, GET, POST, DELETE, TRACE).
Tks
Edney Marcel Imme
Edney
bludata.com.br
Fone: Celular: 91124616
==================================================================
"Voce quer REALMENTE que o e-commerce de certo no Brasil ? Então compre
pela Internet..."
==================================================================
A informação transmitida destina-se apenas à pessoa a quem foi endereçada e pode conter
informação confidencial, legalmente protegida e para conhecimento exclusivo do
destinatário. Se o leitor desta informação não for o seu destinatário, fica ciente de
que sua leitura, divulgação, distribuição ou cópia é estritamente proibida. Caso a
mensagem tenha sido recebida por engano, favor comunicar o remetente e deletar o texto
de qualquer computador ou servidor.
attached mail follows:
On Thu, 16 Aug 2001 11:14:17 +0930, David Robley
<huntsman
www.nisu.flinders.edu.au> wrote:
>On Thu, 16 Aug 2001 03:08, Egan wrote: >> I need to set some PHP values like: >> >> php_value session.save_path /a_more_secure_dir
>Yuo might try allowovveride options
Yes, thanks.
I was trying to avoid "allowoverride options" because I did not want users to set +Includes or +ExecCGI in their .htaccess files.
But since it was the only way to get php_value working in .htaccess, I decided to use:
<Location /> Options -ExecGGI -Includes </Location>
to override their .htaccess overrides, in case they try.
All happy now. :-)
Egan
attached mail follows:
I'm trying to integrate a payment processing service for a client. The client would like to store the values passed from the payment processing service in a database on the clients server. I'm using a Meta Tag redirect from the payment processing service to my client to pass the variables.
Unfortunately I loose the variables when using Netscape 4.7 on the Mac if the variable has a space in it. Here's a url for an example;
http://www.smyclient.com/relay.php?trans_id=0&sub_acct=10&delay=nodelay&node lay=&revshare_id=&first=Tim&last=Jorgenson&address1=710 Clearview Road&address2=&city=San Francisco...
I loose everything after the first blank space in the url. In this example at "address1=710 Clearview Road&"
The payment processing service does not run PHP so I can't alter the variables on their side to include html formatted spaces, i.e. %20.
Any suggestions would be greatly appreciated.
Tom
attached mail follows:
You're not sending CC numbers in the url as plain text are you? That's a REALLY BAD idea. You should store the information in your database before you go to processing the CC (name, address, etc.) and don't store CC numbers, the liability is much more than you're being paid. If you store it ahead of time all you need to pass in the url from the processing company is an id# to look up the info in your database.
Data Driven Design 1506 Tuscaloosa Ave Holly Hill, Florida 32117
http://www.datadrivendesign.com Phone: (386) 226-8979
Websites That WORK For You
----- Original Message -----
From: "Tom Beidler" <tom
orbittechservices.com>
To: "php list" <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 1:01 PM
Subject: [PHP] loose variables when url parsed through Netscape
> I'm trying to integrate a payment processing service for a client. The
> client would like to store the values passed from the payment processing
> service in a database on the clients server. I'm using a Meta Tag redirect
> from the payment processing service to my client to pass the variables.
>
> Unfortunately I loose the variables when using Netscape 4.7 on the Mac if
> the variable has a space in it. Here's a url for an example;
>
>
http://www.smyclient.com/relay.php?trans_id=0&sub_acct=10&delay=nodelay&node
> lay=&revshare_id=&first=Tim&last=Jorgenson&address1=710 Clearview
> Road&address2=&city=San Francisco...
>
> I loose everything after the first blank space in the url. In this example
> at "address1=710 Clearview Road&"
>
> The payment processing service does not run PHP so I can't alter the
> variables on their side to include html formatted spaces, i.e. %20.
>
> Any suggestions would be greatly appreciated.
>
> Tom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
>
>
attached mail follows:
No I'm not passing credit card numbers.
I have to receive the variables from the payment processing company because my clients ISP is not using cURL and I can't do a secure post of the info to them.
> From: "Data Driven Design" <jeff
datadrivendesign.com>
> Date: Thu, 16 Aug 2001 13:21:53 -0400
> To: "Tom Beidler" <tom
orbittechservices.com>, "php list"
> <php-general
lists.php.net>
> Subject: Re: [PHP] loose variables when url parsed through Netscape
>
> You're not sending CC numbers in the url as plain text are you? That's a
> REALLY BAD idea. You should store the information in your database before
> you go to processing the CC (name, address, etc.) and don't store CC
> numbers, the liability is much more than you're being paid. If you store it
> ahead of time all you need to pass in the url from the processing company is
> an id# to look up the info in your database.
>
> Data Driven Design
> 1506 Tuscaloosa Ave
> Holly Hill, Florida 32117
attached mail follows:
Hi all, I don't know if this is a PHP related question, but here it is:
I'm developing a PHP / MySQL site, and, in one page the admin of the site has the power to add categories to the database in a <input type="text"> field. To check if the entry is already set, there is a <select> control with all the entries in the database. So, when the admin type the name of the categorie and press the submit button, another page load and tell if the insert operation was success or not. Then if the entry was add and press the back link ( <a href="" window.history.back();return false">[ back ]</a> ) the option in the <select> is not show after the user press the reload button. Is there a way that the page reaload automatically the data from the database without the user pressing the reload button? Thanks in advance.
-- Mauricio Téllez Jiménez Seguimiento Técnico EDUMEXICO edumexicospeedy.coacade.uv.mx edumexico
yupimail.com Zamora No. 25, Col. Centro C.P. 91000, Xalapa, Ver. Tel. 52(28)17-86-87, 17-73-80 Fax. 52(28)18-64-13
attached mail follows:
The command "mysql_db_name" is not working in our installation. We get no error, but no database listing either if we use this command. ----- // This is the code which does NOT work: $dbs = mysql_list_dbs(); $num_dbs = mysql_numrows($dbs); for($i=0; $i<$num_dbs; $i++) { $db = mysql_dbname($dbs, $i); echo "db=".$db."<br>"; } ----- // And this is adopted code from the manual which DOES work: $db_list = mysql_list_dbs($conn); while ($row = mysql_fetch_object($db_list)) { echo "db=".$row->Database . "<br>"; } -----
I tried both: mysql_db_name, mysql_dbname. We need this function to use phpMyAdmin. Solaris 8, Apache 1.3.20, PHP 4.0.6, MySQL 3.23.40
Any ideas why this command does not work?
TIA, Peter
attached mail follows:
I have a function like this...
function register_db_to_globals( $row ) { while( list( $key, $val) = each( $row ) ) { global $$key; // (I've tried this with $key as well print "$key : $val <Br>"; } }
where the function prints this;
job_ID : 2 jobTitle : testtestt jobDesc : esttest jobShortDesc : jobSalary : jobLocation : client_ID : 2 jobContractType : 1
I want to create global variables from the data ie $job_ID = 2, $jobTitle = testtestt
but this is not working, the values are remaining empty.
Has anyone got any ideas on this.
Regards
Tom Hodder
--
attached mail follows:
Use the $GLOBALS array.
On Thu, 16 Aug 2001, Tom Hodder wrote:
> > I have a function like this... > > function register_db_to_globals( $row ) > { > while( list( $key, $val) = each( $row ) ) > { > global $$key; // (I've tried this with $key as well > print "$key : $val <Br>"; > } > } > > where the function prints this; > > job_ID : 2 > jobTitle : testtestt > jobDesc : esttest > jobShortDesc : > jobSalary : > jobLocation : > client_ID : 2 > jobContractType : 1 > > I want to create global variables from the data ie $job_ID = 2, $jobTitle = > testtestt > > but this is not working, the values are remaining empty. > > Has anyone got any ideas on this. > > Regards > > Tom Hodder > > > -- > > > >
attached mail follows:
I am under the (possibly flawed) assumption that you need to have the oracle client installed on the web server in order to use the oracle PHP module. Since I don't want to use the client on this machine at all, I would prefer to use the Perl DBI/DBD modules to connect to the database. Is there a way to access perl calls and return data from them from PHP? Thanks, Mike
attached mail follows:
> I am under the (possibly flawed) assumption that you need to > have the oracle client installed on the web server in order > to use the oracle PHP module. Since I don't want to use the > client on this machine at all, I would prefer to use the Perl > DBI/DBD modules to connect to the database. Is there a way > to access perl calls and return data from them from PHP?
The Perl DBI/DBD stuff needs exactly the same Oracle client library that PHP does.
-Rasmus
attached mail follows:
The menu that's taken from the database is basically a list of links like this
$s="select * FROM molds m, prodlookup p WHERE p.cid=$cid and p.pid=m.id ORDER BY p.pid"; $menu=mysql_query($s); while ($stuff = mysql_fetch_array($menu)) { extract($stuff); echo "<a href=\"?cid=$cid&id=$id&page=1\">".$title."</a><br>"; }
So basically there could be an unlimited # of links depending on how many products there are. I'm guessing that before I echo the link, I need to evaluate whether $id is in the current URL. How would I go about doing that?
Thanks for your time.
__________________ Jason Dulberg Extreme MTB http://extreme.nas.net
> On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote: > > I am dynamically creating a menu based on a "title" field from a > > database. > > > > ie > > item1 > > item2 etc. > > > > Is it possible that when I'm on the "item1" page to bold the title in > > the menu? > > > > Any suggestions are appreciated. > > > > Presumably there is a corresponding filed for filename, or URL, or > somesusch? If so, just check whether the current script name matches, and > if so add the <STRONG> tags where needed. > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > If at first you don't succeed, work for Microsoft. >
attached mail follows:
I suppose you could check the $GLOBALS["REQUEST_URI"] variable with a regular expression or something. - Dan
On Thu, 16 Aug 2001, Jason Dulberg wrote:
> The menu that's taken from the database is basically a list of links like > this > > $s="select * FROM molds m, prodlookup p WHERE p.cid=$cid and p.pid=m.id > ORDER BY p.pid"; > $menu=mysql_query($s); > while ($stuff = mysql_fetch_array($menu)) { > extract($stuff); > echo "<a href=\"?cid=$cid&id=$id&page=1\">".$title."</a><br>"; > } > > So basically there could be an unlimited # of links depending on how many > products there are. I'm guessing that before I echo the link, I need to > evaluate whether $id is in the current URL. How would I go about doing that? > > Thanks for your time. > > __________________ > Jason Dulberg > Extreme MTB > http://extreme.nas.net > > > > On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote: > > > I am dynamically creating a menu based on a "title" field from a > > > database. > > > > > > ie > > > item1 > > > item2 etc. > > > > > > Is it possible that when I'm on the "item1" page to bold the title in > > > the menu? > > > > > > Any suggestions are appreciated. > > > > > > > Presumably there is a corresponding filed for filename, or URL, or > > somesusch? If so, just check whether the current script name matches, and > > if so add the <STRONG> tags where needed. > > > > -- > > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > > > If at first you don't succeed, work for Microsoft. > > > > >
--
attached mail follows:
Another way you could do it would be to check each item in the $GLOBALS["argv"] variable (or $argv). - Dan
------------ Forwarded message ---------- Date: Thu, 16 Aug 2001 14:18:09 -0400 (EDT) From: Daniel Adams <danno
wpi.edu> To: Jason Dulberg <jdulberg
nas.net> Cc: huntsman
www.nisu.flinders.edu.au, php-general
lists.php.net Subject: RE: [PHP] bold current menu item
I suppose you could check the $GLOBALS["REQUEST_URI"] variable with a regular expression or something. - Dan
On Thu, 16 Aug 2001, Jason Dulberg wrote:
> The menu that's taken from the database is basically a list of links like > this > > $s="select * FROM molds m, prodlookup p WHERE p.cid=$cid and p.pid=m.id > ORDER BY p.pid"; > $menu=mysql_query($s); > while ($stuff = mysql_fetch_array($menu)) { > extract($stuff); > echo "<a href=\"?cid=$cid&id=$id&page=1\">".$title."</a><br>"; > } > > So basically there could be an unlimited # of links depending on how many > products there are. I'm guessing that before I echo the link, I need to > evaluate whether $id is in the current URL. How would I go about doing that? > > Thanks for your time. > > __________________ > Jason Dulberg > Extreme MTB > http://extreme.nas.net > > > > On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote: > > > I am dynamically creating a menu based on a "title" field from a > > > database. > > > > > > ie > > > item1 > > > item2 etc. > > > > > > Is it possible that when I'm on the "item1" page to bold the title in > > > the menu? > > > > > > Any suggestions are appreciated. > > > > > > > Presumably there is a corresponding filed for filename, or URL, or > > somesusch? If so, just check whether the current script name matches, and > > if so add the <STRONG> tags where needed. > > > > -- > > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > > > If at first you don't succeed, work for Microsoft. > > > > >
--
attached mail follows:
What's thee easiest way to check this?
- seb
attached mail follows:
PHP IDE for Linux Only a.. Coffeecup Editor (the best IDE for PHP on Linux) PHP editor b.. HTML/PHP editors Quanta c.. HTML/PHP editors Blue Fish d.. HTML editors AswEdit On Windows a.. PHP IDE and Editor "PHP Coder" and mirror b.. Zend PHP IDE c.. IDE for PHP scripting (Web browser) d.. Nexidion PHP IDE e.. In Source Forge, enter the keyword PHP IDE in Search PHP IDE for Windows Only a.. Soyal, a excellent PHP editor (Windows) b.. IDE for PHP editor (Windows) c.. IDE for PHP (Windows) d.. "EditPlus Text editor" Win32 (high rating 5 stars) e.. eNotepad Win32 (high rating 5 stars) f.. PHP editor Win32 (high rating 5 stars) g.. UltraEdit Win32 with PHP word file h.. ScriptWorx editor Win32 (rating 4.5 stars) i.. TextPad editor Win32 (rating 4.5 stars) j.. PHP editor "ASPEdit" (rating 3.5 stars) along with PHP code explorer (rating 4.5 stars) k.. HTML/PHP editor Dreamweaver l.. HTML/PHP editor Homesite m.. HTML/PHP editor Hotdog PHP IDE for Both Windows and Linux a.. PHP editor (for both Windows and Linux/UNIX) (rating 5 stars). b.. HTML/PHP editors Amaya c.. Folding text editor (Windows and Linux) d.. PHP Editor (Windows and Linux) e.. Color editor gvim for PHP (Windows and Linux) at and see also "ptags of PHP" f.. Jed (Windows and Linux) Editors for PHP http://www.itworks.demon.co.uk/phpeditors.htm
http://www.oodie.com/tools/index.php?view=editor
attached mail follows:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello...
Im having a problem with a php code that was running (and is running smoothly until today i guess).
The code that's giving me the error is this: $sql = "select * from archivo where fecha between $fechaprima and $fechasegu"; $r = mysql_query ($sql); $num_de_rows = mysql_num_rows ($r); this line <- if ( $num_de_rows > 0 ) { (i create some html tables here) }
The site is (www.passive-aggressive.org/pic_archive.php). The problem only happens when i select 08 as the month (i have a dropdown in which u can select which month u want and then i create the $fechaprima and $fechasegu from that date. Anyway... with all the other months im not getting any errors at all. However, I've done the query by hand at the mysql prompt and it is bringing me one row (the only one that exists for 08 month), so im guessing its invalid syntax, which is weird cause all the other months are running this "script" ok.
The error im getting is: Warning: Supplied argument is not a valid MySQL result resource in /home/passive-/public_html/pic_archive.php on line 172
(line 172 is the one that i showed before)
Any ideas?
- --
Saludos,
Romina N. Tulisi romina
spcom.com.ar
Desarrollos
Soluciones Punto Com
http://www.spcom.com.ar
-----BEGIN PGP SIGNATURE----- Version: PGP 6.0.2i
iQA/AwUBO3wgu9gEND22jsQ3EQKSsgCfb18sc+b/hAI6WuZOjmKD6wUDy7YAn3GM 3Usgy3KSM1w/D2Q2G67oZCst =JAs/ -----END PGP SIGNATURE-----
attached mail follows:
> The site is (www.passive-aggressive.org/pic_archive.php). The problem > only happens when i select 08 as the month (i have a dropdown in which
08 is an invalid octal number which will evaluate to 0
-Rasmus
attached mail follows:
> $num_de_rows = mysql_num_rows ($r); > this line <- if ( $num_de_rows > 0 ) { (i create some html > tables here) }
> The error im getting is: > Warning: Supplied argument is not a valid MySQL result resource in > /home/passive-/public_html/pic_archive.php on line 172
I am not sure but have some ideas where to look.
Can you echo/print the value $num_de_rows? It could be that it is 'false' or empty, and maybe php chokes on the comparison ? [ if (false>0) or (>0) ] then test add in the if a test whether the $num_de_rows is false/empty.
Would it be an idea to set $num_de_rows to 0 before you start? Nahh... wouldn't help.
Also try to print/echo the query and run the query on your database in phpmyadmin and see if the resulting table is what you expected.
<obscure> could it be that line 172 also contains a part of the html table printing? i think the numbering of the $r array starts with index 0 so there is no $r[1] if the number of rows is 1. Just $r[0]. </obscure>
hth, Chris
-------------------------------------------------------------------- -- C.Hayes Droevendaal 35 6708 PB Wageningen the Netherlands -- --------------------------------------------------------------------
attached mail follows:
You have been specially selected to qualify for the following:
Premium Vacation Package and Pentium PC Giveaway To review the details of the please click on the link with the confirmation number below:
Confirmation Number#Lh340 Please confirm your entry within 24 hours of receipt of this confirmation.
Wishing you a fun filled vacation!
If you should have any additional questions or cann't connect to the site
do not hesitate to contact me direct:
mailto:vacation
btamail.net.cn?subject=Help!
attached mail follows:
Geeeee, does this mean we ALL won? :O
----- Original Message -----
From: <CATHY4233
hotmail.com>
To: <php-general
lists.php.net>
Sent: Thursday, August 16, 2001 2:40 PM
Subject: [PHP] Win One of 25 Dream Vacation Getaways!! .
> You have been specially selected to qualify for the following:
>
> Premium Vacation Package and Pentium PC Giveaway
> To review the details of the please click on the link
> with the confirmation number below:
>
> http://www.1xin.net/wintrip
>
> Confirmation Number#Lh340
> Please confirm your entry within 24 hours of receipt of this confirmation.
>
> Wishing you a fun filled vacation!
> If you should have any additional questions or cann't connect to the site
> do not hesitate to contact me direct:
> mailto:vacation
btamail.net.cn?subject=Help!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe
lists.php.net
> For additional commands, e-mail: php-general-help
lists.php.net
> To contact the list administrators, e-mail: php-list-admin
lists.php.net
attached mail follows:
I'm trying to integrate an Internet Telephony service for a client. I have a number of variables I need to dump into the clients database and then to pass to the Internet Telephony service via a Perl script they have provided for me that will reside on the client's server. Can I somehow pass them "behind the scenes" or should I use a redirect. There is info I need to keep away from the end user, mainly the phone number.
attached mail follows:
Can php and perl code reside in the same file? When the document is served up it parses the PHP and then the Perl?
attached mail follows:
hey-
this has ABSOLUTELY no relation to php in any way, however I wanted to ask. I'm about to order a computer for school. I need opinions on Gateway vs. Dell and vice versa. So far, I'm leaning towards gateway(more bang for the buck)
thanks chris
attached mail follows:
Let's see if I can elaborate a little on my previous problem...
I work with 3 ISPs, 2 of which have Magic Quotes turned off (can someone tell me why an ISP would want to have magic quotes turned off???). If I feed a large dump from one database into another (using phpMyAdmin) then on the one with Magic Quotes turned ON there is no problem. But WITHOUT magic quotes turned on feeding a statement like this won't work:
INSERT INTO database ( fieldname ) VALUES ( 'bob's string' );
So... keeping in mind that it is fairly large dump, is there a way to utilize addslashes() to get it to go in? I've tried various addslash combinations but can't seem to get it right.
attached mail follows:
Hello, I am looking for a way to check a string if it has anything other than Numbers or Letters. Does anyone know how to do this? Thank you,
--------------------------------------------
Brandon Orther
WebIntellects Design/Development Manager
brandon
webintellects.com
800-994-6364
www.webintellects.com
--------------------------------------------
attached mail follows:
I use a javascript to do that for my forms:
if (window.RegExp) { var reg = new RegExp("^[_0-9a-z]*$","gi"); if (!reg.test(f.elements['username'].value)) { alert("Kullanici adi harf ve/veya rakamlardan olusmalidir. Lutfen Duzeltiniz!"); f.elements['username'].focus(); return(false); } }
I am sure you could write something similar with PHP.....
--- Brandon Orther <orther
webintellects.com> wrote:
> Hello,
>
> I am looking for a way to check a string if it has
> anything other than
> Numbers or Letters. Does anyone know how to do this?
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon
webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
===== 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/
attached mail follows:
hi...
i have compiled php as a cgi binary on my linux box. i want to be able to tell the binary which ini file to use on the command line, which i thought would be the -c switch.
entering:
./php -?
reveals:
Usage: php [-q] [-h] [-s [-v] [-i] [-f <file>] | {<file> [args...]} -q Quiet-mode. Suppress HTTP Header output. -s Display colour syntax highlighted source. -f <file> Parse <file>. Implies `-q' -v Version number -C Do not chdir to the script's directory -c <path> Look for php.ini file in this directory -a Run interactively -d foo[=bar] Define INI entry foo with value 'bar' -e Generate extended information for debugger/profiler -z <file> Load Zend extension <file>. -l Syntax check only (lint) -m Show compiled in modules -i PHP information -h This help
but entering either of:
./php -c /path/to/ini/ mytest.php ./php -c /path/to/ini/php.ini mytest.php
tells me that it is using the following (and incorrect) ini file:
/usr/local/lib/php.ini
does anybody know how to accomplish this?
regards,
jamie burns.
attached mail follows:
Consider the following table that I grabbed from another web site using:
<? $url = 'http://www.abc123xyz.com'; $lines_array = file($url); $lines_string = implode('', $lines_array); ?>
=======================================
<table cellspacing="2" cellpadding="2" border="0"> <tr> <td align=center>banana</td> <td align=left>.46</td> <td align=right>.55</td> </tr>
<tr> <td align=center>pear</td> <td align=left>.38</td> <td align=right>.51</td> </tr>
<tr> <td align=center>apple</td> <td align=left>.59</td> <td align=right>.33</td> </tr> </table>
=======================================
The fruit lables don't change, but prices change daily. How would I parse JUST the two prices to the right of the word pear into a new html table?
How would I parse the word pear AND the two prices to the right into a new html table?
I think the answers will help me understand better.
Thanks
Craig ><>
westerman
chanuteks.com
attached mail follows:
I'm currently running my site on a win2k server, I'm using PHP for my tag board. Today a hacker managed to overwrite the text file I was using to store all the messages, which really isn't that big a surprise considering the permissions to the folder it is kept in are wide open thanks to my hosting company.
My question is, is there anything that I can do so that only PHP scripts on the server are able to access the file? Or am I going to have to contact my hosting company and see if they can figure out how to set the permissions properly?
Thanks in advance.
--craig henderson giantr productions everythingisfutile.com
attached mail follows:
>I'm currently running my site on a win2k server, I'm using PHP for my tag >board. Today a hacker managed to overwrite the text file I was using to >store all the messages, which really isn't that big a surprise considering >the permissions to the folder it is kept in are wide open thanks to my >hosting company.
You must hunt this scum down and cut out his guts using only a flint rock and some string....
Or this that the rite for manhood?
attached mail follows:
"Craig Henderson" <php
everythingisfutile.com> wrote in message
news:AKEALILCEDONMAKEGPNJCEBDCDAA.php
everythingisfutile.com...
> My question is, is there anything that I can do so that only PHP scripts
on
> the server are able to access the file? Or am I going to have to contact
my
> hosting company and see if they can figure out how to set the permissions
> properly?
Keep the file outside the web directory... ie, if your web directory is /home/users/craig/www/ then keep the file in /home/users/craig
... although telling them to get their sh*t together is a good plan too...
attached mail follows:
I have OpenLDAP and PHP 4.0.4p1 on a RedHat 7.1 (plain distribution, didn't recompile anything, and I use MOD_LDAP to authenticate users to an intranet site. I want PHP pages to show the real username so I have this function I call when I want to know the username.
the mod_ldap queries and ldap queries from a Perl CGI return very fast. On Perl I don't notice an performance issue (with less than a couple queries/second), but each query using PHP takes about two full seconds (or more). I did a workaround keeping the result on a session variable, but it's still slow every time I call this function. mod_ldap stores the user's dn on the REMOTE_USER environment variable.
Here's the function. I don't know how to make it faster.
Thanks, Emilio Panighetti
<?php // Retrieves user's real name from LDAP function ldapcnsearch() { $s_ldapserver = "localhost"; $s_ldapport = 389; $ds = ldap_connect( "ldap://".$s_ldapserver.":".$s_ldapport ); ldap_set_option( $ds, LDAP_OPT_PROTOCOL_VERSION, 3); $qar[] = "cn"; if ( $ds ) { $r = ldap_bind( $ds ); $sr = ldap_read( $ds, getenv( "REMOTE_USER" ), "cn=*", $qar, 0, 1, 1 ); $info = ldap_get_entries($ds, $sr); $s_RealName = $info[0]["cn"][0]; ldap_close( $ds ); return( $s_RealName ); } } ?>
attached mail follows:
It's probably a good idea to learn a bit about regular expressions. In short, PHP gives us two types of regular expressions to play with, POSIX and PCRE. For more information : PCRE : http://php.net/manual/en/ref.pcre.php POSIX : http://php.net/manual/en/ref.regex.php The following is an example rich tutorial : http://www.phpbuilder.org/columns/dario19990616.php3 It uses ereg, which is POSIX : ereg() : http://php.net/manual/en/function.ereg.php Your question is "How can I make sure a string contains ONLY alpha-numeric characters?" That could look like : $string = 'examPle123';
if (eregi("^[a-z0-9]+$",$string)) { echo 'String is alpha-numeric'; } else { echo 'String is NOT alpha-numeric'; }
Which in english says : if the string : - begins with // ^ - contains one to an unlimited number of // + - ends with // $ the following characters : a-z // all lowercase letters A-Z // comes from i in eregi (case insensitive) 0-9 // all numbers then this is TRUE.
Let's say we wanted to make sure the length was between 3-11 characters, tinkering with the regex the following works : if (eregi("^[a-z0-9]{3,11}$",$string)) { echo 'Is alpha-numeric and 3-11 characters in length'; } else { echo 'Is NOT alpha-numeric and/or 3-11 characters in length'; }
Allowing spaces in $string is easy as : [a-z0-9 ] Also, some good variable and string functions exist : variables : http://php.net/manual/en/ref.var.php strings : http://php.net/manual/en/ref.strings.php
Regards, Philip Olson
On Thu, 16 Aug 2001, Brandon Orther wrote:
> Hello,
>
> I am looking for a way to check a string if it has anything other than
> Numbers or Letters. Does anyone know how to do this?
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon
webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]