Re[2]: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rasmus Lerdorf
Why not just a simple wget -S https://... to see the headers? On Tue, 8 Oct 2002, Tom Rogers wrote: > Hi, > > Tuesday, October 8, 2002, 1:32:16 PM, you wrote: > JWH> Thanks for the help guys. Like I said, the download works fine as long > JWH> as it's not over SSL. I will try to disable it and s

Re: [PHP] Change in PHP 4.2.3 for mysql rollback

2002-10-07 Thread Rasmus Lerdorf
It doesn't look to see if there are any, that'd be hard. It just does a rollback to be safe. It shouldn't hurt anything if you aren't using transactions. -Rasmus On Tue, 8 Oct 2002, Samantha Savvakis wrote: > Hi, > > I noticed one of the fixes/changes to PHP 4.2.3 is the following: > > - Made

Re: [PHP] fsockopen timeout not working

2002-10-07 Thread Rasmus Lerdorf
You should read up on socket_select On Tue, 8 Oct 2002, Scott Dowd wrote: > I have a PHP application that goes out an checks all our servers via > SNMP when requested. Trouble is, if the server is not available, the > fsockopen never times out and therefore never moves onto the next > server. I

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rasmus Lerdorf
ame=" . $filename . > ".xls"); > > and I'm still getting the same thing. Is the no-cache cache-control header > sent automatically by PHP at all? I don't have one set explicitly in my > code. > > Any help is appreciated. > > ---John Holmes... >

Re: [PHP] File download doesn't work with SSL

2002-10-07 Thread Rasmus Lerdorf
Does it work with a different browser? Smells like an IE bug to me. On Mon, 7 Oct 2002, 1LT John W. Holmes wrote: > Everyone, > > I've had a simple download script working where a user would click on a link and the >program would send word or excel headers instead of HTML. The file would then

Re: [PHP] getimagesize or loop pblm

2002-10-06 Thread Rasmus Lerdorf
It could take a while. Depends how fast your server's disk sub-system is. Going to disk to stat and open an image and then parse through the initial headers to get the sizing data can take some time. I'd suggest caching this data somewhere if you are going to need it on every request. -Rasmus

Re: [PHP] Re: Stuck at PHP4 installation( with Apache2 )

2002-10-05 Thread Rasmus Lerdorf
Keep in mind that we do not officially support Apache2 yet. Will be a while before it will be anywhere near stable. -Rasmus On Sat, 5 Oct 2002, kramer wrote: > Ok guys, > To correcte all the typos, this is what I did. > 1. Removed PHP( directory ) completely. > 2. Start Apache - went fine( wit

Re: [PHP] Findng a pattern

2002-10-04 Thread Rasmus Lerdorf
> This is for my own internal statistics. > > I hope that puts your mind at rest. > > Henry > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > You realize that you are asking us to help you

Re: [PHP] Findng a pattern

2002-10-04 Thread Rasmus Lerdorf
site." -Rasmus On Sat, 5 Oct 2002, Henry wrote: > Thanks, but I don't want to uses google's SOAP interface, is there a preg > type solution. > > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... &

Re: [PHP] Findng a pattern

2002-10-04 Thread Rasmus Lerdorf
Google has a SOAP interface for this. On Sat, 5 Oct 2002, Henry wrote: > Dear All, > > Excuse my ignorance but I'm STILL a newbie to this aspect of PHP. > > $str="Results 1 - 10 of about 14. Search took > 0.04 seconds." > > I would like to look for the string above in a buffer of text. However

Re: [PHP] Copying array segments

2002-10-04 Thread Rasmus Lerdorf
> I've got an array that is 5 arrays deep, and I want to copy the array > three levels down of one index into a new array. > > Example: $output['recommendernames'][0]['recommendername'][0]['com']; > > This is what I want to do: > >$newoutput = $output['recommendernames'][0]['recommen

Re: [PHP] timeout

2002-10-04 Thread Rasmus Lerdorf
If you set_tiome_limit(0) your script will not be timed out as long as it keeps sending something every now and then. If it just sits there without outputting anything, then Apache will kill it off eventually. On Fri, 4 Oct 2002, lallous wrote: > Hello, > > > if i set set_time_limit(0) will my

Re: [PHP] force download and file size issue

2002-10-04 Thread Rasmus Lerdorf
and content length are correct as i have checked them and made comparisons to > other files which i can download. > > is there a problem with this code? i have tried it with win ie 6 and mac ie 5.1.2 > and ns 4.7.. same issue > > cheers > christian > > Rasmus Lerdorf wrote

Re: [PHP] force download and file size issue

2002-10-03 Thread Rasmus Lerdorf
t; > i have tried read file but it gave me the same issues as fpassthru.. both cap > on the memory_limit directive withint the php.ini file > > any other suggestions maybe? > > cheers > christian > > Rasmus Lerdorf wrote: > > > readfile() > > > > O

Re: [PHP] force download and file size issue

2002-10-03 Thread Rasmus Lerdorf
readfile() On Fri, 4 Oct 2002, christian haines wrote: > hi all, > > i have successfully created a download script to force a user to > download, however attempting to download large files causes an error > saying that the file cannot be found. > > my code > > header("Cache-control: private");

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
aticFunc() { echo get_class($this); } > } > > Class B extends A {} > > B::staticFunc(); > > thanks again > /nick > > - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "Debbie Dyer" <[EMAIL PROTECTED]>

