Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
Done that, doesn't work! Brave Cobra - Original Message - From: Toby Dacre [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 3:29 AM Subject: Re: [PHP] Image Upload?? chmod the file or directory so that php can access it it doesn't run as you! -- PHP

[PHP] Re: php propaganda request

2001-05-16 Thread Sara Young
There are also PHP case studies at http://www.zend.com/zend/cs/ Sara On 15 May 2001, at 8:27, Philip Olson wrote: Greetings PHP friends, I'm compiling a list of PHP related propaganda, please send any that you know of. Positive, Negative, Neutral ... all is welcome! ;-) Thus far :

[PHP] Deleting 1 file line

2001-05-16 Thread Tarrant Costelloe
Does anyone know what the code is, if you wanted to specify a specific line in a file to delete and also to wipe clean the entire file? Thanks in advance! Taz -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: [PHP] need some ideas here...

2001-05-16 Thread James Holloway
Hi Christian, I have an account with f2s.com that I use for sampling scripts with - I set up a mailform yesterday after reading this, using mail() to send the email to myself. It got here - albeit 6am today (I sent it yesterday lunchtime) Perhaps you're using the mail() function

Re: [PHP] Deleting 1 file line

2001-05-16 Thread elias
Good question. Never had to face such problems before... but what I can do actually is: 1) Read file into variable till i reach that line 2) Skip that line 3) Continue reading till eof 4) writting back the buffer to the file. Basically use file() then preg_replace() then fopen() fwrite()

[PHP] PHP for Win

2001-05-16 Thread elias
Any easy way to call Win32 API functions yet? -elias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP] Uptime script?

2001-05-16 Thread Patrik Wallstrom
On Wed, 16 May 2001, Ben Cairns wrote: I know I've seen one before, and before I go write my own version, does anyone know of a PHP script that echoes the uptime of a server (Linux) in days,hour,minutes, etc? Does anyone know a script to do this under WinNT? For Linux it is easy, just read

[PHP] zlib or gzip compression?

2001-05-16 Thread Alex Dupre
What are the differences between output_handler = ob_gzhandler and zlib.output_compression = On ? Alex Dupre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

[PHP] Shopping with variables

2001-05-16 Thread Tarrant Costelloe
I am currently just messing around with a basic shopping cart, but have stumbled onto a problem. Bascially there is three input boxes all name DVD, VIDEO, CD and these are also variables. Once the user has said they wanted 15 cd's for example, the form then takes them onto the shop.php. Which

