[PHP] Re: query caching & caching in general

2003-01-23 Thread Jean-Christian Imbeault
Justin French wrote: anyone got any links to decent tutorials on sql caching, and caching in general? A few questions: At what level do you want the caching? Are you talking about stored procedures? Do you mean storing functions in the DB? (some DB's, like PostgreSQL can compile functions onc

Re: [PHP] htpasswd

2003-01-23 Thread Peter Janett
Don't run the htpasswd program at all, just write the .htpasswd file with PHP. The format is very simple, it's just username:crypted_password So, you can just write those lines to the file, using the crypt function to create the crypted password. Of course the same file permission issues exist t

Re: [PHP] Re: query caching & caching in general

2003-01-23 Thread Peter Janett
Query caching is something that seems to exist in Cold Fusion, but not PHP. What I'm referring to is that in Cold Fusion you can specify that query results be cached in memory, and how long to cache those results. So, if you have a page that runs the same query each time it's loaded, and you cach

RE: [PHP] Re: query caching & caching in general

2003-01-23 Thread Clarkson, Nick
I found this on Zend - SQL Query Caching - http://www.zend.com/zend/tut/tutorial-staub2.php; "The basics to caching is using the serialize() and unserialize() PHP functions..." I don't know if this will help. Nick -Original Message- From: Peter Janett [mailto:[EMAIL PROTECTED]]

[PHP] PHP and xemacs

2003-01-23 Thread Hans Jacob Simonsen
Hi I have just started using xemacs as editor to my php scripts I think that the indentation in emacs stinks! xemacs has imorted a php package for med, but it does not make indentation on my html codes. i would prefer looking like: and so fourth. Is there a way

Re: [PHP] PHP and xemacs

2003-01-23 Thread Faisal Abdullah
I use Kate. Love it for the following features: 1. Wonderful customizable syntax highlighting not only for PHP, but other languages/scripts as well. 2. Splittable screen 3. Line numbering 4. A handy terminal emulator 5. Indent tracking, and brace tracking 6. Remembers recently opened files.

[PHP] Uploading and storing large files

2003-01-23 Thread peter a
Hi. I am currently working on a projekt that will involve uploading files with filesizes up to about 10mb, and all sorts of different filetypes and I havet o Questsions concerning that. 1 ) How should the upload be done? I don't feel all that comfortable posting 10mb-files via a simple html-

[PHP] Disable pic copy/save?

2003-01-23 Thread Anthony Rodriguez
Hi! A client wants to test market two versions of an advertising but wants to disable the users' ability to copy/save the ads (right click, copy/save). How can this be done in PHP? Thanks! Anthony F. Rodriguez ([EMAIL PROTECTED]) -- PHP General Mailing List (http://www.php.net/) To unsubsc

[PHP] compiling php-4.3.0 error message : BrowserMatch regex could not be compiled.

2003-01-23 Thread info
Hello, I compiled php-4.3.0 succesful --with-apxs="...path-to-apxs" after make and make install on a RedHat8.0 box. I started my apache-1.3.27 and got the follwing error message: " Syntax error on line 956 of /usr/local/apache/conf/httpd.conf: BrowserMatch regex could not be compiled. " Any h

Re: [PHP] Disable pic copy/save?

2003-01-23 Thread Jason Wong
On Thursday 23 January 2003 17:52, Anthony Rodriguez wrote: > Hi! > > A client wants to test market two versions of an advertising but wants to > disable the users' ability to copy/save the ads (right click, copy/save). > > How can this be done in PHP? It can't be done, period. You need to get the

RE: [PHP] Disable pic copy/save?

2003-01-23 Thread Clarkson, Nick
This cannt be done in PHP. You would have to use something like Flash or Java - which is a lot of effort. The best you can do is disable right click using javascript, but that's easy to circumvent. Because everything's displayed client side, then a user could go into their Temporary Internet Files

Re: [PHP] PHP and xemacs

2003-01-23 Thread Hans Jacob Simonsen
On 23 Jan 2003, Faisal Abdullah wrote: > I use Kate. Love it for the following features: > > 1. Wonderful customizable syntax highlighting not only for PHP, but > other languages/scripts as well. > > 2. Splittable screen > > 3. Line numbering > > 4. A handy terminal emulator > > 5. Indent tr