Re: [PHP] Inheritance and a class function: on what class was itcalled?

2002-10-02 Thread Rasmus Lerdorf
> The mistake is mine not yours. I know about the :: operator I use it all the > time (but within classes parent::function() etc) - but I never realised > until now that PHP will let you use any class before instantiation (and > nearly all my PHP work uses classes). I have never even attempted to

Re: [PHP] counting number of records in a MySQL table; how do I getthe result?

2002-10-02 Thread Rasmus Lerdorf
$ret = mysql_query("SELECT count(*) as foo FROM AuthNum"); $result = mysql_fetch_array($ret); echo $result['foo']; One of many ways... -Rasmus On Wed, 2 Oct 2002, DonPro wrote: > Hi, > > I need to do either an insert or update into a MySQL table. Insert if there > are 0 records or update if

Re: [PHP] addslashes and remove slashes.

2002-10-02 Thread Rasmus Lerdorf
No, nothing has changed in recent memory with respect to this. On Wed, 2 Oct 2002, Anil Garg wrote: > Hi, > > Is it so that in php 4.2.3 we have to do both..."addslashes" and > "removeslashes" ?? coz in one of the older versions the things are goin fine > without using "removeslashes" but it do

Re: [PHP] Help with CHdir

2002-10-02 Thread Rasmus Lerdorf
Your code makes no sense and the error message is telling you exactly what you did wrong. opendir() returns a directory handle to be passed to readdir(). Calling chdir() on a directory handle makes no sense. You want to chdir to the same string that you passed to opendir() -Rasmus On Wed, 2 O

Re: [PHP] Paging HOWTO for PHP n' MYSQL

2002-10-02 Thread Rasmus Lerdorf
Just pass the current position from one page to the next and use a "LIMIT start,num" clause. -Rasmus On Wed, 2 Oct 2002, Francisco Vaucher wrote: > Hi people, > > i've been searching for a while in google and vivisimo for docs that treats > paging techniques for php and mysql. And so far i seek

Re: [PHP] Help with Numbers

2002-10-02 Thread Rasmus Lerdorf
Sort the arrays and pick off the first and last elements. On Wed, 2 Oct 2002, Christopher J. Crane wrote: > I am looking for a way to find the highest 5 and lowest 5 numbers within 300 > or so numbers. Here is what I have so far... > > $Tickers = array(); > $Current = array(); > > > // SQL QUERY

Re: [PHP] Getting users IP address into a variable.

2002-10-02 Thread Rasmus Lerdorf
$REMOTE_ADDR On Wed, 2 Oct 2002, Webmaster MBTRADINGCO wrote: > I'm sure there has to be a way to verify which IP address is accessing > from. I need to establish a page where when I enter it records the IP > address I'm logging in from, to a database. > > Problem is I can't seem a command in ph

Re: [PHP] Apache2 and PHP4.2.3 - errors

2002-10-02 Thread Rasmus Lerdorf
PHP doesn't officially support Apache2 at this point. Go back to Apache1. On Thu, 3 Oct 2002, Chris Aitken wrote: > Hi all, > > I have recently upgraded to apache2 on my FreeBSD 4.6 box, and the upgrade > worked well, the daemon was running and serving pages etc. So I installed > the latest PHP

Re: [PHP] php 4.2.3 giving prob.

2002-10-02 Thread Rasmus Lerdorf
Turn on register_globals in your php.ini On Wed, 2 Oct 2002, Anil Garg wrote: > hi, > i am facing a strange problem > i am using php 4.2.3 the url says > "http://ipaddress/admin/add_doc.php?id=264&mode=add";. > but in the php file when i try to print $id and $mode it couldnt print the > values..

Re: [PHP] PHP5