[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo
?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ? This prints out, You have bought 16 - Thank you for example, see the problem? How do I get it to print the variable name not just it's value? Try with replacing your print with the following one: print( You have

Re: [PHP] Shopping with variables

2001-05-16 Thread Vitali Falileev
Hello Tarrant, Wednesday, May 16, 2001, 12:12:43 PM, you wrote: TC ?php print( You have asked to purchase $dvd $video $cd 's - Thank you) ? TC This prints out, You have bought 16 - Thank you for example, see the TC problem? How do I get it to print the variable name not just it's value? Use

[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo
Thanks Gabriele :) Whilst waiting for your e-mail I figured out another way...Thought I would show you it just in case you ever find the need to use this alternative: ?php print( You have asked to purchase . ($dvd ? DVD: $dvd :''). ($video ? Video: $video :''). ($cd

RE: [PHP] Shopping with variables

2001-05-16 Thread Ralph Guzman
Might want to reconsider the way you are doing this, since this may not be the most efficient way. An alternative might be to do this as follows: In your web form set a field for Quantity and another for Item Name, so for example: FORM ACTION=script_name.php METHOD=post ... Quantity: INPUT

Re: [PHP] nested functions

2001-05-16 Thread Hannes Schmiderer
elias wrote: good question...I might need an answer when you get one. Why? Ok, I have a perl-counter script which is included to shtml-pages with SSI. Now I want to add some PHP pages to my site. So I need a PHP-function that does the same as the perl-script does. In the script I have a lot of

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
Maybe I ought to mention that I don't have direct access to this server. It's a F2S account, I'm trying to upload to. BC - Original Message - From: Brave Cobra [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 10:01 AM Subject: Re: [PHP] Image Upload?? Done that,

[PHP] Detect screen size

2001-05-16 Thread Mark Lo \(3\)
Hi, I would like to know how to detect the screen size. I mean the viewing area. etc. 800x600, 1028x728... Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

RE: [PHP] Detect screen size

2001-05-16 Thread Maxim Maletsky
With javascript of course. Again, go to look for the codes of these free tracking systems. Like Extreme tracker. They've got those. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message-

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
And then I found the answer. The PHP module of the Apache server at F2S is running in Safe mode(like the error said), meaning that you can't do uploads in PHP. This safe mode prohibits that. The only alternative is uploading in CGI or Perl. Another challange to let PHP and CGI work together! BC

[PHP] MySQL database

2001-05-16 Thread \[Inf\] F!RE-WALL
Yo, I'd like to use a MySQL database on my website. If I look at the PHP details of my site (see for yourself at http://infinity.shrimpwars.be/phpinfo.php) it says under the MySQL section: enabled. Well, if I create a testpage with this as content: ? mysql_connect(localhost, , ) or die (unable

RE: [PHP] Detect screen size

2001-05-16 Thread Rudolf Visagie
Hi, script language=JavaScript !-- hide from none JavaScript Browsers function PassScreenWidth(what) { document.login_frm.screen_width.value=what } function GetScreenSize() { var screen_width = screen.width; return

Re: [PHP] MySQL database

2001-05-16 Thread Julia A. Case
first off, is the MySQL database running? you can do a ps -xa | grep mysql to see... second you need to enter a username and password on the mysql_connect line.. Hope this helps, Julia Quoting [Inf] F!RE-WALL ([EMAIL PROTECTED]): Yo, I'd like to use a MySQL database on my website. If I

Re: [PHP] MySQL database

2001-05-16 Thread Jack Dempsey
setup an account with a username and password and flush your privileges...see if you can login on the command line...after that works, then try it with php -jack [Inf] F!RE-WALL wrote: Yo, I'd like to use a MySQL database on my website. If I look at the PHP details of my site (see for

[PHP] I have a problem with phpMySqlAdmin

2001-05-16 Thread Enrique Ivorra Gómez
Sorry, but I dont speak Englich very well. I have Apache, PHP and MYSQL which work well but I want to use phpMySQLAdmin and I have an error: Fatal error: Call to undefined function: mysql_connect() in lib.inc.php on line 255 Can anybody help me? Bye! -- PHP General Mailing List

[PHP] Sending Output Buffer contents to PDFLib

2001-05-16 Thread Matthew M. Boulter
Heya guys, I've just started to play with PDFLib v3 and was primarily experimenting to enable me to produce PDF versions of our HTML files on demand. I.e., like some sites have a 'Print this article' button, I want a 'Make a PDF' button. I played with PDFLib and saw that to get text on the page

[PHP] Test, bitte löschen

2001-05-16 Thread ws
Test, bitte löschen

Re: [PHP] Image Upload??

2001-05-16 Thread James Holloway
From phpinfo() on f2s.com upload_max_filesize 2M So, something like, @copy($file, /path/to . $file_name) or die (Blam, something's up!); should work - haven't got time to try it at the moment. James. What am I doing wrong here? Is there a way to get around the temporary folder? Tnx

Re: [PHP] nested functions

2001-05-16 Thread Christian Reiniger
On Wednesday 16 May 2001 12:12, Hannes Schmiderer wrote: elias wrote: good question...I might need an answer when you get one. Why? Ok, I have a perl-counter script which is included to shtml-pages with SSI. Now I want to add some PHP pages to my site. So I need a PHP-function that does

Re: [PHP] nested functions

2001-05-16 Thread Hannes Schmiderer
What about using classes instead of outer functions? Classes provide rather nice (nestable) scoping. You're right! If I had written it from scratch classes would be the best way! Although, I'm a newbie and I haven't read the PHP object oriented capter yet ;-). Hannes -- PHP General Mailing

RE: [PHP] Shopping with variables

2001-05-16 Thread John Monfort
That will work, assuming the user is not allowed to purchase multiple items... -John On Wed, 16 May 2001, Ralph Guzman wrote: Might want to reconsider the way you are doing this, since this may not be the most efficient way. An alternative might be to do this as follows: In your web

Re: [PHP] I have a problem with phpMySqlAdmin

2001-05-16 Thread John Monfort
Is your MySQl server on? What platform are you on? Also, make sure your username, password, and database name, are correct. __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com The world is waiting, are

RE: [PHP] I have a problem with phpMySqlAdmin

2001-05-16 Thread Robert Covell
I would check to make sure that your php installation has mysql compiled in. Do this in phpinfo.php: ?php phpinfo(); ? And look to see how it was compiled and if Mysql is listed there and or in the list of valid options. Sincerely, Robert T. Covell President / Owner Rolet Internet Services,

Re: [PHP] MySQL database

2001-05-16 Thread \[Inf\] F!RE-WALL
Erm..I'm using windows. And euhI have MySQL installed, but I don't know if it's running. Anyway, the phpinfo() returns that MySQL is enabled.so I guess it must be working. Julia A. Case [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... first

Re: [PHP] MySQL database

2001-05-16 Thread \[Inf\] F!RE-WALL
Huh? What about Windows? Jack Dempsey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... setup an account with a username and password and flush your privileges...see if you can login on the command line...after that works, then try it with php -jack [Inf]

Re: [PHP] Uptime script?

2001-05-16 Thread Michael Kimsal
Ben Cairns wrote: I know I've seen one before, and before I go write my own version, does anyone know of a PHP script that echoes the uptime of a server (Linux) in days,hour,minutes, etc? Does anyone know a script to do this under WinNT? http://is-it-true.org/nt/atips/atips228.shtml

[PHP] bug? file(), newline (\n) comparison

2001-05-16 Thread Hannes Schmiderer
Hi! $astrData = file($astrCounterFile[$i]); echo |\n|br; echo | . $astrData[0] . |br; echo | . $astrData[1] . |br; //$astrData[1] = \n; //echo | . $astrData[1] . |br; echo | . $astrData[2] . |br; for($k = 0; strcmp($astrData[$k] , \n) ($k 50); $k++) // for($k = 0; ($astrData[$k] \n) ($k

Re: [PHP] need some ideas here...

2001-05-16 Thread Christian Dechery
At 09:27 16/5/2001 +0100, James Holloway wrote: Hi Christian, I have an account with f2s.com that I use for sampling scripts with - I set up a mailform yesterday after reading this, using mail() to send the email to myself. It got here - albeit 6am today (I sent it yesterday lunchtime)

[PHP] Compiled error.

2001-05-16 Thread Pellegrini Giuliano
linux 2.2.19 apache1.3.19,php-4.0.5,mod_ssl 2.8.2,mod_perl-1.25,mm-1.1.13 step a) compiled mm ./configure --disable-shared + make +make test + make install OK. step b) compiled mod_ssl CC=egcs CFLAGS=-O9 ... .configure --with-apache=../apache-source-tree

Re: [PHP] Image Upload??

2001-05-16 Thread Brave Cobra
But as you can see too : upload_tmp_dir has no value, so I'm guessing this won't work. I'm still getting errors with PHP, no problem in CGI though. BC - Original Message - From: James Holloway [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 2:47 PM Subject: Re:

[PHP] PDF

2001-05-16 Thread Keith Ng
Hi all, With regards to the PDF library, I'm wondering if there are any generators that generate the code for the pdf document instead of manually hard-coding everything. Or is there an easy way out by converting an already designed pdf document into the code which pdflib recognises? Thanks

[PHP] I have a problem with phpMySqlAdmin

2001-05-16 Thread Enrique Ivorra Gómez
I sent you my phpinfo(). I dont put on INTERNET becouse it's on a Intranet. System Linux porky.devel.redhat.com 2.2.5-22smp #1 SMP Wed Jun 2 09:11:51 EDT 1999 i686 unknown Build Date Aug 23 2000 Configure Command './configure' '--target=i386-redhat-linux' '--prefix=/usr'

[PHP] RE: Any Golive Users?

2001-05-16 Thread Tim Ward
My best advice is don't go near it. I spend a lot of time reworking stuff done in this and 90% of that is rewriting the crap html/javascript, not adding the php, which is relatively easy. Sorry to rant, and maybe the results are down to the user, but what I've come across has caused me a lot of

[PHP] Generate code bars

2001-05-16 Thread Sandra Ruivo Grilo
I have a problem: how can I generate code bars in php ? Thanks in advance, Sandra. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Generate code bars

2001-05-16 Thread Kurth Bemis
Code bars? like Barcodes? I do it with gd and free type with a barcode font. Works like a charm. Currently i'm looking at using it on an online ticking system for conventions. ~kurth On Wed, 16 May 2001, Sandra Ruivo Grilo wrote: I have a problem: how can I generate code bars in php ?

Re: [PHP] I have a problem with phpMySqlAdmin

2001-05-16 Thread Miles Thompson
Enrique, 1. Are you running MySQL and have you tested it at the console? 2. You do not have MySQL support compiled into PHP. See the last line of Configure Command where it says '--without-mysql'. You will have to recompile PHP with MySQL support. If you hae installed Apache, MySQL and PHP

Re: [PHP] bug? file(), newline (\n) comparison

2001-05-16 Thread Chris Lee
on my linux based system echo ord(\n); is 10 which is 0A in hex. windows machings usually consider newline to be 0A0D or 0D0A mac's usually are 0D I would convert your file. I have to do this often with file uploads. // convert all 0A0D and 0D0A to 0A0A $data = str_replace(chr(13), chr(10),

Re: [PHP] Sending Output Buffer contents to PDFLib

2001-05-16 Thread Chris Lee
I can't say this is for sure, but I am almost 100% sure adobe function, not a pdflib function to convert html - pdf. sorry I dnt have any recommendations, I had to write a special convert_pdf page for every page. -- Chris Lee [EMAIL PROTECTED] Matthew M. Boulter [EMAIL PROTECTED] wrote

Re: [PHP] Custom Session Func?

2001-05-16 Thread Chris Lee
common mistake, your session_register() is before you assign the variable, you must have it after. Ive done this myself. oi. session_start(); if ( ! session_is_registered(user_key) ) { $user_key = dummy; session_register(user_key); } I'll include my session file. this will

[PHP] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig
is it possible for a script to continue running after calling readfile()? I have a function that uses readfile(), after the file has been read, I need to update a database. Any reason my script would just stop executing? At first I thouht it may be a time limit, issue, but I set time limit to 0

[PHP] How can I enable magic_quotes_gpc without editing PHP.ini

2001-05-16 Thread SED
Hi, I need to enable magic_quotes_qpc for one session (or a script) but I can no access to the php.ini on the server. Is it possible to do it? And if so, how? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile:

[PHP] Inserting and Selecting an IMAGE from the DB

2001-05-16 Thread Felipe Moreno
Hi list members! I have a doubt regarding how can I INSERT and SELECT an IMAGE from a MYSQL database. I'm using , in the DB, the BLOB field, so, I will be able to receive binary data. Thnaks for any help! Best Regards, Felipe Moreno -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] How can I enable magic_quotes_gpc without editing PHP.ini

2001-05-16 Thread Keith Ng
In reply to [EMAIL PROTECTED]: Return-Path: [EMAIL PROTECTED] Received: from toye.php.net (va.php.net [198.186.203.51]) by cobalt1.intermedia.com.sg (8.10.2/8.10.2) with SMTP id f4GEsVZ09896 for [EMAIL PROTECTED]; Wed, 16 May 2001 22:54:31 +0800 Received: (qmail 7963 invoked

[PHP] sending mail alternatives...

2001-05-16 Thread Christian Dechery
I have an account at f2s.com and it seems to me that is IMPOSSIBLE to send mail... I've got answers from other users there that got it working... I don't know how below are listed all the things I've tried to do: 1 - use mail() function (even tested with the most basic

RE: [PHP] Custom Session Func?

2001-05-16 Thread Johnson, Kirk
Chris, is this requirement spelled out in the manual anywhere? I have never seen any effect of the order of calling session_register() and assigning a value in my own code. In fact, I almost always register a variable before assigning a value. Just curious. Kirk -Original Message-

[PHP] Re: ANN:Visual PHP Studio 1.0 Field Test 1 B156 New release!

2001-05-16 Thread Michael O'Neal
On Wed, 16 May 2001 00:28:21 +0200, José León Serna [EMAIL PROTECTED] successfully typed: Hello: The next release of Visual PHP Studio is out!!!. I have reserved the domain visualphpstudio.com and I have moved the web site to a new host to avoid some problems with the old one. The most

[PHP] working on array of different number of indices

2001-05-16 Thread Dennis Gearon
I want to pass in a scalar int, or an array of ints (indices) to a function in a class. The scalar or array will be a class variable. Without knowing the max size of each index, or the number of indices, (as is required is most other languages), I can't figure out how to access the array in a

[PHP] Why is there no socket support for Win32?

2001-05-16 Thread Todd
If I am incorrect in this belief, please tell me how to enable this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] bug? file(), newline (\n) comparison

2001-05-16 Thread Hannes Schmiderer
Ok, now I got it. I already knew that the newline is coded differently in Unix/Win/Mac. But I did not know, that in PHP on Win32 \n is 0D 0A when outputed, but 0A otherwise. Confusing... Hannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] Does anyone know where I can get mcrypt.dll?

2001-05-16 Thread Brandon Orther
Does anyone know where I can get mcrypt.dll? Thanks Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

[PHP] RE: Processing time in PHP. better to use php tags inline or print(html);

2001-05-16 Thread Merio, Quinn
Sorry to nag, i hadnt recieved any responses on this post yet.. would like to re-request.. I wanted to know if there is drawbacks or benefits to using the php alternate syntax? 1.) Is it possible (and if so, how do i) get the time it took to process the page (seconds or milliseconds)?

[PHP] Kill a cookie....

2001-05-16 Thread Tristan . Pretty
I am using setCookie(cookie1, $form_variable) Is there a command like killCookie? I am finding that my pages are remembering cookies after they are needed. I've looked on php.net, but couldn't find anything. Tris... **

Re: [PHP] RE: Processing time in PHP. better to use php tags inlineor pri nt(html);

2001-05-16 Thread Rasmus Lerdorf
Why don't you just benchmark both? On Wed, 16 May 2001, Merio, Quinn wrote: Sorry to nag, i hadnt recieved any responses on this post yet.. would like to re-request.. I wanted to know if there is drawbacks or benefits to using the php alternate syntax? 1.) Is it possible (and if so, how

Re: [PHP] Kill a cookie....

2001-05-16 Thread Rasmus Lerdorf
http://php.net/setcookie is quite clear on this subject, I think. -Rasmus On Wed, 16 May 2001 [EMAIL PROTECTED] wrote: I am using setCookie(cookie1, $form_variable) Is there a command like killCookie? I am finding that my pages are remembering cookies after they are needed. I've

AW: [PHP] Kill a cookie....

2001-05-16 Thread Sebastian Stadtlich
you kill a cookie by setting an emty one with the same name www.php.net/setcookie sebastian -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 16. Mai 2001 18:39 An: [EMAIL PROTECTED] Betreff: [PHP] Kill a cookie I am

Re: [PHP] working on array of different number of indices

2001-05-16 Thread Rasmus Lerdorf
On Wed, 16 May 2001, Dennis Gearon wrote: I want to pass in a scalar int, or an array of ints (indices) to a function in a class. The scalar or array will be a class variable. Without knowing the max size of each index, or the number of indices, (as is required is most other languages), I

[PHP] changing pixelsize of a picture via php

2001-05-16 Thread Andreas Pucko
Hi there, I am trying to change the size of picture (.jpg or.gif) on the server via php. In order to get a smaller file size for a thumb. Has anybody a idea how to do that?? Cheers Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: [PHP] Does anyone know where I can get mcrypt.dll?

2001-05-16 Thread Johannes Janson
Hi, Does anyone know where I can get mcrypt.dll? I'm not sure but it might be included in the dist from www.php4win.de johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the

[PHP] Sessions question.

2001-05-16 Thread Brandon Orther
Hello, Is there a way to get the name of each variable in a session? Thanks Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP] Shopping with variables

2001-05-16 Thread scott [gts]
why not use serialized arrays stored in cookies to store a growing list of things that the user is purchasing? then, it'd be as easy as having this array stored as a single cookie... ;) $items = array( #indexed by item ID '1003045' = array( 'name' ='The best

Re: [PHP] changing pixelsize of a picture via php

2001-05-16 Thread Rasmus Lerdorf
I am trying to change the size of picture (.jpg or.gif) on the server via php. In order to get a smaller file size for a thumb. Has anybody a idea how to do that?? The best way, albeit somewhat slow, is to use the new ImageCopyResampled() function provided by GD2. See

Re: [PHP] Sessions question.

2001-05-16 Thread Rasmus Lerdorf
Is there a way to get the name of each variable in a session? Just walk through $HTTP_SESSION_VARS -Rasmus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators,

[PHP] need help

2001-05-16 Thread Fai
Can anybody tell me what does the following mean? $path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) - 1); Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact

Re: [PHP] need help

2001-05-16 Thread Rasmus Lerdorf
Can anybody tell me what does the following mean? $path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) - 1); It's silly code written by someone who doesn't realize that the dirname() function exists. dirname(__FILE__) would do exactly the same thing. See php.net/dirname

RE: [PHP] need help

2001-05-16 Thread Johnson, Kirk
__FILE__ is a constant predefined by PHP. See http://www.php.net/manual/en/language.constants.php For help on the basename() function, see http://www.php.net/manual/en/function.basename.php Kirk -Original Message- From: Fai [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001

RE: [PHP] need help

2001-05-16 Thread scott [gts]
wow, that's quite a mouthfull ;) use dirname $path=substr(__FILE__, 0, strlen(__FILE__) - strlen(basename(__FILE__)) - 1); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list

Re: [PHP] Continue Script after readfile()

2001-05-16 Thread Rasmus Lerdorf
is it possible for a script to continue running after calling readfile()? I have a function that uses readfile(), after the file has been read, I need to update a database. Any reason my script would just stop executing? At first I thouht it may be a time limit, issue, but I set time limit

RE: [PHP] Inserting and Selecting an IMAGE from the DB

2001-05-16 Thread scott [gts]
use a BLOB field type read the docs for mysql, or whatever DB you happen to be using. -Original Message- From: Felipe Moreno [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 11:02 AM To: [EMAIL PROTECTED] Subject: [PHP] Inserting and Selecting an IMAGE from the DB

Re: [PHP] RE: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Ethan Schroeder
The following code is not mine, so I take no credit for it. It seems to work fine for me, though: ? class c_Timer { var $t_start = 0; var $t_stop = 0; var $t_elapsed = 0; function start() { $this-t_start = microtime(); } function

[PHP] RE: Sending attachments via mail()

2001-05-16 Thread Daniel BI
Yep, it was *very* much discussed last time :) first need to prepare your image to meet the base 64 and chunked standards: $content = chunk_split ( base64_encode ( $your_image ) ); then you need something like this in the additional header info of the php mail function: $boundary =

Re: [PHP] RE: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Ethan Schroeder
Sorry, I think that code got chopped off, try this: ? class c_Timer { var $t_start = 0; var $t_stop = 0; var $t_elapsed = 0; function start() { $this-t_start = microtime(); } function stop(){ $this-t_stop= microtime();

RE: [PHP] EREGI -- Help

2001-05-16 Thread Johnson, Kirk
Give this a try: if(!ereg(^([0-9]{5}([-]{1}[0-9]{4})?)$,$data)) { Kirk -Original Message- From: Jason Caldwell [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 8:16 PM To: [EMAIL PROTECTED] Subject: [PHP] EREGI -- Help I'm just trying to create a eregi expression that

RE: [PHP] RE: Processing time in PHP. better to use php tags inline or pri nt(html);

2001-05-16 Thread Merio, Quinn
Thank you for your help, gentlemen, sorry about the re-post. In case you were wondering about the results on that, the pages both processed at almost identical times: 0.0023289918899536 - 1st hit 0.0022320411682129 - refresh 2 0.0017479658126831 -refresh 3 Cheers, q. Quinn Merio

Re: [PHP] Continue Script after readfile()

2001-05-16 Thread Joseph Koenig
OK, I think I failed to see what was realling happening. The script is continuing after the readfile(), however, I want the page to reload after the file is done. The link that lets the user download the file is really a link to $PHP_SELF with some variables set. Everything in the script will

[PHP] PrimalScript Users

2001-05-16 Thread Phillip Bow
For anyone using PrimalScript as their IDE I have put together an updated php.sense file with mostly all(theoretically) the PHP functions available as of PHP 4.04pl1(the sense files are what allow the autocompletion of functions, and shows the param list). I have seen a lot of complaints about

Re: [PHP] zlib or gzip compression?

2001-05-16 Thread Jakob Kruse
As I understood it: performance. zlib.output_compression should be a lot more effective than using output_handlers. I don't really have a basis for comparing them, but I have been using zlib.output_compression since the day 4.0.5 was released and it works beautifully and very, very fast.

Re: [PHP] Uptime script?

2001-05-16 Thread Christian Reiniger
On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote: Why would you want to advertise that? Seems like you would be leaking information to crackers ... It's very difficult to imagine how 'uptime' information could be used to cause mischief... chris@server:~$ uptime 8:55pm up 45 days,

Re: [PHP] Passing vars between functions (with POSTs)

2001-05-16 Thread Rasmus Lerdorf
I've tried other ways but my problem still continues... I can not pass $login var out of the function. I don't have this problem in the two previous functions because I pass this variable as function argument, but this last function that doesn't have arguments I can't see the $login (even

[PHP] php as CGI

2001-05-16 Thread Beech Rintoul
Hi, I'm new to pgp and I'm trying to configure it as an Apache cgi. What do I need to put into the httpd.conf to enable it? I tried the example from the manual, but it doesn't work. Also will php3 scripts work in php4? I'm using php4 and apache-1.3.19 with mysql. Any assistance would be

RE: [PHP] Uptime script?

2001-05-16 Thread Ryan Christensen
That's what I was wondering.. hehe.. I just want to be able to show users that the server is stable.. (this is for a server-status page.. shows general information.. only for members of the site anyways.) Ryan -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]]

RE: [PHP] php as CGI

2001-05-16 Thread scott [gts]
you need to: ./configure [whatever options] make make test make install (as root) then you need to edit Apache httpd.conf appropriately and restart the daemon. then, it should work -Original Message- From: Beech Rintoul [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001

RE: [PHP] still not friends with RegExps..

2001-05-16 Thread scott [gts]
yes... i agree. if you know pregs, you have the added benefit of knowing how to write regexps for PHP *and* perl (should you ever have to program in perl) i personally prefer pregs becuase i think that the syntax is cleaner and more concise... -Original Message- From: Christian

Re: [PHP] Passing vars between functions (with POSTs)

2001-05-16 Thread Miguel Ribeiro
Thanks for your reply but for example, my problem is more like the following php3: ? $login=''; Function login() { global $login; echo('form enctype=multipart/form-data method=post action=test.php3?s=1'); echo(' pLogin/pinput type=text name=login size=10'); echo('input type=submit

[PHP] Permission Problems

2001-05-16 Thread John Vanderzwet
One of my scripts must create a directory, then a file in it. This part works great, although when another script tries to delete the file (and directory afterwards) it doesn't work because of the permissions. The user on the created file is 'httpd', from apache. The owner of the script is

Re: [PHP] Free Database Design Program

2001-05-16 Thread Chris Worth
That's a good plan. promote THEFT. maybe somebody will think if they crack your front door they then realize all the stuff in your house is free? On Sun, 13 May 2001 17:18:45 -0300 (EST), Augusto Cesar Castoldi wrote: The software can be really a freeware (better) or... can be

[PHP] deleting a file

2001-05-16 Thread Joseph Bannon
What is the file function to remove/delete a file from a server? Joseph Say I'm Hot! - Post Your Picture! http://www.sayimhot.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To

RE: [PHP] deleting a file

2001-05-16 Thread Johnson, Kirk
http://www.php.net/manual/en/function.unlink.php Kirk -Original Message- From: Joseph Bannon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 1:53 PM To: PHP (E-mail) Subject: [PHP] deleting a file What is the file function to remove/delete a file from a server?

[PHP] [annoucement] Smarty template engine 1.4.1 available

2001-05-16 Thread Monte Ohrt
A minor bug fix release. http://www.phpinsider.com/php/code/Smarty/ Version 1.4.1 - - fix LOCK_EX logic for all windows platforms (Monte) - fixed indexing by section properties with the new syntax. (Andrei) - updated Smarty to use absolute paths when requiring/including

Re: [PHP] Uptime script?

2001-05-16 Thread Ben Gollmer
Uptime.exe is available on the WinNT / Win2k resource kit. You can also download it here: http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default. asp On NT, you need at least Service Pack 4 to run it. Ben On Wednesday, May 16, 2001, at 01:55 PM, Ryan Christensen wrote:

Re: [PHP] References Object XML-Parser

2001-05-16 Thread Peter Dudley
I am new to PHP's OO (though not to OO or to PHP), but here's a fix and my assessment of why it works: In your tag functions, you need to change the $this reference to instead refer to your $xml_parser object, thus: function tag_open($parser,$tag,$attributes) { global $xml_parser;

Re: [PHP] Re-directing

2001-05-16 Thread B. van Ouwerkerk
If you're hosting on a apache box you could have something like DirectoryIndex start.php Forgot to mention: You can add this to .htaccess Bye, B. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP] \nhelp

2001-05-16 Thread jtjohnston
Hi, I am parsing the contents of a text file. I have certain lines that start with 4; I would like to attach these lines to the previous line as follows. But I don't know how. I figure I have to search and replace for \n4; but ... ? BEFORE: Here is an example of before. 4; here is the second

  1   2   >