Re: [PHP] gettin parameters from url, architecture question

2003-08-11 Thread Curt Zirzow
* Thus wrote Merlin ([EMAIL PROTECTED]): Hi there, I recently dumped into a site which was kind of search engine optimized. They had urls like this: server.com/country_province_city_222.html where country would be a php file, but how are those guys picking the right file? Where is the

[PHP] Re: PHP Fusebox

2003-08-11 Thread Nicolas Frisby
I just recently did a bit of research into standardized development processes and such and the most robust system I have found is XML and XSLT. I realize that the whole idea of the 'fusebox' page is lost, but XSL allows you to generate just about anything and XML's standard formats (DocBook and

Re: [PHP] Mail

2003-08-11 Thread Sean
Got it if anyone else has trouble. In the IIS SMTP properties go to the Access Tab. Click the Relay button at the bottom and change the selection from Only the list below to All except the list below I have no idea if this is a security risk it works that's all I care about for now. Sean --

Re: [PHP] find string

2003-08-11 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 11 Aug 2003 at 00:25, lines prefixed by '' were originally written by you. Isn't there an in_array function you can use? If (in_array($action, array(a1,a2,a3,a4)) { // do something else { // do something else Carl. Make sure that

[PHP] MIME Mail Problem with Netscape

2003-08-11 Thread Hendry J
Hi all, I'm having problem sending MIME Mail using PHP (SMTP) to netscape.net emails, it didn't display the content of html, (although i've filled the content-type with text/html), instead, it display the garbled text. I've tried to encode the message with 7bit and base64 encoding, but those

Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-11 Thread Jason Wong
On Monday 11 August 2003 13:01, Simon Fredriksson wrote: Anyway; I want to make some sort of PHP backdoor to start sshd again. As far as I know, only root can do so though so just an exec() won't do. How can I switch to root, enter the password and then start sshd via a PHP script that I run

Re: [PHP] Why Redirection works on 1 machine but not on another

2003-08-11 Thread John W. Holmes
Ow Mun Heng wrote: Hi, I have this peculiar problem, my header header( Refresh:2;url=$g_prog_path/$l_refresh_url ); is set up correctly to be the FULL pathname. It works on some PC but now on some others. I'm using IE on win98/2000. The offending one is IE6 (128bit) on Win98. (IE5.5/win98

Re: [PHP] Container functions....

2003-08-11 Thread David Otton
On Sun, 10 Aug 2003 10:50:03 -0400, you wrote: In a language that I used to program in - for development we used to be able to make a function that basically just executed everything inbetween: hidecode Print This is html printed some programming code Print this is more code; /hidecode So

Re: [PHP] Correct Coding

2003-08-11 Thread skate
That can generate an error if $Task was never assigned a value. could you not do if(@$Task == Add ){do something } to suppress the error of the variable not being set? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] preventing output dump of passthru()

2003-08-11 Thread Jon Drukman
At 05:22 PM 8/5/2003, Chris W. Parker wrote: David Nicholson mailto:[EMAIL PROTECTED] on Tuesday, August 05, 2003 5:12 PM said: $output = array(); exec(command,$output); $output = implode(,$output); That's a good idea! Well how about this? (posted in another message) $output =

[PHP] why doesn't default values for this function work

2003-08-11 Thread anders thoresson
Hi, I'm having problem with a function that I'll use to validate user input before passing it to MySQL. For strings, I want to make sure that they aren't to long, so I have written this function: function secure_string($unsafe_string, $max_length = -1, $errormessage = Too many characters. )

Re: [PHP] HELP strip slashes ???

2003-08-11 Thread John W. Holmes
Didier McGillis wrote: Everyone, I am doing an admin site for a person and their small site. I need to allow them to put in paragraphs of information. I am allowing them to put in some HTML like b, br, p a href= a very limited amout of tags. What is the best way to submit and then show this

[PHP] Re: mail() function failure

