[PHP] Problems benchmarking php Scripts

2001-08-21 Thread Jens Kisters
Hello together, I have been trying to benchmark the backend scripting for a flash online game, for this purpose i wrote another PHP Script that uses fopen to make exactly the same requests the flash movie would make with the same timing, and writes a log of the game session into a database. I run

Re: [PHP] mySQL Query - comparing multiple values with one field

2001-08-21 Thread David Robley
On Wed, 22 Aug 2001 16:21, Niklas Lampén wrote: > What I need to do is to compare if one field matches a value from a > huge list of values. > > Do I need to query like > "SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE > '%value2%'" or can I do it something like this > "SELECT * FRO

Re: [PHP] time

2001-08-21 Thread David Robley
On Thu, 23 Aug 2001 16:11, nafiseh saberi wrote: > hi. > how do I can wrk with time: > > 11:56:23 - 10:00:45 = > > thanks. Have a look at the date and time functions - convert the time to seconds and do the calculation (mktime) then turn it back to whatever format you like. -- David Roble

[PHP] thanks

2001-08-21 Thread nafiseh saberi
thanks for time and pg_dump. nafiseh. -- 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] transfer tables to another database?

2001-08-21 Thread speedboy
> hi. > I want to transfer tables to another database. > how?? Have you read the documentation on backing up and restoring databases/tables in postgresql? http://www.ca.postgresql.org/users-lounge/docs/7.1/admin/backup.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-m

[PHP] Re: time

2001-08-21 Thread Raphael Pirker
convert both to a timestamp... check http://www.php.net/manual/en/function.mktime.php for more info -- 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

Re: [PHP] time

2001-08-21 Thread speedboy
> hi. > how do I can wrk with time: > > 11:56:23 - 10:00:45 = Don't ask this again. Date: Mon, 20 Aug 2001 19:14:41 +1000 (EST) From: speedboy <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: [PHP] time in php > hi. > how I compare two times with php? > 12:23:50 - 13:12:00 = ??? Co

[PHP] re:transfer tables to another database?

2001-08-21 Thread nafiseh saberi
hi and thanks. I work with postgres with php. best regards. love your enemies that cause to work harder. I am from IRAN. thanks again. -- 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] mySQL Query - comparing multiple values with one field

2001-08-21 Thread Niklas Lampén
What I need to do is to compare if one field matches a value from a huge list of values. Do I need to query like "SELECT * FROM table WHERE field LIKE '%value1%' || field LIKE '%value2%'" or can I do it something like this "SELECT * FROM table WHERE field LIKE ('%value1%' || '%value2%')"? Nikla

Re: [PHP] transfer tables to another database?

2001-08-21 Thread David Robley
On Thu, 23 Aug 2001 16:07, nafiseh saberi wrote: > hi. > I want to transfer tables to another database. > how?? > > thanks. Without knowing what DB package you are using - use whatever tool you have (in mysql it's mysqldump) to dump the data, then use ? to reload it into the new database; assum

[PHP] time

2001-08-21 Thread nafiseh saberi
hi. how do I can wrk with time: 11:56:23 - 10:00:45 = thanks. -- 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] transfer tables to another database?

2001-08-21 Thread nafiseh saberi
hi. I want to transfer tables to another database. how?? thanks. -- 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] array

