Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
Rasmus On Fri, 22 Mar 2002, Ashley M. Kirchner wrote: > Rasmus Lerdorf wrote: > > > http://www.php.net/manual/en/function.mysql-affected-rows.php > > Thanks Rasmus. I did try that as well, same result. If I don't bother with the > $result, everything's fin

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

2002-03-22 Thread Rasmus Lerdorf
So add it those. On Fri, 22 Mar 2002, James Taylor wrote: > The PHP FAQ isn't really specific when it comes to most problems. The 'code' > section has like 10 questions, the rest of the FAQ is mainly how to > download/compile, what do these PHP errors mean, migration, etc. A FAQ that > had answ

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, like I said,

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] 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] 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 which > is password protec

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 in $_SESSION['myvar'] are not necessary. You're > readin

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] 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] How to adress pictures stored outside of the http serverroot?

2002-03-21 Thread Rasmus Lerdorf
Think about what you are doing a bit here. You want to store the pictures outside of your document_root, yet you want to reference them directly from a web page. That makes absolutely no sense. By definition, something that can be accessed directly through your web server must be accessible fro

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] 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] Urgent: Apache sometimes displays PHP source code

2002-03-21 Thread Rasmus Lerdorf
Step 1 - upgrade to a recent version. Then report back. -Rasmus On Thu, 21 Mar 2002, Sam Jordan wrote: > Hello all > > I'm working for an ISP and some weeks ago we noticed a problem > with PHP we never had before. Since then quite often the PHP > code is not interpreted, but displayed as plain

Re: [PHP] How to clear variables?

2002-03-21 Thread Rasmus Lerdorf
> The above speudo script work fine and when the user click 'Add to > Data', the data is added to my database. Howver, the > session_unregister and session_destroy do not clear the variable > Faction and its value. Therefore if the user click Reload on the > browser, the data gets added again. >

Re: [PHP] search engine friendly urls

