Re: [PHP] Assignment operator proposal

2002-03-21 Thread Rasmus Lerdorf
> Please note, there are many German PHP developers. Most of them are > not so stupid ... Oh, I don't know about that. I have met a bunch of them... ;) -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How to clear variables?

2002-03-21 Thread Rasmus Lerdorf
> On 21 Mar 2002, at 8:03, Rasmus Lerdorf wrote: > > > This Faction variable comes from the browser. > > Thanks for answering Rasmus. > > But is it possible to clear this variable. Is this what is called a > global variable? If not, does this means that the scope of POS

Re: [PHP] How to adress pictures stored outside of the http serverroot?

2002-03-21 Thread Rasmus Lerdorf
from your document_root. The way to do this is to write a little PHP wrapper script that you stick in your document_root that does a readfile() on the file stored outside of the document_root. -Rasmus On Thu, 21 Mar 2002, andy wrote: > Hi there, > > I am trying to put my images outside

Re: [PHP] Session Varaible Problem

2002-03-21 Thread Rasmus Lerdorf
Are you calling session_start() on the subsequent pages you want to be part of the session? On Thu, 21 Mar 2002, Randy Phillips wrote: > Hi, > > I have tried every example of creating a session variable I could find on > php.net and have had the same results with all of them. The session > varia

Re: [PHP] Apache

2002-03-21 Thread Rasmus Lerdorf
So either turn off the DirectoryIndex or put an index.html in the dir. On Fri, 22 Mar 2002, Jason Wong wrote: > On Friday 22 March 2002 00:54, Erik Price wrote: > > Isn't it just a matter of setting the permissions? apache can't have > > read access to this directory, that's all. > > > No, he d

RE: [PHP] echo and Session Variables

2002-03-21 Thread Rasmus Lerdorf
Well, a stray define('myvar','foo') somewhere would make a mess of that. It is safer to use $myarray['myvar']. Inside a quoted string you of course shouldn't use the '' -Rasmus On Thu, 21 Mar 2002, Kevin Stone wrote: > The single quotes

Re: [PHP] converting a password database from perl to php

2002-03-22 Thread Rasmus Lerdorf
Show us an example Perl one. Chances are you can get the PHP crypt() function to do the right thing by feeding it the correct SALT. -Rasmus On Fri, 22 Mar 2002, R'twick Niceorgaw wrote: > Hi all, > I'm converting a site written in perl to php. It has a member section whi

Re: [PHP] converting a password database from perl to php

2002-03-22 Thread Rasmus Lerdorf
> text password : f0rget123 > encrypted password: òOú«#7Fá73¯ Uh, that's not md5 at all. By definition md5 is 32 characters. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf
That's a FAQ (did you try the obvious? http://php.net/faq) On Fri, 22 Mar 2002, James Taylor wrote: > Has anyone given any thought to possibly maintaining a FAQ containing the > answers to the most commonly asked PHP questions on this list? I notice > duplicates roll through every couple of da

Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf
I just don't see what the difference is. This is a PHP mailing list which supposedly gets questions about PHP. Why would the PHP FAQ not be the right place for this? -Rasmus On Fri, 22 Mar 2002, James Taylor wrote: > You are correct sir. The purpose of the FAQ would be so that, lik

Re: [PHP] FAQ

2002-03-22 Thread Rasmus Lerdorf
gets questions about PHP. Why would the PHP FAQ not be the > > right place for this? > > > > -Rasmus > > > > On Fri, 22 Mar 2002, James Taylor wrote: > > > You are correct sir. The purpose of the FAQ would be so that, like I > > > said, similar que

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
http://www.php.net/manual/en/function.mysql-affected-rows.php On Fri, 22 Mar 2002, Ashley M. Kirchner wrote: > > After a bit of research: > > -- > Rick Emery wrote: > > > $result = mysql_query(.)' > > mysql_num_rows($result) > > Hrm, this is resulting in: > > Warning: Supp

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
But did you read the documentation? It states: int mysql_affected_rows ( [resource link_identifier]) That's an optional link identifier. You don't feed it a result resource. Just call it without any arguments. The affected rows is tied to a database connection, not a result set. -

Re: [PHP] Crypt Limitation?

2002-03-23 Thread Rasmus Lerdorf
Depends on the OS. I suggest using md() instead. On Sat, 23 Mar 2002, Steven Walker wrote: > Is there a string length limitation to crypt()? It generates the same > result for different input strings. I'm using crypt to store access > codes that are generated using uniqid. For example, if I do