2003-08-11 Thread Ivo Fokkema
Brad Esclavon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I have made a simple script to mail an email to a person on my domain. i have tested the script with different values and i still cannot get the email. when i execute the mail function, it returns true, so i know it gets

Re: [PHP] Stop neurotic posting

2003-08-11 Thread Nicholas Robinson
I don't have time for speculative research and I'm not going to apologise for it. By answering a few queries of a technical nature, helpfully and constructively without recourse to rude TLA's and FL:A's (and not having to defend my modus operandi), I feel I earn the odd tasty morsel lobbed in

Re: [PHP] Filling a text field

2003-08-11 Thread Justin French
Any of these will work: input type='text' name='foo' value='?php echo $foo; ?' size='20' / input type='text' name='foo' value='?=$foo?' size='20' / ? echo input type='text' name='foo' value='{$foo}' size='20' /; ? easy :) Justin On Monday, August 11, 2003, at 07:01 PM, bob pilly wrote: Hi all

[PHP] someone unsubscribe hibognara@hanmir.com

2003-08-11 Thread Chris W. Parker
Transmit Report: To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED]) --- Every time I make a post to the list I get one of these mails. Someone either unsubscribe him or set his account to no-mail please. kthxbye!! -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-11 Thread Marek Kilimajer
edit /etc/inittab and add line ssh:345:respawn:/usr/bin/sshd Then tell init to reread its configuration: kill -1 1 Simon Fredriksson wrote: Oops, I did it again! Once again, I've managed to kill SSHd on my server. Hurray! _ What I want to do now, is make a script start it again. I could just

Re: [PHP] Simple cookie question

2003-08-11 Thread Justin French
On Sunday, August 10, 2003, at 01:36 PM, Liam Gibbs wrote: Does it have to be a cookie? I use the IP address and store that somewhere. Liam, please don't advise relying on the IP address for anything. It's been discussed to death on the list before, but in short, the highlights are: 1.

Re: [PHP] PHP vs ASP.NET formal opinions request

2003-08-11 Thread Chris Shiflett
--- Tim Thorburn [EMAIL PROTECTED] wrote: If your Windows Server blows up - you dial a very expensive Microsoft number to get help. If your Linux server running some manner of PHP script blows up, you send out countless emails to mailing lists hoping someone out there in the open source

Re: [PHP] Allowed mem size exhausted

2003-08-11 Thread Curt Zirzow
* Thus wrote David Nicholson ([EMAIL PROTECTED]): Hello, This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at 17:57, lines prefixed by '' were originally written by you. I would prepare the file on disk instead of memory. If you do increase the memory to handle bigger files,

Re: [PHP] Flash Actionscript List or Forum

2003-08-11 Thread Miles Thompson
Some v. active lists here: http://chattyfig.figleaf.com This is moderately active, but munges code examples, so is less useful: [EMAIL PROTECTED] And the forums at Macromedia, of course. HTH - Miles Thompson At 03:08 AM 8/8/2003 -0400, Joe Harman wrote: Hello all, I've been doing PHP for a

Re: [PHP] gzip to max 9

2003-08-11 Thread Evan Nemerson
try setting zlib.output_compression_level in your php.ini On Saturday 09 August 2003 09:42 am, Decapode Azur wrote: Dear All, ?php function wrl2wrz($buffer) { return gzencode ($buffer, 9); } ob_start(wrl2wrz); /* here the file */ ob_end_flush(); # end of the output buffering ? In

Re: [PHP] Filling a text field

2003-08-11 Thread John W. Holmes
bob pilly wrote: Is there anyway in php to fill a HTMl text input field with a php variable? Or do i have to use javascript? Like this: input type=text name=whatever value=?php echo $variable; ? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A

[PHP] Permissions denied trying to upload a move a file...