[PHP] setcookie function

2003-01-23 Thread Sukrit
Hi listers, I have some webspace on a Unix server running apache. Things look like this there: Path to dir with files - /home/username/public_html/ URL - www.somesite.net/~username setcookie("id",$randval,time()+3600,"Q1","Q2",0); What do I plug into Q1 and Q2? I want to set cookie for only my

[PHP] HELP: Regex pattern matching

2003-01-23 Thread Nasko Vassilev
I have an ASCII file which has multiple blocks of text I want to clear. The scheme is as follows: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- line 1 Everything between the separators, line 2 including the separators line 3 I want to clear from the text file line 4 --

Re: [PHP] Disable pic copy/save?

2003-01-23 Thread af
Not true -- you can use JavaScript to catch right-click events and do something creative with them, or disable them entirely. But that, of course, is a client-side scripting issue, which has nothing to do with server-side languages such as PHP. Cheers, Alex > On Thursday 23 January 2003 17:5

[PHP] Re: Disable pic copy/save?

2003-01-23 Thread Foong
try this article http://www.devarticles.com/art/1/265 However it is not perfect. Foong "Anthony Rodriguez" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi! > > A client wants to test market two versions of an advertising but wants to > disable the users' a

Re: [PHP] Disable pic copy/save?

2003-01-23 Thread Martin Hudec
H it might be done by checking which mouse button is pressed using javascript :) but i think this works only in Iexplore ;)...i used such code on my webpageit shows only copyright etcanyway user does not need to rightclik and save if he knows where is his browser cache located.

[PHP] File upload security