2001-08-21 Thread David Robley
On Wed, 22 Aug 2001 15:34, Chris Herring wrote: > I'm trying to get an array to read the text from a file, and so far it > isn't working. If you can help me, respond. > > > $fp = fopen ("./file.txt", "r"); > $text = array ($fp); > sort ($text); > reset ($text); > while (list ($key, $val) = each (

[PHP] COM

2001-08-21 Thread Paul S.
I heard refs on using the COM interface to access MS Word files. Is this a procedure an interface that only works on Windows systems (as that is where Word runs)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

[PHP] array

2001-08-21 Thread Chris Herring
I'm trying to get an array to read the text from a file, and so far it isn't working. If you can help me, respond. $fp = fopen ("./file.txt", "r"); $text = array ($fp); sort ($text); reset ($text); while (list ($key, $val) = each ($text)) { echo "[".$key."] ".$val; echo ""; } fclose ($f

Re: [PHP] Re: if statement and imageline()

2001-08-21 Thread Hugh Danaher
Richard, Without the code below, I get a good .jpg file and it displays nicely. But, with the IF statement in, I get a time out error message "Execute time exceeds 30 seconds..." I think it is because two of the variables are declared after the IF statement, even though they aren't being used o

RE: [PHP] Unable to use fopen to read a URL - DNS Problem?

2001-08-21 Thread Dave
check that apache is doing name resolution?? stab in the dark there. can you do includes from other locations using names? dns on the Ip address that apache/php is sitting on resolving correctly? >-Original Message- >From: Brian White [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, August

RE: [PHP] Why lynx don't work with cron?

2001-08-21 Thread Dave
you are talking about two completely different applications(as mentioned in post)... one is a cron job to do something (unspecified) which requires executable PHP (a la CGI) to point the file to the other (recent post) discusses using lynx to parse a site which is IMO a bad move in either case..

[PHP] problem with $HTTP_POST_FILES

2001-08-21 Thread Jason Dulberg
I am working on an image upload script and I've tried to use the variables from $HTTP_POST_FILES however it seems that no matter how I try to get the variables, they are always empty -- even though they are populated when checking phpinfo(); HTTP_POST_FILES["binFile"] Array ( [name] => arrow-blo

Re: [PHP] Why lynx don't work with cron?

2001-08-21 Thread Rob Hardowa
Hiya, I was waiting for someone to answer this question but it hasn't happened yet. I was using this a couple years ago to get a weather page from http after the ftp site with the raw text disappeared. Rest assured this has NOTHING to do with php and everything to do with lynx. I ran my scr

Re: [PHP] Re: chicken and egg problem with SID

2001-08-21 Thread Egan
On Tue, 21 Aug 2001 19:41:29 -0500, "Richard Lynch" <[EMAIL PROTECTED]> wrote: >> I can generate some random value to be used for the session_id, but I >> can't think of a good way to store it for use on the first page. > >Why does it matter if they hit refresh and get a new session ID before >yo

[PHP] Unable to use fopen to read a URL - DNS Problem?

2001-08-21 Thread Brian White
This is a repost. To summarise: My installtion of PHP is unable to resolve names. I can't use fopen to open a URL which uses a name, but if I manually calculate the IP address, I can read in the page OK. ( see example below ). I need some tips on where to start lo

Re: [PHP] AudioGalaxy-like stuff

2001-08-21 Thread Andrew Brampton
When you click on the image it reloads the image which is really a PHP page which returns a image. That way when it loads the image, it can actually run some PHP and do whatever is required, once done it returns the approiate image That make sense? Andrew - Original Message - From: "Chr

Re: [PHP] List of files?

2001-08-21 Thread David Robley
On Tue, 21 Aug 2001 21:56, Seb Frost wrote: > OK so I'vebeen reading about reading and writing to/from files, but > what I want to do is (I think) simpler than this. > > Basically I want to look at a directory and be able to get a list of > all subdirectories and then a list of the files in each d

[PHP] Re: sockets question

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Gregor Jaksa) wrote: > i have login.php where i do > $socket_handle = fsockopen($server, $port); > > now in add.php i would like to send msg to $socket_handle socket... include("login.php"); has more info. -- CC

RE: [PHP] AudioGalaxy-like stuff

2001-08-21 Thread Johnny Nguyen
I suppose they could use a hidden frame, like a 1 pixel frame all the way down at the bottom that contains all the javascript in there to submit a form. And then the page that you see simply contains some javascript that calls a javascript function in that hidden frame. I'm sure you get the idea

[PHP] md5(), uniqid(), rand(), password()

2001-08-21 Thread Christian Dechery
Is mysql's PASSWORD() function secure for storing passwords? Or should I use one of PHP's md5() or uniqid(), or even md5(uniqid()) ??? . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- PHP General Mailing List (http://ww

[PHP] AudioGalaxy-like stuff

2001-08-21 Thread Christian Dechery
Is there anyone here familiar with Audiogalaxy's site? It's all in PHP, and there is something there which is really something... when you're searching for songs, there's an icon that when u click, it adds the song to the queue. But the page remains... the file is added to the queue without le

RE: [PHP] Re: security check - virtual host and mod php setup

2001-08-21 Thread Dave
>> please hack apart this solution and point out the error/insecure nature of >> apache compiled with suexec >> # set user and group to unique >> chown USERID:USERID /path/to/user/html/directory > >Make it -R in case any files managed to get in there before you did this. > error of omission on m

[PHP] sockets question

2001-08-21 Thread Gregor Jaksa
One simple question: I need to use the same socket connectin in 2 different scripts, is that possible ? and if YES, then how to do it ? for example: i have login.php where i do $socket_handle = fsockopen($server, $port); now in add.php i would like to send msg to $socket_handle socket... h

RE: [PHP] Re: passing variables between PHP and Perl

2001-08-21 Thread Dave
Just a quick addition... when a PHP script is run as a shell script from a Perl script (that make sense?) it cannot pass back exit variables to the Perl script... Would love to be proven wrong on this as I had to dust off Perl programming for a RADIUS interface some time ago. Dave > >http://ph

[PHP] Re: unix permission converter

2001-08-21 Thread Raphael Pirker
Hi Richard, The system is not for any boxes use - it's for the user-access system I'm developing for my companie's Website. I copied the system they use at unix a little. We have READ and WRITE permissions and 4 different user-categories. 1,2,4,8 - the reason I'm splitting this up is actually qui

RE: [PHP] Strings with Spaces in URLS

2001-08-21 Thread Lawrence . Sheed
$search= urlencode ($search); urlencode - have a look on the php site. -Original Message- From: Chris Aitken [mailto:[EMAIL PROTECTED]] Sent: August 22, 2001 9:05 AM To: [EMAIL PROTECTED] Subject: [PHP] Strings with Spaces in URLS I have come up with a bit of a problem I have a l

RE: [PHP] Strings with Spaces in URLS

2001-08-21 Thread Jason Murray
> $search = "This is a test"; > echo "http://www.blah.com/foo.php?search=$search>"; You'll want this: echo "http://www.blah.com/foo.php?search=".urlencode($search).">"; ^^ Jason -- PHP General Mailing List

RE: [PHP] Re: To jump or not to jump?

2001-08-21 Thread Maxim Maletsky
Hey, we've got an article about it on PHPBeginner.com http://www.phpbeginner.com/columns/jason/echo Cheers, Maxim Maletsky www.PHPBeginner.com -Original Message- From: Alexander Skwar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 22, 2001 6:14 AM To: Gabe da Silveira Cc: [EMAIL

[PHP] Strings with Spaces in URLS

2001-08-21 Thread Chris Aitken
I have come up with a bit of a problem I have a little funky search form on a page, and when I send the search data on as a URL, anything with a space is screwed up example $search = "This is a test"; echo "http://www.blah.com/foo.php?search=$search>"; and when the li

RE: [PHP] Regular Expressions....

2001-08-21 Thread Dave
below > >HEy, i am having major problems trying to work out this regular expression. >Regular expressions are still quite new to me, and i don't fully understand >them, so please bear with me... thanks! regex is a different beast... however if the text that you have isa actually as such, it is

[PHP] Re: Returning a string from a function

2001-08-21 Thread Richard Lynch
> For($i = 0; $i< (count($items)/1); $i +=1){ > $path=strstr(($items[$i]), '/'); > return $path; You probably want the return *OUTSIDE* the loop. You also probably want $path .= strstr(...), not just = Can't tell for sure, as I don't understand what sed and awk are doing. -- WARNING [EMAIL

[PHP] Re: if statement and imageline()

2001-08-21 Thread Richard Lynch
What are you getting? An image at all? Broken image? Try getting rid of the header("image/jpeg") or whatever, and see if you have some error message. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.c

[PHP] Re: Help with ImageCreateFromGIF()

2001-08-21 Thread Richard Lynch
> Is it possible to import images from external sources using > ImageCreateFromGIF()? I am working on a script that is designed to pull a > web-based counter into another image on my server, but I get errors from > every external URL I've tried so far. Probably not. You'll have to suck the GIF d

[PHP] Re: HELP with Regular Expressions

2001-08-21 Thread Richard Lynch
> if (($hostname) || ($HOSTNAME)) { >$hostname= trim($hostname); >if ($HOSTNAME) > $hostname = trim($HOSTNAME); >if (!eregi("^[-a-z0-9-]+(\.[a-z0-9-]+)*$ ", $hostname)) { > print_error("your your hostname is invalid"); >} >$HOSTNAME = $hostname; > } Things I know a

[PHP] Re: Mem and variables

2001-08-21 Thread Richard Lynch
> odd question, but if variables are stored in memory > until the script terminates, that includes old unused > variable, isn't it more efficient, memory wise, to > reuse old variables that reference, in effect the same > basic data, rather than create new or additional > variables The difference

[PHP] Re: change user after uploading file using a form

2001-08-21 Thread Richard Lynch
> I'm using the form file object for uploading a file because php using ftp > isn't supported on my provider but everthing ok so far. > > Now the http user (lets say the user that php is running on) is owner of the > file, I want to change this to the user I am (the ftp user) > hosting is running

[PHP] Re: our country

2001-08-21 Thread Richard Lynch
Check at http://www.phpusergroups.org to see if there's a User Group in your area. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer

[PHP] Re: how expensive is Image functions?

2001-08-21 Thread Richard Lynch
> How expensive are the image functions as far as the system > resources go. Would it be too expensive to use php to > create simple gifs like buttons, tabs etc. How busy is your server?... Would I recommend it for Yahoo.com? No. Would I recommend it for some site that has low-traffic? S

[PHP] Re: PHP and the Console

2001-08-21 Thread Richard Lynch
You have to compile PHP a second time without the --with-apxs (or --with-apache). If you still have your PHP source code, just copy config.nice to config.cgi, and edit it to remove the --with-apxs line. Then do make clean ./config.cgi make You'll get a binary file called "php" which you can thr

[PHP] Re: chicken and egg problem with SID

2001-08-21 Thread Richard Lynch
> I can generate some random value to be used for the session_id, but I > can't think of a good way to store it for use on the first page. Why does it matter if they hit refresh and get a new session ID before you've collected any information about that ID?... About all you *COULD* do is have a

[PHP] Re: 404 header

2001-08-21 Thread Richard Lynch
Just telnet to a 404 page that works and see what that outputs... I'm guessing: header("404: Page does not exist"); -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little t

[PHP] Re: Increase field value by 1 problem

2001-08-21 Thread Richard Lynch
> function updateHitCounter($id,$PHPSESSID,$type){ > $flag=$this->validateSession($PHPSESSID); > if($flag==1){ > include("admin/config.inc.php"); > $connection = mysql_connect("$host","$username","$password"); > if ($connection == false){ > echo mysql_er

[PHP] Re: Help me on server.

2001-08-21 Thread Richard Lynch
Can you surf to the IIS machine and get HTML. Can you use: telnet IIS-host 80 GET /whatever.php HTTP/1.0 (Hit return twice) and get the HTML? If so, the problem is probably in Java, not in PHP. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me

[PHP] Re: $PATH_INFO strangeness

2001-08-21 Thread Richard Lynch
> Produces the result (among everything else): > HTTP_SERVER_VARS["PATH_INFO"]: /foo/bar > > However, an produces an empty > result. Same with $HTTP_SERVER_VARS["PATH_INFO"]. That's crazy... You're not doing this inside a function and forgetting: global $PATH_INFO are you? OH -- You also ar

[PHP] Re: register_globals odd behaviour?

2001-08-21 Thread Richard Lynch
I think you should still use $count++ The array is just there for you to *READ* data, not to alter it. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://ch

Re: [PHP] Need "Working..." pop up dialog (repost)

2001-08-21 Thread Richard Lynch
You may just need a flush() call after the Starting UNZIP. http://php.net/flush PHP (Apache, actually) sends data to the browser when there's enough to send, not right away. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? B

[PHP] Re: INPUT type=file value=????

2001-08-21 Thread Richard Lynch
> The W3C HTM 4x spec(s) say that when using the file type on a form > input element, "User agents may use the value of the value attribute > as the initial file name." They *MAY* use it? As in, if they feel like it?... W3C has a lot of specs that have nothing to do with what the browsers have

[PHP] Re: flash and mysql

2001-08-21 Thread Richard Lynch
Rasmus has some sample code in his talks. It's not real fancy, just makes a Flash movie with "PHP" flying all around. Should be enough to help you get started though. http://conf.php.net -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out?

[PHP] Re: confusing problem w/sessions

2001-08-21 Thread Richard Lynch
> i have a simple snippet of code : But before you got to this code, there was some more code, or some includes, or some HTML... > session_start(); > $a = 10; > session_register("a"); > ?> > > i am trying to understand how do session work. > > Accessing at this document directly fro

[PHP] Re: security check - virtual host and mod php setup

2001-08-21 Thread Richard Lynch
> please hack apart this solution and point out the error/insecure nature of the > setup. > > goal, provide php access to name based virtual hosts on FreeBSD boxes > > problem, security of PHP access to base system and other user scripts > > solution, > > apache compiled with suexec > # set user a

Re: [PHP] hacks we should know about

2001-08-21 Thread Richard Lynch
There *SHOULD* be some directory outside htdocs you can get to... Talk to your ISP to see if there is. If not, create a directory and add Apache directives to Deny All access to that directory. Not as good, but better than nothing. -- WARNING [EMAIL PROTECTED] address is an endangered species

[PHP] Re: PHP files appearing in error_log

2001-08-21 Thread Richard Lynch
> The issue is that every once in a while I get a full copy of a page in my > system error_log. That is, not the error_log for the site the page exists > on, but the /var/log/httpd/error_log. Wild Hypothesis: Some worm/virus/hacker is trying to access: http://yoursite.com/something/something/../

[PHP] Re: Countries and ip addresses

2001-08-21 Thread Richard Lynch
In addition to scanning the results of http://php.net/gethostbyaddr I believe there *ARE* records of who owns what IP ranges, and you could *MAYBE* access them with Whois, SNMP, and/or other tools to make an educated guess. Nothing will be 100% accurate, however. Why do you think you need this?

[PHP] Re: 2D-3D Imagem (GD Library)

2001-08-21 Thread Richard Lynch
> I'd like to know if I can create 2D images with the > image function of GD Library. I'm guessing you mean 3-D, since 2D is just there... AFAIK, there's no built-in 3-D support to GD. You'd have to have a separate 3-D engine and a renderer to project it onto 2D before you ever touched the GD f

[PHP] Re: Session expiration detection and handling

2001-08-21 Thread Richard Lynch
On each page visit: Check their time-stamped (viz) session id to see if it's expired. if (expired) header("Location: expired.php"); UPDATE a record with their session id and a timestamp. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help

[PHP] Re: unix permission converter

2001-08-21 Thread Richard Lynch
> I have written a "Permission Converter" which converts unix permissions (the > ones we know from CHMOD) into a "-" delimited string of numbers. I also made > it that it supports one more level (unix only has 3 different types of > permissions, (r,w,x) while mine can handle a fourth one. Since I'

[PHP] Re: Passing variables to a file

2001-08-21 Thread Richard Lynch
You could give them a session ID, and then keep foo completely on the server. http://php.net/session_start If you just want it "invisible" to most users but not really *SECRET*, a simple POST form works. They can still see it if they do "View Source" in the browser. -- WARNING [EMAIL PROTECTED]

[PHP] Re: showing submitted images

2001-08-21 Thread Richard Lynch
A FORM submission is supposed to return an HTML document, not a JPEG. Have your return document look more like this: echo ""; Then, move your header() and fread into the display.php file. The catch is the file is DELETED after the upload script finishes. So what you *REALLY* need to do is use

[PHP] Re: passing variables between PHP and Perl

2001-08-21 Thread Richard Lynch
http://php.net/exec/ You can get back whatever Perl spews out to 'stdout' using that. -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volun

[PHP] Re: attachments

2001-08-21 Thread Richard Lynch
You need to not just use the mail() function, but use something like Manuel Lemos' mail class that does the mime-encoding needed to do attachments... -- WARNING [EMAIL PROTECTED] address is an endangered species -- Use [EMAIL PROTECTED] Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/

[PHP] Re: Include/requrie secure pages

2001-08-21 Thread Richard Lynch
You would have to use "cURL" to get those. HTTPS pages require that the client (in this case PHP) negotiate a secure connection using SSL and thus sending back and forth some headers of public/private key-pairs. cURL does this. PHP's include() doesn't. -- WARNING [EMAIL PROTECTED] address is a

[PHP] Re: strange upload/db-insert problem with ie5.5

2001-08-21 Thread Richard Lynch
> 1)select the document, then upload through form with method post -> target > same document > 2)do the checking stuff with the document, if ok call the same script again > for displaying the property-page -> form-target same document Don't do that. Just do everything in one script. > 3) if ev

[PHP] Re: To jump or not to jump?

2001-08-21 Thread Richard Lynch
Jump out for anything more than three lines of pure HTML. Your HTML will be much easier to read. Speed-wise, it just doesn't matter, unless you intentionally alternate back-and-forth every other line... Even then, the difference is negligible. -- WARNING [EMAIL PROTECTED] address is an endange

[PHP] Mcrypt: just a little tip:-)

2001-08-21 Thread Alex Piaz
Hi Folks! I am working on a project where I need to encrypt some data that will be decrypted later by a visual basic application and also receive encrypted data from that application and decrypt it on the webserver. To exchange the data, I did some xml and everything went fine, but I can't tel

Re: [PHP] download script

2001-08-21 Thread Brad Hubbard
On Wed, 22 Aug 2001 10:19, AD wrote: > Hi, > > I'm working on a download script > > header("Content-Type: application/octet-stream\n"); > header("Content-Length: $size\n"); > header("Content-Disposition: attachment; filename=\"$file\"\n"); > header("Content-Description: Download\n"); > readfile($p

[PHP] download script

2001-08-21 Thread AD
Hi, I'm working on a download script header("Content-Type: application/octet-stream\n"); header("Content-Length: $size\n"); header("Content-Disposition: attachment; filename=\"$file\"\n"); header("Content-Description: Download\n"); readfile($path.$file); This works, but when the initial file do

Re: [PHP] Re: hello and a question

2001-08-21 Thread Kevin Keeler
yay. this preg business methinks needs some more looking into. ;) everywhere I've looked theres always one or 2 people proselytizing its greatness. my late-night "boredom" reading of O'Reilly's _Perl_ (sans computer or pause) left little behind little information in my head, not surprisingly.

[PHP] Re: hello and a question

2001-08-21 Thread jimw
Kevin Keeler <[EMAIL PROTECTED]> wrote: > $entry_hidden = eregi_replace(".+","",$entry); try: $entry_hidden = preg_replace("|.+?|i","",$entry); ".+" is 'greedy', meaning it consumes as much as text as it can. with perl-like regular expressions, you can add a trailing "?" which makes the + and *

[PHP] hello and a question

2001-08-21 Thread Kevin Keeler
Hi. I just joined the list and, of course, I have a question. I've searched for quite a bit of time now, but to no avail.. mostly, I suspect, because all the relevant search terms are to broad. But heres my problem: I have a journal I whipped up and tweak often that uses PHP and MySQL (no small c

RE: [PHP] Session Headaches

2001-08-21 Thread Johnson, Kirk
> I am using php 4.0.6 and i would rather not use global variables. I hear ya. After playing around with this, your approach works if register_globals is set to off (I did this with an .htaccess file). I'm surprised by this. It appears that the global version of a variable still overwrites the H

[PHP] Regular Expressions....

2001-08-21 Thread Steve Wright
HEy, i am having major problems trying to work out this regular expression. Regular expressions are still quite new to me, and i don't fully understand them, so please bear with me... thanks! This is what i wanmt to do, turn the following block of text: if (top != self) top.location.replace(sel

[PHP] Re: sysvsem extention question

2001-08-21 Thread Chris Chabot
As far as creating the new module goes, it shouldn't be 'to much effort'. The basic implimentation of system v semaphores is actualy quite simple, its the usage of sempahores that can be very confusing :-) sysv sem's are often refered to as the most difficult to comprehend of the sysv standards.

RE: [PHP] Returning info from a function

2001-08-21 Thread Dave
I'll assume the & is legit (never used it in PHP personally) here is a restructured function assuming all your provided code does what you want !untested! function &getpath($search) { # removed $path and $search... $search is already passed # and you are only using $path in the

Re: [PHP] how to discover cause of php crash under win98?

2001-08-21 Thread Chris Hayes
Richard, thank you for your suggestion. i installed PHP 406 over the 405 and now i don't get the error anymore. so whatever was the cause is solved now. Chris > vhost.acces.log gets these lines (each split in 3 by me): > (uri: http://localhost/trials/postnuke/ ) > > Chris > > > I assume y

RE: [PHP] Session Headaches

2001-08-21 Thread Johnny Nguyen
I am using php 4.0.6 and i would rather not use global variables. regards, Johnny Nguyen -Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 3:33 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Session Headaches OK, the session_is_registered() t

RE: [PHP] chicken and egg problem with SID

2001-08-21 Thread Johnson, Kirk
One way around this is to make the first page just a dummy that starts a session then redirects to the real first page, with the session id passed on the redirect URL. Kirk > -Original Message- > From: Egan [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 21, 2001 10:56 AM > To: [EMAIL

Re: [PHP] how to discover cause of php crash under win98?

2001-08-21 Thread Chris Hayes
Error.log does not get new lines, but if i have it open in an editor, and cause the crash again, the editor says it changed, so probably the date is changed? vhost.acces.log gets these lines (each split in 3 by me): (uri: http://localhost/trials/postnuke/ ) 127.0.0.1 - - [22/Aug/2001:00:20:18

[PHP] Re: Page detect

2001-08-21 Thread J Smith
If you're talking about the PHP page itself, try $PHP_SELF. If you want to know what page sent the form data to the PHP page, try $HTTP_REFER. Be careful, though, as not every browser sends the referring page along with a request, leaving $HTTP_REFER empty. J Kevin P wrote: > Hi all > >

RE: [PHP] Session Headaches

2001-08-21 Thread Johnson, Kirk
OK, the session_is_registered() thing is correct. > It seems like the gist of the problems is that different > pages can't seem to > modify the same session variables. This is definitely not the case. Two things to try: 1. In page2, put some logic around the "session_register("FailedLogins");"

[PHP] attachments

2001-08-21 Thread Nicholas Thompson
I am currently using an e-mail page that supports uploads, but does anyone know how to get the attachment to actually attach to the message? (perhaps even upload it to other mail servers like yaho) Uploading to my server is fine, but when I send messages with attachments and check my mail th

[PHP] Re: sysvsem extention question

2001-08-21 Thread Jason Greene
There probably should be a full implementation of semaphores in php. If you have a need for this, we should discuss exactly how it should be implemented. I will have some free time available soon, so I can start working on this. Though I have a couple other projects as well. If you would be inter

RE: [PHP] Session Headaches

2001-08-21 Thread Johnny Nguyen
oops. of course that's what i meant. -Original Message- From: Johnson, Kirk [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 1:56 PM To: [EMAIL PROTECTED] Subject: RE: [PHP] Session Headaches Start with this correction on page1.php: > if (session_is_registered != 1) { s

[PHP] Re: Not allowing same value in array. Example requested

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (James C. Montz) wrote: > Can someone show me how I could walk through each value (a random number) in > an array to make sure no 2 are the same? -- CC -- PHP General Mailing List (http:/

[PHP] change user after uploading file using a form

2001-08-21 Thread Jeroen Olthof
hi, I'm using the form file object for uploading a file because php using ftp isn't supported on my provider but everthing ok so far. Now the http user (lets say the user that php is running on) is owner of the file, I want to change this to the user I am (the ftp user) hosting is running linux

[PHP] Returning info from a function

2001-08-21 Thread Richard Kurth
Could somebody tell me way this function will not work I know the script inside the function works because I have tested it but when I put it in a function all I get back when I call it is a 1 function &getpath($search) { Global $search,$path; $a = `/bin/ls -al /home/sites/ | awk {'print $9" "$1

[PHP] Not allowing same value in array. Example requested

2001-08-21 Thread Montz, James C. (James Tower)
Can someone show me how I could walk through each value (a random number) in an array to make sure no 2 are the same? I'm basically just trying to generate a random number generator. I'm just looking to create 10 numbers, none of which can be duplicates. Thank you in advance! -- PHP General M

Re: [PHP] URGENT AND CONFIDENTAIL

2001-08-21 Thread Christopher CM Allen
> > In order to transfer out (USD 126 M) One hundred and > twenty six million United States Dollars) from African > Development Bank >your private telephone and fax > number including the full details of the account to be > used for the deposit. lol sheesh! -- PHP General Mailing List (http:

[PHP] Re: mySql_fetch_array($result) question.

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mehmet Kamil Erisen) wrote: > I have a form that has more than one drop down lists. I > like to use the mysql_fetch_array($result) to populate the > select options. > The problem is that after the first use, the > mysql_fetch_array($result) doe

[PHP] mySql_fetch_array($result) question.

2001-08-21 Thread ERISEN, Mehmet Kamil
Hello All, Another question. Here is the problem: - One SQL query - 1 result. I have a form that has more than one drop down lists. I like to use the mysql_fetch_array($result) to populate the select options. The problem is that after the first use, the mysql_fetch_array($result) does not retu

[PHP] how expensive is Image functions?

2001-08-21 Thread ERISEN, Mehmet Kamil
Hello All, How expensive are the image functions as far as the system resources go. Would it be too expensive to use php to create simple gifs like buttons, tabs etc. Thanks, Erisen ulrAslan. = Mehmet Erisen http://www.erisen.com __ Do Yo

Re: [PHP] Sessions, Is this behavior by design?

2001-08-21 Thread Alexander Skwar
So sprach »Johnny Nguyen« am 2001-08-21 um 12:29:53 -0700 : > false. I was expecting boolean true and false return values, but no matter > i can work with it this way, just wondering if this is by design.? There isn't such a thing as boolean true or false in PHP. In PHP, everything other than N

Re: [PHP] Re: To jump or not to jump?

2001-08-21 Thread Alexander Skwar
> > From: [EMAIL PROTECTED] (Seb Frost) > > Newsgroups: php.general > > Date: Tue, 21 Aug 2001 20:10:38 +0100 > > To: <[EMAIL PROTECTED]> > > Subject: To jump or not to jump? > > > > Is it good practice (sp?) to jump in and out of php whenever you've got some > > plain html to write, or should on

Re: [PHP] Need "Working..." pop up dialog (repost)

2001-08-21 Thread Ray Clouse
Another part of this is an external program on the server that can't read from the gzipped file. The file has to be uncompressed, unfortunately. The resulting uncompressed file is recompressed through a cron job after 30 days if it hasn't been used for 30 days. I came up with something that

  1   2   3   >