2003-08-11 Thread Jason Barnett
I'm using PHP version 4.2.2 on a Linux system running Apache. I am trying to allow my users to upload a file, however I continue to receive a Permission denied error when using move_uploaded_file() or copy(). The file appears to be sent to the temporary directory successfully, but can not be

[PHP] Why Redirection works on 1 machine but not on another

2003-08-11 Thread Ow Mun Heng
Hi, I have this peculiar problem, my header header( Refresh:2;url=$g_prog_path/$l_refresh_url ); is set up correctly to be the FULL pathname. It works on some PC but now on some others. I'm using IE on win98/2000. The offending one is IE6 (128bit) on Win98. (IE5.5/win98 works but I've

Re: [PHP] PHP vs ASP.NET formal opinions request

2003-08-11 Thread John Manko
I hate to be the one to break it to you but this isn't the real world. It's a senior project, and he has a chance to justify the reason to do a project in the language he see's fit, not what the political machine wants. I just don't buy the don't go against the tide mentality, and obviously

Re: [PHP] Stop neurotic posting

2003-08-11 Thread Jason Wong
On Wednesday 06 August 2003 13:41, [EMAIL PROTECTED] wrote: good on you , i'm sick and tired of twats replying with i dont understand your question or RTFM , i absolutely hate RTFM , the idea of the list is to help eachother out and even post back to the list the completed code someone was

[PHP] Simple cookie question

2003-08-11 Thread Matthew Koh
This may be a stupid question, but I'm trying to set up a system where I can take a poll from visitors to my website and then set a cookie so that they can't vote more than once (until they clear their cookies at least). Problem is, I don't want to put it at the top of my page, because what if

Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-11 Thread Simon Fredriksson
Yeah, but as it is, I can't start those things :P I must be root to do so. Apache is not running as root. //Simon Jason Wong wrote: On Monday 11 August 2003 13:01, Simon Fredriksson wrote: Anyway; I want to make some sort of PHP backdoor to start sshd again. As far as I know, only root

[PHP] does PHP have a equivalent to the C++ #ifndef #define?

2003-08-11 Thread Dan Anderson
I'm coding a really large web page in PHP. One of the problems I run into is I'll create a function in file inc.function.something.php and it will need a function included in inc.function.somethingelse.php. If I require() somethingelse.php in something.php and it's already been required in

Re: [PHP] Container Functions Continued.....

2003-08-11 Thread Robert Cummings
On Sun, 2003-08-10 at 18:04, Mike Morton wrote: Thanks to everyone who responded to me so far, but I fear that I have not explained myself too clearly. First of all, I understand the argument about having a testing, development and live servers, however, in the real world not every client

[PHP] Persistent connection extension not freeing connections until serveris restarted

2003-08-11 Thread Matt Anderson
Hi all, I have a fairly advanced question regarding writting modules that create persistent resources: I've written a module very similar to the 'de-facto standard' mysql implementation, however its developed a strange bug. Occasionally, after working with a persistent connection for a few page

RE: [PHP] Freelance code optimizations

2003-08-11 Thread Robert Cummings
In that case it makes perfect sense since a concatenation is not actually performed. The loops stuff though might be more tricky to determine reasoning. I imagine it has to do with the execution tree and references being created at various stages. Probably the for loop has an extra step or two

Re: [PHP] problem looping through records

2003-08-11 Thread Chris Shiflett
--- Huzz [EMAIL PROTECTED] wrote: I have a sql statement which brings about 15 records... inside the while loop i am trying to get data from another table by passing an id, the problem is i am only getting the first record .. not the whole 15 records.. The answer lies in your own code. You're

Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.

2003-08-11 Thread Curt Zirzow
* Thus wrote Simon Fredriksson ([EMAIL PROTECTED]): Oops, I did it again! Once again, I've managed to kill SSHd on my server. Hurray! _ I wonder how you can kill ssh. I ssh to my computer 24/7 and never have I killed it. Curt -- I used to think I was indecisive, but now I'm not so sure.

