Re: [PHP] Fixing timezone issues

2002-08-13 Thread Rasmus Lerdorf
Well, now you are getting into system configuration issues. You need to figure out why your TZ is getting ignored and where GMT is coming from in your environment. I don't think this has anything to do with PHP. -Rasmus On Tue, 13 Aug 2002, H. Wade Minter wrote: > On Tue, 13 Aug 2002

Re: [PHP] newbie array question

2002-08-13 Thread Rasmus Lerdorf
Two ways I can think of off the top of my head: $s = "('item','item2','item3')"; preg_match_all("/'(.*?)'/",$s,$regs); $result = $regs[1]; or $s = "('item','item2','item3')"; eval('$result = array'.$s.';'); Neither is very efficient though. eval() is particularly ugly. -R

Re: [PHP] count link clicks

2002-08-13 Thread Rasmus Lerdorf
Write a link wrapper that you would use like this: Then in wrap.php: -Rasmus On Tue, 13 Aug 2002 [EMAIL PROTECTED] wrote: > How do I count how many times a user clicks on a certain link? (and put > it into and array or variable I guess). > > I want to be able to repeat a certain action

Re: [PHP] cutting up a string

2002-08-13 Thread Rasmus Lerdorf
php.net/substr On Tue, 13 Aug 2002, Hans wrote: > hello :-) > > I have a string of 50 characters in length, including numbers and letters. I > want to cut of the first 20 characters. Can anyone help me as to how I can > achieve this? > > Thank you, > regards Hans > > > > -- > PHP General Mailing

Re: [PHP] Fixing timezone issues

2002-08-13 Thread Rasmus Lerdorf
Fix your Apache startup environment so TZ is set correctly. On Tue, 13 Aug 2002, H. Wade Minter wrote: > At some point recently, PHP/Apache running on FreeBSD decided that i'm on > GMT, instead of EST5EDT. The system date is correct: > > bash-2.05a# date > Tue Aug 13 14:39:37 EDT 2002 > > But p

Re: [PHP] Bussiness Logic Date Problem

2002-08-13 Thread Rasmus Lerdorf
Yes, the Date/Calc.php class in PEAR can do this. -Rasmus On Tue, 13 Aug 2002, Collins, Robert wrote: > I have some bussiness logic that states a specific piece of info be > displayed on a specific day and then replaced by another piece of info when > the date roll arround. The problem is that

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Rasmus Lerdorf
> while ( list($Key, $Val) = each($_SESSION) ) { > $$Key = $Val; > } extract($_SESSION) is a better way to do that. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sessions in a database?

2002-08-13 Thread Rasmus Lerdorf
The main reason to store it in a database is to allow you to share that session data across multiple web servers. In a load-balanced architecture, this is essential. -Rasmus On Tue, 13 Aug 2002, Randy Johnson wrote: > When i started to learn php there was talk of storing session information in

Re: [PHP] session.use_trans_sid question

2002-08-13 Thread Rasmus Lerdorf
You cannot do it inside the script as the trans-sid stuff happens before your script is executed. The setting is changed, so ini_set() is doing its job, it's just that it sets it too late. In your .htacess file, just do it per-location: php_value session.use_trans_sid 0 -Rasmus On Tue, 13 A

Re: [PHP] PHP 4.2.2 and Apache 2

2002-08-13 Thread Rasmus Lerdorf
Which OS, which extensions and how much load have you put it under? There are known thread safety issues in various libraries that you can link PHP against. And some of them are subtle. Did you know, for example, that libpq (the PostgreSQL client library) is threadsafe except for the case where

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION - cont.

2002-08-13 Thread Rasmus Lerdorf
No real reason to start the session in index.php. You are not registering any session vars, nor are you accessing any. > index.php >session_start(); > ?> > > > > > Admin Login > > > > Username: > > > > > > Passwor

Re: [PHP] Mail(): Does it block question?

2002-08-12 Thread Rasmus Lerdorf
Just about any mailing list system that supports subscriber passwords should do. I can't imagine a way they would store these passwords that PHP wouldn't be able to grok with a little 10-minute hack job. -Rasmus On Tue, 13 Aug 2002, Jean-Christian Imbeault wrote: > Rasmus

Re: [PHP] Mail(): Does it block question?

2002-08-12 Thread Rasmus Lerdorf
On UNIX PHP hands the message off to sendmail to be delivered. You want this stuff to happen out of band, it makes no sense to sit there and watch a browser spin while something is off communicating with an smtp server. So, depending on your sendmail configuration, and how you are invoking sendm