2003-01-23 Thread Marco Alting
Hi, I have a php script which uploads file to a webserver. The idea is that anyone can upload files, but only another php script can read the files. At this moment I think someone is deleting file from my upload folder. What CHMOD settings do I need to secure this? -- PHP General Mailing List (

Re: [PHP] Disable pic copy/save?

2003-01-23 Thread Negrea Mihai
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 There is no client side solution. The only one I see is serverside: to put a text on the image, a bit transparent so that it does not affect very much the image but it can't be used. - -- Negrea Mihai http://www.negrea.net On Thursday 23 January

[PHP] Sessions & Security

2003-01-23 Thread Clarkson, Nick
Hi, I am trying to find the best method for implementing sessions in PHP to track/limit users. However, the more I read, the more I am concerned about security. Can anyone give me a definitive answer as to the best method of tracking users with security in mind ? Thanks, Nick This private and

Re: [PHP] File upload security

2003-01-23 Thread peter a
Files in web folders should usually be 755 /peter a At 2003-01-23 11:15, Marco Alting wrote: >Hi, I have a php script which uploads file to a webserver. The idea is that >anyone can upload files, but only another php script can read the files. At >this moment I think someone is deleting file

[PHP] PHP and Oracle

2003-01-23 Thread Christophe Valentin
Hello, Does someone had a speed trouble when using PHP and Oracle with OCI ?? The trouble i have is that the php pages are slower and slower during the day. It looks that if I make an apache restart things restart in a good way. I don't understand where the trouble come from. Help ! Christophe

[PHP] get current username from the windows system

2003-01-23 Thread Thomas Franz
Hi. is their a possibilty to get the windows username of the current logged on user with php. I want this to make a logon dialog more comfortable. Thanks for an answer and a little example if it's possible. Thomas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: htt

Re: [PHP] Disable pic copy/save?

2003-01-23 Thread MH
If someone wants your pic, he will take it, even if Alt+Print Screen is the last resort. The best way is to watermark it with text to make it unusable, but even with some patients this can be edited out if they want it badly enough. Mh "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PRO

[PHP] Page doesn't load..

2003-01-23 Thread Borut Kovacec
Hello .. I don't know if this is the right question for this mailing list .. but I'm having some problems with loading some php pages, localy on my computer (win XP, apache 1.3,Mysql) .. The prioblem is that certain page doesnt load ... I get "The page doesn't exist" message .. but it's there.

Re: [PHP] get current username from the windows system

2003-01-23 Thread Justin French
So, you want the server (PHP) to probe the client (user's) remote machine to find out the windows username? Can't be done. First thing to remember is that PHP is server side. SOME LIMITED information is sent to the server by the browser, but I doubt this would ever be considered -- or even secur

RE: [PHP] get current username from the windows system

2003-01-23 Thread James Lobley
Hi Thomas, The following code should help you... Note that you have to turn off anonymous access in IIS, so that the user authenticates to a domain. "); $user_chunks = explode("\\",strtoupper(getenv("REMOTE_USER"))); $user_domain = $user_chunks[0]; $user_name = $user_chunks[1]; echo("User domai

[PHP] handling files error

2003-01-23 Thread Gilberto Garcia Jr.
Hey guys, I have a red hat 7.3 server running apache and php4. It all seems working fine, but when I try to upload a file through a form I got nothing. I mean, I can ouput the temp name of the file, the final name, size and other stuff. but some functions don´t work. Like If (!is_executable($u

[PHP] session domain

2003-01-23 Thread Stain
i would use sessions in multiple hosts of my domain. say my domain is example.com, i'd use sessions in several hosts such as: www1.example.com www2.example.com www3.example.com this could be easily configured in php.ini by putting: session.cookie_domain = example.com but how can i do if i would

Re: [PHP] PHP and xemacs

2003-01-23 Thread Chris Hewitt
Hans Jacob Simonsen wrote: Sorry I forgot to tell you. I am using GNOME, and I'm on a company computer so I can't change to KDE. I'm using gnome and kate works by just typing its name at a shell prompt. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

[PHP] nested queries/loops

2003-01-23 Thread Justin French
Hi all, I'm aware that this post is borderline MySQL, but the solution may be more PHP-oriented, so I'm asking here first. I have 4 related tables: partner (id,name,url,desc) category (id,name) service (id,categoryid,name) pid_to_sid (pid,sid) To point out the obvious, a partner provides one or

Re: [PHP] HELP: Regex pattern matching

2003-01-23 Thread af
Hmmm... I was about to reply with a simple solution, but there's a problem with it that I can't explain. Assuming the text is in $str... I can't get preg_replace to match a newline at the end of a pattern. If I use... $str = preg_replace('/\n=.+--\n/sU', '', $str); ...it matches nothing,

Re: [PHP] get current username from the windows system

2003-01-23 Thread 1LT John W. Holmes
$_SERVER['LOGON_USER'] also works. ---John Holmes... - Original Message - From: "James Lobley" <[EMAIL PROTECTED]> To: "'Thomas Franz'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 23, 2003 6:05 AM Subject: RE: [PHP] get current username from the windows system > Hi

[PHP] JOB: PHP SOFTWARE ENGINEER (Cape Town, South Africa)

2003-01-23 Thread Mark Henderson
JOB: PHP SOFTWARE ENGINEER DESCRIPTION Small, fast-paced, software company seeks PHP Software Engineer. Our Software Engineers are responsible for all aspects of technical development, including architecture, design, implementation, and performance tuning. They play a key role in helping the organ

[PHP] Extending PHP

2003-01-23 Thread MH
I am looking for 3d party extensions of PHP like PHPTurbine. Anything will do, I am just curious whats available. Anyone know of any sites dedicated to PHP extensions that I can look at? Thanks Mh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/uns

Re: [PHP] nested queries/loops

2003-01-23 Thread Tim Ward
// pseudo code (mostly) if (mysql_query("SELECT * FROM partner, category, service WHERE partner.id = service.id AND service.categoryid = category.id")) {while ($array = mysql_fetcharray($result)) {$partners[$array["id"][]= $array; } } // then do ...

[PHP] Re: textarea new line

2003-01-23 Thread Neil M
Adi wrote: i want to add in textarea a string with new line tag in it. how to do that? my try: $string="-line1n\ -line2 n\-line3"; echo "$string"; but i see a single line instead of: -line1 -line2 -line3 tx in advance for any help Hello For a new line in a text area you cant use html 's Yo

[PHP] Re: Removing the #!/usr... from cgi output?

2003-01-23 Thread Neil M
Colin McDonald wrote: Did you try it without that line at all? I'm pretty sure you can setup apache (you are using apache right?) to use /usr/.../bin/php for all files with the extension .php colin David Brannlund wrote: Example: #!/usr/local/bin/php becomes #!/usr/local/bin/php f

[PHP] Re: File upload problem

2003-01-23 Thread Neil M
John M wrote: Hello, I have the code below. It's a simple file upload. But it doesn't work. Before the line if(isset( $Submit )) is an echo which can I read. But after choosing a file and press a submit nothing happens. Why is if(isset( $Submit )) always false? Maybe my apache or php config is wr

Re: [PHP] Re: textarea new line

2003-01-23 Thread Ernest E Vogelsinger
At 12:55 23.01.2003, Neil M said: [snip] >Adi wrote: >> i want to add in textarea a string with new line tag in it. how to do that? >> >> my try: >> $string="-line1n\ -line2 n\-line3"; >> echo "$string"; >> >> but i see a single line instead of: >> -line1 >

Re: [PHP] nested queries/loops

2003-01-23 Thread Marek Kilimajer
For me it seems it can be done with one mysql query: SELECT * FROM partner p LEFT JOIN pid_to_sid p2s ON p.id=p2s.pid LEFT JOIN service s ON p2s.sid=s.id LEFT JOIN category c ON s.categoryid=c.id WHERE $your_conditions ORDER BY p.name, c.name, s.name The important part is ORDER BY clause, so whe

Re: [PHP] HELP: Regex pattern matching

2003-01-23 Thread Nasko Vassilev
Hmm... i'm not that advanced... May be first I replace any string containing "---" with "---x", then use your solution? <[EMAIL PROTECTED]> wrote in message news:r01050400-1023-F7D646F52EC711D78B79003065B83B6C@[208.37.41.173]... > Hmmm... I was about to reply with a simple solution, but there's a

Re: [PHP] Page doesn't load..

2003-01-23 Thread Marek Kilimajer
Do you get the message from apache? If so, check apache logs. If it is the exploder's default error page, turn user friendly messages off (in IE), or try another browser Borut Kovacec wrote: Hello .. I don't know if this is the right question for this mailing list .. but I'm having some proble

Re: [PHP] handling files error

2003-01-23 Thread Marek Kilimajer
None of the uploaded files is executable, even if it is some .exe or shell script, simply it does not have the permission to execute. $userfile_name is only the name of the file as it was on the client's machine, there is no such file on your filesystem (unless you create it) Gilberto Garcia Jr

Re: [PHP] session domain

2003-01-23 Thread Marek Kilimajer
It is cookie restriction, you can - set several cookies, but it won't work if user has third party cookies disabled (many have) - pass session id in url if the url is cross domain Stain wrote: i would use sessions in multiple hosts of my domain. say my domain is example.com, i'd use sessions in

[PHP] A rather strange problem.

2003-01-23 Thread Denis L. Menezes
hello friends, I run some queries and output the database fields in a form with text boxes for the purpose of editing by the administrator. My problem is that if my field value is of 2 words or more, my output text box shows only the first work. e.g. if the field is "Jane Enterprises", the text

RE: [PHP] A rather strange problem.

2003-01-23 Thread Jon Haworth
Hi Denis, > if the field is "Jane Enterprises", the textbox shows only "jane". At the moment, if you view the HTML, you'll see: Your browser sees this as an input with a value of "jane" and an attribute called "enterprises", which it doesn't recognise (and therefore ignores completely). Wh

Re: [PHP] Reading Directory in reverse

2003-01-23 Thread Marek Kilimajer
It does not read it in reverse alphabetical order, but in the order it is listed on the filesystem, which happens to be in reverse alphabetical order. If you need it ordered, use $files=array(); if (!($dp = opendir($default_dir))) die("cannot open $default_dir"); while($file = readdir($dp))

Re: [PHP] handling files error

2003-01-23 Thread Gilberto Garcia Jr.
Thanks, but just a little part of the problem was solved. the other part is: why php doesn´t move the upload file to the specified directory, with move_uploaded_file? - Original Message - From: "Marek Kilimajer" <[EMAIL PROTECTED]> To: "Gilberto Garcia Jr." <[EMAIL PROTECTED]> Cc: "PHP" <[

Re: [PHP] session domain

2003-01-23 Thread Stain
i thought this about cookies... but i would cookies to be sent by clients only on some hosts of the same domain, just this. bye, stain. Il 13:40, giovedì 23 gennaio 2003, Marek Kilimajer ha scritto: > It is cookie restriction, you can > - set several cookies, but it won't work if user has thir

Re: [PHP] A rather strange problem.

2003-01-23 Thread Marek Kilimajer
And also use htmlspecialchars() print ' '; Jon Haworth wrote: Hi Denis, if the field is "Jane Enterprises", the textbox shows only "jane". At the moment, if you view the HTML, you'll see: Your browser sees this as an input with a value of "jane" and an attribute called "enterpr

Re: [PHP] HELP: Regex pattern matching

2003-01-23 Thread 1LT John W. Holmes
If the separators are always the same length, then you can use the following: $new_str = preg_replace("/(=-){5}(.*)-{10}/sU","",$str); Where 5 is how many times the =- pattern repeats, and 10 is how many times the - character repeats. Hope that helps. ---John Holmes... - Original Message -

Re: [PHP] nested queries/loops

2003-01-23 Thread Justin French
Thanks Marek, That put me right on track :) Justin on 23/01/03 11:24 PM, Marek Kilimajer ([EMAIL PROTECTED]) wrote: > SELECT * FROM partner p LEFT JOIN pid_to_sid p2s ON p.id=p2s.pid LEFT > JOIN service s ON p2s.sid=s.id LEFT JOIN category c ON s.categoryid=c.id > WHERE $your_conditions ORDER

Re: [PHP] Uploading and storing large files

2003-01-23 Thread Marek Kilimajer
peter a wrote: Hi. I am currently working on a projekt that will involve uploading files with filesizes up to about 10mb, and all sorts of different filetypes and I havet o Questsions concerning that. 1 ) How should the upload be done? I don't feel all that comfortable posting 10mb-files via

[PHP] PHP Image Gallery

2003-01-23 Thread 1LT John W. Holmes
I know there are a ton of these out there and I've used a few of them, but I'm looking for a specific feature, of course. :) Does anyone know of a Gallery system where I can, once it's installed, just drop a folder full of images into the "gallery_root" and the program automatically makes it into

Re: [PHP] PHP and Oracle

2003-01-23 Thread Larry E. Ullman
Does someone had a speed trouble when using PHP and Oracle with OCI ?? The trouble i have is that the php pages are slower and slower during the day. It looks that if I make an apache restart things restart in a good way. I don't understand where the trouble come from. I've seen this once before

[PHP] Upload file

2003-01-23 Thread Tyler Durdin
I am using PHP 4.2.1 and have noticed that I can only upload files with a php script when I have the php.ini file set with register globals on. Is there a way to use the file upload scripts without having to turn the register globals on? How about newer versions of PHP?

Re: [PHP] Upload file

2003-01-23 Thread 1LT John W. Holmes
> I am using PHP 4.2.1 and have noticed that I can only upload files with a > php script when I have the php.ini file set with register globals on. Is > there a way to use the file upload scripts without having to turn the > register globals on? How about newer versions of PHP? Yes, you'll use

RE: [PHP] Custom Error pages in IIS

2003-01-23 Thread Didier McGillis
Yes I always do that when I go there. Sorry .. From: "John W. Holmes" <[EMAIL PROTECTED]> Reply-To: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: RE: [PHP] Custom Error pages in IIS Date: Wed, 22 Jan 2003 19:28:03 -0500 No biggie, but you forgot an 's' on the address: http://www.ii

[PHP] textarea problem

2003-01-23 Thread Denis L. Menezes
Thanks Marek. Could you help me with this piece of code? '; ?> Thanks denis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] textarea problem

2003-01-23 Thread Ernest E Vogelsinger
At 14:34 23.01.2003, Denis L. Menezes said: [snip] > Print 'value="'.htmlspecialchars($row['OrgName']).'">'; > ?> [snip] This won't work. needs its value outside the tag, without an attribute, just plain: Print ''

[PHP] Help!!!

2003-01-23 Thread Brian McGarvie
I have just got use of a new dedicated webserver... Now the 1st time a piece of code is ran it doesnt work but then the 2nd it does... i.e. index.php // stuff... $visitDBID = referrerVisit($rid,$rgid,$visitIP,$visitFromURL); // stuff... //end index.php function referrerVisit($rid,$rg

[PHP] Re: textarea problem

2003-01-23 Thread Marek Kilimajer
Yes - textarea does not have value attribute, put the value between and Print ''.htmlspecialchars($row['OrgName']).''; Denis L. Menezes wrote: Thanks Marek. Could you help me with this piece of code? Print ' value="'.htmlspecialchars($row['OrgName']).'">'; ?> Thanks denis -- PH

[PHP] chown() despiration

2003-01-23 Thread Urb LeJeune
I could do this in perl but I'm being stubborn :-) When I run the following code as a regular user, everything fails. When I run it as root the directory is created and the chmod works. However, chown reports: chown failed: Operation not permitted Here is the code. $Directory2Create = "/hom

[PHP] Re: Help!!!

2003-01-23 Thread Brian McGarvie
ok i think i see the problem but how do i fix? Before call to procedure: VARS: 1,1,213.123.253.117, inside procedure: VARS: ,,, Causing: connectin: insert into referral (RID, RGID, VisitorIP, VisitorDate, VisitorFromURL) values(Resource id #4,Resource id #4,'Resource id #4',NOW(),'R

[PHP] Thanks Marek, Jon, Ernest

2003-01-23 Thread Denis L. Menezes
Thanks Marek, Jon, Ernest. Denis

[PHP] Executing Shell Commands.

2003-01-23 Thread scott
Hello, Does anybody know how to execute a shell command from PHP on a Linux system? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] mysql_fetch_row problem

2003-01-23 Thread Bryan Brannigan
Can someone tell me what I'm doing wrong with the following code. What I am trying to do with this is insert some data from a form into a database. Then I am querying another database to retrieve the email addresses related to $location. This is the error I get: Warning: mysql_fetch_row(): suppl

Re: [PHP] changing a key in an array

2003-01-23 Thread David T-G
Brent, et al -- ...and then Brent Baisley said... % % I'm not sure how you are creating your array, but your resulting array Well, here's some code with some commentary to perhaps help: - first we define a name for a picture basket; the default is 'default' (we might later get a new name

RE: [PHP] Executing Shell Commands.

2003-01-23 Thread Bryan Brannigan
I believe something like this would do it: system('ls -l'); > -Original Message- > From: scott [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 9:06 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Executing Shell Commands. > > > Hello, > > Does anybody know how to execute a s

[PHP] Mail Function Parameters

2003-01-23 Thread Adam Voigt
I have a site with a PHP auto-mailer where the owner of the site gets a report generated from the DB, it all works fine, except his server has spam filtering enabled so the FROM header in my PHP-Generated email, which says "apache@hostname" doesn't work because what the hostname is set to, i

Re: [PHP] Mail Function Parameters

2003-01-23 Thread Petre Agenbag
You have to use sendmail with the -f flag. I have written a small test util to do this: On Thu, 2003-01-23 at 16:12, Adam Voigt wrote: > I have a site with a PHP auto-mailer where the owner of the site gets a > report > generated from the DB, it all works fine, except his server has spam > fil

Re: [PHP] PHP Image Gallery

2003-01-23 Thread David T-G
John -- ...and then 1LT John W. Holmes said... % % I know there are a ton of these out there and I've used a few of them, but % I'm looking for a specific feature, of course. :) Of course! % % Does anyone know of a Gallery system where I can, once it's installed, just Yep. % drop a folder

Re: [PHP] Executing Shell Commands.

2003-01-23 Thread Chris Hewitt
scott wrote: Hello, Does anybody know how to execute a shell command from PHP on a Linux system? exec() and friends. HTH Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] mysql_fetch_row problem

2003-01-23 Thread Matt Schroebel
> -Original Message- > From: Bryan Brannigan [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 9:03 AM > Subject: [PHP] mysql_fetch_row problem > $db = mysql_connect("localhost", "webapp"); > mysql_select_db("helpdesk",$db); > $result = mysql_query("SELECT contactemail FROM l

Re: [PHP] mysql_fetch_row problem

2003-01-23 Thread Rick Emery
I'm gong to bet that $Location is alpha, not numeric. Therefore: $result = mysql_query("SELECT contactemail FROM loc WHERE location=\"$Location\"",$db); - Original Message - From: "Bryan Brannigan" <[EMAIL PROTECTED]> To: "Php List (E-mail)" <[EMAIL PROTECTED]> Sent: Thursday, January 23,

[PHP] RE: Solved [PHP] mysql_fetch_row problem

2003-01-23 Thread Bryan Brannigan
Thanks all for the responses.. the solution was to add single quotes around the $Location variable. > -Original Message- > From: Rick Emery [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 10:10 AM > To: Bryan Brannigan; Php List (E-mail) > Subject: Re: [PHP] mysql_fetch_row p

[PHP] looking for PHP, MYSQL & IMAGEMAGIK hosting

2003-01-23 Thread Vahan Yerkanian
I know I'll start another flamewar, but I'm desperate for a quality hosting provider supporting php/mysql/imagemagik anyone has good experience with any company? regards, Vahan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Page doesn't load..

2003-01-23 Thread Marek Kilimajer
Yes, it is strange. Something that might help you debug this out: - check server logs - turn off any output buffers - call flush() in your while loop - use another browser, IE is hiding stuff from users, but you are a developer, you need to know what is going on - check your loop if it is not endl

Re: [PHP] Sessions & Security

2003-01-23 Thread Chris Shiflett
--- "Clarkson, Nick" <[EMAIL PROTECTED]> wrote: > I am trying to find the best method for implementing > sessions in PHP to track/limit users. However, the > more I read, the more I am concerned about security. > Can anyone give me a definitive answer as to the best > method of tracking users with

Re: [PHP] Re: textarea new line

2003-01-23 Thread David T-G
Adi, et al -- I somehow missed the original message. Odd... ...and then Neil M said... % % Adi wrote: % >i want to add in textarea a string with new line tag in it. how to do that? % > % >my try: % >$string="-line1n\ -line2 n\-line3"; % >echo "$string"; Did you type this from memory or paste

[PHP] Re: Extending PHP

2003-01-23 Thread J Smith
Look at PEAR's PECL project: http://cvs.php.net/cvs.php/pear/PECL J Mh wrote: > I am looking for 3d party extensions of PHP like PHPTurbine. Anything > will > do, I am just curious whats available. Anyone know of any sites dedicated > to PHP extensions that I can look at? > > Thanks > Mh

RE: [PHP] Sessions & Security

2003-01-23 Thread Clarkson, Nick
Thanks - I've only just joined the list so must have missed your previous msgs. I'll give them a read later. Thanks again. Nick -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED]] Sent: 23 January 2003 15:28 To: Clarkson, Nick; [EMAIL PROTECTED] Subject: Re: [PHP] Session

Re: [PHP] looking for PHP, MYSQL & IMAGEMAGIK hosting

2003-01-23 Thread David T-G
Vahan, et al -- ...and then Vahan Yerkanian said... % % I know I'll start another flamewar, but I'm desperate for % a quality hosting provider supporting php/mysql/imagemagik % % anyone has good experience with any company? I promise that I'm not just here to keep beating my own drum, but you'v

[PHP] editing textfile

2003-01-23 Thread Patrick
Hi, i got a textfile and i want to edit one post in it. here is what i use to read the file $fp = fopen($servername, "r") or die("error"); $wuser = file($servername); $num = -1; for ($i=0; $i < count($wuser); $i++) { $wtemp = explode(";;", $wuser[$i]); if ($ausername == $wtemp[0]) {

Re: [PHP] HELP: Regex pattern matching

2003-01-23 Thread Nasko Vassilev
Thanks indeed! This pattern worked just perfect. Nasko "1lt John W. Holmes" <[EMAIL PROTECTED]> wrote in message 00e601c2c2e0$0c204720$a629089b@TBHHCCDR">news:00e601c2c2e0$0c204720$a629089b@TBHHCCDR... > If the separators are always the same length, then you can use the > following: > > $new_str

[PHP] A way to detach the existing session data while making a new one???

2003-01-23 Thread Scott Fletcher
Hi! I'm wondering is, is there a way to lose the existing session and existing session data while making a new session id??? I can't use session_destroy() function because it affected IE users, it doesn't affect the non-IE user at all. I got so tired of problems with IE and having it to wor

Re: [PHP] changing a key in an array

2003-01-23 Thread Brent Baisley
Unless the user has a lot of baskets, I would assume you would just list all the baskets the user has as links on the web page or as a pop up menu. The value passed by the links or pop up would be the element number of the array item containing the desired basket. To extract a basket by name I w

[PHP] Possible Bug in 4.3.0

2003-01-23 Thread Bob Horton
I've got a site running PHP w/ MySQL & DBF extensions on Apache with mod_ssl/openssl. Yesterday, following upgrading to 4.3.0 (and upgrading mod_ssl/apache as well) the site stopped working. I quickly figured out there was a change in session processing and that I needed to no longer use global v

[PHP] Size of images (in bytes)

2003-01-23 Thread Oliver Witt
Hi, After calling to the function ImageCreateFromJPEG() and before outputing the image with ImageJPEG, is there a way to determine the images size in bytes? I want to reduce the quality more and more until it has reached a certain level. Thanks, Olli -- PHP General Mailing List (http://www.php.n

[PHP] Cycle through multiple servers....

2003-01-23 Thread Christopher Ditty
Hello all. I have a few servers that I need to check during a login process. If the first server fails to connect, then I need to do server #2 and so on. Below is the code that I am using, but I am unable to get it to work like it should. Can anyone offer some advice on how this should be ac

Re: [PHP] Size of images (in bytes)

2003-01-23 Thread 1LT John W. Holmes
> After calling to the function ImageCreateFromJPEG() and before outputing > the image with ImageJPEG, is there a way to determine the images size in > bytes? > I want to reduce the quality more and more until it has reached a > certain level. > Thanks, > Olli You have the image data in a string,

[PHP] Word Count

2003-01-23 Thread Craig
Is there a way to count the number of words in a string? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Size of images (in bytes)

2003-01-23 Thread Oliver Witt
"1lt John W. Holmes" schrieb: > > After calling to the function ImageCreateFromJPEG() and before outputing > > the image with ImageJPEG, is there a way to determine the images size in > > bytes? > > I want to reduce the quality more and more until it has reached a > > certain level. > > Thanks, >

Re: [PHP] Word Count

2003-01-23 Thread Chris Boget
> Is there a way to count the number of words in a string? Untested, but this should work. $string = "Is there a way to count the number of words in a string?" $numOfWords = count( explode( " ", $string )); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

Re: [PHP] Word Count

2003-01-23 Thread Adam Voigt
Umm, how about: $string = "hi my name is bob"; $count = (substr_count($string," ")+1); On Thu, 2003-01-23 at 11:35, Craig wrote: Is there a way to count the number of words in a string? -- PHP General Mailing List (http://www.php.

[PHP] $_GET space in index changed to underscore

2003-01-23 Thread Per
Hi Anyone who knows why get variables whit spaces in looking like this in the URL blah.php?aa+bb=1 is changed to aa_bb in $_GET resulting in $_GET['aa_bb'] instead of $_GET['aa bb']? /P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] $_GET space in index changed to underscore

2003-01-23 Thread Jon Haworth
Hi Per, > Anyone who knows why get variables whit spaces in looking like this in > the URL blah.php?aa+bb=1 is changed to aa_bb in $_GET resulting in > $_GET['aa_bb'] instead of $_GET['aa bb']? I don't think spaces are legal in variable names - PHP's probably just trying to recover from the dod

Re: [PHP] A rather strange problem.

2003-01-23 Thread Tom Rogers
Hi, Thursday, January 23, 2003, 10:47:56 PM, you wrote: DLM> hello friends, DLM> I run some queries and output the database fields in a form with text boxes for the purpose of editing by the administrator. My problem is that if my field value is of 2 words or more, my output DLM> text box shows

Re: [PHP] $_GET space in index changed to underscore

2003-01-23 Thread 1LT John W. Holmes
> Anyone who knows why get variables whit spaces in looking like this in > the URL blah.php?aa+bb=1 is changed to aa_bb in $_GET resulting in > $_GET['aa_bb'] instead of $_GET['aa bb']? That's just what PHP does. It'll also convert any periods in a form element name to an underscore. Otherwise, i

  1   2   >