Re: [PHP] chown / chgrp of a http owned file after upload

2003-08-11 Thread Bix
Much appreciated! Will try the ftp approach, thanks. Jason Wong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Wednesday 06 August 2003 18:16, Bix wrote: I have written as part of my CMS, an image upload system, now when the images are placed in the destination folder, they

Re: [PHP] Array to List

2003-08-11 Thread Curt Zirzow
* Thus wrote James Johnson ([EMAIL PROTECTED]): Hello, Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it.

Re[2]: [PHP] htmlspecialchars() and HTML code

2003-08-11 Thread Tom Rogers
Hi, Saturday, August 9, 2003, 1:57:04 AM, you wrote: TJQ CPT John W. Holmes wrote: TJQ --SNIP-- TJQ Try this: TJQ TJQ textarea name=textThis is lt;somegt; text/textarea TJQ TJQ If you submit that text and then print $_REQUEST['text'], you'll TJQ see that TJQ you have TJQ TJQ This

Re: [PHP] sizeof

2003-08-11 Thread Curt Zirzow
* Thus wrote Pawe³ Kondzior ([EMAIL PROTECTED]): Hello everybody, i have strange behaviour with sizeof(). mysql_fetch_array () return for me empty array, when i count this array by sizeof() it return 1, serialized array is look like this: b:0; check it: ?php print sizeof ( unserialize (

RE: [PHP] [Newbie Guide] For the benefits of new members

2003-08-11 Thread Van Andel, Robbert
Personally, I think one of the worst replies someone on the list can do when someone new asks a question is send only a link to the manual. It's presumption that everyone will understand the way the manual is worded. There have been times when it's confused me and I needed another perspective on

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
Chris, thanks that works perfectly -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Coming from ColdFusion, this is difficult. CF has an ArrayToList() function.

[PHP] HTML equivalents of accented characters

2003-08-11 Thread Liam Gibbs
I don't think this has been discussed, although I'm not really sure what you would call these accented characters, so I haven't been able to do a complete search of the archives, so apologies if this has been previously discussed. Is there a function that not only turns into amp;, into quot;,

[PHP] Half solved (was foreach in search)

2003-08-11 Thread Ryan A
Hi, I am getting a lits of GET values and dumping the variable and the value into an array like so: $xxx=0; foreach ($_GET as $a = $v) { print Current value of \$a:$a and \$v $v.\n br; $test=$a.=.$v; $test1[$xxx]=.$test; $xxx++; } So now $test1[] contains the whole GET's variables

RE: [PHP] Hitler and Recent Threads

2003-08-11 Thread Jay Blanchard
[snip] I pity the poor sap who just joined the list and instead of finding php topics discussed finds quotes,jokes,godwins laws, quirks laws,name calling, referneces to Hitler and other topics... Can we end this now please? [/snip] This from a guy who ends his posts with [snip] We will

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
All, Thanks for your help, but this shouldn't be so freaking hard to do. sigh 1) I have a multiple select input on one page that is populated with a list of campuses. The user selects which campus(es) to search on. 2) the user submits the form and goes to the next page. 3) I want a list of the

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
John Holmes suggested that as well. What I'm getting is this: Campuses: Cal. State San Bernardino When I echo $c, I get: Cal. State San Bernardino Leading me to believe that the SQL query is wrong. BTW, I saw I was using SELECT *..., when all need is the name, so I changed it to SELECT

Re: [PHP] Array to List

2003-08-11 Thread Chris Boget
Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. implode(); I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it. [snip] $campusList = implode( ', ', $_POST['campus'] );

RE: [PHP] FDF support in RedHat

2003-08-11 Thread Jay Blanchard
[snip] Thanks for your help. I have only one question for you... Where is the PHP directory (where the php library files are) ... [/snip] Well, unfortunately I cannot answer that for sure, but it is usually something like /usr/local/php-4.x.x or something like that Good luck and may all your

Re: [PHP] hanmir!!

2003-08-11 Thread John Manko
huh? Chris W. Parker wrote: hanmir!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] magical file writing truncation

2003-08-11 Thread Jay Blanchard
[snip] OK, put stripslashes back in and show the echo'd out put again. - $text = urlencode(stripslashes(nl2br($text))); print $text; [/snip] I didn't see anything right off of the bat. You may want to output the text both ways and then compare them using

Re: [PHP] mail() usage in for loops

2003-08-11 Thread Mohanaraj
Michael Geier wrote: See answer above. With Qmail and homegrown software, I have several servers sending upwards of 13K emails per minute. All of these are HTML emails with: Custom headers, Custom unsubscribes. I create my email list and break it into files of 500, then loop through those

[PHP] sapi/embed -- how to?

2003-08-11 Thread BrianS
Just came across sapi/embed and am now looking into that direction for incorporating scripting support from my C/C++ application. Does anyone know where I can find the API docs for the zend_ functions? I can't seem to find them online. What I want to accomplish is: 1. set my 'C' variables in

RE: [PHP] Freelance code optimizations

2003-08-11 Thread Chris W. Parker
Robert Cummings mailto:[EMAIL PROTECTED] on Monday, August 11, 2003 11:11 AM said: $i = 0; while( $i++ 1000 ){} [snip] Notice the large difference when the incrementation occurs within the while check itself. Wow, look at that. I had no idea you could even do that. Now my pages

RE: [PHP] Re: [ERR] DEAD MAILBOX

2003-08-11 Thread Joe Harman
CHRISTMAS IN AUGUST! -Original Message- From: andu [mailto:[EMAIL PROTECTED] Sent: Friday, August 08, 2003 2:53 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: [ERR] DEAD MAILBOX On Fri, 08 Aug 2003 02:52:31 -0400 John Manko [EMAIL PROTECTED] wrote: arrg.

Re: [PHP] PDF Thumbnail with PHP?

2003-08-11 Thread John W. Holmes
Anthony wrote: Unfortunatly, that's not what I'm trying to do. That function will add an image to a PDF file as a thumbnail. What I want to do, is read a PDF file, and generate a thumbnail in the form of a gif or jpg and have it display in the browser. Thanks for the thought though. What about

Re: [PHP] where are my errors?

2003-08-11 Thread John W. Holmes
David T-G wrote: Hi, all -- My partner and I have done something that gets rid of our error messages, and we're not quite sure what. The identical code base (I copied it over myself; I'm sure) worked fine on another supposedly-identical RH Linux machine. is display_errors ON for one machine and

Re: [PHP] PHP vs ASP.NET formal opinions request

2003-08-11 Thread Joel Rees
In a such poor country like this, Free Software and Open Source could be the answer to the government's software needs. Well, open source and free software are not God. Netcraft surveys the internet and reports on actual server usage. It's always good for a little dose of reality:

Re: [PHP] Allowed mem size exhausted

2003-08-11 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Tue, 5 Aug 2003 at 16:45, lines prefixed by '' were originally written by you. I have the following code that generates the following error. I am using this code to prepare a zip or tar.gz file as an email attachment. Can someone suggest

[PHP] Associative to Numeric

2003-08-11 Thread Gerard Samuel
What would be the quickest, most reliable means to convert an associative array to a numeric array. Running an implode()/explode() combination comes to mind, but reliablity can be questioned when it comes to deciding a delimiter, since, the data can possibly contain any character. Any

Re: [PHP] greedy preg

2003-08-11 Thread skate
You cannot store file pointers. If you output the variable it's going to look something like Resource ID #1 which is meaningless except to the instance of the script that created it. Or did you mean something different by $file pointer? sorry, wrong words... when i meant $file is equal

RE: [PHP] PHP vs ASP.NET formal opinions request

2003-08-11 Thread Jay Blanchard
[snip] I'm not so sure it's an entirely horrible idea for a university to focus on one area over another. I went to art school - so I'm sure I'll be burned at the stake for having comments :P But a great deal of my friends who took comp sci or comp eng in uni are greatly unemployed - why you

Re: [PHP] Problem with forced downloads via HTTP headers..

2003-08-11 Thread Curt Zirzow
* Thus wrote Magnetotron ([EMAIL PROTECTED]): Can anyone verify / solve the problem I am having with downloading an image.. ?php $fpath = ../tmp/; $fname = somefile.jpg; header( Pragma: no-cache\n ); header( Content-type: image/jpg\n ); Should be image/jpeg. header(

Re: [PHP] dbx

2003-08-11 Thread Curt Zirzow
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): hi there , i am interested to know more about dbx, especially the error handling $link = dbx_connect(DBX_MYSQL, localhost, db, username, password) or die (Could not connect); is there such an error feature where it can die to the

Re[2]: [PHP] Image Header

2003-08-11 Thread Uros Gruber
Hello, Monday, August 11, 2003, 10:42:58 PM, you wrote: CS --- Uros Gruber [EMAIL PROTECTED] wrote: I made some php script to get Header from http request. When I request some image header looks like: Content-Type: text/html CS Your instincts serve you well. You want the Content-Type header

Re: [PHP] Freelance code optimizations

2003-08-11 Thread Ray
also, if you can compare to a constant, there is a notable difference as well. ?php $i = 0; $a = 1000; while( $i++ $a ){} ? real0m10.268s user0m10.000s sys 0m0.030s ?php $i = 0; $a = 1000; while( $i++ 1000 ){} ? real0m7.057s user0m6.880s sys 0m0.020s so if

[PHP] Edit a page in PHP

2003-08-11 Thread Jeremy Darling
This is driving me nuts. I know it can be done, cuz I've seen it done before, but I can't figure it out. I would like to have a php file that allows me to edit an HTML/PHP file thru my browser. Currently I have something that looks like: TextArea ?PHP $filename = /usr/local/something.txt;

Re: [PHP] Server-side script identified as IE

2003-08-11 Thread Curt Zirzow
* Thus wrote Vchat20 ([EMAIL PROTECTED]): the actual script im using can be found at http://www.cfxweb.net/civax/archives/0171.htm . and if you could post the exact code for the User-Agent header, that would be great. Installation 1. Copy the files exactly as they are sorted

Re: [PHP] Correct Coding

2003-08-11 Thread Curt Zirzow
* Thus wrote Christopher J. Crane ([EMAIL PROTECTED]): Is this the best way to do this? if(isset($Task) $Task == Add) { Do something } I want to check if the variable is set and if so, if it is Add. Yes, that is good. Remember, though, it is case sensitive so ADD wont match. Concerning

Re: [PHP] Problem occurs when included file includes anther file.

2003-08-11 Thread Nicholas Robinson
ooops, sorry, ignore my last post, I must get larger text on my screen! Missed the .: element of your path! Can you confirm that this file is a replacement for demo.php? Problem occurs when the code is like this ?php //file inc/inc1.php require './inc2.php'; ? If so, then it won't find it

[PHP] Re: How to display?

2003-08-11 Thread rush
Here is small example on how to do it with PHP MySQL and TemplateTamer: http://www.templatetamer.org/index.php?SimpleMySqlRowList rush -- http://www.templatetamer.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] partly imploding an array...possible?

2003-08-11 Thread Ryan A
Hi, I have an array with around 20-50 parts in it. This is my code: (please note that i will be getting a $_GET['page'] also) $xxx=0; foreach ($_GET as $a = $v) { print Current value of \$a:$a and \$v $v.\n br; $test=$a.=.$v; $test1[$xxx]=.$test; $xxx++; } $someVar = implode( ,