Re: [PHP] Re: show_source question

2002-08-12 Thread Rasmus Lerdorf
file() returns an array, show_source() takes a string. On Mon, 12 Aug 2002, eriol wrote: > Thanks for the reply.. > > I did try what you suggested, but am getting the following warning: > > Warning: Failed opening 'ArrayArrayArray' for highlighting in > /hsphere/local/home/eriol/oo0oo.com/o0o.o0

Re: [PHP] Credit Card suggestions

2002-08-12 Thread Rasmus Lerdorf
If they are able to lift your database they are more than likely able to lift your scrambling code as well. And assuming you want the ability to descramble the card number, there is simply no way to do this securely. Sorry. -Rasmus On Mon, 12 Aug 2002, Mike Mannakee wrote: > Does anyone have a

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf
t, just out of curiosity, why does it work fine on my newer system? > > Thanks > > On Mon, 2002-08-12 at 21:17, Rasmus Lerdorf wrote: > > If register_globals is known to be on, why are you worrying about > > the $HTTP_* arrays? > > > > On 12 Aug 2002, Petre A

Re: [PHP] $HTTP_SESSION_VARS vs $_SESSION

2002-08-12 Thread Rasmus Lerdorf
If register_globals is known to be on, why are you worrying about the $HTTP_* arrays? On 12 Aug 2002, Petre Agenbag wrote: > Hi > Me again > > Still having problems with forms not sending variables, and session > variables dissapearing. > > I have 2 systems, one older 4.0.3 PHP which is my main

Re: [PHP] SQL ?

2002-08-12 Thread Rasmus Lerdorf
If I have to do that for every reply then I will only reply to half as many messages each day. On Tue, 13 Aug 2002, Jason Wong wrote: > On Tuesday 13 August 2002 00:03, Rasmus Lerdorf wrote: > > I know many people hate top-posts, but when you get 1400+ emails every day > > and

Re: [PHP] SQL ?

2002-08-12 Thread Rasmus Lerdorf
I know many people hate top-posts, but when you get 1400+ emails every day and answer 50+, it sure does speed things up. Having the relevant text right up front means I don't have to scroll down to find it. If I don't understand the reply and need more context, that's when I scroll down to see w

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-12 Thread Rasmus Lerdorf
environment. > Most things I've tried with directives in an htaccess don't work and the > error log says "not allowed" etc. > > I appreciate your help. > > Rasmus Lerdorf wrote: > > What does include have to do with DirectoryIndex? And what exac

Re: [PHP] Please someone help me!

2002-08-11 Thread Rasmus Lerdorf
You really should also do a bit of work to make it easy for people to help you. I just spent 5 minutes decyphering your text file so I could reproduce your problem using this script: "Videografik", "aus_id"=>"1"), array("aus_name"=>"Webdesign","aus_id"=>"2"),

Re: [PHP] Please someone help me!

2002-08-11 Thread Rasmus Lerdorf
First of all, which OS and PHP version? On Mon, 12 Aug 2002, Gandalf wrote: > > > Hello! > > First of all, i am trying to solve this problem for more then a week now, i > looked through php.net for hours and have posted on numerous boards but > nobody could come up and tell me what is going wron

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf
What does include have to do with DirectoryIndex? And what exactly is your problem with include? The only trick is setting the include_path which doesn't seem all that obtuse to me. -Rasmus On Sun, 11 Aug 2002, Al wrote: > The problem may be due to the fact that my environment is Apache Unix.

Re: [PHP] Case Sensitivity

2002-08-11 Thread Rasmus Lerdorf
Filesystems are meant to be case-sensitive, and yes, URL's are as well. It's an abomination that Windows and old-style Mac filesystems are not. You need to keep track of that in your code. 'a' and 'A' are just as different as 'a' and 'b'. -Rasmus On Sun, 11 Aug 2002, Rich Hutchins wrote: > I'v

Re: [PHP] Newbie question about UNIX command-line directives

2002-08-11 Thread Rasmus Lerdorf
Does your AllowOverride include "Indexes"? If it doesn't, you can't put DirectoryIndex in a .htaccess. httpd -L is your friend. -Rasmus On Sun, 11 Aug 2002, Al wrote: > Appreciate the feedback, but. > > The .htaccess approach appears to fit my situation best; but, I've not > been able to

Re: [PHP] why true?

2002-08-11 Thread Rasmus Lerdorf
Because you are comparing a string to a number. PHP has to choose to either compare the two as strings or as numbers. The numerical value of the string 'test' is 0 which means it works out to 0 == 0 which is true. If you want to force a string comparison, you can use strcmp() or, if you want to