Re: [PHP] Version 4.2 changes

2002-03-23 Thread Rasmus Lerdorf
In the NEWS and ChangeLog files in CVS. See http://cvs.php.net/cvs.php/php4/NEWS and pay attention to the branch name. On Sat, 23 Mar 2002, Gaylen Fraley wrote: > Where can I find the changes coming in 4.2? > > -- > Gaylen > PHP KISGB v4.0.2 Guest Book http://www.gaylenandmargie.com/phpwebsite/

Re: [PHP] PHP Search Engine?

2002-03-23 Thread Rasmus Lerdorf
So just put that file in your own directory and use it from there. It is just a PHP script. On Sat, 23 Mar 2002, lmlweb wrote: > Hello, > > I've picked up a book called the PHP Developer's Cookbook, specifically > for the search engine that was featured in it. It required the use of > PEAR's Fi

Re: [PHP] Image Manipulation/GD support

2002-03-23 Thread Rasmus Lerdorf
Try image/jpeg as your content-type On Sat, 23 Mar 2002, Navid Yar wrote: > Hello, > > I just enabled GD support for PHP via the php.ini file. When I try to > run a script that uses the functions included in the library, it gives > me a dialog box asking me whether I want to save the php file to

Re: [PHP] Trouble with mysql_pconnect unable to connect to database?

2002-03-23 Thread Rasmus Lerdorf
Figure out where your mysql.sock file is and provide the path right in your mysql_connect() call. "mysqladmin version" tells you the path. -Rasmus On Sat, 23 Mar 2002, Jim Hankins wrote: > I'm doing a simple database connection using the follow syntax: > > > >

Re: [PHP] Image Manipulation/GD support

2002-03-23 Thread Rasmus Lerdorf
for me. Play with your config.log and see what is failing. I use gd2 these days because the 8-bit limitation of gd1 just sucks. You can find my simple gd2 instructions here http://www.php.net/~rasmus/gd.html -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] upload forms, how much was uploaded before upload fails..

2002-03-24 Thread Rasmus Lerdorf
You'll probably need PHP 4.2 for uploads that big to work well. Before 4.2 uploads were buffered in ram, so no, you have no way to recover a broken upload. On Sun, 24 Mar 2002, Gerhard Hoogterp wrote: > Hello all, > > I'm still having problems uploading BIG files (15MB and more) Is there a way

Re: [PHP] Retrieving POP mail

2002-03-24 Thread Rasmus Lerdorf
Did you read php.net/imap_open ? On Mon, 25 Mar 2002, Kearns, Terry wrote: > The documentation for the IMAP functions is, er, virtually non-existent. I'm > not looking to read several sets of RFCs - all I want to do it check a POP > account on Exchange for messages and retrieve them. > > Does a

RE: [PHP] localization - internationalization

2002-03-25 Thread Rasmus Lerdorf
See http://php.net/gettext On Mon, 25 Mar 2002, Matt Friedman wrote: > Looking for some more detailed information on this subject. > > Any experts out there? > > Thanks, > > Matt Friedman > > > -Original Message- > From: Andrey Hristov [mailto:[EMAIL PROTECTED]] > Sent: Monday March 25,

Re: [PHP] list(), each()

2002-03-25 Thread Rasmus Lerdorf
Why do you put each(explode()) ? Just list() = explode() is what you want. -Rasmus On Mon, 25 Mar 2002, Chris Boget wrote: > Ok, I've got to be doing something wrong here. I've been > beating my head up against the wall for some time and I > just cannot figure out what i

Re: [PHP] getenv and ISAPI: solution?

2002-03-25 Thread Rasmus Lerdorf
if(count($HTTP_GET_VARS)) On Mon, 25 Mar 2002, Kai Schaetzl wrote: > I transferred an application from Linux/Apache to .NET/IIS6 and it > appeared to be working fine, first. A bit later I found that it > wouldn't switch to most functions derived from a GET variable. The > reason being that $quer

Re: [PHP] date ("j") not working on Unix - any ideas

2002-03-25 Thread Rasmus Lerdorf
Because 'j' was probably added somewhere in between the two versions... On Mon, 25 Mar 2002, geoff wrote: > Any ideas why date ("j") doesn't appear to work when I use it on my ISP > that has a Unix Server, but on my Windows ISP , it works fine ? The other > date() functions Y,m,d etc all wo

Re: [PHP] GIF support in PHP