2002-03-21 Thread Rasmus Lerdorf
You can do exactly the same thing with PHP. The 205 would show up in the $PATH_INFO variable. -Rasmus On Thu, 21 Mar 2002, Kelly Meeks wrote: > Does anyone have any ideas/info (or can you point me to) regarding how to make >dynamic php content more search engine friendly (losing the '?' when

Re: [PHP] HTTP_Upload with PHP

2002-03-20 Thread Rasmus Lerdorf
'none' comes from a failed file upload. Figure out why the file upload is not working. Did you perhaps turn file uploads off in your php.ini file? -Rasmus On Wed, 20 Mar 2002, Rick wrote: > We have an application that used PHP's FTP function to upload files. Now it > worked until we upgraded

RE: [PHP] strlen() gives a wrong count

2002-03-19 Thread Rasmus Lerdorf
Think you could post a base64_encode() version of that string? On Tue, 19 Mar 2002, Gil Disatnik wrote: > Of course. > Following is a part Hebrew part English text I have in my phorum, it > probably won't look good on a system without Hebrew support. > > String on a file: > --->snip<

Re: [PHP] strlen() gives a wrong count

2002-03-19 Thread Rasmus Lerdorf
Well, how are you putting it into the string? On Tue, 19 Mar 2002, Gil Disatnik wrote: > Hello there, > > I have a 98 characters string (including spaces), wc -c says it's 98 > characters and a file containing this string is 98 bytes as well. > > For some reason - strlen() says it's more... it s

=?x-unknown?q?Re=3A_=5BPHP=5D_Replacing_chars_like=3A_=BA_OR?==?x-unknown?q?_=BF?=

2002-03-18 Thread Rasmus Lerdorf
$new = preg_replace('/[^a-z]/i','',$old); Note that this will also get rid of the - in this case since you specifically asked for something that got rid of everything not a-z -Rasmus On Mon, 18 Mar 2002, andy wrote: > Hi there, > > I am still searching for a function which is replacing all cha

Re: [PHP] apache md5 vs. php md5

2002-03-14 Thread Rasmus Lerdorf
he htpassword is generating $apr1$ hashes. > > Where is the gadget that needs fixed? > > David > > Rasmus Lerdorf wrote: > > >The PHP one supports that if your OS does. > > > >On Thu, 14 Mar 2002, David Ford wrote: > > > >>Does anyone have a cr

Re: [PHP] apache md5 vs. php md5

2002-03-14 Thread Rasmus Lerdorf
The PHP one supports that if your OS does. On Thu, 14 Mar 2002, David Ford wrote: > Does anyone have a crypt() function that can use the $apr1$ prefixed > salt that apache's htpasswd uses? > > David > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.p

Re: [PHP] SafeMode, Virtual Hosts with different users & filesystemfunctions

2002-03-14 Thread Rasmus Lerdorf
Nope, not with Apache-1.3. Apache 2.0 will have a solution to this. Or you can run multiple instances of Apache behind a Squid reverse proxy with Squidguard redirecting requests to the appropriate port. -Rasmus On Thu, 14 Mar 2002, Pablo Murillo wrote: > Hi > > I have a machine running : > -

Re: [PHP] Passing an array as an argument

2002-03-14 Thread Rasmus Lerdorf
You can't put $a[][] inside a qouted string like that. Either use ${a[][]} or put it outside like this: Print(" ".$aOptions[1][1]."\n"); -Rasmus On Thu, 14 Mar 2002, Mauricio Cuenca wrote: > Hello, > > I've built a function that receives an array as an argument to create an > HTML drop-do

Re: [PHP] simple yet weird... help pls

2002-03-14 Thread Rasmus Lerdorf
> Please take a look at the script below. > If i want to show an image it doesnt work if it's under an if statement. > Why in this case? > > $feedb=0; > if($feedb==0){ echo "";} > echo ""; > ?> > How can i solve this problem? By spelling src correctly. -Rasmus --

Re: [PHP] Hi what is diff. Between mktime() and UNIX_TIMESTAMP()

2002-03-14 Thread Rasmus Lerdorf
>UNIX_TIMESTAMP(2002-03-21 08:30:00) and >mktime(2002,03,21,08,30,00) equal or not? Careful, 08 != 8 A leading 0 indicates an octal number in PHP. Also, you have the arguments to mktime() completely messed up. It is hour, minute, second, month, day, year. 2002 is a strange-loo

Re: [PHP] rand()

2002-03-13 Thread Rasmus Lerdorf
Just do the obvious: $rand = rand(33,111); $num = ($rand>90) ? $rand+35 : $rand; On Wed, 13 Mar 2002, Jeff Sittler wrote: > I am wanting to use rand() to generate a number between 33-90 OR 125-146. > Is there a way to do this? I don't want any numbers before 33 or between > 91-124 or

Re: [PHP] re: passing inputs

2002-03-13 Thread Rasmus Lerdorf
> echo ''; First of all, $_POST will only work in PHP 4.1.x so make sure you are running a recent version. And second, I bet you mean $_POST['inp'] there. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How to access arrays from $GLOBAL?

2002-03-13 Thread Rasmus Lerdorf
references -Rasmus On Wed, 13 Mar 2002, Hunter, Ray wrote: > Where is some good documentation on how $GLOBALS works and what is really > going on in the background? > > > Thank you, > > Ray Hunter > Firmware Engineer > > ENTERASYS NETWORKS > > > -Ori

Re: [PHP] How to access arrays from $GLOBAL?

2002-03-13 Thread Rasmus Lerdorf
I don't understand why you think it is illogical. How else would you dereference a multi-dimensional array? On Wed, 13 Mar 2002, Richard Davey wrote: > "Mike Ford" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > $GLOBALS['mtxt'][1] > > Fantastic :) > > Th

Re: [PHP] removing ALL whitespace from a string

2002-03-11 Thread Rasmus Lerdorf
$output = preg_replace('/\s/','',$input); On Mon, 11 Mar 2002, Lee P Reilly wrote: > Can somebody tell me if there is a function that will remove *all* > whitespace (\n, \r, \t, \w, etc) from a string i.e. from the beginning, > the end, and the middle?. Something like chop(), trim()? > > e.g. in

Re: [PHP] Rasmus, O'Reilly, "Programming PHP"

2002-03-07 Thread Rasmus Lerdorf
The book will be coming out. I have seen the galleys and the appendices have gone in. -Rasmus On Fri, 8 Mar 2002, DL Neil wrote: > Hi Erik, > > > > Rasmus/others, > > > > > > O'Reilly are advertising the imminent release (Mar 2002) of > "Programming > > > PHP" (http://www.oreilly.com/catal

Re: [PHP] ploblem with safe_mode_include_dir

2002-03-04 Thread Rasmus Lerdorf
There is no such feature. On Mon, 4 Mar 2002, Renato Lins wrote: > Sorry, I may not haven been clear. > > What should I do to include from a safe area (/myuser/safe) when I have > open_basedir set to other path (/myuser/public_html) ? > > Rasmus Lerdorf wrote: > > >

Re: [PHP] Re-Compiling PHP HELP

2002-03-04 Thread Rasmus Lerdorf
--with-apache builds the static library version of PHP which is linked into Apache. If you use this switch you need to recompile Apache as well which you haven't done. Please read the INSTALL file that came with PHP. -Rasmus On Mon, 4 Mar 2002, James Taylor wrote: > I'm trying to compile 4.1.

Re: [PHP] PHP 4.1.2 + GD 2.0.1 please help.

2002-03-04 Thread Rasmus Lerdorf
Well, what is the error? On Mon, 4 Mar 2002, Sebastian Wenleder wrote: > I am having the same problem, I can't compile the latest php-cvs with > gd support on Linux. It worked until last week or so. > > Sebastian > > At 8:46 Uhr -0800 04.03.2002, Rasmus Lerdorf wrote: &

Re: [PHP] PHP 4.1.2 + GD 2.0.1 please help.

2002-03-04 Thread Rasmus Lerdorf
Which OS? If a Linux distro, are you sure you have both libpng and libpng-devel packages installed? And does your configure script detect PNG support? On Mon, 4 Mar 2002, Alex Bloor wrote: > Hi, > > Thanks for reading this message. I am having great difficulty recompiling > php 4.1.2 + apache

Re: [PHP] ploblem with safe_mode_include_dir

2002-03-04 Thread Rasmus Lerdorf
open_basedir doesn't take a list of paths. On Mon, 4 Mar 2002, Renato Lins wrote: > Some one can help me. Why this is not working ? > > > > # apache conf > > php_admin_flag safe_mode on > php_admin_value safe_mode_include_dir "/myuser/safe/" > php_admin_value doc_root "/myuser/public_html/"

Re: [PHP] ID variable alsways set

2002-03-03 Thread Rasmus Lerdorf
Do a phpinfo() and check to see if you perhaps have a cookie with the name "id" set with the value "1". If your look at variables_order in your php.ini file, you will see that cookie data will override get-method data. To force a read from the GET data, use $_GET['id'] instead of $id. -Rasmus

Re: [PHP] ignore_user_abort

2002-03-03 Thread Rasmus Lerdorf
Which version of PHP? I just tested it and it works just fine for me. How exactly do you know the script is not finishing? Try a test like this: \n"; flush(); fputs($fp,"Line $i\n"); fflush($fp); sleep(1); } ?> Load up this file. You should see it start wri

Re: [PHP] 4.1.2 transitional blues

2002-03-02 Thread Rasmus Lerdorf
Check that register_globals = On in your php.ini file. On Sun, 3 Mar 2002, cyberskydive wrote: > yayy i had my virtual server upgraded to php 4.1.2! > > oh wait.. nothings F#*&ing working now! > > a simple dropdown menu- leading to a page containing: > > header("location:$location"); > exit

Re: [PHP] A Small Bug Giving Me A Big Headache

2002-03-02 Thread Rasmus Lerdorf
Well, add this and tell us what it says: if(!$cursor) echo odbc_error($db).": ".odbc_errormsg($db); right after that odbc_exec() call. *always check for errors - and when you get one, show it!* -Rasmus On Sat, 2 Mar 2002, Dr. Shim wrote: > I've tried, and tried. Reread, and reread. I can't a

Re: [PHP] Sending a file with fpassthru() or readfile(), causes IEto hang.

2002-03-02 Thread Rasmus Lerdorf
I don't see how this can be a PHP problem. If you say that a similar script written in Perl doesn't cause this, then simply compare the output of the Perl one to the PHP one and make sure they are sending the same thing. If your IE browser gets confused with the PHP version then it must be sendi

Re: [PHP] Web Cam Support

2002-03-02 Thread Rasmus Lerdorf
I will be setting one up next week so should have more for you then. But there really isn't much for PHP to do here. Basically you need something like camstream to regularly create an image somewhere and then a little meta-refresh page that reloads that image. You are unlikely to be able to str

RE: [PHP] Re: php 4.1.1 vs 4.0.6

2002-03-02 Thread Rasmus Lerdorf
> I have a site that uses a $HTTP_POST_VARS['var_name'], > $HTTP_GET_VARS['var_name'] and $HTTP_SERVER_VARS['var_name'] all over the > place (there is more PHP in there than flat HTML :) and more than a handful > of references to $HTTP_USER_AGENT, $PHP_AUTH_*, $PHP_SELF, etc > Is there anythin

RE: [PHP] Re: php 4.1.1 vs 4.0.6

2002-03-02 Thread Rasmus Lerdorf
You will always be able to turn register_globals on. Completely removing that feature would make it impossible to ever run a lot of code written for PHP. Some will argue that this is a good thing, but ultimately it is not for us to say. When you turn register_globals on, $HTTP_* do not disappea

Re: [PHP] PHP4.1.2

2002-03-02 Thread Rasmus Lerdorf
> Anyone have any ideas or similar problems? I just built a server yesterday for IMP. My PHP configure line was: './configure' \ '--with-pdflib=/usr/local' \ '--with-gd=/home/rasmus/gd-2.0.1' \ '--with-jpeg-dir=/usr' \ '--with-freetype-dir=/usr' \ '--enable-gd-native-ttf' \ '--enable-gd-imgstrt

Re: [PHP] can I sandwich html docs with PHP

2002-03-01 Thread Rasmus Lerdorf
> > Using mod_perl I can write a module for any phase that Apache > > goes through while handling a request. Based upon any variables I > > want, I can tell Apache to have my module handle one of those > > phases. So when you request this url for example: > > > > http://www.mydomain.com/joe.html >

Re: [PHP] PHP and passwords

2002-03-01 Thread Rasmus Lerdorf
No, that is not a good idea. It is potentially much worse to allow people to execute include files out of context than to merely let them see them. The correct way to handle this is to either put your include files outside the document_root, or add an Apache rule to block any direct access to .in

Re: [PHP] safe mode and file handling

2002-03-01 Thread Rasmus Lerdorf
The easiest way to make this work is to use open_basedir settings instead of safe_mode. Safe_mode is specifically created to prevent you from doing what you are trying to do. -Rasmus On Fri, 1 Mar 2002, Mika Lindqvist wrote: > I and my www space provider have fought with a problem. All > files

Re: [PHP] compile php with GD2

2002-03-01 Thread Rasmus Lerdorf
You never put "lib" in a PHP configure flag. Read the INSTALL file carefully, please. It should just be --with-gd=/usr since it also needs to find the gd header files which are nowhere under /usr/lib On Fri, 1 Mar 2002, Hendrik wrote: > hi there, > > i tried to compile php with GD2 support and

Re: [PHP] patching a lower version.

2002-02-28 Thread Rasmus Lerdorf
So download 4.0.6 and patch that. Or walk through the patch manually and apply the relevant bits to the rfc1867.c file. On Thu, 28 Feb 2002, Steven Deaton wrote: > I'm trying to use the file upload patch..on 4.0.4pl1 > but it only says its for 4.0.6.so will it not work on 4.0.4pl1?

Re: [PHP] Inserting leading 0 infront of a variable

2002-02-27 Thread Rasmus Lerdorf
$leading_digits = '0' . $leading_digits; although what you probably want is strpad() or sprintf() On Thu, 28 Feb 2002, Andy wrote: > Hi guys, > > is there a possibility to add a string in front of a veriable like the .= > commands adds it to the end? I would like to create a 6 digit number out

Re: [PHP] compiling with all options

2002-02-27 Thread Rasmus Lerdorf
Not really, no. On Wed, 27 Feb 2002, Henning Sprang wrote: > hy all, > is there an easy way to compile php with all possible extension and > feature options, as far as they don't crash when used together, and, > even better as far as the libs are available on the system? > > > tia, > henning > >

Re: [PHP] http header reference

2002-02-26 Thread Rasmus Lerdorf
These are all HTTP request headers. See the HTTP spec for details. They have nothing to do with PHP. -Rasmus On Tue, 26 Feb 2002 [EMAIL PROTECTED] wrote: > Hi all, > > I'm debugging a php script that is using several environmental vars that I'm not >familiar with: > HTTP_VIA > HTTP_CONNECTIO

Re: [PHP] Installing PHP4.1.1 on RH7.2 impossible!

2002-02-24 Thread Rasmus Lerdorf
See http://www.php.net/~rasmus/gd.html On Sun, 24 Feb 2002, Andy wrote: > Hi there, > > I am a Linux newbie and I would reallly like to get this thing working on > RH7.2 But it does not work out! > > A "normal" PHP4.1.1 installation works. But I need gd2.0 and JPEG support. > Thats where my know

Re: [PHP] login determines content on page

2002-02-22 Thread Rasmus Lerdorf
Well, if $submit_happening is set to 0, "0" or false then if($submit_happening) will evaluate to false while if(isset($submit_happening)) will evaluate to true As the documentation (please read http://www.php.net/isset) isset() returns true if the variable exists and false if it doesn't. -Rasmu

Re: [PHP] PHP-4.1.1 and freetype 2

2002-02-22 Thread Rasmus Lerdorf
It does only fix the anti-aliasing problem. ImageFtText() works fine. On Fri, 22 Feb 2002, Ernie Dipko wrote: > Do I need Wes's patch for gdImageStringFTEX to work??? I was mistaken, I > thought the patch only fixed the anti-aliasing problem? > > > "Rasmus Lerdorf"

Re: [PHP] Apache 2.0.32 + PHP from CVS not working

2002-02-22 Thread Rasmus Lerdorf
> From the list, the APR API is done. So there should be no further issues > getting it to work.(As in, you should no longer have to jump through > hoops every month or release, just to keep up with apr). Well, this is simply not true. Things are still changing. -Rasmus -- PHP General Mailin

Re: [PHP] PHP-4.1.1 and freetype 2

2002-02-22 Thread Rasmus Lerdorf
> > > > INCLUDEDIRS=-I. -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/i > nclude/X11 -I/usr/X11R6/include/X11 > > LIBDIRS=-L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/lib > > > > Did I miss something...Is my INCLUDEDIRS correct for the

Re: [PHP] header problem

2002-02-22 Thread Rasmus Lerdorf
You can't redirect after sending output unless you use Javascript or some other weirdness. Redirections are done before any output. -Rasmus On Fri, 22 Feb 2002, Michael P. Carel wrote: > Hi , > > I have a problem in using the Header() function. I want to automatically > redirect the page into

Re: [PHP] Creating methods runtime

2002-02-22 Thread Rasmus Lerdorf
You can sort of fake it using the call handler of the overload extension. -Rasmus On Thu, 21 Feb 2002, Mika Tuupola wrote: > > Is there a way to create/add methods runtime to a class via > constructor or static factory method? I know it is possible > to create functions runtim

Re: [PHP] Apache 2.0.32 + PHP from CVS not working

2002-02-21 Thread Rasmus Lerdorf
It won't work simply because Apache 2.0 is very much in a state of flux. The API's change constantly. We are many months away from any sort of stable Apache2+PHP system. Unless you are a developer and can help fix problems, you are much better off sticking with Apache 1.3.x and not bugging the d

Re: [PHP] How do you setup cacheing?

2002-02-21 Thread Rasmus Lerdorf
What you are looking for is called a "Reverse Proxy". Do some google searches on that term. -Rasmus > I have been trying to figure this out for a week now, with no luck. Posts > to [EMAIL PROTECTED] have gotten no response. Anyone here happen to > know how to do this? > > I understand that Ap

Re: [PHP] overwriting PHP_SELF and PHP_AUTH_xxxx

2002-02-21 Thread Rasmus Lerdorf
Well, in this particular case it really makes no difference as PHP_AUTH_* is data that comes from the user anyway. Whether it is sent in the GET-method data or in the Authenticate header is completely irrelevant and turning register_globals off does not make any difference whatsoever. The reason

Re: [PHP] PHP-4.1.1 and freetype 2

2002-02-21 Thread Rasmus Lerdorf
Are you trying to draw TTF fonts on a truecolor image? If so, GD-2.0.1 has a bug which turns of anti-aliasing of the fonts in that case. GD-2.0.2 will have the fix. For now, try it with a non-truecolor image and I bet the font will look just fine. You can also ask Wes Furlong nicely for the pat

Re: [PHP] PDF Fonts Files

2002-02-20 Thread Rasmus Lerdorf
You need to sit through my PDF/PHP talk where I go through all this. See conf.php.net/paris2 specifically slides 7 and 8 In particular see the example: http://conf.php.net/pres/slides/intro/pdf_font_ex2.php the code for which is on slide #8. This example shows how to use each of the built-in

Re: [PHP] Unicode TTF Font wingding's just don't cut it!

2002-02-20 Thread Rasmus Lerdorf
> Does anyone know where I can get a simple symbol font which is .ttf and > "unicode" compatible. Seems that my php graphic program is very > sensitive to ttf problems. It'll take one or two wingdings in > imagettftext() before it up and dies. Your help will be greatly > appreciated. Dies? How s

Re: [PHP] Get an application/octet-stream from a java applet

2002-02-20 Thread Rasmus Lerdorf
Grab a recent PHP release and in your php.ini file add: always_populate_raw_post_data = On -Rasmus On Wed, 20 Feb 2002, Nicolas Boutet wrote: > Hi all, > I'm trying to make a script to get "application/octet-stream" datas from a > java applet. The method used by the applet is POST and I tried

RE: [PHP] Re: Weather Scripts

2002-02-19 Thread Rasmus Lerdorf
> Sorry, I forgot to mention that I would be willing to get the > information off either METAR or any other source that provides the raw > data for the forecasts. I am in australia and the Bureau of Meteorology > provides annoymous ftp access to a raw data text file for this > information as well.

Re: [PHP] Difference between two dates

2002-02-19 Thread Rasmus Lerdorf
This will give you the difference between the two dates in seconds: $diff = strtotime(str_replace('-','/',$str1)) - strtotime(str_replace('-','/',$str)); -Rasmus On Wed, 20 Feb 2002, Uma Shankari T. wrote: > > > > Hello, > > How can i find out the difference between two dates. > > I am h

Re: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Rasmus Lerdorf
This creates all the variables you asked for and also prints each one in a column of a table. foreach($row as $key=>$val) { $$key = $val; echo "$val"; } -Rasmus On Tue, 19 Feb 2002, Baloo :0) wrote: > How can I assign automatically all fields of a database to a variable of > the same n

Re: [PHP] Getting an RGB value of a pixel (JPEG)

2002-02-19 Thread Rasmus Lerdorf
ImageColorsForIndex() and ImageColorAt() But you will PHP 4.1 for these functions to work with TrueColor images. -Rasmus On Tue, 19 Feb 2002, Baumann Reto wrote: > Hi there > > > I have to get an RGB value of a specified pixel in an JPEG image. This image > uses 24bit per pixel (so is true-co

Re: [PHP] Change gif image with php

2002-02-16 Thread Rasmus Lerdorf
> Rodrigo, > I've been struggling with this for some time, so here goes: > > The php4 builds do not support .gif files, you'll need to change your files > to .jpg or .png format, or use php3 (I can't change to php3). This is not true. GIF support depends solely on the version of the GD library

Re: [PHP] last char in string?

2002-02-14 Thread Rasmus Lerdorf
http://php.net/substr $rest = substr("abcdef", 0, -1); // returns "abcde" -Rasmus On Thu, 14 Feb 2002, marcbey wrote: > hello php guys, > > how can i delete the last char in a string? > > thanx > > > -- > --- > magic garden GmbH - Agentu

Re: [PHP] SAPI (Apache 2) question & connection pooling

2002-02-01 Thread Rasmus Lerdorf
> On Fri, Feb 01, 2002 at 09:14:24AM -0800, Rasmus Lerdorf wrote: > > > a) if Apache 2 is a single-process server (as opposed to Apache 1.x which > > > forks a new process for a new request) > > > > It is a hybrid server which can be anything from one to the oth

Re: [PHP] SAPI (Apache 2) question & connection pooling

2002-02-01 Thread Rasmus Lerdorf
> a) if Apache 2 is a single-process server (as opposed to Apache 1.x which > forks a new process for a new request) It is a hybrid server which can be anything from one to the other. > b) if PHP will work, or does work, with Apache 2 in this mode It works today. > c) how database connection p