Re: [PHP] Can't find my font file - Please help

2002-08-10 Thread Rasmus Lerdorf
Try leaving off the .ttf On Fri, 9 Aug 2002, JR wrote: > I am trying to use the "imagettfbbox" function. Am testing the script on my > local network > running W2K. Have defined : > $fontfile = "arial.tff"; // this file is in the same directory > with my script > The instruction t

Re: [PHP] Tried that..

2002-08-10 Thread Rasmus Lerdorf
This isn't really a PHP question, is it? This is a function of your database, and since you don't mention which database you are using it is a bit hard to answer. Assuming MySQL, there is an entire chapter in the MySQL docs on exactly how to do this: http://www.mysql.com/doc/en/Date_and_time_fu

Re: [PHP] JSP vs. PHP?

2002-08-09 Thread Rasmus Lerdorf
You are mixing up some things here. JSP is server-side Java, applets are client-side. The two have very little to do with each other. You can use PHP and still send a Java applet to the browser, for example. But if you are asking if doing client-side graphics with a java applet is faster or sl

Re: [PHP] I'm going to shoot my machine

2002-08-09 Thread Rasmus Lerdorf
Probably a quote problem, or you are adding a ; at the end. The mysql_error() output after the failed query would tell you exactly. Much easier than asking here. -Rasmus On Fri, 9 Aug 2002, Liam Gibbs wrote: > Is there any reason why a MySQL query won't run > properly in a mysql_query command

Re: [PHP] Is there a standard function to remove multiple spacesfrom a string?

2002-08-09 Thread Rasmus Lerdorf
function foo($str,$num) { return preg_replace('/ {'.$num.',}/',str_repeat(' ',$num),$str); } On Fri, 9 Aug 2002, Henry wrote: > Hi All, > > Are there standard functions for removing multiple spaces (or even better > limiting contiguous space to specified lengths)? > > i.e > > foo("Hello

RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf
I have seen posted to this list in a very long time." > > > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: August 3, 2002 1:04 PM > To: Acer > Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED] > Subject: RE: [PHP] Re: Protect PHP cod

RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf
e the ones building > php so something is not right. > > > > -Original Message- > From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] > Sent: August 3, 2002 1:04 PM > To: Acer > Cc: Dennis Moore; Andrey Hristov; [EMAIL PROTECTED] > Subject: RE: [PHP] Re: Protect

RE: [PHP] Re: Protect PHP coding

2002-08-03 Thread Rasmus Lerdorf
> You'll never hear anything from the core php group since they are a tight > click so it's business as usual. That's probably the most uninformed statement I have seen posted to this list in a very long time. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: ht

Re: [PHP] ldap_modify parameters?

2002-08-01 Thread Rasmus Lerdorf
I think your problem is that you are passing the output of ldap_get_entries() directly back into ldap_modify(). ldap_get_entries() returns an array of result elements whereas ldap_modify() is expecting a single element. So, to change the 'st' attribute for the uid=testing record, you should simp

Re: [PHP] Explain?

2002-07-31 Thread Rasmus Lerdorf
> Hey php-general, > > maybe somebody can explain me what happens in this line? because how > mutch i read it..thought i don't get it :) > > list ($date, $laik) = split (' ', $row['time'], 2); Well, it is rather inefficient code. Applying a regex just to break a string up on a single chara