2002-03-25 Thread Rasmus Lerdorf
y you have to recompile PHP. -Rasmus On Mon, 25 Mar 2002, Todor Stoyanov wrote: > Is there a way to add GIF support in PHP without recompiling? > Just adding as an extension. > > Tanks a lot. > > > > -- > PHP General Mailing List (http://www.php.net/) > To uns

Re: [PHP] reg-ex

2002-03-25 Thread Rasmus Lerdorf
"^[ A-Za-z---]*$" On Mon, 25 Mar 2002, John Fishworld wrote: > How can I change this to accept spaces as well ? > > (ereg("^[A-Za-zÀ-ÖØ-öø-ÿ]*$", $str)) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing Li

Re: [PHP] upload forms, how much was uploaded before upload fails..

2002-03-25 Thread Rasmus Lerdorf
There is only an upload_tmp_dir. Not sure where you think this second tmpdir is coming from. Once the upload is finished the file is written to the upload_tmpdir and you then have to do something with the file from there. -Rasmus On Mon, 25 Mar 2002, Gerhard Hoogterp wrote: > On Sunday

Re: [PHP] mail() function returns TRUE but no email is sent

2002-03-25 Thread Rasmus Lerdorf
Sure, it just passes it off to the MTA. If the MTA drops the ball later on we don't know about it. Check your logs. On Mon, 25 Mar 2002, Kevin Stone wrote: > Anyone run into this problem before? I've got a simple email parser > that I've set up for our clients to access from their websites.

Re: [PHP] File Edit

2002-03-25 Thread Rasmus Lerdorf
You read the entire file into memory (an array using file() perhaps) and then edit it in memory and write the entire new file back out. -Rasmus On Mon, 25 Mar 2002, Randy Johnson wrote: > Hello, > > > I want to be able to edit part of a file. via a text box using php how do i r

Re: [PHP] File Edit

2002-03-25 Thread Rasmus Lerdorf
You read all of it On Mon, 25 Mar 2002, Randy Johnson wrote: > How do I know what part of it to read in the array? > - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "Randy Johnson" <[EMAIL PROTECTED]> > Cc: <[EMA

Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf
Or, of course, if you want to be cool like Carl: http://lerdorf.com/buy/ ;) -Rasmus On Tue, 26 Mar 2002, Ralph Friedman wrote: > In article <[EMAIL PROTECTED]>, Septic Flesh wrote: > > I wanna buy a book from amazon . . .but don't know which one.. > > Do

Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf
It is, the picture should prove that. On Tue, 26 Mar 2002, Scott St. John wrote: > I didn't think Programming PHP was out yet? > > > On Tue, 26 Mar 2002, Rasmus Lerdorf wrote: > > > Or, of course, if you want to be cool like Carl: > > > > http://lerdo

[PHP] Re: OT Re: [PHP] Re: which php book 2 buy ?

2002-03-26 Thread Rasmus Lerdorf
No idea, I don't follow O'Reilly covers all that closely. This one arrived on my doorstep a couple of days ago. According to Barnes & Noble it starts shipping today. Not sure why Amazon says it isn't published yet. The fact that I have a copy would seem to disprove that.

Re: [PHP] [Session] (it seems to be a bug in PHP 4.1.2)

2002-03-26 Thread Rasmus Lerdorf
Just to clarify, that is a Windows-specific bug. Non-Windows works just fine. On Tue, 26 Mar 2002, Chris wrote: > On 26 Mar 2002 at 20:42, Evan wrote: > > I have PHP 4.1.2 (the latest, I downloaded it a week ago). > > PHP 4.1.2 has several bugs. > One of them is that Apache and sessions variabl

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's locationtag?

2002-03-26 Thread Rasmus Lerdorf
So use a Javascript meta-refresh On Wed, 27 Mar 2002, webapprentice wrote: > Hi, > Thanks for the reply. I saw this as well in the mailing list archives, but > everyone is saying you cannot output ANYTHING before calling header. > > Unfortunately, I'm calling this at the end of a process, so it

Re: [PHP] Any PHP equivalent of Macromedia ColdFusion's locationtag?

2002-03-26 Thread Rasmus Lerdorf
, a space is as valid a character as any other. -Rasmus PS. One of the things with PHP is that we have never gone out of our way to hide the actual mechanics of HTTP very much from the users. I think it is important for people to actually understand what is going on. That's why we don't

Re: [PHP] Does this seem odd? File Upload Permissions

2002-03-26 Thread Rasmus Lerdorf
First, the execute bit means nothing over HTTP. So they couldn't just execute it remotely. They would need an account on the box. And second, PHP does not set the x bit, you are doing that. Check your default umask or set it explicitly with a call to umask() before copying the file into place.

RE: [PHP] Does this seem odd? File Upload Permissions

2002-03-26 Thread Rasmus Lerdorf
entirely true... if php is running as cgi it would need the > execution bit set. Or if someone wanted to write a shell script in php > to be used to help compromise a server it would need to be executable as > well... > > -Original Message- > From: Rasmus Lerdorf [mailto

Re: [PHP] Getting QUALITY text on an image

2002-03-27 Thread Rasmus Lerdorf
efore switching. The patches to fix this are available privately, but you should bug the folks at boutell.com to release a new version of GD2. -Rasmus On Tue, 26 Mar 2002, Michael A. Peters wrote: > Here's the situation. > > I run the website for a macintosh user folding@home team. &

[PHP] Re: OT Re: [PHP] Re: which php book 2 buy ?

2002-03-27 Thread Rasmus Lerdorf
Erik, I asked an editor at O'Reilly about this cover issue. Here is the response: > We did switch to wite spines with black letters for a while, but now > we've switched back to our original colored spines with white letters. > Trust me, you don't want to know the sordid

Re: [PHP] Help! Recent PHP security patch => high server load?

2002-03-27 Thread Rasmus Lerdorf
I don't really see how that patch could cause that. Any chance of an truss or a gdb backtrace or something on one of these guys to give us a clue? -Rasmus On Thu, 28 Mar 2002, Jason Murray wrote: > Hi folks, > > Just curious to know if anyone has experienced a high serve

Re: [PHP] Uploading big files

2002-03-27 Thread Rasmus Lerdorf
> Is it because of the memory_limit that it doesn't work ? Yes > Do I have a way to upload files (over 7M) on the server without increasing the > memory_limit ? Not until PHP 4.2 -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expression Problem continues

2002-03-28 Thread Rasmus Lerdorf
This code works fine: eregi("__([a-z0-9_]+)__", "Hello __WO_RD__ Test", $Matches); echo $Matches[1]; produces: WO_RD -Rasmus On Thu, 28 Mar 2002, Sharat Hegde wrote: > Hello, > > I am still having problems with the regular expressions. Looks like there > h

Re: [PHP] Need some help on security with php and mysql

2002-03-28 Thread Rasmus Lerdorf
Did you flush the privileges? Using either flush privileges or mysqladmin reload? And besides, you really should be using a GRANT query to do this. -Rasmus On Thu, 28 Mar 2002, hamish wrote: > Hello all, > I am using php and mysql with phpmyadmin. I am trying to set up a username

Re: [PHP] Regular Expression Problem continues

2002-03-28 Thread Rasmus Lerdorf
I just tried it on 4.1.x and it is working fine. On Thu, 28 Mar 2002, Sharat Hegde wrote: > Rasmus, > > The code worked fine in PHP Version 3.x > > It does not work with PHP Version 4.1.1. That is where I have a problem. > > With Regards, > Sharat > > >From:

Re: [PHP] Regular Expression Problem continues

2002-03-28 Thread Rasmus Lerdorf
In your configure flags you have: --with-regex=system Why did you do this? Recompile without that switch and see if things change. -Rasmus On Thu, 28 Mar 2002, Sharat Hegde wrote: > Yesthere may be something else going wrong. The source code of the test > file I have is: > &g

Re: [PHP] Regular Expression Problem continues

2002-03-28 Thread Rasmus Lerdorf
is the significance of the switch --with-regex=system It means that it was compiled against the system regex library as opposed to the one shipped with PHP. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Help with Acrobat FDF support

2002-03-28 Thread Rasmus Lerdorf
You have to build the FDF extension to include FDF support by adding the --with-fdftk to the PHP build flags. -Rasmus On Thu, 28 Mar 2002, Robert Stoeber wrote: > I just found the very cool looking new FDF functions to support Acrobat > forms. According to the documentation at www.php

Re: [PHP] Security hole using cookies for sessions. Workaround?

2002-03-29 Thread Rasmus Lerdorf
the PHP sessions do by default - 24 minutes of inactivity and the session data is expired. There is no way to detect a user closing one window of a browser session. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Displaying Image with PHP

2002-03-29 Thread Rasmus Lerdorf
mediumtext is long enough, but you are putting binary data into it, not text. You should be using mediumblob. The limit is 16M for that column type. -Rasmus On Fri, 29 Mar 2002, Jay Paulson wrote: > Hello-- > > I can't quite seem to get this to work. What I'm trying to do

Re: [PHP] creating files with same user id than the script?

2002-03-29 Thread Rasmus Lerdorf
requested. Then you would set up multiple instances of Apache each listening to a different port on localhost and each running as that user's user id. The last option is the most powerful, but is also somewhat more resource intensive. -Rasmus On Fri, 29 Mar 2002, Kai Schaetzl wrote

Re: [PHP] A quesiton about arrays and indexes

2002-03-29 Thread Rasmus Lerdorf
Complex arrays inside quoted strings either need to be escaped with {}'s or drop out of the quoted string to display them. ie. echo "".$week[$i][$j].": ".$week[$i][$k][0].""; or echo "${week[$i][$j]}: ${week[$i][$k][0]}"; -Rasmus On Fri, 29 Ma

Re: [PHP] [PHP-DB] Displaying Floats

2002-03-29 Thread Rasmus Lerdorf
A couple of ways. The most flexible is probably to use number_format() since that lets you set the separators as well. printf("%.2f",$value) would also do it. -Rasmus On Fri, 29 Mar 2002, Ian Wayne wrote: > Hi all. > > I can't believe I'm stuck on this - seems to

Re: [PHP] Not a valid MySQL resource?

2002-03-30 Thread Rasmus Lerdorf
Always always always check your queries for errors before trying to use the result set. ie. $result = mysql_query($sql) or die(mysql_error()); (assuming you want a query failure to be a fatal error) -Rasmus On Sat, 30 Mar 2002, Brian Waskiewicz wrote: > Can anyone tell me what is caus

Re: [PHP] Re: Nead Help With A Php Script

2002-03-30 Thread Rasmus Lerdorf
t;;); > exit; > } Note that nothing prevents users from faking a username via their own cookie either. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php configs in the apache config file?

2002-03-30 Thread Rasmus Lerdorf
rrect. None admin flags can be overridden in .htaccess files assuming you enable it via the appropriate AlloveOverride Options. If you don't set "Options" on AllowOverride then none of this stuff can be overridden in the .htaccess files. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Image manipulation with PHP on RHLinux 7.1

2002-03-30 Thread Rasmus Lerdorf
exif_imagetype() is new function only available in PHP 4.2 (not released yet) and above. Use GetImageSize() for now. -Rasmus On Sat, 30 Mar 2002, Dale & Lora Marshall wrote: > > Ok, I've been looking at the image functions, and found that I needed > to recompile PHP with exi

Re: [PHP] fetching a parameter from url like on php.net A mirarcle?

2002-03-31 Thread Rasmus Lerdorf
ErrorDocument 404 your_script.php then in your_script.php look at $REQUEST_URI Or stick a phpinfo() call there initially to see what is set. -Rasmus On Sun, 31 Mar 2002, Andy wrote: > Hi there, > > I am wondering how to get a parameter from url like on php.net Example: > php.net/

RE: [PHP] fetching a parameter from url like on php.net A mirarcle?

2002-03-31 Thread Rasmus Lerdorf
> I believe this is done with mod_rewrite Nope. Absolutely no reason to incur the wrath of mod_rewrite for something this simple. Just an ErrorDocument entry in your httpd.conf. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] return