Re: [PHP] add on's to php

2002-01-31 Thread Rasmus Lerdorf
You can add modules on the fly today using dl() or semi-on-the-fly by adding them to php.ini and just restarting the web server. You don't need to recompile php to add any of these modules. -Rasmus On Thu, 31 Jan 2002, Kunal Jhunjhunwala wrote: > Hey, > I was wondering, if it would be possible

Re: [PHP] connection_aborted() ?

2002-01-31 Thread Rasmus Lerdorf
> can anone show me a good example how to use this function? > I'm not really sure how it works it only makes sense to use if your turn off user aborts. -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Re: [PHP] gd library 1.6 or younger

2002-01-30 Thread Rasmus Lerdorf
google for gd-1.8.3gif On Wed, 30 Jan 2002, Ed Lazor wrote: > I'm trying to play with the gif functions this program supports. I'm > having trouble finding it. Could someone e-mail it to me? > > Thanks, > > -Ed > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-

Re: [PHP] Install wddx extention for php 4.1.1

2002-01-25 Thread Rasmus Lerdorf
Try leaving off the --with-expat-dir switch completely. PHP comes with its own expat. On Fri, 25 Jan 2002, Ziying Sherwin wrote: > > We tried to install php 4.1.1 with wddx support on our Solaris 2.8 with > gcc 3.0. We installed expat library 1.2 (download from > http://www.jclark.com/xml/expat

RE: [PHP] Question: $_* etc or $HTTP_*_VARS etc

2002-01-25 Thread Rasmus Lerdorf
http://www.php.net/manual/en/features.file-upload.php $HTTP_POST_FILES or $_FILES -Rasmus On Fri, 25 Jan 2002, Gonzalez, Zara E wrote: > To add on to this question, I have an upload script that I use on my site and > now that I have registered globals off, I can't seem to find where the > auto

Re: [PHP] wierd function behavior within classes.. Bug?

2002-01-24 Thread Rasmus Lerdorf
PHP does not support having multiple methods with the same name. Write a single method and check the number of args in that. -Rasmus On Thu, 24 Jan 2002, Marc Swanson wrote: > I'm not sure if this is a known feature in php.. but the following code will > generate this warning: Warning: Missin

Re: [PHP] RFE: $HTTP_POST_VARS =& $_POST;

2002-01-24 Thread Rasmus Lerdorf
I think the real answer here is to treat these as read-only arrays. ie. never use them on the left side of the '=' and you will never run into problems. Or if you do, be consistent and use the same array all the time. You are writing your code with the assumption that these two arrays are the s

Re: [PHP] MySQL queston - Which row does it put your info into?

2002-01-24 Thread Rasmus Lerdorf
That's how databases work. There is no implied ordering internally. An order is only applied if you add an "order by" clause on a select. -Rasmus On Thu, 24 Jan 2002, Phil Schwarzmann wrote: > When Im adding rows into my MySQL database using PHP, it seems to put > them in random places in the

RE: [PHP] Re: eval()

2002-01-20 Thread Rasmus Lerdorf
> while (list($opid, $ppid, $amount, $pname) = mysql_fetch_row($res)) { > $eval = '$temp["'.$pname.'"] = $temp["'.$pname.'"] + '.$amount.';'; > eval($eval); > $i++; Whoa... Why not simply: $temp[$pname] += $amount; ?? -Rasmus -- PHP General M

Re: [PHP] PHP Security - "view source code"

2002-01-17 Thread Rasmus Lerdorf
> On Wednesday, January 16, 2002, at 08:04 PM, Rasmus Lerdorf wrote: > > > No, it is safer to block access to .inc files with an httpd.conf rule. > > Allowing people to execute files that were meant to be included out of > > context could end up being much more dang

Re: [PHP] PHP Security - "view source code"

2002-01-16 Thread Rasmus Lerdorf
> On Thu, 17 Jan 2002, [EMAIL PROTECTED] wrote: > > > I've seen a number of sites for example that didn't have the .inc extension >registered, > > include() doesn't care about that, but if your includes are under the document >root of your > > website (that happens a lot too, i don't know why ?

Re: [PHP] Mail() Timeout

2002-01-16 Thread Rasmus Lerdorf
Fix your sendmail flags in your php.ini file to just queue up the mail. On Wed, 16 Jan 2002, Ben Sinclair wrote: > Is there a way to shorten the timeout for the mail() function? Currently it > will wait too long when it is unable to send mail, causing the browser to > appear to hang. > > -- > Be

Re: [PHP] security benefits of predefined variables

2002-01-16 Thread Rasmus Lerdorf
> You can see where I'm going with this. > Experiments of mine with using array elements within SQL statements > brought some of my questioning to the list just last week. I found that > the following did not work: > > $sql = "SELECT table.column FROM table WHERE criteria LIKE > $myrow['variable'

RE: [PHP] security benefits of predefined variables

2002-01-16 Thread Rasmus Lerdorf
> If you are careful, you can defend against Scenario 1 with register_globals > on, but you need to understand all the stuff that PHP is doing with the > data, and that is a fairly complicated picture. Your application can still > work even if you don't understand that picture, and that is how uns

Re: [PHP] Question about HTTP_ENV_VARS, PHP, and Apache

2002-01-15 Thread Rasmus Lerdorf
This has been discussed a number of times here. Apache will always inherit the environment of the user that starts it. You should start it with a clean environment. ie. add "env -i" to whatever script starts your httpd server. -Rasmus On Tue, 15 Jan 2002, Michael Sims wrote: > This may be more

RE: [PHP] Compile problems php 4.1.1

2002-01-15 Thread Rasmus Lerdorf
Redhat's apxs was broken years ago in RH 6.0 or some version like that. But since then the apxs from the apache-devel package has been fine. -Rasmus On Tue, 15 Jan 2002, Simon Ritchie wrote: > > I'm trying to compile php 4.1.1 and when it gets to the > > --with-apxs option it errors out with th

Re: [PHP] Content

2002-01-15 Thread Rasmus Lerdorf
Grab the latest version of PHP. There is a new php.ini directive called always_populate_raw_post_data which when turned on forces all post data to be available through the $HTTP_RAW_POST_DATA variable. -Rasmus On Tue, 15 Jan 2002, Daniel C. Sobral wrote: > I have a little problem I have been t

Re: [PHP] Compile problems php 4.1.1

2002-01-14 Thread Rasmus Lerdorf
You don't mention which OS you are on, but usually apxs is found in the apache-devel package. You probably didn't install that. -Rasmus On Mon, 14 Jan 2002, Jay Paulson wrote: > I'm trying to compile php 4.1.1 and when it gets to the --with-apxs option it errors >out with the following: > > S

Re: [PHP] SELECT DAYOFYEAR(NOW())

2002-01-13 Thread Rasmus Lerdorf
This doesn't appear to be a PHP question. Are you sure you are on the right list? On Sun, 13 Jan 2002, sundogcurt wrote: > Hi! I'm storing a date in this format : > > 2002-01-13 11:08:40 > -mm-dd hh:mm:ss > > This is great because it gives me the date and the time, which I need. > I want to

Re: [PHP] Re: [PHP-DEV] Re: strtok bug

2002-01-13 Thread Rasmus Lerdorf
You call it broken, we call it finally making them POSIX-compliant. Whatever floats your boat. -Rasmus On Mon, 14 Jan 2002, Manuel Lemos wrote: > Hello, > > Alain Samoun wrote: > > > > Manuel: > > What is broken with strtok() since php4.06? So far my code that use it seems > > to work ok with P

Re: [PHP] Slow references?

2002-01-13 Thread Rasmus Lerdorf
copies are faster if you don't change the copied data since no copy is actually done. It is a shallow copy also know as a copy-on-write so you should just pass a copy in your case, I bet. -Rasmus On Mon, 14 Jan 2002, Tino Didriksen wrote: > Is it just me, or is working with references slow? >

[PHP] Re: [PHP-DB] Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread Rasmus Lerdorf
ld consider using SQL commands in >favor of implementing > identical functionality in PHP (and possibly in some situations, vice-versa)? > > Regards, > =dn > > > > - Original Message - > From: "Rasmus Lerdorf" <[EMAIL PROTECTED]> > To: "Sander Pete

Re: [PHP] convert yyyy/mm/dd to mm/dd/yyyy, how?

2002-01-13 Thread Rasmus Lerdorf
MySQL has plenty of functions to return dates to you in any format you specify. Please read http://mysql.com/documentation/mysql/bychapter/manual_Reference.html#Date_and_time_functions and pay special attention to the DATE_FORMAT() function. -Rasmus On Sun, 13 Jan 2002, Sander Peters wrote:

Re: [PHP] 4.1.1 Causes Signal 11 On FreeBSD 4.5 / Apache 1.3.22

2002-01-13 Thread Rasmus Lerdorf
> I am experiencing a lot of Signal 11's when I compile PHP 4.1.1 into my > Apache server on my FreeBSD 4.5-RC machine. If I compile the -exact- same > Apache configuration with PHP 4.0.6, it works fine. As soon as I switch to > 4.1.1, it causes Signal 11's (and sometimes 10's) when I load certa

<    5   6   7   8   9   10   11   12   13   14   >