Re: [PHP] multiselects and arrays
How can i access names with '[]' w/o eval() or seeking in form's element? -elias Rouvas Stathis [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Actually, you *can* use brackets ([]) in names and javascript can handle them just fine. -Stathis. Max Vysotskiy wrote: Hi. Why doesn't PHP convert mutiselect values with plain names (not array-like) to arrays. Is there any reason to not doing this? Example: I have a page with multiselect, which name is SEL1 (I cannot use square brackets because I need to use a JavaScript on the page, so, it's not allowed in variable names to contain [ ] ). When browser submits this page, and if there are sew values selected in this multiselect, it just sends this values along to each other with same name. (such as in case of GET method: http://somehost.com/index.php?SEL1=1SEL2=2) So, why not parse this, and in case if there are more than one variable with same name, convert this variable to array, and put all the values there? Thanx -- 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 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 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] grabbing file number from article042.html?
I'm trying to get the number of a file where the filename= article00x.html. The dir looks like: 2001/article001.html, article002.html... Currently I'm grabbing it using the following code: $path_info = preg_split(/\//i, $PHP_SELF,-1, PREG_SPLIT_NO_EMPTY); $current_file = end($path_info); $current_year = prev($path_info); // gives me the year. // is it a valid article name? if (preg_match('/^' . ARTICLE_BASE_NAME . '\d{3}\.html$/i', $current_file) ) { *** $result = preg_split(/^ . ARTICLE_BASE_NAME . /i, $current_file,-1, PREG_SPLIT_NO_EMPTY); *** $result = preg_split(/.html/i, end($result),-1, PREG_SPLIT_NO_EMPTY); ^ | $filenumber = (int)reset($result); | Is this the best way to do it? I have had no experience with Reg ex before this so fire away! -- 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] split string
$test = 1,2,3; $arrTest = explode(,,$test); foreach($arrTest as $k=$v) { $vname = test.(!$k?:$k); // global for use later global $$vname; $GLOBALS[$vname] = $v; } // now global $test, $test1, $test2 exist etc -Original Message- From: Jacky [mailto:[EMAIL PROTECTED]] Sent: 11 May 2001 16:24 To: [EMAIL PROTECTED] Subject: [PHP] split string I got series of string value like this 1,2,3. And the seires are dynamaic, which means it is not always 1,2,3 but could be more, but always in this format that is separated by , . How do I pick each of value in the series and assign it into new vairiable, like from: $test = 1,2,3; and assign to be $test =1; $test1=2; $test2 =3; Is theer any function that could help me with that? because I need to update table using those value but I cannot use series of value to update, have to break them down to each variable like that. Jack [EMAIL PROTECTED] There is nothing more rewarding than reaching the goal you set for yourself -- 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] Site Search Engine
Hello. I'm looking for a good Site Searching program or script.. I'm currently using http://WebGlimpse.org But it is looking inside my PHP files and showing their source! ie: i search for: echo Hello and WebGlimpse show search result as: ? blah blah echo hello . . basically i need something in PHP rather in whatever WebGlimpse is written in... -elias http://www.eassoft.cjb.net -- 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] Passing Objects Vol II
In index2.php change the line $myInstance=urldecode ( unserialize($passedClass) ); to $myInstance=unserialize ( urldecode($passedClass) ); and you should be happy... I also assume you have register_globals turned on in php.ini. Pavel - Original Message - From: [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Friday, May 11, 2001 4:21 AM Subject: [PHP] Passing Objects Vol II hmm well I tried it perhaps another step is in order. Once I can see it work once I will be happy. // // index.php contains: // pre ?php include( classes.inc ); $myInstance=new Main( $REMOTE_HOST , nick , zzyzx , true); echo $myInstance-client . \n; echo $myInstance-user . \n; echo $myInstance-password . \n; echo $myInstance-allowed . \n; ? a href= ?php echo index2.php?passedClass= . urlencode(serialize($myInstance)) ; ? Test /a /pre // // index2.php contains: // pre ?php include(classes.inc); $myInstance=urldecode ( unserialize($passedClass) ); echo $myInstance-client . \n; echo $myInstance-user . \n; echo $myInstance-password . \n; echo $myInstance-allowed . \n; ? /pre // // classes.inc contains: // ?php class Main { var $client; var $user; var $password; var $allowed; function Main( $client=0.0.0.0 , $user= , $password= , $allowed = false) { $this-client= $client; $this-user = $user; $this-password = $password; $this-allowed = $allowed; } } ? // // THE MSG I GET // Warning: unserialize() failed at offset 3 of 130 bytes path to file here on line 6 -- 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 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] Posted earlier no reply
Hi, It would be my pleasure to help! but can you please lessen your source code and give code+question same time in a short way? Adrian D'Costa [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I am trying to write a php and javascript that will pick up data from a table and display and scroll it. I seem to have run out of ideas how to make the script work. I don't get any display on the screen. I use rand() limit 1 so only one row is selected. Can some one tell me where I went wrong? Adrian =cscroll.php === ? define(CS_FORM, 0); define(A-city, 0); define(A-curr1, 1); define(A-catalogo, 2); define(A-hf, 3); define(A-curr2, 4); define(A-vitofferta, 5); define(A-fh, 6); class cscroll { var $data; var $tcity; var $tcurr1; var $tcatalogo; var $thf; var $tcurr2; var $tvitofferta; var $tfh; function cscroll($data) { /* **copy parameters into properties */ $this-data = $data; foreach($data as $row) { //create list of unique choices for first selector $this-tcity[($row[A-City])] = $row[A-City]; $this-tcurr1[($row[A-curr1])] = $row[A-curr1]; $this-tcatalogo[($row[A-catalogo])] = $row[A-catalogo]; $this-thf[($row[A-hf])] = $row[A-hf]; $this-tcurr2[($row[A-curr2])] = $row[A-curr2]; $this-tvitofferta[($row[A-vitofferta])] = $row[A-vitofferta]; $this-tfh[($row[A-fh])] = $row[A-fh]; } } } function initialize() { echo (form); echo(input name=message size=57 value=\$this-data[A-city]\); echo(/form); } scroll.php while($row = mysql_fetch_object($result)) { $tarray[] = array( A-city=$row-city, A-curr1=$row-curr1, A-catalogo=$row-catalogo, A-hf=$row-hf, A-curr2=$row-curr2, A-vitofferta=$row-vitofferta, A-fh=$row-fh, ); } //instantiate class $tscroll = new cscroll( $tarray); ? html head script language=JavaScript !-- // Text box marquee Modified by Prasad Mapatuna // CHANGE THESE TO ALTER THE SCROLL SPEED var timerID=null var run=false count = 10 // counter of cycles ScrollSpeed = 300; // milliseconds between scrolls ScrollChars = 1;// chars scrolled per time period function Stop() { if(run) clearRimeout(timerID) run=false } function Start() { Stop(); Marquee() } function Marquee() { var msg = document.forms[0].message.value; var tmp = msg.substring(0,ScrollChars); msg = msg.substring(ScrollChars) + tmp; document.forms[0].message.value = msg; if(count200) { timerID = setTimeout('Marquee()',ScrollSpeed); run= true; count++; } } !-- end -- /script title/title META HTTP-EQUIV=Pragma CONTENT=no-cache META HTTP-EQUIV=Cache-Control CONTENT=no-cache /head body bgcolor=white script type=text/javascript language=JavaScript ?php initialize(); ? ?php include(footer.php); ? -- 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 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] Hi!
with the variable HTTP_REFERER you go to the previous page. That means one page back in time. But how do go two pages back? Anyone have suggestions. Thanks for all the help you can give. //Johan -- 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] Hi!
Hi Ben. I need the URL for two pages back to be saved as a variable. I am going to format the adress for two pages back and redirect the user to the formatted URL. Sounds weird but i really nead it. -Original Message- From: Ben Cairns [mailto:[EMAIL PROTECTED]] Sent: den 11 maj 2001 10:10 To: Johan Vikerskog (ECS); php-general Subject: RE: [PHP] Hi! You can so this with JavaScript: A HREF = history.go(-2)Go back Two Pages/A -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.. -- 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] preview function with upload
Hi, Does anyone know how to implement a preview function. That preview function is work after selecting the specific picture to upload in php upload function, when people click the preview function, the the selected upload product will show up on the screen. Hope, I am clear enough. Thank you Mark -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] preview function with upload
-Original Message- From: Mark Lo (3) [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 4:39 AM To: ListPHP Mailing Subject: [PHP] preview function with upload Hi, Does anyone know how to implement a preview function. That preview function is work after selecting the specific picture to upload in php upload function, when people click the preview function, the the selected upload product will show up on the screen. Hope, I am clear enough. Thank you Mark Yes. What you do after they have Browsed (using the appropriate form functions), you simply capture the actual Client side Machine path of the image they want to upload, and set that as the Img tags SRC value. For example: img src=C:\Documents and Settings\Administrator.GENRIC\My Documents\My Pictures\Sample.jpg This will display the image to the person. While I have not tested it out on various browsers, I know it works in IE, and don't see any reason why it wouldn't work on other browsers. After this, they simply click agree, and the normal file uploading procedure goes from there. Jason Lotito www.NewbieNetwork.net VI VI VI : Editor of the Beast -- 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] Has anyone tried to make telnet client with php?
On Thu, May 10, 2001 at 08:28:59PM -0700, Grishick wrote: Has anyone ever tried to make a telnet client with PHP? Any ideas how to make it? Tried to make it with socket, fsockopen, fputs, freads - does not work for telnet. Probably cURL will help? Deadly need an advice. Thanks. Grishick. [EMAIL PROTECTED] the attached code was written in a hurry and does _no_ error checking - but it does work (for me). ? error_reporting(-1); class Telnet { /* (c) [EMAIL PROTECTED] */ var $sock = NULL; function telnet($host,$port) { $this-sock = fsockopen($host,$port); socket_set_timeout($this-sock,2,0); } function close() { if ($this-sock) fclose($this-sock); $this-sock = NULL; } function write($buffer) { $buffer = str_replace(chr(255),chr(255).chr(255),$buffer); fwrite($this-sock,$buffer); } function getc() { return fgetc($this-sock); } function read_till($what) { $buf = ''; while (1) { $IAC = chr(255); $DONT = chr(254); $DO = chr(253); $WONT = chr(252); $WILL = chr(251); $theNULL = chr(0); $c = $this-getc(); if ($c === false) return $buf; if ($c == $theNULL) { continue; } if ($c == \021) { continue; } if ($c != $IAC) { $buf .= $c; if ($what == (substr($buf,strlen($buf)-strlen($what { return $buf; } else { continue; } } $c = $this-getc(); if ($c == $IAC) { $buf .= $c; } else if (($c == $DO) || ($c == $DONT)) { $opt = $this-getc(); // echo we wont .ord($opt).\n; fwrite($this-sock,$IAC.$WONT.$opt); } elseif (($c == $WILL) || ($c == $WONT)) { $opt = $this-getc(); // echo we dont .ord($opt).\n; fwrite($this-sock,$IAC.$DONT.$opt); } else { // echo where are we? c=.ord($c).\n; } } } } $tn = new telnet(192.168.255.100,23); echo $tn-read_till(ogin: ); $tn-write(admin\r\n); echo $tn-read_till(word: ); $tn-write(thieso\r\n); echo $tn-read_till(: ); $tn-write(ps\r\n); echo $tn-read_till(: ); echo $tn-close(); ? -- 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] weird problems with file uploads
Hi all! This is my first intervention in this list. This is probably a tyipical problem but I have scoured the web for a solution and I haven't found one. I'm trying to implement a file upload on a website so people can send us files of their work and I'm having a fantastic success with text files. The problem comes when I try to upload binary files such as zip or mp3, when I get the typical file attack error mesage from the script, in other words, the is_uploaded_file() function does not recognise the file correctly. can anyone give me a lead as on what the problem might be? Thanks for your patience Jordi -- 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] Re: Reliability of Window-version of PHP
I'm planning to use PHP for Windows on Windows 2000 Advanced Server as CGI. Wondering if Php on Windows is stable/robust enough for a 1 million hits per month site ? Yes it is. Assuming everything is well set up and the crackers don't have a go at your machine you should have no worries on the stability/robustness front. Depending on the complexity of your scripts, you may have some performance issues at times of peak load. Suck it and see if you can. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- 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] Hi!
If you know what page(s) are being used to load the end page then on these pages you could pass the $HTTP_REFERER value from the middle page to the end one and use that in the redirect Tom Carter Web Architect roundcorners ltd. On Fri, 11 May 2001, Johan Vikerskog (ECS) wrote: Hi Ben. I need the URL for two pages back to be saved as a variable. I am going to format the adress for two pages back and redirect the user to the formatted URL. Sounds weird but i really nead it. -Original Message- From: Ben Cairns [mailto:[EMAIL PROTECTED]] Sent: den 11 maj 2001 10:10 To: Johan Vikerskog (ECS); php-general Subject: RE: [PHP] Hi! You can so this with JavaScript: A HREF = history.go(-2)Go back Two Pages/A -- Ben Cairns - Head Of Technical Operations intasept.COM Tel: 01332 365333 Fax: 01332 346010 E-Mail: [EMAIL PROTECTED] Web: http://www.intasept.com MAKING sense of the INFORMATION TECHNOLOGY age @ WORK.. -- 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 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] Demonstration of Passing Objects
Thanks for your help in the Vol I and Vol II of passing variables. I have put up a quick little page to show the passing of variables and the correction suggested here by Pevel. Kalian http://24.11.192.82/objects/ sometimes seeing the solution is the best way to learn. I am only going to leave it there for a few days so if it moves feel free to email me. one last question. Since the object is serialized how would you suggest getting to the next page form an href? I have this little question left from my built sample - Original Message - From: Pavel Kalian [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Php-General (E-mail) [EMAIL PROTECTED] Sent: Friday, May 11, 2001 12:56 AM Subject: Re: [PHP] Passing Objects Vol II In index2.php change the line $myInstance=urldecode ( unserialize($passedClass) ); to $myInstance=unserialize ( urldecode($passedClass) ); and you should be happy... I also assume you have register_globals turned on in php.ini. Pavel - Original Message - From: [EMAIL PROTECTED] To: Php-General (E-mail) [EMAIL PROTECTED] Sent: Friday, May 11, 2001 4:21 AM Subject: [PHP] Passing Objects Vol II hmm well I tried it perhaps another step is in order. Once I can see it work once I will be happy. // // index.php contains: // pre ?php include( classes.inc ); $myInstance=new Main( $REMOTE_HOST , nick , zzyzx , true); echo $myInstance-client . \n; echo $myInstance-user . \n; echo $myInstance-password . \n; echo $myInstance-allowed . \n; ? a href= ?php echo index2.php?passedClass= . urlencode(serialize($myInstance)) ; ? Test /a /pre // // index2.php contains: // pre ?php include(classes.inc); $myInstance=urldecode ( unserialize($passedClass) ); echo $myInstance-client . \n; echo $myInstance-user . \n; echo $myInstance-password . \n; echo $myInstance-allowed . \n; ? /pre // // classes.inc contains: // ?php class Main { var $client; var $user; var $password; var $allowed; function Main( $client=0.0.0.0 , $user= , $password= , $allowed = false) { $this-client= $client; $this-user = $user; $this-password = $password; $this-allowed = $allowed; } } ? // // THE MSG I GET // Warning: unserialize() failed at offset 3 of 130 bytes path to file here on line 6 -- 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 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 General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re: PHP + GD + FreeBSD
Take a look into the GD makefile. I had once a problem like yours and there was the solution. Daniel BI - When i compile PHP on my FreeBSD with the following confgoptions, i don't get png support. Whats wrong? -- 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] Can PHP send MSmail????
Would you tell me more detail ? Are there any reference source? Do you mean what I need to do is to point the smtp server setting to the ip of my exchange server and let it do the rest? Thanks for advice!!! Alan. Don Read [EMAIL PROTECTED] ¼¶¼g©ó¶l¥ó [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Point SMTP in the php.ini file to your Exchange server, and let it handle the RFC822 - MAPI conversion. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- 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 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] Php.ini style change
Can anyone tell me why they checnged the style of the php.ini file. I feel it's hardly readable anymore. Finding stuff was a lot easier when all the comments where on the right side instead of between the different directives. Anyone disagree? -- 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] StripSlashes
On Thursday 10 May 2001 22:11, Sterling wrote: H- I'd like to be able to strip the slashes from all the imported HTTP_POST_VARS. I found the $string = stripslashes($string); command. But this becomes very tedious if I have 20 vars and I need to code each one with its own stripslashes line. If you set magig_quotes_gpc = off in your php.ini you don't need the stripslashes anymore (just make sure that you use addslashes () on the data before inserting it into the database). Which I am currently doing in a function. So I have two situations. One: function scrub_slashes(){ $email = stripslashes($email); $first_name = stripslashes(first_name); My method for reading POST data: /* * Get variable name from POST request * Automatically strips slashes when needed */ function pbGetPOST ($Name) { global $HTTP_POST_VARS; if (isset ($HTTP_POST_VARS[$Name])) { if (get_magic_quotes_gpc () is_string ($HTTP_POST_VARS[$Name])) return stripslashes ($HTTP_POST_VARS[$Name]); else return $HTTP_POST_VARS[$Name]; } else { return ; } } function GetFormData () { $email = pbGetPOST ('email'); $first_name = pbGetPOST ('first_name'); ... } I'm not sure if I'm doing this function correctly. From what I understand I think I need to pass each variable to the function; which would negate the speedyness of my typing which is what I'm going for anyway. function scrub_slashes($email, $first_name, etc){ CODE } and it'd be called like so $scrub_error = scrub_slashes($email, $first_name, etc) Hmm, I think someone else answered that already. But another thing I miss in your code is the use of 'global' (See http://php.net/manual/en/language.variables.scope.php) -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? -- 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] include(../file.inc);
How do you include or require a file that is above the current script in the directory hierarchy? For example how would I include or require a file whose path is ../file.inc relative to the current script? I tried all of: include(../file.inc); require(../file.inc); include(/file.inc); require(/file.inc); include(..\file.inc); require(..\file.inc); include(\file.inc); require(\file.inc); but it doen't like any of them. :( I don't want to use a full path relative to the root of the drive or webserver folder because the included file and the script may move as the development server is setup differently to the real web server. Any ideas? -- Thanks, Matt [EMAIL PROTECTED] www.mralston.co.uk / -- 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] include(../file.inc);
Either of the first two should work under linux. I have done similar many times myself e.g. require_once ../common/localvars.php; -Stewart -Original Message- From: Matthew Ralston [mailto:[EMAIL PROTECTED]] Sent: 11 May 2001 11:40 To: [EMAIL PROTECTED] Subject: [PHP] include(../file.inc); How do you include or require a file that is above the current script in the directory hierarchy? For example how would I include or require a file whose path is ../file.inc relative to the current script? I tried all of: include(../file.inc); require(../file.inc); include(/file.inc); require(/file.inc); include(..\file.inc); require(..\file.inc); include(\file.inc); require(\file.inc); but it doen't like any of them. :( I don't want to use a full path relative to the root of the drive or webserver folder because the included file and the script may move as the development server is setup differently to the real web server. Any ideas? -- Thanks, Matt [EMAIL PROTECTED] www.mralston.co.uk / -- 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 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] php and asp
You can use this code: set fso = Server.CreateObject(Scripting.FileSystemObject) set fs = fso.GetFolder(Server.MapPath(/images)) for each file in fs.Files Response.write file.name br Response.write file.size next You'll have to use the FileSystemObject in order to get data from a text file, or get the file type, size, etc... []'s Luiz Vitor - Original Message - From: todd kennedy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 12:42 AM Subject: [PHP] php and asp i've got a problem...i've written some stuff in PHP and now the person I wrote it for is looking for an ASP version to play with as well... I've gotten most of it working in ASP now (eek. VBScript is downright archaic compared to php4), but I'm having problems finding an equivelent for one PHP function that's pretty central to the code (it's a photogallery)... the funciton is: getImageSize does any one know of an ASP equivelent to this? thanks in advance todd kennedy -- 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 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] php and asp
I forgot to tell you... you don't need to install any component in your server. The FileSystemObject already comes with IIS 5.0. []'s Luiz Vitor - Original Message - From: todd kennedy [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 12:42 AM Subject: [PHP] php and asp i've got a problem...i've written some stuff in PHP and now the person I wrote it for is looking for an ASP version to play with as well... I've gotten most of it working in ASP now (eek. VBScript is downright archaic compared to php4), but I'm having problems finding an equivelent for one PHP function that's pretty central to the code (it's a photogallery)... the funciton is: getImageSize does any one know of an ASP equivelent to this? thanks in advance todd kennedy -- 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 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] update statement
Hi, I got a series of string value in this format ie: 1,2,3, say pretend that these are telephone number, which is one feild in user table. I need to update this telephone number field, I got 3 user ID in series like this too, ie: 3,4,5 and normally it is like update set where userID IN (3,4,5) ( when there is one vaule to update, not series of string to update). I would think about the general layout of the DB. It is not good to store more than one value in one field. Do some normalisation on your DB or read: http://www.devshed.com/Server_Side/MySQL/Normal/ and http://www.devshed.com/Server_Side/MySQL/Normal2/ hope it helps Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] problem forcing download
Hi, I'm having some problems with forcing a file download. I want to use the script to force the download of .doc,.pdf and .txt files so they don't get opened in the current browser window. I already have a script that works on most browsers (ie5.01, netsc4.07, netsc6.01, opera4.01 all on PC) except for IE 5.5 and Opera 5 on PC. Macintosh browsers (both IE and Netscape) don't like my script either... IE 5.5 just opens the file in the browserwindow, Opera 5 just opens raw code in the browserwindow (as if they were textfiles). I already had to use a little hack to please IE 5.5, otherwise download.php got downloaded instead of the actual file... Please have a look at the code below. I know I could use a javascript popup window, but I realy would like to get this script going... All tips are greatly appreciated! Thanx alot! Bert This is what I've got for now: ** ? //download.php, a result of some serious cutting and pasting... //download.php?file.ext will get 'file.ext' from the download directory //download.php?somesubdir/file.ext will get 'file.ext' from 'somesubdir' in the download directory $what_to_get = getenv(QUERY_STRING); //this puts cookie to know they have downloaded before SetCookie(Download,yep, time()+3600, /, www.domain.com, 0); $size = filesize(/path/to/the/download/dir/$what_to_get); //we wanna know the name of the file, without the directories $my_name_is = basename($what_to_get); //headerstuff //use one of these 2, I don't know if it makes a difference... //header(Content-Type: application/octet-stream); header(Content-Type: application/force-download); //need the size of our file header(Content-Length: $size); // IE5.5 just downloads download.php if we don't do this... // for now I only check on 5.5 but what if 6.0 has the same problem?? if(preg_match(/MSIE 5.5/, $HTTP_USER_AGENT)) header(Content-Disposition: filename=$my_name_is); } else header(Content-Disposition: attachment; filename=$my_name_is); } header(Content-Transfer-Encoding: binary); $fh = fopen(/path/to/the/download/dir/$what_to_get, r); fpassthru($fh); exit; ? ** -- 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] stumped
Hi, I need to find a solution to this. I am lost. To see what I talk about check vvmm.net/search.php3. I am using php 4 offline. Based on whatever the viewer select I get the below script to build the select statements accordingly. Everything is working fine now. I want to add another feature where, if the viewer search for a particular city that has no record I need to display all the cities for that country selected as alternative choices. The problem is trying to re-build the select statements. I have reduced the checking as the script is too long, but checking the link earlier mentioned would give an idea. Each table has a countryid (contid) and cityid (cityid). Here is the code, a pls do give me a clue:) TIA Adrian $tdate = date(Y . - . m . - . d); // build search query if ($vsearch == c || $vsearch == v || $vsearch == l) { $searchStmt = select ; } // get the correct table switch ($vsearch) { case z: // this exec only if no choice is selected. $searchStmt .= ; break; case c: // Select vvmmdb table. Catalog Choice $searchStmt .= city.city as destinazione, vvmmdb.days, vvmmdb.periodo, vvmmdb.vitofferta, vvmmdb.curr1 as curr2, vvmmdb.url, vvmmdb.stars, vvmmdb.club, vvmmdb.tcode from vvmmdb,city where ; // DisplayErrMsg(Catalog Data); // exit(); break; case v: // Select special table. Vitofferta $searchStmt .= city.city as destinazione, special.periodo, special.date2, special.catalogo, special.hf, special.curr2, special.vitofferta,special.fh, special.club, special.stars from special,city where ; break; case l: // Select travel table. Last Minute $searchStmt .= travel.tour_operator, city.city as destinazione, travel.nome_hotel, travel.periodo, travel.notti, travel.giorni, travel.trattamento, travel.curr2, travel.vitofferta,travel.club, travel.stars from travel,city where ; break; case a: // select all tables and query. $searchStmt .= select travel.tour_operator, city.city as destinazione, travel.nome_hotel, travel.periodo, travel.notti, travel.giorni, travel.trattamento, travel.curr2, travel.vitofferta,travel.club, travel.stars from travel,city where ; $searchStmt1 .= select city.city as destinazione, special.periodo, special.date2, special.catalogo, special.hf, special.curr2, special.vitofferta, special.fh,special.club,special.stars from special,city where ; $searchStmt2 .= select city.city as destinazione, vvmmdb.days, vvmmdb.periodo, vvmmdb.vitofferta, vvmmdb.curr1, vvmmdb.url, vvmmdb.stars, vvmmdb.club, vvmmdb.tcode from vvmmdb,city where ; break; default: DisplayErrMsg(Error); break; } // Check if destinazione has been entered if ($dest) { switch ($vsearch) { case z: $searchStmt .= ; break; case c: // Select vvmmdb table. Catalog Choice $searchStmt .= vvmmdb.cityid=$citycode and ; break; case v: // Select special table. Vitofferta $searchStmt .= special.cityid=$citycode and ; break; case l: // Select travel table. Last Minute (travel flight) $searchStmt .= travel.cityid=$citycode and ; break; case a: // select all tables and query. // Check if destinazione has been entered if ($dest) { switch ($vsearch) { case z: $searchStmt .= ; break; case c: // Select vvmmdb table. Catalog Choice $searchStmt .= vvmmdb.cityid=$citycode and ; break; case v: // Select special table. Vitofferta $searchStmt .= special.cityid=$citycode and ; break; case l: // Select travel table. Last Minute (travel flight) $searchStmt .= travel.cityid=$citycode and ; break; case a: // select all tables and query. // $searchStmt .= destinazione like '%$destinazione%' and ; // $searchStmt1 .= destinazione like '%$destinazione%' and ; $searchStmt .= travel.cityid=$citycode and ; $searchStmt1 .= special.cityid=$citycode and ; $searchStmt2 .= vvmmdb.cityid=$citycode and ; default: //DisplayErrMsg(Error); break; } } else { $searchStmt .= ; $searchStmt1 .= ; $searchStmt2 .= ; } = I removed the other code and gave the ending -== $stmt = substr($searchStmt, 0, strlen($searchStmt)-4); $stmt1 = substr($searchStmt1, 0, strlen($searchStmt1)-4); $stmt2 = substr($searchStmt2, 0, strlen($searchStmt2)-4); == === === -- PHP
Re: [PHP] multiselects and arrays
you can have access to everything, using the following construct: window.document.forms[i].elements[j].name and window.document.forms[i].elements[j].value so, for example : htmlbodyform input type="text" name="aaa[1]" input type="text" name="aaa[2]" /form/body/html the first input text can be accessed as window.document.forms[0].element[1] while the second can be accessed as window.doucment.forms[0].elements[2] -Stathis. elias wrote: How can i access names with '[]' w/o eval() or seeking in form's element? -elias "Rouvas Stathis" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Actually, you *can* use brackets ([]) in names and javascript can handle them just fine. -Stathis. Max Vysotskiy wrote: Hi. Why doesn't PHP convert mutiselect values with plain names (not array-like) to arrays. Is there any reason to not doing this? Example: I have a page with multiselect, which name is SEL1 (I cannot use square brackets because I need to use a JavaScript on the page, so, it's not allowed in variable names to contain [ ] ). When browser submits this page, and if there are sew values selected in this multiselect, it just sends this values along to each other with same name. (such as in case of GET method: http://somehost.com/index.php?SEL1=1SEL2=2) So, why not parse this, and in case if there are more than one variable with same name, convert this variable to array, and put all the values there? Thanx -- 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 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 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 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] OT-Please bare with me :)
Check out http://www.dhtmlab.com for javascript code to create drop-down menus. On Thu, 3 May 2001 10:05:48 -0700 Brandon Orther [EMAIL PROTECTED] wrote: Hello, I am making a suite of php tolls that I want to have all incorporated in one management website. What I would like to have is a drop down menu in a frame on the left. A great example of what I want is the left drop down menu on the new Cobalt XTR server admin section. If anyone has a JavaScript or a tutorial how to make a drop down menu please send me a link. Thank you :) Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP 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] Redirect With Authentication Question
Authentication Question... My company subscribes to several pay-to-view e-commerce sites that require htaccess-type authentication. To keep things simple for our users and to ensure that our users don't use these accounts w/out our permission, we would like to keep the account IDs and passwords from the user's direct view. A simple but not entirely effective solution is to include the id/password in the URL... http://user:[EMAIL PROTECTED]/index.html The problem with the above-noted method is that the account ID and password are clearly visible. What I would rather do is point the users at a PHP script that then redirects them to the correct site with authentication already handled. I can easily handle the redirect using... header(Location: ... ) What I haven't figured out is how to include the authentication in the redirect. I understand how to use base64_encode() to encode the ID:password string. What I can't figure out is how to pass this info along with the redirect. Any thoughts on if/how this could be accomplished? For the record, I tried a different approach where I used fsockopen(), fputs(), and fpassthru() to successfully connect/authenticate and receive the HTML stream. This will actually display the results (messy). The problem with this approach is that the links on the page are all broken as the user's browser is still pointing at the local web server. In a nutshell, how can I redirect a web client to a remote site and include the authentication info as part of the redirect. Thanks, Stan -- 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] Redirect With Authentication Question
Authentication Question... My company subscribes to several pay-to-view e-commerce sites that require htaccess-type authentication. To keep things simple for our users and to ensure that our users don't use these accounts w/out our permission, we would like to keep the account IDs and passwords from the user's direct view. A simple but not entirely effective solution is to include the id/password in the URL... http://user:[EMAIL PROTECTED]/index.html The problem with the above-noted method is that the account ID and password are clearly visible. What I would rather do is point the users at a PHP script that then redirects them to the correct site with authentication already handled. I can easily handle the redirect using... header(Location: ... ) What I haven't figured out is how to include the authentication in the redirect. I understand how to use base64_encode() to encode the ID:password string. What I can't figure out is how to pass this info along with the redirect. Any thoughts on if/how this could be accomplished? For the record, I tried a different approach where I used fsockopen(), fputs(), and fpassthru() to successfully connect/authenticate and receive the HTML stream. This will actually display the results (messy). The problem with this approach is that the links on the page are all broken as the user's browser is still pointing at the local web server. In a nutshell, how can I redirect a web client to a remote site and include the authentication info as part of the redirect. Thanks, Stan -- 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] Phorum and IBM DB2
Anyone have experience that deploy phorum with IBM DB2 as backend database ? Or, can this be done? The webserver is still apache. Any hints on how to do this? Thanks! Yong -- 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[2]: [PHP] PHP Editor
Hi Grishick, Grishick Nothing is better then HomeSite Agreed ;-) --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.net -- 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] Question re: JOIN statement PHP/MySQL
Hi, Can anyone tell me how to properly execute a JOIN from PHP to MySQL?? I just want to JOIN two tables, both of which have 'user_id' in common, and then get all of the fields from the matching records. Can anyone tell me where to find some info on this or cut-n'-paste a little helpful code? Thanks a lot to everyone. - John Haag O N E P O W E R F U L C L I C K All4one Search Machine http://www.all4one.com All4one Submission Machine http://www.all4one.com/all4submit (614) 575-9897 -- 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] php4 phplib problems
is anyone using phplib with php4? I seem to be unable to get it working on a win98 machine with php4.0.5 It seems unable to use phplib. Error is: Warning: Undefined variable: sid in C:\Inetpub\scripts\lib\phplib\session.inc on line 393 Warning: Cannot add header information - headers already sent by (output started at C:\Inetpub\scripts\lib\phplib\session.inc:393) in C:\Inetpub\scripts\lib\phplib\session.inc on line 117 Warning: Cannot add header information - headers already sent by (output started at C:\Inetpub\scripts\pangea\lib\phplib\session.inc:393) in C:\Inetpub\scripts\lib\phplib\session.inc on line 401 I have been using it with php3 before successfully Please help I am missing something obvious? Colm Rafferty -- 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] Question re: JOIN statement PHP/MySQL
SELECT * FROM table1, table2 WHERE table1.user_id = table2.user_id John E. Haag wrote: Hi, Can anyone tell me how to properly execute a JOIN from PHP to MySQL?? I just want to JOIN two tables, both of which have 'user_id' in common, and then get all of the fields from the matching records. Can anyone tell me where to find some info on this or cut-n'-paste a little helpful code? Thanks a lot to everyone. - John Haag O N E P O W E R F U L C L I C K All4one Search Machine http://www.all4one.com All4one Submission Machine http://www.all4one.com/all4submit (614) 575-9897 -- 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 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] Slightly OT - PHP Mileage from Zip Code Calculator
Not sure what you're asking exactly, but I have a Find a Dealer page where a person puts in their zip code and selects how far they want to look. http://earthcomfort.com/find_a_dealer.html Is that what you're looking for? Todd Pillars wrote: I found a site that had a commercial PHP version of a zip code mileage calculator, but the site owners have not responded to my request. Does anyone know of a calculator written in PHP that will allow users to enter their zip code and select the amount of miles radius of their home? Commercial versions are okay, Free would be better ;) Thank you for your help and patience. Todd -- 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 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] Slightly OT - PHP Mileage from Zip Code Calculator
I've also been interested in knowing how this is done. If you are willing to share, please post the source to your page. Thanks, joe bill([EMAIL PROTECTED])@Fri, May 11, 2001 at 09:07:26AM -0400: Not sure what you're asking exactly, but I have a Find a Dealer page where a person puts in their zip code and selects how far they want to look. http://earthcomfort.com/find_a_dealer.html Is that what you're looking for? Todd Pillars wrote: I found a site that had a commercial PHP version of a zip code mileage calculator, but the site owners have not responded to my request. Does anyone know of a calculator written in PHP that will allow users to enter their zip code and select the amount of miles radius of their home? Commercial versions are okay, Free would be better ;) Thank you for your help and patience. Todd -- 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 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 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] weird problems with file uploads
I'm trying to implement a file upload on a website so people can send us files of their work and I'm having a fantastic success with text files. The problem comes when I try to upload binary files such as zip or mp3, when I get the typical file attack error mesage from the script, in other words, the is_uploaded_file() function does not recognise the file correctly. I do have the same problem on my WinNT box. I'm using php to store the file in a LargeBlob field in my mysql database. Text files upload successfully but binary files don't ( the Insert query fails ). If someone knows something let us know. Bye, -- Nick Mpeglitis. The first thing we do, let's kill all the lawyers. -- Wm. Shakespeare, Henry VI, Part IV -- 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] PHP 4.0.5 - segmentation fault when using OCI8
Hi, I have a development machine with 4.0.4pl1 which has been used for creating a set of scripts to access oracle (using stored procedures). It seems to be working fine (the problems that I've encountered seems to be related to the oracle/procedure itself). Last night I moved the scripts to the production server. Eveything was working ok until I try to access the part the uses the oracle where it hangs for a while and then gives me a [notice] child pid X exit signal Segmentation fault (11). I've compiled using './configure' '--with-apxs' '--with-ttf' '--with-xml' '--with-gd' '--with-ftp' '--enable-session' '--enable-trans-sid' '--with-zlib' '--enable-inline-optimization' '--with-oci8=/u01/app/oracle/product/8.1.7/' --with-mcrypt --enable-sigchild Any ideas ? Thanks. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- 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[2]: [PHP] weird problems with file uploads
Hi Mpeglitis, I'm trying to implement a file upload on a website so people can send us files of their work and I'm having a fantastic success with text files. The problem comes when I try to upload binary files such as zip or mp3, when I get the typical file attack error mesage from the script, in other words, the is_uploaded_file() function does not recognise the file correctly. Mpeglitis I do have the same problem on my WinNT box. I'm using Mpeglitis php to store the file in a LargeBlob field in my mysql database. Mpeglitis Text files upload successfully but binary files don't ( the Insert Mpeglitis query fails ). If someone knows something let us know. well, is your form enctype=multipart/mixed and method=post ? did you use open($file, rb); (b is important 4 binary) did you use addslashes when storing the file in mysql ? well, you ought to specify the problem more exactly... --- EnjoY, Adaran ([EMAIL PROTECTED]) check http://www.adaran.net -- 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] Is this still true?
From the PHP FAQ ... The last method is to use PHP as a plug-in for a multithreaded web server. Currently this is only theoretical -- PHP does not yet work as a plug-in for any multithreaded web servers. Work is progressing on support for ISAPI, WSAPI, and NSAPI (on Windows), which will all allow PHP to be used as a plug-in on multithreaded servers like Netscape FastTrack, Microsoft's Internet Information Server (IIS), and O'Reilly's WebSite Pro. When this happens, the behavior will be essentially the same as for the multiprocess model described before. I thought that PHP was available as a ISAPI NSAPI plug-in already? Is it not? cheers, Richard -- 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] Sending mail from a Unix
I'm running a couple of web scripts in a Unix system with Apache. I need to send an email message with some info but I have to do it using a SMTP running in another server on my network. How can I do this? I've tried setting the SMTP parameter in the php.ini file, but it'd only work if I'm running WinNT. Note: I can't send it via sendmail command line (local). Any ideas? Thanks, Jaime -- 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] Getting referrer from another frame
I would like to tweek the getenv(REMOTE_ADDRESS) a little. -- 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] Is this still true?
Our personal experience is that the ISAPI version, running under IIS, is not stable. Last version I tried was 4.0.4pl1. Perhaps 4.0.5 is better now, but I don't think so. I've read reports of people using PHP ISAPI under Apache on Windows, but I've not tried that myself. Richard McLean wrote: From the PHP FAQ ... The last method is to use PHP as a plug-in for a multithreaded web server. Currently this is only theoretical -- PHP does not yet work as a plug-in for any multithreaded web servers. Work is progressing on support for ISAPI, WSAPI, and NSAPI (on Windows), which will all allow PHP to be used as a plug-in on multithreaded servers like Netscape FastTrack, Microsoft's Internet Information Server (IIS), and O'Reilly's WebSite Pro. When this happens, the behavior will be essentially the same as for the multiprocess model described before. I thought that PHP was available as a ISAPI NSAPI plug-in already? Is it not? cheers, Richard -- 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] Getting referrer from other frame.
Sorry about the post before (if there was one)... It was sent by accident. Here is the complete question: I would like to tweek the getenv(REMOTE_ADDRESS); a little. I want my top frame to print the referrer for the frame below. I'm not sure if this should be done with PHP or javascript. Sounds like javascript though... Any thoughts? // Tobias -- 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: Re[2]: [PHP] weird problems with file uploads
well, is your form enctype=multipart/mixed and method=post ? did you use open($file, rb); (b is important 4 binary) did you use addslashes when storing the file in mysql ? well, you ought to specify the problem more exactly... Well, it was that addslashes() stuff :) Thank you! -- Nick Mpeglitis. The first thing we do, let's kill all the lawyers. -- Wm. Shakespeare, Henry VI, Part IV -- 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] RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with u pgrade to 4.0.5
right, that is what I though to do at first, but somehow our sysadmin denied the idea. The server is now being tested by him, and I will continue playing with PHP on Monday (it is 5.30 here in Tokyo, he will leave soon and I am not allowed the root-pass. The server belongs to another company we acquire and was originally configured by other team). Meanwhile I will download the files I was testing on into my test machine, install on it the same apache as on prod. server and the PHP v4.0.5. If the result will be the same, I will then try the snapshots as you advised to me. Maxim Maletsky -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 5:19 PM To: Maxim Maletsky; [EMAIL PROTECTED]; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [PHP] RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with u pgrade to 4.0.5 OK, but anyway you can run another Apache web server instance on a different IP of that machine. Andi At 05:19 PM 5/11/2001 +0900, Maxim Maletsky wrote: I know, but the fact is that this problem might be caused by OS/web server configuration on the production server. It is an old and slow Red Hat 6.1 Apache 1.3.9 We are first trying to set a new apache 1.3.19 on it in parallel directory, and then we testing by switching symlinks. I really believe it is a compatibility thing. Do you think we would be able to reproduce the problem on some other newer machine? If that would be so, then we'd hear lots of such complains from users upgrading to v4.0.5. After all it is just an '//'! I am gonna try it now on my test linux. I'll let you know. Maxim Maletsky -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 4:57 PM To: Maxim Maletsky; [EMAIL PROTECTED]; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with u pgrade to 4.0.5 OK but in any case, I suggest not doing it on a production server but doing it on a development port/server. Andi At 04:58 PM 5/11/2001 +0900, Maxim Maletsky wrote: OK, but I can do it only on Monday. There's too much risk doing it this Friday night, if site goes down on the weekend - that is our last nightmare. It runs now on backups, but runs well. Thanks Andi, Maxim Maletsky -Original Message- From: Andi Gutmans [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 4:15 PM To: [EMAIL PROTECTED]; Maxim Maletsky; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5 Can you try the latest snapshot from snaps.php.net and let us know if it works for you now? Andi At 06:01 PM 5/6/2001 +0800, Jude wrote: wel then it's up to you.. goodluck! =) -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 11:25 AM To: '[EMAIL PROTECTED]'; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5 nope, I won't give up. disabling '//' is so bad.. just think how much trouble I'm creating for my team. (Although, I in fact never use '//', I use '#' instead. That is why I noticed the problem so late = 20 minutes of downtime yesterday) Cheers, Maxim Maletsky -Original Message- From: Jude [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 06, 2001 6:53 PM To: Maxim Maletsky; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5 or simply you can use another comment tags.. like /* */ =) -Original Message- From: Maxim Maletsky [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 11:09 AM To: '[EMAIL PROTECTED]'; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5 But why? 1. on 4.0.1pl2 it worked. 2. I noticed it even on a function(); // comment as well. I will restart experimenting later again. I think I should upgrade my apache first, then recompile PHP, and try it again. It seems to me more of a stupid problem, I have no idea why that happen. Everything works unless there's an '//', then it starts showing the code up. Cheers, Maxim Maletsky -Original Message- From: Jude [mailto:[EMAIL PROTECTED]] Sent: Sunday, May 06, 2001 6:37 PM To: Maxim Maletsky; 'Vlad Krupin' Cc: 'PHP General List. (E-mail)'; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] RE: [PHP-DEV] WEIRD, WEIRD problem with upgrade to 4.0.5
Re: [PHP] Is the CGI-only Win32 binary compiled with --enable-sockets?
This is what it says on top of the page: System: Windows NT 5.0 build 2195 Build Date: Apr 30 2001 Server API: CGI Virtual Directory Support: enabled Configuration File (php.ini) Path: C:\WINNT\php.ini ZEND_DEBUG: disabled Thread Safety: enabled I've searched the rest of the page but all I saw was mysql.default_socket which doesn't seem relevant. Any other ideas? Michael Stearne wrote: If you make a page with phpinfo() you will see all the compile options that were used for the particluar build you have (at the top of the page). Michael Todd wrote: I'm trying the example client code under Socket Functions in the documentation and I get the error: Fatal error: Call to undefined function: socket() Is there any way to enable this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 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] preview function with upload
Do you capture the actual Client side Machine path before they hit the submit button or after? If before, I'm guessing you use javascript. If after, I have no guess. I didn't think that information was passed with the POST. kind regards, bill hollett Jason Lotito wrote: -Original Message- From: Mark Lo (3) [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 4:39 AM To: ListPHP Mailing Subject: [PHP] preview function with upload Hi, Does anyone know how to implement a preview function. That preview function is work after selecting the specific picture to upload in php upload function, when people click the preview function, the the selected upload product will show up on the screen. Hope, I am clear enough. Thank you Mark Yes. What you do after they have Browsed (using the appropriate form functions), you simply capture the actual Client side Machine path of the image they want to upload, and set that as the Img tags SRC value. For example: img src=C:\Documents and Settings\Administrator.GENRIC\My Documents\My Pictures\Sample.jpg This will display the image to the person. While I have not tested it out on various browsers, I know it works in IE, and don't see any reason why it wouldn't work on other browsers. After this, they simply click agree, and the normal file uploading procedure goes from there. Jason Lotito www.NewbieNetwork.net VI VI VI : Editor of the Beast -- 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 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] Getting referrer from other frame.
if you have two frames, for example : frame1 : the top frame frame2 : the bottom frame. in the bottom frame : script language=javascript var ref=?echo $HTTP_REFERRER;? /script in the top frame : script language =javascript document.write(refferrer is+parent.frame2.ref) /script Well, something like that I guess... Problem could be the top frame loaded before the bottom frame. In that cas, the ref javascript variable may not be initialized. At 16:20 11/05/01 +0200, Tobias Talltorp wrote: Sorry about the post before (if there was one)... It was sent by accident. Here is the complete question: I would like to tweek the getenv(REMOTE_ADDRESS); a little. I want my top frame to print the referrer for the frame below. I'm not sure if this should be done with PHP or javascript. Sounds like javascript though... Any thoughts? // Tobias -- 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] EuroVox 4, place Félix Eboue 75583 Paris Cedex 12 Tel : 01 44 67 05 05 Fax : 01 44 67 05 19 Web : http://www.eurovox.fr -- 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] PostgreSQL vs. Interbase
Hi Please discuss as to your point of view the advantage of PostgreSQL over Interbase and/or vise versa. I'm considering three (3) important points I'm just evaluating Interbase and there is an important point that did not come out in the thread. It seems that Borland went back on key commitments to the open source development team and lost their trust and goodwill. As a result, the source has forked, with most of the momentum behind the fully open source Firebird project. Borlands commitment to their own 'official' version looks pretty thin. You can find info on Firebird at: http://firebird.sourceforge.net http://www.ibphoenix.com http://www.interbase2000.com Things are at an early stage, but Firebird have already identified and fixed a major security hole during their security audit of the Borland code, and offer binary builds for a number of platforms. Looks like the Firebird fork is the one with the future. Geoff Caplan -- 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] How good is the Interbase/Firebird API?
Hi I am hoping that someone can save me some testing time. I am considering using Interbase/Firebird, but notice that there is no facility to set the maximim number of connections in php.ini - the API seems to be a bit basic. Last time I tested an RDBMS without a maximum setting, I found that there were problems with connection handling under heavy load with both persistent and non-persistent connections (this was with FrontBase ). It seemed to run out of connections and quickly died a nasty death ... Can anyone share their practical experience with how the PHP Interbase API functions under load? Also, I see from the archive that someone was having problems getting the API to function under Windows. Does anyone have this working ok? Geoff Caplan -- 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] How good is the Interbase/Firebird API?
Hi I am hoping that someone can save me some testing time. I am considering using Interbase/Firebird, but notice that there is no facility to set the maximim number of connections in php.ini - the API seems to be a bit basic. Last time I tested an RDBMS without a maximum setting, I found that there were problems with connection handling under heavy load with both persistent and non-persistent connections (this was with FrontBase ). It seemed to run out of connections and quickly died a nasty death ... Can anyone share their practical experience with how the PHP Interbase API functions under load? Also, I see from the archive that someone was having problems getting the API to function under Windows. Does anyone have this working ok? Geoff Caplan -- 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] How good is the Interbase/Firebird API?
Hi I am hoping that someone can save me some testing time. I am considering using Interbase/Firebird, but notice that there is no facility to set the maximim number of connections in php.ini - the API seems to be a bit basic. Last time I tested an RDBMS without a maximum setting, I found that there were problems with connection handling under heavy load with both persistent and non-persistent connections (this was with FrontBase ). It seemed to run out of connections and quickly died a nasty death ... Can anyone share their practical experience with how the PHP Interbase API functions under load? Also, I see from the archive that someone was having problems getting the API to function under Windows. Does anyone have this working ok? Geoff Caplan -- 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] How good is the Interbase/Firebird API?
Hi I am hoping that someone can save me some testing time. I am considering using Interbase/Firebird, but notice that there is no facility to set the maximim number of connections in php.ini - the API seems to be a bit basic. Last time I tested an RDBMS without a maximum setting, I found that there were problems with connection handling under heavy load with both persistent and non-persistent connections (this was with FrontBase ). It seemed to run out of connections and quickly died a nasty death ... Can anyone share their practical experience with how the PHP Interbase API functions under load? Also, I see from the archive that someone was having problems getting the API to function under Windows. Does anyone have this working ok? Geoff Caplan -- 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] How good is the Interbase/Firebird API?
Following the links you provided I came accross this. (Installing, Configuring and Using Apache, PHP3 and Interbase on Linux.) http://www.synectics.co.za/php3/tutorial/tutorial.html oktay -Original Message- From: Geoff Caplan [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 11:47 AM To: [EMAIL PROTECTED] Subject: [PHP] How good is the Interbase/Firebird API? Hi I am hoping that someone can save me some testing time. I am considering using Interbase/Firebird, but notice that there is no facility to set the maximim number of connections in php.ini - the API seems to be a bit basic. Last time I tested an RDBMS without a maximum setting, I found that there were problems with connection handling under heavy load with both persistent and non-persistent connections (this was with FrontBase ). It seemed to run out of connections and quickly died a nasty death ... Can anyone share their practical experience with how the PHP Interbase API functions under load? Also, I see from the archive that someone was having problems getting the API to function under Windows. Does anyone have this working ok? Geoff Caplan -- 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 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] Php.ini style change
Yup. I disagree totally. In the old style the file was totally unreadable unless you happened to have an editor with the same concept of tab-width as the editor of the person who wrote the file, plus the file was too wide to read it all. Much easier this way. And quite frankly, my eyes have no problem separating the comment lines from the rest. Such is life - always people to disagree with ;-) Regards, Jakob Kruse Jonatan Bagge [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can anyone tell me why they checnged the style of the php.ini file. I feel it's hardly readable anymore. Finding stuff was a lot easier when all the comments where on the right side instead of between the different directives. Anyone disagree? -- 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] include(../file.inc);
You may need to set your include_path to . in php.ini. Than again maybe not. Try it. Then include ../file.inc should work (on Unix or Linux, use \ on Windows). Regards, Jakob Kruse Matthew Ralston [EMAIL PROTECTED] wrote in message 9dgfbo$kom$[EMAIL PROTECTED]">news:9dgfbo$kom$[EMAIL PROTECTED]... How do you include or require a file that is above the current script in the directory hierarchy? For example how would I include or require a file whose path is ../file.inc relative to the current script? I tried all of: include(../file.inc); require(../file.inc); include(/file.inc); require(/file.inc); include(..\file.inc); require(..\file.inc); include(\file.inc); require(\file.inc); but it doen't like any of them. :( I don't want to use a full path relative to the root of the drive or webserver folder because the included file and the script may move as the development server is setup differently to the real web server. Any ideas? -- Thanks, Matt [EMAIL PROTECTED] www.mralston.co.uk / -- 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 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] Book PHP4 Professional WROX Mail over SMTP
Hi there, I bought this book tryed it for 2 days now to bring the Mail over SMTP example to work. It doesn' t work at all. Does anybody have a class for sending E-Mails over SMTP? This really drives me mad. It should not be so complicated to send E-Mails over the net. Can anybody please help me out? Thanx in advance. Cheers Andy -- 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] IIS and PHP4.0.5 give me some problems?
Hello, I recently installed ISS with SQL server because of a database our company had installed. I installed PHP 4.0.5 to IIS and now get soem weird errors when i run these script I made that worked perfectly before. Error1: Undefined variable Error2: Undefined offset Has anyone else had these errors, and does anyone know how to resolve this? Thanks brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Upload time vs. script execution time
Hi, Before I try it, can anyone tell if the execution-time of the script start when upload finish or when it starts? (I referring to the script that receives the uploaded file and handles it). It its the later one, what can I do when I want to upload files that take longer time to upload (but without editing the php.ini). Thanks in advance! SED -- 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] Documentation
Does anyone know alternative sites for PHP documentation? www.php.net seems to be down. Thankls, Don -- 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] Update statement sent by PHP to MySQL
Hi there, I am trying to update a row in my MySQL database (I am an newbie) It does not work, but the DB does not return an error. Is there an error in the syntax?? // Create the user record //-- -- if (!($newresult = mysql_db_query($DB, update $T1 set caption = $caption where name = $name ))) { HEADER(Location:admin.php?content=edit_dataentryerrormsg=baduserrecord); } //-- -- Thanx for your help Cheers Andy -- 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] Book PHP4 Professional WROX Mail over SMTP
I remember there was somebody who had a mail class and when I asked him to he had added a similar functionality to his class that made it possible to use another smtp domain to send email. I'm very sorry that the above is the only info I have now. It was months ago. Just wanted to let you know that it's out there or at least doable. Oktay Altunergil -Original Message- From: Andreas Pucko [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 1:00 PM To: Php (E-mail) Subject: [PHP] Book PHP4 Professional WROX Mail over SMTP Hi there, I bought this book tryed it for 2 days now to bring the Mail over SMTP example to work. It doesn' t work at all. Does anybody have a class for sending E-Mails over SMTP? This really drives me mad. It should not be so complicated to send E-Mails over the net. Can anybody please help me out? Thanx in advance. Cheers Andy -- 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 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] Documentation
http://uk.php.net/mirrors.php regards, philip On Fri, 11 May 2001, Don Pro wrote: Does anyone know alternative sites for PHP documentation? www.php.net seems to be down. Thankls, Don -- 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 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] gdImageCreateFromJpeg in -lgd... no
Can do what i want. I need gif and jpeg habe installed jpeg-6b , gd-1.8.4gif.tar.gz checking for libjpeg (needed by gd-1.8+)... yes checking for jpeg_read_header in -ljpeg... yes checking for libXpm (needed by gd-1.8+)... no configure: warning: If configure fails try --with-xpm-dir=DIR checking whether to include GD support... yes (static) checking for gdImageString16 in -lgd... yes checking for gdImagePaletteCopy in -lgd... yes checking for gdImageColorClosestHWB in -lgd... no checking for compress in -lz... yes checking for png_info_init in -lpng... yes checking for gdImageColorResolve in -lgd... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromGif in -lgd... yes checking for gdImageWBMP in -lgd... no checking for gdImageCreateFromJpeg in -lgd... no checking for gdImageCreateFromXpm in -lgd... yes checking whether to include FreeType 1.x support... yes checking for T1lib support... no -- 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] Documentation
I hate the fact that php.net, phpbuilder.com are down very frequently and mysql.com is slow usually.. It's too bad for our image. Oktay Altunergil -Original Message- From: Philip Olson [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 1:26 PM To: Don Pro Cc: php list Subject: Re: [PHP] Documentation http://uk.php.net/mirrors.php regards, philip On Fri, 11 May 2001, Don Pro wrote: Does anyone know alternative sites for PHP documentation? www.php.net seems to be down. Thankls, Don -- 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 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 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] Has anyone tried to make telnet client with php?
Thanks! This works. And this give me a clue how to work on it. Grishick. - Original Message - From: Thies C. Arntzen [EMAIL PROTECTED] To: Grishick [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 1:39 AM Subject: Re: [PHP] Has anyone tried to make telnet client with php? On Thu, May 10, 2001 at 08:28:59PM -0700, Grishick wrote: Has anyone ever tried to make a telnet client with PHP? Any ideas how to make it? Tried to make it with socket, fsockopen, fputs, freads - does not work for telnet. Probably cURL will help? Deadly need an advice. Thanks. Grishick. [EMAIL PROTECTED] the attached code was written in a hurry and does _no_ error checking - but it does work (for me). ? error_reporting(-1); class Telnet { /* (c) [EMAIL PROTECTED] */ var $sock = NULL; function telnet($host,$port) { $this-sock = fsockopen($host,$port); socket_set_timeout($this-sock,2,0); } function close() { if ($this-sock) fclose($this-sock); $this-sock = NULL; } function write($buffer) { $buffer = str_replace(chr(255),chr(255).chr(255),$buffer); fwrite($this-sock,$buffer); } function getc() { return fgetc($this-sock); } function read_till($what) { $buf = ''; while (1) { $IAC = chr(255); $DONT = chr(254); $DO = chr(253); $WONT = chr(252); $WILL = chr(251); $theNULL = chr(0); $c = $this-getc(); if ($c === false) return $buf; if ($c == $theNULL) { continue; } if ($c == \021) { continue; } if ($c != $IAC) { $buf .= $c; if ($what == (substr($buf,strlen($buf)-strlen($what { return $buf; } else continue; } } $c = $this-getc(); if ($c == $IAC) { $buf .= $c; } else if (($c == $DO) || ($c == $DONT)) { $opt = $this-getc(); // echo we wont .ord($opt).\n; fwrite($this-sock,$IAC.$WONT.$opt); } elseif (($c == $WILL) || ($c == $WONT)) { $opt = $this-getc(); // echo we dont .ord($opt).\n; fwrite($this-sock,$IAC.$DONT.$opt); } else { // echo where are we? c=.ord($c).\n; } } } } $tn = new telnet(192.168.255.100,23); echo $tn-read_till(ogin: ); $tn-write(admin\r\n); echo $tn-read_till(word: ); $tn-write(thieso\r\n); echo $tn-read_till(: ); $tn-write(ps\r\n); echo $tn-read_till(: ); echo $tn-close(); ? -- 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] Setting extensions for IIS and PHP4.0.5
Hello, Does anyone know the proper way to setup the extension_dir when i try to set it up it says it can't find the extensions in that dir even though when i go to that dir it is right there. Can someone let give me an example of what they have for extension_dir and then give me the path to where there extensions are. Thanks Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Update statement sent by PHP to MySQL
Hi, update $T1 set caption = $caption where name = $name put single quotes aroud the variables: caption='$caption'. You can do this aswell: $result = mysql_query(UPDATE $T1 SET caption='$caption WHERE name='$name', $DB) or die(mysql_error()); if (! $result) { send the haeder... } hope it helps Johannes -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP 4.0.5 - segmentation fault when using OCI8
On Fri, May 11, 2001 at 06:51:35AM -0700, Robert Mena wrote: Hi, I have a development machine with 4.0.4pl1 which has been used for creating a set of scripts to access oracle (using stored procedures). It seems to be working fine (the problems that I've encountered seems to be related to the oracle/procedure itself). Last night I moved the scripts to the production server. Eveything was working ok until I try to access the part the uses the oracle where it hangs for a while and then gives me a [notice] child pid X exit signal Segmentation fault (11). I've compiled using './configure' '--with-apxs' '--with-ttf' '--with-xml' '--with-gd' '--with-ftp' '--enable-session' '--enable-trans-sid' '--with-zlib' '--enable-inline-optimization' '--with-oci8=/u01/app/oracle/product/8.1.7/' --with-mcrypt --enable-sigchild is your apache linked against -lpthread? please read http://www.php.net/bugs-dos-and-donts.php and submit a bug report (with backtrace). re, tc -- 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] if $index=1 how can I create a variable named $column_1
and that's pretty cool ... do you also have a solution to access the name of this dynamic variable if I'd like to use it also (e.g. with WDDX functions)? That' would be great! TIA, Arne -Original Message- From: ..s.c.o.t.t.. [gts] [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 5:07 PM To: Php-General Subject: RE: [PHP] if $index=1 how can I create a variable named $column_1 And even though it's much less elegant than the solution by Sean below, you could also use 'eval' $toast = array(wheat, rye, pumpernickel); $numbreads = count($toast); for ($index = 0; $index $numbreads; $index++) { eval(\$column$index = '$toast[$index]'; echo \$column$index . 'BR';) ; } -Original Message- From: Sean R. Bright [mailto:[EMAIL PROTECTED]] To: 'Jay Lepore'; [EMAIL PROTECTED] Subject: RE: [PHP] if $index=1 how can I create a variable named $toast = array(wheat, rye, pumpernickel); $numbreads = count($toast); for ($index = 0; $index $numbreads; $index++) { ${column . $index} = $toasts[$index]; } (A little less code and one less variable required.) Sean -- 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 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] phpjobs.com
anyone know what the deal with it is? i'm trying to find some work for the summer (been REAL hard) and noticed that the site is there, although not really... -jack -- 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] Does the array parameter of ereg actually return strings matched?
On Wed, May 09, 2001 at 06:13:17PM -0700, Dexter wrote: Does the array parameter of ereg actually return strings matched? I tried to read a file looking for a string using ereg and wanted to put the matched strings found in an array. Doesn't seem to be happening with the following. $contents=fread($readfile,10); $pattern=a href.*\; $i=0; while(!feof($readfile)) { $contents=fgets($readfile,4065); if(eregi($pattern,$contents,$regs)) { echo $regs[$i]br; } $i++; } Yes, it actually does return strings matched. I would not expect your code, as you typed it, to do what you expect. I realigned things to make it easier to see what is happening. With what you have, it is very unlikely that you will ever print out a match. You are incrementing your counter for every line of the file, not for every match actually found. Try this code instead: ?php $contents=fread($readfile,10); $pattern=a href.*\; while(!feof($readfile)) { $contents=fgets($readfile,4065); if(eregi($pattern,$contents,$regs)) { for($i = 0; $i sizeof($regs); $i++) { echo $regs[$i]br; } } } ? -- Jason Stechschulte [EMAIL PROTECTED] -- I hope I'm not getting so famous that I can't think out load [sic] anymore. -- Larry Wall in [EMAIL PROTECTED] -- 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 limits????
On Thu, May 10, 2001 at 10:27:55AM -0400, shaun wrote: is there a limit to the number of fields one can put in an array?? heres the code im using to create the array $arrResIDs = explode(,,$RESID,300); now $RESID has at least 100 different values in it but when i print out the array i only get 80 can anyone shed some light on this subject??? Seeing code sure would help. 100 values in a PHP array is nothing. -- Jason Stechschulte [EMAIL PROTECTED] -- Tcl tends to get ported to weird places like routers. -- Larry Wall in [EMAIL PROTECTED] -- 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] Free Database Design Program
phpMyAdmin and phpMyEdit are two free PHP MySQL thingies. check out http://www.phpwizard.net/ -Original Message- From: Anuradha Ratnaweera [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 11:52 PM To: Augusto Cesar Castoldi Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Free Database Design Program On Sat, 5 May 2001, Augusto Cesar Castoldi wrote: Anyone know a Free database Design program? I'm needing to organize my MySQL databases and design new databases. In what sence do you mean Free? Just curious; Anuradha -- a href=http://www.bee.lk/people/anuradha/;home page/a -- 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 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] profit xxx
Could YOU use an EXTRA $5000 per month? - OR MORE! We can offer you the OPPORTUNITY OF A LIFETIME. YOU could make THOUSANDS OF DOLLARS each month without any selling experience, stock, investment or phone calls EVER again. All you need is a PC with Internet access and the desire to be rich. ABSOLUTELY NO Experience is necessary. If you take advantage of this offer, you will get involved with the $35 BILLION DOLLAR a year adult XXX industry. The fastest growing and largest business on the WORLD WIDE WEB. Over 70% of ALL surfers access adult sites INTENTIONALLY at some time. It is now estimated that OVER 300,000,000 people surf the Internet. That's a staggering 210,000,000 people searching for a product YOU can SELL. What does FUNCLUBXXX do for YOU? We set up and run an Adult Web Site in your name. We take care of all the site maintenance and content. All you have to do is follow some simple instructions to promote the site on search engines and collect a check every month. Advertising is free - All it takes is a little of your time each week. There are NO hidden costs. The only money we will EVER ask you for is $100 for each site you buy into. This money is purely for administration costs. Once you sign up, then you can start referring others into the business - for each successful referral, WE PAY YOU $50 IMMEDIATELY. Just think about that for a minute... All you have to do is refer two more people and that's your business paid for. All the rest is PURE PROFIT! Discretion is very important to us and we respect your anonymity. There is no need for even your family to know anything if that is your wish. We will never divulge your details to any third party. This is a NO RISK proven business supported by a 'long term sustainable business plan' that will take you on a roller-coaster ride to SUCCESS. WHY WAIT? - APPLY NOW Click on the link below and SEND for more information. mailto:[EMAIL PROTECTED]?subject=More_Info_Please -- 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] split string
On Fri, May 11, 2001 at 10:24:02AM -0500, Jacky wrote: I got series of string value like this 1,2,3. And the seires are dynamic dynamaic, which means it is not always 1,2,3 but could be more, but always in this format that is separated by , . How do I pick each of value in the series and assign it into new vairiable, like from: $test = 1,2,3; and assign to be $test =1; $test1=2; $test2 =3; Is theer any function that could help me with that? because I need to update table using those value but I cannot use series of value to update, have to break them down to each variable like that. Use arrays. $test = 1,2,3; $test = explode(,, $test); // $test[0] == 1; // $test[1] == 2; // $test[2] == 3; -- Jason Stechschulte [EMAIL PROTECTED] -- Well, that's more-or-less what I was saying, though obviously addition is a little more cosmic than the bitwise operators. -- Larry Wall in [EMAIL PROTECTED] -- 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] phpjobs.com
I'm looking for a site like that too.. Is there a php-employment kind mailing list? Oktay Altunergil -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP] phpjobs.com anyone know what the deal with it is? i'm trying to find some work for the summer (been REAL hard) and noticed that the site is there, although not really... -jack -- 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 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] Web Hosting That Supports PostgreSQL?
Hi, I am looking for a cheap hosting plan that supports PostgreSQL (hopefully 7.1) with PHP4 on a unix platform (BSD prefered, Linux would be OK though). It would be nice if phpPgAdmin was already configured with the account. But if not, that's ok, I can set it up myself. This is only for the development of my site, not production, so that's why I'm looking at a cheap solution. Anyone have any recommendations? Thanks. Jason -- 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] Free Database Design Program
There's also the free version of Mascon ( www.scibit.com ) and a free application MySQLFront (www.mysqlfront.de) . The former has some report generation functionality like Crystal Reports. Oktay Altunergil -Original Message- From: scott [gts] [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 2:56 PM To: Php-General Subject: RE: [PHP] Free Database Design Program phpMyAdmin and phpMyEdit are two free PHP MySQL thingies. check out http://www.phpwizard.net/ -Original Message- From: Anuradha Ratnaweera [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 11:52 PM To: Augusto Cesar Castoldi Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Free Database Design Program On Sat, 5 May 2001, Augusto Cesar Castoldi wrote: Anyone know a Free database Design program? I'm needing to organize my MySQL databases and design new databases. In what sence do you mean Free? Just curious; Anuradha -- a href=http://www.bee.lk/people/anuradha/;home page/a -- 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 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 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] Is the CGI-only Win32 binary compiled with --enable-sockets?
I am not sure but i think you have to find a dll extension out there for sockets Unfortuantely i don't know any sites, google would be your best bet - Original Message - From: Todd [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 11, 2001 8:16 AM Subject: Re: [PHP] Is the CGI-only Win32 binary compiled with --enable-sockets? This is what it says on top of the page: System: Windows NT 5.0 build 2195 Build Date: Apr 30 2001 Server API: CGI Virtual Directory Support: enabled Configuration File (php.ini) Path: C:\WINNT\php.ini ZEND_DEBUG: disabled Thread Safety: enabled I've searched the rest of the page but all I saw was mysql.default_socket which doesn't seem relevant. Any other ideas? Michael Stearne wrote: If you make a page with phpinfo() you will see all the compile options that were used for the particluar build you have (at the top of the page). Michael Todd wrote: I'm trying the example client code under Socket Functions in the documentation and I get the error: Fatal error: Call to undefined function: socket() Is there any way to enable this? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- 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 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] phpjobs.com
I reserved this domain a while back, but I still haven't put up a site. One of these days I'll make it into a useful tool, but I just haven't had the time. This is the closest thing out there right now that I know of: http://phpbuilder.com/people/ Stewart === [EMAIL PROTECTED] http://www.montanab.com (Montana Banana Web Design) http://www.yixing.com (YiXing.com Teapots) Jack Dempsey [EMAIL PROTECTED] wrote... anyone know what the deal with it is? i'm trying to find some work for the summer (been REAL hard) and noticed that the site is there, although not really... -jack -- 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] Upload time vs. script execution time
On Fri, May 11, 2001 at 05:07:57PM -, SED wrote: Before I try it, can anyone tell if the execution-time of the script start when upload finish or when it starts? (I referring to the script that receives the uploaded file and handles it). It its the later one, what can I do when I want to upload files that take longer time to upload (but without editing the php.ini). I'm fairly certain that the execution time of the script does not start counting until the file is uploaded. -- Jason Stechschulte [EMAIL PROTECTED] -- No prisoner's dilemma here. Over the long term, symbiosis is more useful than parasitism. More fun, too. Ask any mitochondria. -- Larry Wall in [EMAIL PROTECTED] -- 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] **BUG** / wierd problem concatenating global string vars
If I do echo($HTTP_SERVER_VARS[SERVER_ADDR]) I get the expected server address ***WITHOUT A SLASH AT THE END*** eg. my.server.address --- If I do echo($PHP_SELF) I get the expeted URL relative the the server ***WITH O-N-E SLASH** at beginning. eg. /expected/url/relative/doc_name --- If I do THIS: $this_page = http://; . $HTTP_SERVER_VARS[SERVER_ADDR] . $PHP_SELF; echo( $this_page ); I get, http://my.server.address//expected/url/relative/doc_name; There is **ALWAYS** a double slash between the server address and the doc path, if the concatenation of those two variables occurs in the same statement. It works when used as an action for a form, but I don't think it should do unexpected results. --- HOWEVER If I do **THIS**: $this_page = http://;; $this_page .= $HTTP_SERVER_VARS[SERVER_ADDR]; $this_page .= $PHP_SELF; I get the correct results, http://my.server.address/expected/url/relative/doc_name; My provider is using PHP version 4.0.3pl1 -- 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] phpjobs.com
There is a list on yahoo groups for PHP employees. It's primarily intended to be a place for employers looking for PHP people to post listings too. Spare pickings so far, but it's not been publicized much yet. http://groups.yahoo.com/group/phpjobs Altunergil, Oktay wrote: I'm looking for a site like that too.. Is there a php-employment kind mailing list? Oktay Altunergil -Original Message- From: Jack Dempsey [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 2:40 PM To: [EMAIL PROTECTED] Subject: [PHP] phpjobs.com anyone know what the deal with it is? i'm trying to find some work for the summer (been REAL hard) and noticed that the site is there, although not really... -jack -- 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 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 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] Only have one session per user?
Hi all! Can I only have one session per user / internet explorer? Or is it possible to seperate sessions let's say from script to script? -- 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] PATH_INFO at document root
Hi all, I want to set up one virtual server with many domains pointing to it which serves pages depending on the domain name. Here is how i see it: 1) 3 domains pointing to 1 virtual server, eg. www.foo.com www.bar.com and www.blah.com 2) If user visits http://www.foo.com/contact.phtml then the PHP script does this: ? include ($DOCUMENT_ROOT . / . $SERVER_NAME . $PATH_INFO); ? So the question is, how do i get one script called no matter what comes after the root slash, and pass that info to the script? Cheers Simon Kimber -- 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] Sending attachments via mail()
I have some jpgs I'd like to send as attachments with automatically generated (via PHP) e-mails. Does anyone have any suggestions as to how I might go about this? Check this out: http://www.zend.com/codex.php?id=103single=1 Regards, Sean -- 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] Encode/Decode Problem
I have a in the middle of the encoded string. How can I solve this problem? You need to use addslashes(). http://www.zend.com/manual/function.addslashes.php Regards, Sean -- 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] protecting video files
Hi there - I am having some weird problems here. I am try to write a script that will check to see where a movie file is being called from. I want to define which web page I will allow a movie to be called from, and block all others. The script so far looks like this: The file gets called like this http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov playmovie.php === ?php header(Content-type: video/quicktime); $file=fopen($movie, r); fpassthru($file); ? = end script === which works fine until I add this at the top if($HTTP_REFERER != http://www.hardcorehosting.com/video/test.html;) { exit(); } to check and see where the page is being called from. It then gives me a broken image. I've checked for space's and can't see what I'm doing wrong :( Any suggestions ?? Thanks. Tim Schulte [EMAIL PROTECTED] -- 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] protecting video files
Check for extraneous spaces in your script. Tim Schulte wrote: Hi there - I am having some weird problems here. I am try to write a script that will check to see where a movie file is being called from. I want to define which web page I will allow a movie to be called from, and block all others. The script so far looks like this: The file gets called like this http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov playmovie.php === ?php header(Content-type: video/quicktime); $file=fopen($movie, r); fpassthru($file); ? = end script === which works fine until I add this at the top if($HTTP_REFERER != http://www.hardcorehosting.com/video/test.html;) { exit(); } to check and see where the page is being called from. It then gives me a broken image. I've checked for space's and can't see what I'm doing wrong :( Any suggestions ?? Thanks. Tim Schulte [EMAIL PROTECTED] -- 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 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] protecting video files
I did :( went character by character and could find not extra spaces. At 06:16 PM 5/11/01 -0400, Michael Kimsal wrote: Check for extraneous spaces in your script. Tim Schulte wrote: Hi there - I am having some weird problems here. I am try to write a script that will check to see where a movie file is being called from. I want to define which web page I will allow a movie to be called from, and block all others. The script so far looks like this: The file gets called like this http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov playmovie.php === ?php header(Content-type: video/quicktime); $file=fopen($movie, r); fpassthru($file); ? = end script === which works fine until I add this at the top if($HTTP_REFERER != http://www.hardcorehosting.com/video/test.html;) { exit(); } to check and see where the page is being called from. It then gives me a broken image. I've checked for space's and can't see what I'm doing wrong :( Any suggestions ?? Thanks. Tim Schulte [EMAIL PROTECTED] -- 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 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] mysql: UPDATE statment
At 21:40 10/5/2001 -0400, [EMAIL PROTECTED] wrote: why isnt this working i need to get 5 values updated in a table called 'user_polls' how do I do this? i have UPDATE user_polls WHERE id = '$id' VALUES($1, $2. and so on your statement is incorrect... the correct UPDATE syntax is: UPDATE user_polls set field='value', field2='value2', field3=value3 where id=$id; hope it helps... . Christian Dechery (lemming) . http://www.tanamesa.com.br . Gaita-L Owner / Web Developer -- 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] protecting video files
On Fri, 11 May 2001 17:28:25 -0500, WebMaster ([EMAIL PROTECTED]) wrote: I did :( went character by character and could find not extra spaces. At 06:16 PM 5/11/01 -0400, Michael Kimsal wrote: Check for extraneous spaces in your script. Tim Schulte wrote: Hi there - I am having some weird problems here. I am try to write a script that will check to see where a movie file is being called from. I want to define which web page I will allow a movie to be called from, and block all others. The script so far looks like this: The file gets called like this http://www.hardcorehosting.com/video/playmovie.php?movie=test.mov playmovie.php === ?php header(Content-type: video/quicktime); $file=fopen($movie, r); fpassthru($file); ? some suggestions: 1) use rb instead of r for binary files 2) you forgot to fclose the file handle. 3) try readfile() instead. -- 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] verify phone number
I am looking for code to verify a phone number has been entered correctly on a form field. Requirements would include the area code: xxx-xxx-. -- 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] Multiple ASP 2 PHP conversion
Hello, I found asp2php to be a great tool. Does anyone know of a way to make it convert a whole directory or more than one file at a time? Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] verify phone number
One way: $phone = ereg_replace([^0-9], , $phone); if(!ereg(^[0-9]{10}$,$phoneHome)) { echo error; } You could also check the string length after removing all non-numbers. Kirk -Original Message- From: Claudia Smith [mailto:[EMAIL PROTECTED]] Sent: Friday, May 11, 2001 4:52 PM To: [EMAIL PROTECTED] Subject: [PHP] verify phone number I am looking for code to verify a phone number has been entered correctly on a form field. Requirements would include the area code: xxx-xxx-. -- 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] Hidden Input and Quotes?
If I have a text box and enter data into that text box with quotes around some of the text... and I want to throw that text into a HTML Hidden Input Field (on my next screen for example) -- the quotes will somehow jackup or truncate that text... because HTML uses quotes within in the Hidden Input Field. So my question is, should I (or, really, can I) encode it? My thinking is I want to encode it with the htmlspecialchars() function... however, eventually, all the data within the Hidden Input Boxes will be stored into my mySQL database, so I'll want to decode it before I send it (restoring the quotes)... is there a way to decode the htmlspecialchars() function? Or, is there a better way to do this (*without* creating a session)? -- I want to use Hidden Input Fields. Thanks Jason [EMAIL PROTECTED] -- 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] protecting video files
which works fine until I add this at the top if($HTTP_REFERER != http://www.hardcorehosting.com/video/test.html;) { exit(); } Check to make sure $HTTP_REFERER is being set. Just create another script that has something like: ?php print Referer: $HTTP_REFERER\n; ? Then create a link to this new script from the test.html page that you're trying to show the movie from. Good luck, Sean -- 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]