2002-03-31 Thread Rasmus Lerdorf
variable in scope, and it is surely not what the misguided coder behind this code was trying to achieve. In short, this is completely bogus. -Rasmus On Sun, 31 Mar 2002, Gary wrote: > Can someone explain to me the reason for using return. > > function _getValue($foo) > { >

Re: [PHP] where i get .so [dll] file of linux ?

2002-03-31 Thread Rasmus Lerdorf
For example: ./configure --enable-ftp=shared make this will create modules/ftp.so -Rasmus On Mon, 1 Apr 2002, Prachait Saxena wrote: > So can u tell me how to complie one module only ? > as i am thinkg to complie that module on my local machine [Linux] and then > upload to t

Re: [PHP] return

2002-03-31 Thread Rasmus Lerdorf
ng"; test($foo); print($foo); -Rasmus On Mon, 1 Apr 2002, Jordan wrote: > Eric, > > Isnt there really no need for the 'return' though? > > $test ($var) > { > addslashes($var) > } > > $foo = "He's dreaming"; > $foo = test($fo

Re: [PHP] register_globals

2002-04-01 Thread Rasmus Lerdorf
You would be better off reading the security chapter in the PHP documentation. It is much better informed than that study-in-scarlet thing. On Mon, 1 Apr 2002, Erik Price wrote: > > On Sunday, March 31, 2002, at 04:05 AM, Liam wrote: > > > at the moment I have register_globals set to "on" > >

Re: [PHP] Request for Feedback - Unsigned Right Shift Operator

2002-04-01 Thread Rasmus Lerdorf
The other argument against adding <<< is that it is the heredoc operator. -Rasmus On 1 Apr 2002, Jason Greene wrote: > > Hello All, > > One of the features that I have been working on for PHP5/Zend Engine 2 > is better unsigned value support for the language. This invo

Re: [PHP] April fools day - did anyone notice Thies's fangs on rc1???

2002-04-02 Thread Rasmus Lerdorf
They were breadsticks. Picture was taken in early 1999 in a restaurant in Tel Aviv, Israel. -Rasmus On Tue, 2 Apr 2002, Erik Price wrote: > > On Tuesday, April 2, 2002, at 11:52 AM, Frank Joerdens wrote: > > > Did anyone else notice Thies's fangs on the phpinf

RE: [PHP] April fools day - did anyone notice Thies's fangs on rc1???

2002-04-02 Thread Rasmus Lerdorf
Well, not really. This easter egg has been in the code since April 2000, so it isn't actually a new thing. We had this same discussion in April 2001. You guys just have a short memory. ;) -Rasmus On Tue, 2 Apr 2002, Brian Drexler wrote: > Wow, talk about things from your past com

Re: [PHP] Evaluating php code.

2002-04-03 Thread Rasmus Lerdorf
uffering lets you catch the output from the code you are testing 4. Preceding the eval()'ed code with ?> makes sure you start the code off in normal HTML mode since eval() actually assumes what you feed it starts in PHP mode which is likely not the case for you. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Evaluating php code.

2002-04-03 Thread Rasmus Lerdorf
;'; ob_start(); eval('?>'.$code); $output = ob_get_contents(); ob_end_clean(); if($php_errormsg) echo "Error was: $php_errormsg\n"; else echo "Output was: $output\n"; ?> Does this give you a fatal error? If so, you may want to look at

Re: [PHP] Warning: Undefined variable

2002-04-03 Thread Rasmus Lerdorf
#x27;t auto-initialize. For example: $foo = $i++; In this case $foo is auto-initialized, but you are incrementing $i without explicitly initializing it to 0. This code should be: $i = 0; $foo = $i++; It is common sense really. -Rasmus -- PHP General Mailing List (http://www.php.n

Re: [PHP] syntax for date math expressions

2002-04-03 Thread Rasmus Lerdorf
hing as PHP's. But you can simply call MySQL's UNIX_TIMESTAMP() function on the mysql field when you select it if you want it into unix timestamp format. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] syntax for date math expressions