2002-10-01 Thread Rasmus Lerdorf
They are dreaming in technicolour. -Rasmus On Tue, 1 Oct 2002, Brad Bonkoski wrote: > Hello... > > Don't know if this has been discussed but I saw a book on PHP5 listed on > Amazon, saying that PHP5 would be released in the fall of 2002? Was > wondering if there has been any information posted

[PHP] Re: comparison of apache 1.3.x and 2.x

2002-10-01 Thread Rasmus Lerdorf
Read the release notes and docs for each. Basically Apache 2 introduces an mpm architecture which allows you to plug in different protocol handlers that make use of different processing models for handling requests. Most notably all the mpms except for the pre-fork mpm are threaded, but since Fr

Re: [PHP] apache2.x and php

2002-10-01 Thread Rasmus Lerdorf
You have it backwards. Apache 2.x can only have PHP as a shared module at this point, no static. -Rasmus On Tue, 1 Oct 2002, Anil Garg wrote: > Hi, > i came to know from someone that i can *not* make php a shared module in > apache 2.x .It works only in > 1.3x. > > If thats true can someone

[PHP] Re: [PHP-INST] vulnerabilities??

2002-09-30 Thread Rasmus Lerdorf
Sure, grab the latest Apache 1.3.x and the latest PHP. On Mon, 30 Sep 2002, Anil Garg wrote: > hi, > > Is there any version of php and apache for which there are no known > vulnerabilities?? > > regards > anil :) > > > -- > PHP Install Mailing List (http://www.php.net/) > To unsubscribe, visit:

Re: [PHP] Installing php - 4.2.3 with apache - 2.0.40

2002-09-30 Thread Rasmus Lerdorf
You need a current unstable snapshot of PHP to work with recent versions of Apache 2. However, unless you have a really good technical reason for using Apache 2, I would highly suggest sticking with Apache 1 for now. -Rasmus On Mon, 30 Sep 2002, Anil Garg wrote: > Hi, > > I am using following

Re: [PHP] mail + pdf + memory question

2002-09-29 Thread Rasmus Lerdorf
$mail->getFile() obviously reads in a file from the disk. You already have your attachment in memory, so don't call that function. Just do $attachment = $data; -Rasmus On Sun, 29 Sep 2002, Jonas Geiregat wrote: > this is my code what I want to do is > generate a pdf file(not save it on hd of

Re: [PHP] Copying a remote graphic to my server.

2002-09-29 Thread Rasmus Lerdorf
In PHP 4.3 you can actually just use copy(). In previous versions if you just want to dump it out you can use readfile(), or if you want to store it, use a simple fopen(), while(!feof()) fread() loop. -Rasmus On Sun, 29 Sep 2002, scott wrote: > > Hello there > I am trying to copy a remote grap

Re: [PHP] Need to get last element of 2-dimensional array

2002-09-28 Thread Rasmus Lerdorf
Well, your nasty parse error is because you have 2 opening ( and 3 closing ) on that line. A quick way to get the very last element of a 2-d array is to use: echo end(end($idArray)); -Rasmus On Sat, 28 Sep 2002, Phil Powell wrote: > The following produced a rather nasty parse error: > > ech

Re: [PHP] Htmlentities and Newlines?

2002-09-28 Thread Rasmus Lerdorf
> > Yeah, good catch on the addslash/magic_quote. > > > > Also, FYI: PHP will only allow you to do one query per mysql_query(). So > > you can't try to end a quote and then send another query. Don't know if > > this is the case for all database functions, or what... > > Does PHP this? Such behavio

Re: [PHP] Bet this is a dead horse

2002-09-28 Thread Rasmus Lerdorf
Nope, convert your SSI's to PHP. On Sat, 28 Sep 2002, John Hinton wrote: > Sorry, just signed on... due to this question... hope this horse ain't > too dead. > > Anyway, I have a need to run a SSI inside of a PHP page. Only thing I > have found so far is that maybe Apache 2.0 will handle this fe

Re: [PHP] Re: PEAR or not PEAR

2002-09-25 Thread Rasmus Lerdorf
No DB abstraction layer, including MetaBase offers true database abstraction. No layer will make stored procedures portable. No layer will make your fancy Oracle DECODE() query portable. No layer will magically make your MS-SQL triggers work anywhere else. For any moderately complex database w

Re: [PHP] error compiling apache2 on cobalt libgdbm error

2002-09-24 Thread Rasmus Lerdorf
Note that gdbm is not threadsafe, so you should only run Apache2 in prefork mode (or simply stick with Apache 1.3). But what does this have to do with PHP? On Tue, 24 Sep 2002, electroteque wrote: > libtool: link: warning: library `/usr/lib/libgdbm.la' was moved. > libtool: link: warning: libra

Re: [PHP] 256colour PNG?? WHY?!

2002-09-21 Thread Rasmus Lerdorf
gd1 is limited to 256 colours. Use gd2. On Sat, 21 Sep 2002, -=| Julien Bonastre |=- wrote: > Hmm.. Interesting problem I seem to have stumbled upon > > > I am running apache2.0.36 and php4.2.2 (i am using gd1.6.2) > > Now the catch is.. I just want to output a few diff image types directly to

Re: [PHP] PHP and Flash

2002-09-17 Thread Rasmus Lerdorf
php.net/ming On Wed, 18 Sep 2002, [EMAIL PROTECTED] wrote: > Hi all, > > I've never combined PHP with Flash, but I do know there's some > possibilities. I'm wondering if I can make a dynamic-PHP-site which > controls Flash. I need the administrator to be able to upload a new product > to a DB, a

Re: [PHP] imagettftext function does not handle combining characterproperly

2002-09-17 Thread Rasmus Lerdorf
That's done in Freetype. First thing I would try would be upgrading to GD2/Freetype2 and see if it is handled better with that combination. -Rasmus On Tue, 17 Sep 2002, Ziying Sherwin wrote: > > We installed php 4.2.2 with freetype 1.3.1 on our solaris 2.8 machine. We > are using function ima

Re: [PHP] open_basedir without safe mode?

2002-09-11 Thread Rasmus Lerdorf
safe mode and open_basedir are completely separate. On Thu, 12 Sep 2002, Ville Mattila wrote: > Hi there, > > I was wondering if there is a possibility to get open_basedir preferences > (also set via .htaccess) active in a server running not PHP in open_basedir. > I should create a small home si

Re: [PHP] PHP And Apache

2002-09-11 Thread Rasmus Lerdorf
Use the latest Apache 1.3.x and the latest PHP. Works just fine. Apache 2.0.x is a completely different beast. -Rasmus On Wed, 11 Sep 2002, Glenn wrote: > Can anyone tell me if the latest version of PHP works with the latest Apache > web server? When I try to build the server it says its not

Re: [PHP] ending a session

2002-09-05 Thread Rasmus Lerdorf
Because there is absolutely no way for PHP to know that the user has closed the browser window. Nothing is sent from the browser to the server on a window close. By using session cookies (cookies without a specified expiry time) the session is effectively ended since the cookie is gone once the

Re: [PHP] simple problem

2002-09-04 Thread Rasmus Lerdorf
Inside the loop do: if(!($i%3)) { whatever } -Rasmus On Wed, 4 Sep 2002, Cirkit Braker wrote: > what would be the best, most efficient way to print something every three > times a loop runs > > for ($i=0; $i<$num_products; $i++) > { > echo "something"; >} > >

Re: [PHP] Question about correct PHP/MySQL configuration

2002-09-03 Thread Rasmus Lerdorf
Step 1, please limit your lines in your emails to mailing lists to 78 chars or less in width. Your entire message shows up as 2 lines for me. Step 2, you need to install the php-mysql rpm. Then everything should work. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] and or statement

2002-08-28 Thread Rasmus Lerdorf
That makes absolutely no sense. How is "and or" different from simply "or"? Draw me the sets and show me the overlap satisfied by this alien "and or" operator of yours. -Rasmus On Wed, 28 Aug 2002, Victor wrote: > What is the "and" "or" statement in php? > > I need this to see if the first st

Re: [PHP] PDF POST, but refresh is GET

2002-08-28 Thread Rasmus Lerdorf
Sounds like an IE bug to me. If it knows there is POST data and it sends a GET, it is just plain wrong. How about just using GET-method vars in the URL to bounce this stuff along, or even a cookie-based session. -Rasmus On Wed, 28 Aug 2002, Matt Schroebel wrote: > I have a page the will print

Re: [PHP] Using "localhost" is taking me to localhost.com!!! why?

2002-08-28 Thread Rasmus Lerdorf
This has nothing to do with PHP. You are missing a local DNS entry pointing localhost to 127.0.0.1 -Rasmus On Wed, 28 Aug 2002, Ryan A wrote: > Hi again guys, > Just tried to use http://localhost/ again but as I do so it takes me >http://www.localhost.com tried it in both IE and NN with the s

Re: [PHP] Fun with Binary Numbers

2002-08-28 Thread Rasmus Lerdorf
Well, to begin with applying the mask to 1101 0100 0110 0110 is going to give you 110 not 110. But you can shift the result to the right 4 if that is the result you want. There is no algorithm to speak of here, just apply the mask. Like this: $num = "1101010001100110"; $

Re: [PHP] GD 1.8.4

2002-08-27 Thread Rasmus Lerdorf
GD1 uses Freetype 1 and you appear to have Freetype2. Grab GD2 instead. On Tue, 27 Aug 2002, Zach Curtis wrote: > I have spent most of the day trying to get gd 1.8.4, freetype2, libpng, > zlib, and jpeg-6b to work with PHP 4.0.6 running on Solaris 7. I am not to > yet to point of configuring th

Re: [PHP] php_flag not valid?

2002-08-27 Thread Rasmus Lerdorf
Known Apache 2.0 related bug. Not sure anybody is looking at it. On 27 Aug 2002, Steve Fox wrote: > I'm using Apache 2.0.40 with PHP 4.2.2 from Red Hat Linux 8.0 beta 3 > (null). php_value statements in my httpd.conf work fine, but php_value > is not recognized, giving the error message below:

Re: [PHP] php created pages's create time

2002-08-26 Thread Rasmus Lerdorf
So use the Header() function to send an appropriate Last-Modified timestamp. PHP can't possibly do that automatically as it does not know the last modication time of the actual dynamic data that you send. -Rasmus On Tue, 27 Aug 2002, lin wrote: > Dear Sir, > > we use php4.1.1+apache put html p

RE: [PHP] GD lib. image quality!

2002-08-25 Thread Rasmus Lerdorf
imagecopyresize() just skips pixels in order to reduce it in size. imagecopyresampled() will take the average of adjacent pixels and therefore produce a much better scaled down image. -Rasmus On Sun, 25 Aug 2002, Jason Reid wrote: > If you have GD2 I'd advise using imagecopyresampled, as I foun

Re: [PHP] Help with matchng strings

2002-08-25 Thread Rasmus Lerdorf
array_intersect() will give you listC directly. Just feed it list A and B. Then you can take a copy of listA and do a foreach on the array_keys() of listC and unset() them. Now this copy with the removed elements becomes your listD -Rasmus On Sun, 25 Aug 2002 [EMAIL PROTECTED] wrote: > > I h

Re: [PHP] register_globals off or on, why on

2002-08-25 Thread Rasmus Lerdorf
> I'm working on a site where I'm using geeklog > http://geeklog.sourceforge.net/ > > It has the requirement that > > > "Geeklog needs the register_globals variable turned on in order to work. > > Since PHP 4.2.0, the default for register_globals is "off". To fix it, > > simply add the following l

Re: [PHP] mysql upate return false?

2002-08-22 Thread Rasmus Lerdorf
> > > Is there a better way to do it? > > Randy > > > - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "Randy Johnson" <[EMAIL PROTECTED]> > Cc: "Rodrigo Peres" <[EMAIL PROTECTED]>

Re: [PHP] PDFlib error help --

2002-08-22 Thread Rasmus Lerdorf
There is no bandaid for this. Your code is simply wrong. You are calling a stroke function without having a path to stroke. You need to fix the code. -Rasmus On Thu, 22 Aug 2002, Hank Marquardt wrote: > I've got an old, inherited codebase (>18months) that generates PDFs -- just > upgraded th

Re: [PHP] mysql upate return false?

2002-08-22 Thread Rasmus Lerdorf
mysql_affected_rows() On Thu, 22 Aug 2002, Randy Johnson wrote: > I have a function > > > update_trans(); > > > in a mysql_query() that processes an update, what could i check for to see > if it was successful or not. The update only updates 1 row. > > Thanks > > Randy > > > > -- > PHP General

Re: [PHP] Pausing PHP?

2002-08-22 Thread Rasmus Lerdorf
sleep() On Thu, 22 Aug 2002, Erich Kolb wrote: > Is there a way to "pause" a script? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/

Re: [PHP] Determining if a variable is blank.

2002-08-21 Thread Rasmus Lerdorf
Use trim() instead of that str_replace and then an if(empty()) On Wed, 21 Aug 2002, Jason wrote: > I have a simplistic forum, and I am trying to write some code to determine > if the message box actually contains information, because if it is blank I > obviously don't want to post it to the data

Re: [PHP] Multiple File Uploads With a Single Input

2002-08-21 Thread Rasmus Lerdorf
That's not how rfc1867 file uploads work. You need multiple browse buttons unless you do some weird client side magic that would zip a bunch of files together and upload them as one. -Rasmus On Wed, 21 Aug 2002, Roger Lewis wrote: > Is anyone aware of any recent developments that would allow y

Re: [PHP] Background process (sending mails)

2002-08-21 Thread Rasmus Lerdorf
should be straightforward. -Rasmus On Wed, 21 Aug 2002, Pupeno wrote: > Rasmus Lerdorf wrote: > > > Simply configure your MTA to queue requests coming from PHP. Your php.ini > > file has the sendmail invocation line that is used by PHP's mail() > > function. Most M

Re: [PHP] Background process (sending mails)

2002-08-21 Thread Rasmus Lerdorf
Simply configure your MTA to queue requests coming from PHP. Your php.ini file has the sendmail invocation line that is used by PHP's mail() function. Most MTA's out there have a sendmail-like interface and most have a way to tell it to simply queue the request and return immediately. For sendm

RE: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-21 Thread Rasmus Lerdorf
the -1 to -2 and so on, but nothing on that either. :( > > -Mike > > > > > -Original Message- > > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, August 20, 2002 12:45 PM > > To: Mike At Spy > > Cc: [EMAIL PROTECTED] > >

Re: [PHP] Garbage Collection?

2002-08-21 Thread Rasmus Lerdorf
> Hi everybody, > > Is there any requirement to free variables in php, or is there any > garbage collection or built-in module that terminates unused variables? > (Especially for arrays and class instances)... Garbage collection is automatic in PHP. When you do: $a = 123; $a = 456; Then the me

Re: [PHP] still problems with register globals set to on

2002-08-21 Thread Rasmus Lerdorf
hp scripts inside a directory with > > A> register globals on. > > > > A> This is what I did put inside the httpd.conf file right after the > > />> close tag. > > > > A> > > A> php_value register_globals on > > A> > >

Re: [PHP] sort()-help needed

2002-08-20 Thread Rasmus Lerdorf
Put them into an array and sort() the array. The loop through the sorted array and output at that point. -Rasmus On Wed, 21 Aug 2002, Øystein Håland wrote: > When calling the function createLinks() I get an unsorted result, and that's > NOT what I want. But I'm not able (lack of knowlegde) to

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Rasmus Lerdorf
> Trim clears whitespace not characters (I'm pretty sure), try using this to > rid yourself of the period: You can optionally specify that trim should trim any other chars. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Agh! trim (#$@#@^%!!!)

2002-08-20 Thread Rasmus Lerdorf
Well, perhaps you have something after the . in that string? You can strip off the last char of a string very simply with: substr($str,0,-1) -Rasmus On Tue, 20 Aug 2002, Mike At Spy wrote: > > Hey! > > :) > > I have an issue with trim / triml. Whenever I put a string in to trimmed, > it r

Re: [PHP] POST & SID

2002-08-20 Thread Rasmus Lerdorf
Put a hidden field in your form with the session id. On Tue, 20 Aug 2002, simanhew wrote: > hi all, > > I have a question regarding POST and SID: > I am trying to make a no-cookies browser work with session_id, according to > some tutorial, using in URL is one choice. I tried that and it > wor

Re: [PHP] tracking visitors till registration?

2002-08-19 Thread Rasmus Lerdorf
See your php.ini file. Specifically the display_errors directive. See also log_errors and error_log. -Rasmus On Mon, 19 Aug 2002, Randy Johnson wrote: > How do I surpress php warnings from being displayed to the screen > > > Randy > > > > -- > PHP General Mailing List (http://www.php.net/) >

Re: [PHP] installing php with register globals off and on?

2002-08-19 Thread Rasmus Lerdorf
ter_globals off. I did so and now I am having a > marvelous time recoding some session stuff :( > I could not find much info on why "register_globals on" is a bad thing. > Seems to me that code is much cleaner with them on. What's the down side? > > Cheers, > David &

Re: [PHP] installing php with register globals off and on?

2002-08-19 Thread Rasmus Lerdorf
Sure, turn register_globals on only for the oasis directory. In your httpd.conf add: php_value register_globals on -Rasmus On Mon, 19 Aug 2002, Andy wrote: > Hi there, > > I am running php 4.2.2 with register globals set to off. Now I am planing to > install oasis (a add tracking sw). T

Re: [PHP] User data validation

2002-08-19 Thread Rasmus Lerdorf
You do not need to revalidate. The data is not coming from the user. On Mon, 19 Aug 2002, Randy Johnson wrote: > I have a proccess where a user submits the data, data is run through checks, > validation etc , then stored in a session. then the user goes to > confirmation page where they hit s

Re: [PHP] include() from another sub-domain

2002-08-19 Thread Rasmus Lerdorf
Apache On 19 Aug 2002, Greg Macek wrote: > Well, that would make sense. Now is this something I need to configure > in the Apache or the PHP config file? > > On Mon, 2002-08-19 at 14:27, Rasmus Lerdorf wrote: > > If these domains are on the same physical server, include the

Re: [PHP] include() from another sub-domain

2002-08-19 Thread Rasmus Lerdorf
If these domains are on the same physical server, include them directly via the full filesystem path. If they are actually on different physical machines, you will need to configure those other machines to let you get the non-parsed PHP code through them. Your problam right now is that the site2

Re: [PHP] ************ SSL Support *****************

2002-08-19 Thread Rasmus Lerdorf
php.net/curl On Mon, 19 Aug 2002, Ron Stagg wrote: > >From within a PHP script, I need to initiate a secure HTTPS form POST > from my Apache server to a separate third party server. I have yet to > figure out how to accomplish this. Can PHP even handle something like > this? > > I welcome any

Re: [PHP] User data validation

2002-08-19 Thread Rasmus Lerdorf
No checks are needed. PHP automatically escapes single quotes for MySQL queries assuming you have magic_quotes_gpc on, which means that if you want to send the same thing by email using PHP's mail() function you just have to call stripslashes() on the data. There are no magical characters that w

Re: [PHP] Multidimensional arrays

2002-08-19 Thread Rasmus Lerdorf
foreach($array as $i=>$values) { echo $values['id'],$values['name'] } On Mon, 19 Aug 2002, Richard Fox wrote: > Hi, > > Given the array $array initialized by: > > $query = "SELECT id,name FROM MYTABLE"; > $result = mysql_query($query); > $nrows = mysql_num_rows($result); >

Re: [PHP] compile error

2002-08-19 Thread Rasmus Lerdorf
You need current PHP CVS to work with Apache 2.0.40. See snaps.php.net On Mon, 19 Aug 2002, Adam Williams wrote: > I'm trying to compile PHP 4.2.2. I am running Apache 2.0.40 (yes I know > support is experimental). I am compiling on Redhat 7.3 Linux 2.4.18. I > did my PHP configure line: > >

Re: [PHP] Apache 2.0 and PHP

2002-08-19 Thread Rasmus Lerdorf
If you run Apache2 in prefork mode, it should mostly work with PHP. Don't try to use one of the threaded mpms yet. The Apache 2 prefork mpm makes it operate exactly like Apache 1.3 in the way it pre-forks processes and handles one request per process. -Rasmus On Mon, 19 Aug 2002, John Wards wr

Re: [PHP] PHP License Agreement

2002-08-19 Thread Rasmus Lerdorf
Did your legal department read the PHP license at all? There is nothing in the PHP license that states this. The clauses of the PHP license are, with my embedded comments in []'s: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the fo

Re: [PHP] sorting multiple-dimensional arrays

2002-08-18 Thread Rasmus Lerdorf
usort(), uasort() or uksort(). uasort() has a nice little example in the user comment. On Sun, 18 Aug 2002, Evan Nemerson wrote: > I have an array that looks like > > $array = Array( > Array($var1, $var2, $var3), > Array($var1, $var2, $var3), > Array($var1, $var2, $var3) > );

Re: [PHP] foreach with methods returning arrays ??? any ideas ?

2002-08-17 Thread Rasmus Lerdorf
The code is very different. In your x() function you create a new array every time you call x(). In the class example, you create the array once when you instantiate the class and then return that same array each time you call the gety() method. When PHP iterates over arrays, it maintains an ar

Re: [PHP] Continue processing after redirect?

2002-08-16 Thread Rasmus Lerdorf
the script keep running after the redirection request has > been made? > > Doesn't that behaviour depend from browser to browser ? > > > Thanks, > > > Elias > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">

Re: [PHP] Continue processing after redirect?

2002-08-16 Thread Rasmus Lerdorf
Sure, in fact, that happens by default unless you explicitly exit or try to output something. On Sat, 17 Aug 2002, Jason Morehouse wrote: > Any ideas if it's possible to keep a script running for a short time after a > client has been redireced? > > i.e: > header("Location: http://php.net";); >

Re: [PHP] Upgraded to PHP 4.2.2 and completely lost all GET and POSTvariables

2002-08-16 Thread Rasmus Lerdorf
Did you bother reading the documentation and release notes before upgrading? Edit your php.ini file and turn register_globals on. -Rasmus On Fri, 16 Aug 2002, james daily wrote: > > RE: phpsecurityadmin-2002-07-24.zip and PHP 4.2.2 > > PLATFORM: win 98 > > BACKGROUND: in order to use the above

Re: [PHP] Apache2

2002-08-16 Thread Rasmus Lerdorf
It will be a while before Apache 2 is properly supported. Switch back to Apache 1.3.x for now. We are working on it and PHP 4.3 should be significantly better with Apache 2. -Rasmus On Fri, 16 Aug 2002, Björn Hilliges wrote: > Upgraded to Apache2, and now most of my php scripts won't work. No

Re: [PHP] OO code and private functions

2002-08-16 Thread Rasmus Lerdorf
Nope On Fri, 16 Aug 2002, Richard Black wrote: > Can I make a function private in PHP, so that it can only be called from > within an object of that class??? > > Just discovering the wonders of OO PHP... :-) > > == > Richard Black > Systems Programmer, Dat

Re: [PHP] Help Please

2002-08-15 Thread Rasmus Lerdorf
This means that you do not have the PHP module loaded properly. Do you have a LoadModule line for PHP in your httpd.conf file? -Rasmus On 15 Aug 2002, paul wrote: > > > Hello Again Everyone, > > Thank you to those of you who sent me suggestions. Unfortunately none so > far have solved the prob

Re: [PHP] assoc array question

2002-08-15 Thread Rasmus Lerdorf
last($info); $last_key=key($info); reset($info); $first_key=key($info); foreach($info as $key=>$val) { switch($key) { case $first_key: ... stuff for first element ... break; case $last_key: ... stuff for last

Re: [PHP] what am I missing here?

2002-08-15 Thread Rasmus Lerdorf
You are missing operator precedence. ! is higher precedence than == so your statement effectively becomes: if ( (!$key) == $info_keys[0]) which makes no sense. Normally you would write that code as: if ( $key != $info_keys[0] ) -Rasmus On Thu, 15 Aug 2002, Alexander Ross wrote: > what

Re: [PHP] MySQL vs Session?

2002-08-14 Thread Rasmus Lerdorf
Sure it can. If the machine name is different make sure you set your session.cookie_domain to something like .domain.com but other than that there shouldn't be anything to it. As long as you propogate the session id somehow to the script, when session_start() is called in that script it will pic

Re: [PHP] how do i continue with ereg replace?

2002-08-14 Thread Rasmus Lerdorf
So pass $good into the second call instead of $str On Wed, 14 Aug 2002 [EMAIL PROTECTED] wrote: > I want to have the ereg_replace action happen many times before the > result is echoed, how do I do this? The following is the code that I > have that obviously is flawed because the later variable

Re: [PHP] File Upload size limit

2002-08-13 Thread Rasmus Lerdorf
> Thanks for quick response. Just a couple of silly questions: > > - changed where? in php or apache? My host is running the "three week old" > v 4.2.2 of php so I guess you mean apache? No, I mean PHP. The 4.2.2 release was a security fix for 4.2.1 only. None of the changes for the past couple

Re: [PHP] Storing objects in a session

2002-08-13 Thread Rasmus Lerdorf
You have to load the class definition for your Auth class before calling session_start() -Rasmus On Tue, 13 Aug 2002, Ron Dyck wrote: > Having trouble storing objects in a session. When I do this: > > if (!isset($_SESSION['auth'])) { > $auth = new Auth(); > $_SESSION['auth'] =& $auth; >

Re: [PHP] File Upload size limit

2002-08-13 Thread Rasmus Lerdorf
post_max_size and upload_max_filesize could not be set in your .htaccess file until recently. It was changed about 3 weeks ago, so unless your provider is running a recent snapshot, you won't be able to get this to work. Ask your provider to add those lines to your virtualhost block in the httpd

Re: [PHP] Web host withdraws support for PHP extensions - supposedsecuity risks

2002-08-13 Thread Rasmus Lerdorf
It's not, your provider is simply lazy. -Rasmus On Tue, 13 Aug 2002, Alan Hale wrote: > My Web hosting company has just withdrawn (with no notice) support for PHP > extensions on the grounds they represent security risks and they don't wish > to spend time and effort in evaluating and compensat

RE: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
Then you are going to have to lock a text file, but chances are you will end up deadlocking things. I'd rethink the whole thing if I were you. -Rasmus On Tue, 13 Aug 2002, vic wrote: > I have no database, this has to be done in PHP > > - Vic > > > -Original Mess

RE: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
> Really? That sounds more complicated than I think I need it to be, can't > I use something like: > > '' > > and somehow (this is what I need to know) get $value to increase in > value as the user clicks on the link again and again... Nope, you would be fighting race conditions forever with an a

<    1   2   3   4   5   6   7   8   9   10   >