Re: [PHP] PDF_function HELP again!!! :(

2002-07-30 Thread Rasmus Lerdorf
function > next_page(open); > next_page(close); > > > I can remove those next_page function calls and just put in the > PDF_begin_page and end page calls and it works right away, but it wont work > inside the function :(. > > Jeff > > > > Rasmus Lerdorf <[EMAI

Re: [PHP] PHP mail() problems

2002-07-30 Thread Rasmus Lerdorf
Try rm config.cache, re-configure and try again On Tue, 30 Jul 2002, John Williams wrote: > I'm having a problem getting the mail() function working on php 4.2.2. > > I get the error message: > Warning: mail() is not supported in this PHP build > > I'm running Solaris 8 and have set the symlink

Re: [PHP] Re: Mail Form

2002-07-30 Thread Rasmus Lerdorf
Which php version? This code works just fine here. On Tue, 30 Jul 2002, Kerry Gray wrote: > Also , Fatal error: Call to undefined function: is_uploaded_file() in > /host/g/i/a/8/b/i/giapai3k.8bit.co.uk/mail.php on line 20 > > "Kerry Gray" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]

Re: [PHP] Serialised Data & DBs

2002-07-30 Thread Rasmus Lerdorf
Yes, you would need to. serialize() does not encode any of the variable data. -Rasmus On Tue, 30 Jul 2002, Danny Shepherd wrote: > Hi, > > Is it necessary to perform addslashes() on serialised data before inserting > it into a database? > > Thanks, > > Danny. > > > -- > PHP General Mailing Lis

Re: [PHP] PDF_function HELP again!!! :(

2002-07-30 Thread Rasmus Lerdorf
Sounds like you didn't call pdf_end_page() before calling your next_page() function. -Rasmus On Tue, 30 Jul 2002, Jeffrey wrote: > Here we go again; I posted the message "pdflib, NEED HELP with > function problem (newby)" and thank you to all that helped. Even > after that help, seems I cant un

Re: [PHP] enabling mysql support

2002-07-30 Thread Rasmus Lerdorf
Simply install the php-mysql rpm. On Mon, 29 Jul 2002, Joel Lopez wrote: > Hi, > > I would like to recompile php with mysql support. I am a newbie. I really > don't want to have to reinstall RedHat just to be able to use MySQL with > php. > > I ran: > rpm -qa | frgrep php > and I see these

Re: [PHP] apache and php

2002-07-30 Thread Rasmus Lerdorf
The latest stable versions of both. Apache 1.3.26 and PHP 4.2.2. On Wed, 31 Jul 2002 [EMAIL PROTECTED] wrote: > So, which version of apache and php are the best for working together under any > OS system ? > > Scott Fletcher wrote: > > > I wouldn't jump on Apache 2.0.39 for the production websi

Re: [PHP] Hide the undefined offset error for the array?

2002-07-30 Thread Rasmus Lerdorf
Your default error reporting level must be set different on your Windows box. If you turn off E_NOTICE warnings on your Windows box it will act the same as your Linux box. But, in general, to write E_ALL clean code you would check if each exists first, or swallow the errors if you know that thes

Re: [PHP] Problem of characters with xml_parse

2002-07-30 Thread Rasmus Lerdorf
Can't you just use CDATA blocks? Personally I'd either use an entity reference or base64 the stuff. -Rasmus On Tue, 30 Jul 2002, Sebastien Mole wrote: > Hello, > > I have a question concerning characters : I use the function xml_parse on a >standalone XML file with the encoding "ISO-8859-1" >

Re: [PHP] Sessions - Informed Opinions

2002-07-30 Thread Rasmus Lerdorf
> > > 3 How can I get a count of currently active (I.e non expired) > sessions? > > > > Count the number of session files. > Can I be sure that the count will only include active sessions though? By definition, if the session file is there, it is an active session. There is no such thing as c

Re: [PHP] Sessions - Informed Opinions

2002-07-30 Thread Rasmus Lerdorf
> So, I've been using my own implementation of session handling which is > mainly storing the userinfo in a cookie (an array, serialised and signed) > but I'm starting to come around to the idea of storing this info on the > server and just passing a session key about - but I have a couple of > re

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
taking your code below, I can simply remove the > > ini_set('session.use_trans_sid',false); and from your code to make it work >exactly as is? > > Thanks > > > > Rasmus Lerdorf wrote: > > >The trick is to not name your form vars the same as your sessi

Re: [PHP] PHP Installation Problem

2002-07-30 Thread Rasmus Lerdorf
Well, how did you do the install? You really need to provide more details. Heck, any details. You don't mention your OS, whether you compiled from source, if so which configure flags, from packages, which packages, etc.. We are not mind readers. -Rasmus On Tue, 30 Jul 2002, Mark Colvin wrote

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
; using a logout button), but that's not going to ensure that people use it... > I would ideally like to have this "app" run on an intranet, where people > will most probably have this app open indefinately, and thus I also > battle with my logic of keeping a session alive. &g

Re: [PHP] Good books on sessions

2002-07-30 Thread Rasmus Lerdorf
he session var. In the end > I was forced to again add all my variables to the end of the url, > keeping the session solely for the username and password. > > I don't know if you would like me to post my code ( it is quite a bit > already ) but I would really appreciate

Re: [PHP] Dates and Date()

2002-07-29 Thread Rasmus Lerdorf
$ts = strtotime("-10 days"); On Mon, 29 Jul 2002, Christopher J. Crane wrote: > I believethisto be one way to find out yesterday's date: > $tomorrow = mktime (0,0,0,date("m") ,date("d")-1,date("Y")); > > However, I would like to have a snippet of code to tell me how to get the > date of today

Re: [PHP] Good books on sessions

2002-07-29 Thread Rasmus Lerdorf
What issues? Just ask. -Rasmus On Mon, 29 Jul 2002, Petre wrote: > What are good books/websites about sessions. > I'm looking for more advanced stuff, I have the Luke Welling/Laura > Tompson book, and have read the manual, but I still have issues that are > unresolved. > > Thanks > > > > -- >

Re: [PHP] Ming Sprite confusion

2002-07-29 Thread Rasmus Lerdorf
You would probably stand more chance of an answer on the ming-fun mailing list. -Rasmus On Mon, 29 Jul 2002, Richard Lynch wrote: > Please cc me on answers, as I'm way behind in this list... > > I have a perfectly good Ming (Flash) movie coming out of PHP, but it's a bit > large... > > I'd like

Re: [PHP] Why won't this work?

2002-07-19 Thread Rasmus Lerdorf
You need == instead of = there On Fri, 19 Jul 2002, John Wulff wrote: > Any ideas on why this won't work? It will only include("inc/entrance.php") > It never, no matter what the value of $mode, displays collection.php. > >$mode = "entrance"; >if ($mode = "entrance") { > include(

Re: [PHP] Loading a File into Variable - How??

2002-07-18 Thread Rasmus Lerdorf
In 4.3 you would use file_get_contents() In prior versions I would suggest: $fp = fopen('filename','r'); $string = fread($fp, filesize('filename')); fclose($fp); The implode(file()) stuff is very memory-inefficient. -Rasmus On Thu, 18 Jul 2002, Analysis & Solutions wrote: > On Thu, Jul 18, 2

Re: [PHP] Apache 2.0 + PHP

2002-07-15 Thread Rasmus Lerdorf
> Is Apache 2.0.x and PHP 4.2.x/4.3.x on Linux a viable proposition yet in a > production environment? Nope -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mailing List

2002-07-11 Thread Rasmus Lerdorf
We use qmail/ezmlm to run this list. High-traffic lists like this require software written specifically to solve this problem. You would not write such a mailing list system in PHP. It would make no sense. The parts you might write in PHP would be web interfaces to allow your user to subscribe

Re: [PHP] weird....php 4.2.1 with apache2 ver 2.0.39

2002-07-11 Thread Rasmus Lerdorf
PHP 4.2.1 does not support Apache 2.0.39. You'll need to download a more recent snapshot, and you will actually also need Apache 2.0.40-dev to get it to work. As you can tell, this stuff is very much in flux and is nowhere near production-quality. -Rasmus On Fri, 12 Jul 2002, Peter wrote: > h

Re: [PHP] using pdf template

2002-07-11 Thread Rasmus Lerdorf
Only using the commercial PDI library from pdflib.com On Thu, 11 Jul 2002, Tobias Talltorp wrote: > Is it possible to produce a PDF, use it as a template and populate > predefined sections of it from a database? > The PDFs I want to create are a little too complex for me to produce from > scratc

Re: [PHP] (OT) No Punishment for Erik Hegreberg, Yet...

2002-07-11 Thread Rasmus Lerdorf
He's been blocked at the server level. He won't be able to post to any php mailing lists. On Thu, 11 Jul 2002, Scott Fletcher wrote: > Well, you better pray that he won't return!! > > > > "I'll Be Back!!" > > "Rasmus Lerdorf" &

Re: [PHP] (OT) No Punishment for Erik Hegreberg, Yet...

2002-07-11 Thread Rasmus Lerdorf
No such logs are kept on our end. On Thu, 11 Jul 2002, Jason Soza wrote: > Well, my attempts at getting discipline for Erik Hegreberg will have to > go unfinished for now. I guess a list admin would have to retrieve the > original headers from Erik's original posts -before- they hit the > mailin

Re: [PHP] compiling with mysql

2002-07-11 Thread Rasmus Lerdorf
The difference between adding a path and not is that without a path the bundled mysql client library will be used, whereas if you add a path then your system's mysql client libs will be used. It is usually a good idea to use the system libaries if you have them because they are more likely to mat

Re: [PHP] getdate

2002-07-10 Thread Rasmus Lerdorf
Works fine here. Are you actually in EDT? On Wed, 10 Jul 2002, Brian V Bonini wrote: > Any idea why this is off by 4 hours? > > Server time zone is set correctly, > %date > Wed Jul 10 14:26:18 EDT 2002 > but the script below returns the time as being 4 hours later then that. > > > $dat

Re: [PHP] Development Tools

2002-07-10 Thread Rasmus Lerdorf
> Right off the bat, any good development tool will have code completion > abilities, which are basically the programmers version of nix consoles tab > completion. This little feature alone helps save time by reducing the > amount of typing required, not to mention can virtually eliminate type-o'

Re: [PHP] reports and reporting options?

2002-07-10 Thread Rasmus Lerdorf
php.net/pdf On Wed, 10 Jul 2002, Jeff D. Hamann wrote: > I've got a project that requires lots of "goofy" reports. These reports are > more than a simple html table (which would be nice) that the client wants to > print out on standard 8.5x11 paper. Crystal Reports type of reports. I need > to b

Re: [PHP]Problem in using php-imap in rh7.3

2002-07-09 Thread Rasmus Lerdorf
Try localhost:143/notls there On Wed, 10 Jul 2002, [gb2312] ÚÈ Ñ« wrote: > > Hi all, > I got a problem when I use php's imap functions in rh7.3 system. > In the php script file imaptest.php I wrote such code: > > $user="usernamexxx"; > $password="passxxx"; > $mbox = imap_open ("{localhost:143}

Re: [PHP] Function source?

2002-07-09 Thread Rasmus Lerdorf
No, they are written in C. And yes, you can of course download the C source code from php.net. -Rasmus On Tue, 9 Jul 2002, Leif K-Brooks wrote: > If I understand correctly, all php functions are written in php. If > this is true, is it possible to view function source code? Thanks for > any i

Re: [PHP] isset

2002-07-09 Thread Rasmus Lerdorf
Yup On Wed, 10 Jul 2002, vins wrote: > that seem always to be the prob with any php coding now days > globals on or off > > "Rasmus Lerdorf" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > register_

Re: [PHP] isset

2002-07-09 Thread Rasmus Lerdorf
register_globals on or off? On Tue, 9 Jul 2002, Preston Wade wrote: > Hello All, > > I am trying to use the isset function to test if the page has been > submitted, but it seems as though it is not working. I am wondering is > there a configuration option that is messing with the functionality

Re: [PHP] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf
alues? > > Regards, > Philip Olson > > > > > On Mon, 8 Jul 2002, Rasmus Lerdorf wrote: > > > Well, you can set it at runtime, it just won't do what you might expect. > > That doesn't mean that it may not be useful to be able to set it at > > runtime.

Re: [PHP] ini_set() broken?

2002-07-08 Thread Rasmus Lerdorf
Well, you can set it at runtime, it just won't do what you might expect. That doesn't mean that it may not be useful to be able to set it at runtime. If, for example, you have register_globals off and you write an auto-prepend script, or even just a normal snippet of code that you insert into som

Re: [PHP] is their a jobs mailing list?

2002-07-07 Thread Rasmus Lerdorf
Job postings are fine on this list. Some people will invariably gripe, but overall people like to see that there are jobs out there involving PHP. And it they don't, well tough. None of the people who help run this list, including myself have any problems with them. -Rasmus On Sun, 7 Jul 2002

Re: [PHP] How to copy a transparent png over an existing image usingGD?

2002-07-06 Thread Rasmus Lerdorf
You need to use ImageCopyResampled() instead. And don't forget to turn on alpha blending beforehand using ImageAlphaBlending($im,true); -Rasmus On Sat, 6 Jul 2002, [ISO-8859-1] Victor Spång Arthursson wrote: > Hi! > > I'm trying to copy a transparent (copyright) image over an existing > using

Re: [PHP] ./configure with register_globals turned on?

2002-07-05 Thread Rasmus Lerdorf
And the php.ini file you are changing is the one listed in your phpinfo() output? Looks to me like your php.ini file is in the wrong place. On Fri, 5 Jul 2002, Scott Fletcher wrote: > I tried following all of your suggestion and so far, still the same. I > tried changing other feature in the p

Re: [PHP] ./configure with register_globals turned on?

2002-07-05 Thread Rasmus Lerdorf
So putting the line: register_globals = on In your php.ini file (path to it specified in your phpinfo() output) didn't work? Check the following: 1. Are you sure there isn't a second "register_globals = off" entry somewhere in that file? 2. Does the web server have read access to the direc

Re: [PHP] Globals bug??

2002-06-30 Thread Rasmus Lerdorf
I don't see how. But if what you are saying is actually happening, then it is a Linux kernel-level bug if memory is leaking from one process to another. No matter how badly we screwed up in PHP, the kernel prevents such a screwup from infecting a separate process. I'd suggest having a close loo

RE: [PHP] Getting IP from behind proxies

2002-06-30 Thread Rasmus Lerdorf
e cookie. > Unless a user clears the cookie himself, you basically limit votes to one > per computer or one per computer per user. > > Bruce Karstedt > President > Technology Consulting Associates, Ltd. > Tel: 847-735-9488 > Fax: 847-735-9474 > > > -Original Me

Re: [PHP] Getting IP from behind proxies

2002-06-29 Thread Rasmus Lerdorf
non-spoofable, easily verifiable id number, what you are trying to do is impossible. Basically live with the fact that your voting system will be inaccurate and spoofable. -Rasmus On Sun, 30 Jun 2002, JJ Harrison wrote: > what esle could i use? > "Rasmus Lerdorf" <[EMAIL P

Re: [PHP] Getting IP from behind proxies

2002-06-29 Thread Rasmus Lerdorf
You can only get it if the proxy provides you with this data. Most don't, so this is not a reliable approach. -Rasmus On Sat, 29 Jun 2002, JJ Harrison wrote: > I want to check to see if people have voted yet for a poll. > > How can I get the ip of a user from both behind a proxy and the proxie

Re: [PHP] saving temporary image to database

2002-06-29 Thread Rasmus Lerdorf
There is no imagejpeg() call in the code snippet you provided. And you don't say how it is failing. You haven't provided us with enough data to answer this question. -Rasmus On Sat, 29 Jun 2002, andy wrote: > Hi there, > > I would like to save a jpg into a blob field of mysql. The function >

Re: [PHP] PHP Session Idle Time

2002-06-27 Thread Rasmus Lerdorf
See your php.ini file: ; After this number of seconds, stored data will be seen as 'garbage' and ; cleaned up by the garbage collection process. session.gc_maxlifetime = 1440 On Thu, 27 Jun 2002, Jefferson Cowart wrote: > I'm writing a web application in which I would like the session to > expi

Re: [PHP] preg and Perl 6 (upcoming..not current preg handling)

2002-06-26 Thread Rasmus Lerdorf
We are using the PCRE library for this. I don't think there are any plans to drop the Perl5 syntax. On Wed, 26 Jun 2002, Peter Thoenen wrote: > Anybody know if PHP 4.x (5.x?) will be sticking with > Perl5 RegEx syntax for preg's or will it be changing > to the new Perl6 RegEx syntax (which I re

Re: Fw: [PHP] New Newsgroups

2002-06-26 Thread Rasmus Lerdorf
People can post to this group from nntp://news.php.net On Wed, 26 Jun 2002, Rick Emery wrote: > Somewhat related to this discussion. > > There are some posters to this email list that appear as Newsgoup entries in my >OutLook Express. Most posters, however, are identified as mail, not news pos

Re: [PHP] diffrance : require(); a file from localhost and from adomain.

2002-06-26 Thread Rasmus Lerdorf
That is the technical difference. Both will make HTTP requests and issue a GET request to fetch the image file. One opens a connection to localhost (normally the loopback at 127.0.0.1) and the other opens a connection to www.domain.com (at whatever ip that resolves to) -Rasmus On Wed, 26 Jun 200

Re: [PHP] dynamically creating variable names

2002-06-26 Thread Rasmus Lerdorf
http://www.php.net/manual/en/language.variables.variable.php On Wed, 26 Jun 2002, Lee P Reilly wrote: > Thanks for the replies. I'm still having a litte trouble though... > > Say I have an array called $compX, and given the letter 'X'... how can I > access the variable $compX using these methods

Re: [PHP] Re: Re: PHP 4.2

2002-06-24 Thread Rasmus Lerdorf
You mean like php.net/version_compare ? On Mon, 24 Jun 2002, Dreamriver.com wrote: > > Hello All, > I also have the challenge of distributing php code to unknown php versions. There is >a wide discrepancy in the functionality of even various PHP 4.x code. Since at the >time of coding I don't k

RE: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
Not inside a quoted string. On Mon, 24 Jun 2002, Johnson, Kirk wrote: > I thought this syntax, an unquoted key name, was deprecated ;) > > >From the manual at http://www.php.net/manual/en/language.types.array.php: > > "You should always use quotes around an associative array index." > > Kirk > >

Re: [PHP] function definition causing problems?

2002-06-24 Thread Rasmus Lerdorf
> // this won't work b/c of quoting issues > echo "This script is called $_SERVER["PHP_SELF"]"; > > // this should work fine IIRC > echo "This script is called $_SERVER['PHP_SELF']"; Nope, use: echo "This script is called $_SERVER[PHP_SELF]"; -Rasmus -- PHP General Mailing List (http://www.p

Re: [PHP] === and @

2002-06-23 Thread Rasmus Lerdorf
http://php.net/operators which would take you to: http://www.php.net/manual/en/language.operators.comparison.php and http://www.php.net/manual/en/language.operators.errorcontrol.php It's all there. -Rasmus On Sun, 23 Jun 2002, Phil Schwarzmann wrote: > What exactly happens when you put three e

Re: [PHP] Current date & time in MySQL datetime format

2002-06-22 Thread Rasmus Lerdorf
Use the date() function. On Sat, 22 Jun 2002, Phil Schwarzmann wrote: > I want to produce the current date & time in a MySQL datetime format > that I can then put into a MySQL database. > > How do I do this? I've tried mktime() and getdate() but it's not > working. > > Thanks!! > -- PHP Gene

Re: [PHP] Upgraded and now apache just dies

2002-06-21 Thread Rasmus Lerdorf
On Fri, Jun 21, 2002 at 06:14:21PM -0700, Rasmus Lerdorf wrote: > > Without the actual error message, there is nothing we can do. > > > > On Fri, 21 Jun 2002, Patrick Aland wrote: > > > > > Hey all, > > > I just upgraded to 4.2.1 on apache 1.3.26 and

Re: [PHP] Upgraded and now apache just dies

2002-06-21 Thread Rasmus Lerdorf
Without the actual error message, there is nothing we can do. On Fri, 21 Jun 2002, Patrick Aland wrote: > Hey all, > I just upgraded to 4.2.1 on apache 1.3.26 and now apache won't start. > If I comment out the LoadModule in the httpd.conf apache starts fine, > otherwise it just starts and exit

Re: [PHP] mod_mm problems now....

2002-06-21 Thread Rasmus Lerdorf
As a rule you never put "include" in a configuration directive. Use --with-mm=/usr PHP expects to find both the library and the header files under the specified dir. -Rasmus On Fri, 21 Jun 2002, Ray Hunter wrote: > Find out where you bsd has all the mm header files and add that to your php >

Re: [PHP] Mysql Insert from select problem with php

2002-06-20 Thread Rasmus Lerdorf
I bet you are double-escaping it. Try without the AddSlashes() call. By default PHP will escape this for you automatically. -Rasmus On Thu, 20 Jun 2002, David McInnis wrote: > After posting this on the MySQL list and getting some feedback we were > able to determine that this was not a flaw w

Re: [PHP] Status code and Header("Location: ")

2002-06-20 Thread Rasmus Lerdorf
Line 706 of php4/main/SAPI.c implements this. Go ahead and submit a patch and we will consider it. -Rasmus On Thu, 20 Jun 2002, Peter Thoenen wrote: > PHP Manual says there are two special cases for > headers, Location and Status. Not to concerned about > status here, but it states that Locat

Re: [PHP] what kind of weird problem is this?

2002-06-18 Thread Rasmus Lerdorf
Well, 312 is not a space. Please use a text editor that knows what a space is. The other lines look fine, but your $test<312>=<312> stuff there is bogus. -Rasmus On Wed, 19 Jun 2002, Joshua Alexander wrote: > Thanks, I didn't know about od > > 000< ? p h p \n \n $ t e

Re: [PHP] what kind of weird problem is this?

2002-06-18 Thread Rasmus Lerdorf
Are you using a broken editor of some sort? All I can think of here is that your spaces aren't really spaces. Try an od -c on that file from your prompt. -Rasmus On Wed, 19 Jun 2002, Joshua Alexander wrote: > I just installed the php 4.2.1 from entropy.ch and when running this script: > > >

Re: [PHP] Linux Redhat 7.2 & PHP with a formatted PC - Need somehelp

2002-06-18 Thread Rasmus Lerdorf
Simply install the appropriate rpms. apache, php, php-mysql, etc. They are all on your cd. -Rasmus On Tue, 18 Jun 2002, Phil Schwarzmann wrote: > I have a nice formatted PC & Linux Redhat 7.2 that I got at a local > retail store for $60. > > All I want this PC to do is be a PHP/MySQL server an

Re: [PHP] cannot find mysql_connect; _pconnect

2002-06-18 Thread Rasmus Lerdorf
t; /usr/lib/mysql/ (mysqlclient.so, etc.). > > - AFC > > - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "Anthony 'Crash' Ciarochi" <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Tuesday,

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