2002-04-03 Thread Rasmus Lerdorf
date() On Wed, 3 Apr 2002, Erik Price wrote: > > On Wednesday, April 3, 2002, at 04:14 PM, Rasmus Lerdorf wrote: > > > But you can simply call MySQL's UNIX_TIMESTAMP() function on the mysql > > field when you select it if you want it into unix timestamp format. >

Re: [PHP] references a functions

2002-04-04 Thread Rasmus Lerdorf
important (please explain why) then this is the syntax: function & bdConsultar($strCon) { $idRes = @mysql_query($strCon); return $idRes; } $myID = & bdConsultar("Select * from users"); But again, I don't think you are quite understanding references. -Rasmus

Re: [PHP] /usr/bin/php Question

2002-04-06 Thread Rasmus Lerdorf
Just compile again with --with-apxs On Sun, 7 Apr 2002, Chris Kay wrote: > > Hi > > I have compiled php -with-apxs option and I read in the archives it > don't create a /usr/bin/php. > But I wish to run 2 scripts I have made by command line, I have the 2 > scripts outside the web server > Root.

Re: [PHP] Re: Newbie and includes

2002-04-06 Thread Rasmus Lerdorf
But you will most certainly need quotes. And no, you don't need the ()'s but it works for exactly the same reason that (1)+(2) is a valid expression with unneccesary brackets. -Rasmus On Sun, 7 Apr 2002, G-no / |{iller wrote: > try > require (includes/footer.php) > ?&

Re: [PHP] PHP 4.2.0 RC2 + Apache 2.0.35 .. DirectoryIndex problem

2002-04-09 Thread Rasmus Lerdorf
Sounds like an Apache bug to me. On Tue, 9 Apr 2002, Adam Plocher wrote: > So I just got PHP 4.2.0 RC2 and Apache 2.0.35 almost completely working. > The only problem I am having now, is Apache's DirectoryIndex option. > Whenever I add index.php to that (like I would do in Apache 1.3), I get a >

Re: [PHP] arguments against php / mysql?

2002-04-10 Thread Rasmus Lerdorf
It's pretty hard to argue in favour of Windows. But stick Linux or FreeBSD in there as your OS and you will have a rock-solid, inexpensive and well-supported platform that will put just about anything you can build on a Windows server to shame. -Rasmus On Wed, 10 Apr 2002, Mallen Baker

Re: [PHP] GMT / TimeZone modifications

2002-04-10 Thread Rasmus Lerdorf
setenv() the appropriate timezone, then use strtotime() or mktime() to create a timestamp. Then setenv() to the other timezone and use date() or strftime() to convert back into a legible format. -Rasmus On Thu, 11 Apr 2002, Richard KS wrote: > Greetings. > > I was wondering if ther

Re: [PHP] Re: arguments against php / mysql?

2002-04-11 Thread Rasmus Lerdorf
n? Going from one dead-end proprietary system to another which both try to lock you into their technologies seems pointless to me. Is ASP not working? Why not just stick with that? Why not get a low-cost Linux server as well and slowly start migrating things? -Rasmus -- PHP General Mailing List

Re: [PHP] Set Global Variables

2002-04-11 Thread Rasmus Lerdorf
Set up an auto_prepend file that either simply sets these constant globals ot fetches them from the DB. -Rasmus On Thu, 11 Apr 2002 [EMAIL PROTECTED] wrote: > Is there a way to set a global variable that all users can access? I have > some values in a database that I'm rea

Re: [PHP] how to create a file with php

2002-04-11 Thread Rasmus Lerdorf
http://php.net/touch On Thu, 11 Apr 2002, andy wrote: > Hi there, > > I am wondering how to create a file on the server. I do not want to write > anything to the file. Just create it. > > Thanx Andy > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://w

Re: [PHP] how to create a file with php

2002-04-11 Thread Rasmus Lerdorf
PHP has a touch() function. No need to exec() On Thu, 11 Apr 2002 [EMAIL PROTECTED] wrote: > At 11.04.2002 17:14, you wrote: > >Hi there, > > > >I am wondering how to create a file on the server. I do not want to write > >anything to the file. Just create it. > > > >Thanx Andy > > exec("touch

Re: [PHP] Posting with script tags, or a plea not to

2002-04-11 Thread Rasmus Lerdorf
I'm sorry, but if your webmail system just sent me your password file, you should run, not walk, to another provider. This is a list about PHP. There is going to be example PHP snippets all over it. Deal with it. -Rasmus On Thu, 11 Apr 2002, Barry C. Hawkins wrote: > List members,

RE: [PHP] Posting with script tags, or a plea not to

2002-04-11 Thread Rasmus Lerdorf
Well, you read the message and I didn't get an email. That tells me that it isn't actually executing the code. Are you sure it isn't just putting the code in the mail literally? ie. if you do a "view source" on the message, do you not see the raw PHP tags? -Rasmus O

RE: [PHP] Posting with script tags, or a plea not to

2002-04-11 Thread Rasmus Lerdorf
Ok, but you didn't really answer my question. When you do a view source to see the raw html in the webmail app, do you see the PHP tags. ie. the tag in this thread? On Thu, 11 Apr 2002, Barry C. Hawkins wrote: > Rasmus, > I was able to see the PHP code because I came home a

Re: [PHP] include through HTTP

2002-04-12 Thread Rasmus Lerdorf
Why do you want to include from localhost over HTTP? Sounds to me like you want to do: $foo='bar'; include "$DOCUMENT_ROOT/folder/file.php"; -Rasmus On Fri, 12 Apr 2002, Barýþ Mert wrote: > What i want to do is : > include("http://localhost/folder/file.php?fo

Re: [PHP] variable scoping...

2002-04-12 Thread Rasmus Lerdorf
I guess the only real way is to use virtual() in this case. That's a bit clunky as well, but it isn't quite as bad as going through CGI or all the way out to the port 80 level. -Rasmus On Fri, 12 Apr 2002, Aric Caley wrote: > Is it possible to keep the variable name-space sep

Re: [PHP] Monitoring a SSL Auth'd page

2002-04-12 Thread Rasmus Lerdorf
See the curl extension. http://php.net/curl And as of PHP 4.3 you will be able to open an https page directly with fopen(). -Rasmus On Fri, 12 Apr 2002, Ninety-Nine Ways To Die wrote: > Ok I got a question for you guys and gals, I am not sure how to go about this, >looking for op

Re: [PHP] how to detect error

2002-04-12 Thread Rasmus Lerdorf
Read the chapter on connection handling in the manual. Basically you need to register a shutdown function using register_shutdown_function() and check connection_status() from that. -Rasmus On Fri, 12 Apr 2002, Charmaine Tian wrote: > Hi, > > If a PHP script is terminated due to

Re: [PHP] variable scoping...

2002-04-12 Thread Rasmus Lerdorf
The documentation is outdated. That restriction has been lifted as of PHP version 4.0.6. (cc'ing phpdoc to fix) -Rasmus On Fri, 12 Apr 2002, Aric Caley wrote: > but the virtual() documentation says you can't use it on a php script? > > "Rasmus Lerdorf" <[EM

Re: RE: [PHP] Including only I want

2002-04-13 Thread Rasmus Lerdorf
You can't do a partial include. Put some logic into your include file so only the appropriate lines are executed. Or if you are not executing anything but simply reading a file containing data, use fopen()/fgets() and read past the first 5 lines. -Rasmus On Sat, 13 Apr 2002, Alberto W

Re: [PHP] graphing packages

2002-04-15 Thread Rasmus Lerdorf
Try jpgraph On Sun, 14 Apr 2002, Christian Calloway wrote: > hey ppl, > > I need to create some fairly complex graphs dynamically, and I need to be > able to specify line, bar, or pie charts. Are there any PHP packages that > someone could point me to that would fill my needs. Thanks > > > > --

Re: [PHP] file delete...

2002-04-17 Thread Rasmus Lerdorf
Did you check the manual? Like php.net/delete perhaps which tells you the PHP function that does this is actually called unlink(). -Rasmus On Wed, 17 Apr 2002, jas wrote: > How can I delete a file in php? > thanks in advance, > Jas > > > > -- > PHP General Mailing

Re: [PHP] Nasty DoS in PHP

2002-04-17 Thread Rasmus Lerdorf
Turn on the memory-limit option On Wed, 17 Apr 2002, Dustin E. Childers wrote: > Hello. > > I have found something interesting that can kill the server. I'm not sure if this is >because of Apache or PHP. If you use PHP to send a header() inside of a while loop, >the httpd process will begin to

Re: [PHP] Ming and/or libswf

2002-04-20 Thread Rasmus Lerdorf
loaded in via php.ini. -Rasmus On Sat, 20 Apr 2002, Richard Lynch wrote: > Please Cc: me as well... > > I'm having the devil of a time getting Ming and/or libswf to do a Bitmap... > > > Short version: > What's the most stable PHP+Ming version-compatible combo I can

Re: [PHP] inline CGI

2002-04-21 Thread Rasmus Lerdorf
virtual() On Sun, 21 Apr 2002, Werner de Schepper wrote: > Hello, > > I like to include the html-output of a perl script in my php-page. The perl > script is on the same server as the php file, so I use de passthru( > [docroot/path/perl-file] ) function to include de html output of the script >

Re: [PHP] How to check flags?

2002-04-21 Thread Rasmus Lerdorf
if($abc & 2) echo "2 Bloco\n"; if($abc & 4) echo "4 Sessao\n"; if($abc & 8) echo "8 Sistema\n"; -Rasmus On Sun, 21 Apr 2002, albertonews wrote: > I want this: > > 2 Bloco > 4 Sessão > 8 Sistema > > only this three > > b

Re: [PHP] adding numbers to a file

2002-04-22 Thread Rasmus Lerdorf
$lines = file('filename'); foreach($lines as line) { list($var,$val) = explode('=>',$line); if(trim($var)=="'total'") $val = trim($val); } $val = $new_value; $fp = fopen('filename','w'); fput

Re: [PHP] How do remove WARNING message

2002-04-22 Thread Rasmus Lerdorf
Read the error handling chapter in the documentation. -Rasmus On Mon, 22 Apr 2002, Jean-Rene Cormier wrote: > Ok I'm trying to create a script that would allow users to bind to an > LDAP server and we all know there's gonna be some people mistyping their > password but whe

RE: [PHP] The so-called improvment in PHP 4.2.0

2002-04-22 Thread Rasmus Lerdorf
Also see extract() and import_request_variables() Although, an upgrade to PHP 4.2.0 is not going to automatically disable register_globals. Upgrading PHP does not overwrite the existing php.ini file, so unless you ISP specifically changes this php.ini setting, nothing will change. -Rasmus On

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