[PHP] register stop working with a site
Hi all, i was wondering if someone has any idea about how to register that a client has stopped working with my site and log him/her out? -- 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] My system don't store session data, anybody can help me!!
In my system i have apache-1.3.17, (i probe 1.3.14 but the problem persist), when i register a variable the session is generatet and a file sess_f5g ... is generated under /tmp but the file is empty size=0, and no data is stored. ?php session_start(); if( !isset( $c)) { session_register("c"); $c = 1; } echo $c . "br"; ? a href="index.php"reload/A this example that works fine in other system with the same configuration, don't work in my machine, everytime he say 1. my system is a red hat 6.2 with 2.2.14 and my php is 4.0.4pl1 -- 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-CVS] cvs: php4 /ext/midgard snippetdir.c
davidg Mon Feb 26 01:45:04 2001 EDT Modified files: /php4/ext/midgard snippetdir.c Log: fixed bug #121 Index: php4/ext/midgard/snippetdir.c diff -u php4/ext/midgard/snippetdir.c:1.5 php4/ext/midgard/snippetdir.c:1.6 --- php4/ext/midgard/snippetdir.c:1.5 Wed Feb 21 14:18:54 2001 +++ php4/ext/midgard/snippetdir.c Mon Feb 26 01:45:04 2001 @@ -1,4 +1,4 @@ -/* $Id: snippetdir.c,v 1.5 2001/02/21 22:18:54 emile Exp $ +/* $Id: snippetdir.c,v 1.6 2001/02/26 09:45:04 davidg Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -145,7 +145,7 @@ switch (ZEND_NUM_ARGS()) { case 3: if (zend_get_parameters_ex - (ht, 3, name, description, + (3, name, description, owner) != SUCCESS) WRONG_PARAM_COUNT; break; case 4: -- PHP CVS 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] a good hosting experience
Wow. Julie is on this list! // send note to self to modify filter and sort for good tips... Hi Julie. LOVED your book. With regard to Hurricane Electronic- we (Abriasoft) use them for our colocating, and they have always been very proffesional and fair to deal with. They have a really nice facility, its clean and well run. Anyway, I don't know squat about their virtual hosting. Does their virtual hosting provide webDAV support? If yes, does it do it right for dynamic content? i.e. Alias /Linux_Pages/ "/var/www/Linux_Pages/" Alias /Linux_Pages-src/ "/var/www/Linux_Pages/" Directory "/var/www/Linux_Pages" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all AuthType Basic AuthName DAV AuthUserFile dav.auth /Directory followed by a IfModule mod_dav.c DAVLockDB /var/apache/dav/moddav DAVMinTimeout 600 Location /Linux_Pages-src/ DAV On ForceType text/plain Limit PUT POST PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK Require user michael /Limit /Location /IfModule The ForceType in the mod_dav directive lets me use webDAV client like Goliath on MacOS or DAVExplorer on Linux to get the php source without it being processed first- but I haven't yet found a host that provides webDAV and sets up an extra alias for getting the source php unparsed, which is what you really want 'cause dynamic content is definately the way to go. If anyone knows of a hosting company that does that- I'd love to hear about it. I suppose I could just get a 1U- but $200/mo is steep for a non profit making personal site... ;) Thanks for any suggestions/comments Julie Meloni wrote: As a follow-up to the "Terrible Hosting Experience" posts, here's a "Good Hosting Experience" post. I completely and unabashedly recommend Hurricane Electric (www.he.net), for virtual or dedicated hosting. AND...they're not paying me a thing to say that. :) They have virtual host packages starting at ten bucks. thickbook.com runs on a thirty bucks a month virtual hosting package, and it's just fine (as far as I can tell). PHP 4, MySQL at all levels of pricing, and you can control local PHP values with .htaccess, just fine. I also have a 1U dedicated server there for $200/mo (www.mytrainingcamp.com) and am ecstatic about it. So, go Hurricane! - Julie ++ | Julie Meloni ([EMAIL PROTECTED]) | || | "PHP Essentials" and "PHP Fast Easy" | | http://www.thickbook.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] -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior 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]
[PHP] Newbie: why do I get this error?
Hello everybody, I am a newbie, so please help me out with my rather basic question. Please take a look at the following code snippet: class HTMLTable extends HTMLElement { var $attributes; function HTMLTable() { $attributes[] = array("border", "0"); $attributes[] = array("cellpadding", "0"); // and some other things } function emit() { // I get an error on this line $arrLength = count($this-attributes[1]); } } On the line indicated above, I get the error: "Warning: Undefined property: attributes in html_base_classes.inc on line line-number" Can anybody give me a clue as to why this is happening? -- Regards, Harshdeep Singh Jawanda. -- 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] php4 as a module AND a cgi
colin olkowski wrote: hi all, my question is this, how would one install PHP4 as a module and as a cgi? somewhere in the install notes for php4 (redhat) the docs clearly say do not install both, yet my old hosting company was able to do it. btw, i just moved from the world of virtual hosting on a FreeBSD box to my own RedHat server. is this a linux vs. freebsd issue? No. I've had php3 running as both, anyways... It does require some work on the httpd.conf file. You have to set the directives properly for the directory containing the php dependant upon wether you want cgi to handle it or php to handle it. I have to ask, though, why would you want to run it as a cgi? Its slower as cgi and runs more security risks. I'd only run it as a cgi if that was my only choice. It works very well as a DSO, I believe you can only use the Zend Optimizer if its built as a DSO (I could be wrong on that)- I can't think of why you want to. colin olkowski - [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] -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior 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]
[PHP] installation problem
I'm a beginner but...I can't install php-4.o.4pl1 on my linux mandrake..why? When I run configure ,the program checks all the files... there are some missing..but it never return an error it return a warning 'you will need bison if you want to regenerate the php parsers' and after other check..it stops with this error'cannot find output for lex;giving up' what can i do? thanks Daniele -- 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] php4 as a module AND a cgi
I have to ask, though, why would you want to run it as a cgi? Its slower as cgi and runs more security risks. I'd only run it as a cgi if that was my only choice. It's probably less of a security risk when utilised via the cgi actually, at least when using Apache as the webserver because you can use suExec to cause it to run under the script owner's uid instead of Apache's. I've often considered switching vhosts over to the cgi version instead of module for this very reason. 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] Newbie: why do I get this error?
Hi all, I changed function HTMLTable() { $attributes[] = array("border", "0"); $attributes[] = array("cellpadding", "0"); // and some other things } to $attributes = array(array("border", "0"), array("cellpadding", "0")); but am still getting the same error. What am I doing wrong here? -- Regards, Harshdeep Singh Jawanda. -- 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] Download PHP from Linux machine?
Joe Stump [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... lynx -source http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gzsource_ site=www.php.net php-4.0.4pl1.tar.gz will work - also try wget Why do so many people apparently not bother to actually read what people are writing? On a unix shell, try putting a \ in front of all your funny characters. eg: http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gz\source site=www.php.net Or whatever the URL is. I think that got mangled by Outlook. -- Rick Hodger On Fri, Feb 23, 2001 at 03:28:14PM -0600, Jorge Alvarez wrote: Hi there, I want to download PHP from my Linux server, but I can't just type "lynx http://www.php.net/do_download.php?download_file=php-4.0.4pl1.tar.gzsource_ site=www.php.net" This is the link in the PHP downloads page, but the shell gets confused by the character. What should I do? Best Regards, Jorge. -- 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] -- -- - Joe Stump, PHP Hacker, -o) http://www.miester.org http://www.care2.com /\\ "It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V -- - -- 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] multiple file upload..
i have a situation. i hope im clear abt this. i need to post multiple set of data elements into php. each set consists of data elements of text, textarea, radio buttons, checkboxes and even a file(image). most fields are optional. all sets are not subset of each other but belongs to the same universal set. all these sets of data elements are posted using one single form and this form will only display at most 3 set of form elements input at one time. the user of course can do more than 3. by declaring how many he/she wants before landing on this page. meaning if user chose 4 , the form display 3 sets. User submits and the form will again appear with one set this time. the form will not update the database till the user finishes number of sets he/she had declared. i only have problem with the (image) file data element. this image file.. if existing , is stored into the database as blob. questions: 1. if file is not declared, what does the file elements holds?... i sometimes get null value, sometimes get "none" 2. does my logic works.. coz usually the file elements in the last form post will work.. but the previous will be corrupted. 3. i try using file input elements as arrays.. meaning input type=file name=filearr[x].. doesn't work? 4.anyone know how to work around this... does anyone encounter problem like these before? thanks for any help john here's what i do ignore any syntax error. this is just a stripdown version of the code.. it is just for putting across the logic.. / if($submit) { //loop to run thur all QuestDiax and convert into characters. for ($j=0; $i $index; $i++,$j++) { $filestr = "QuestDia".$j; if($$filestr) $diagram[$j] = addslashes(fread(fopen($$filestr,"r"), filesize($$filestr))); }//for //insert into database }//if submit print "form enctype=".." method = post "; for($i=0; $i 3; $i++) { print "input type=\"file\" name=\"QuestDia".$i."\""; }//for print "/form"; -- 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] My system don't store session data, anybody can help me!!
This is a correction: I create a new dir /usr/local/tmp with this perms: rwxrwxrwtrootroot and change the dir for store session data to /usr/local/tmp and works, but in certain situation the some data aren't sotored, :(. in /tmp don't store data why?? I set loogin to a file if i set the file in /tmp/php.log the file is created but empty, why?? i set this file in /usr/local/tmp it works fine. i don't understand what is the problem, both dirs have the same permisions. -- 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] Newbie: why do I get this error?
Hi all, I changed function HTMLTable() { $attributes[] = array("border", "0"); $attributes[] = array("cellpadding", "0"); // and some other things } to $attributes = array(array("border", "0"), array("cellpadding", "0")); I'm not sure, but is this what you want? $attributes = array(array('border'=0),array('cellpadding'=0)); or $attributes[] = array('border'=0); $attributes[] = array('cellpadding'=0); -- Yasuo Ohgaki -- 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] My system don't store session data, anybody can help me!!
On Monday 26 February 2001 10:26, Securez wrote: ?php session_start(); if( !isset( $c)) { session_register("c"); $c = 1; } echo $c . "br"; ? a href="index.php"reload/A this example that works fine in other system with the same configuration, don't work in my machine, everytime he say 1. Well, you never change $c, so it of course always says 1 -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- 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] FreeHostage:PHPMySQL
Hi everyone, Can anyone tell me where can i find a place where to put my PHP/MySQL applications for free? Many thanks Bye Bruno
[PHP] Fopen only absolute IP
I can't use any filesystem function (fopen, file, fsockopen, etc.) to open a remote file (fopen wrapper is obviously on). For example if I try the following: $S = file ("http://www.yahoo.com/"); I obtain the error: "Bad file descriptor" If I use an absolute IP address: $S = file ("http://216.32.74.50/"); I have no problem. The machine runs BSDI BSD/OS 4.1 + PHP 4.0.3pl1 + Apache 1.3.11 No problem to access dns from this machine as "ping www.yahoo.com" or "wget www.yahoo.com" work well. I don't want to use absolute IP numbers to retrieve data from remote file (as they can change often). Any ideas, suggestions? Thank you. Dr. Paolo Ciraci - EDP Manager and Webmaster Nautica On Line - http://www.nautica.it EuroMeteo- http://www.eurometeo.com SCUBAweb - http://www.scubaweb.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]
Re: [PHP] multiple file upload..
snip questions: 1. if file is not declared, what does the file elements holds?... i sometimes get null value, sometimes get "none" I get following output with PHP4.0.4pl1 w/ Linux (I set php.ini to store uploaded files info to $HTTP_UPLOAD_FILES. You will get different output if you don't) - OUTPUT - when files to upload are not specified -- Key = userfile, Val = Array a.. Key = name, Val = Array a.. Key = 0, Val = a.. Key = 1, Val = a.. Key = type, Val = Array a.. Key = 0, Val = application/octet-stream a.. Key = 1, Val = application/octet-stream a.. Key = tmp_name, Val = Array a.. Key = 0, Val = none a.. Key = 1, Val = none a.. Key = size, Val = Array a.. Key = 0, Val = 0 a.. Key = 1, Val = 0 - - CODE - file_upload.php --- html head titleFile Upload Test/title meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" /head body bgcolor="#FF" ?php // Data about Uploaded Files are stored in array in $HTTP_POST_FILES["input_name"] while(list($k,$v) = each($HTTP_POST_FILES)) { print("Key = $k, Val = $v br\n"); if (is_array($v)) { while(list($tk, $tv) = each($v)) { print("liKey = $tk, Val = $tvbr\n"); if (is_array($tv)) { while(list($ttk, $ttv) = each($tv)) { print("liKey = $ttk, Val = $ttvbr\n"); } } } } } ? form enctype="multipart/form-data" action="file_upload.php" method="post" input type="text" name"text" value="TEST" input type="hidden" name="MAX_FILE_SIZE" value="1" !-- Do any browsers care about MAX_FILE_SIZE? -- Send this file: input type="file" name="userfile[]" Send this file: input type="file" name="userfile[]" input type="submit" value="Send File" /form /body /html --- 2. does my logic works.. coz usually the file elements in the last form post will work.. but the previous will be corrupted. I cannot understand what you mean well 3. i try using file input elements as arrays.. meaning input type=file name=filearr[x].. doesn't work? See the code and output, it works. (at least when PHP stores uploaded file info to $HTTP_UPLOAD_FILES. Does not work w/o it?) 4.anyone know how to work around this... does anyone encounter problem like these before? Did you copy temp file? It will be deleted. Regards -- Yasuo Ohgaki -- 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] setcookie don't work well...
I try to use this function to prevent that the same visitor vote for more than one time in a hour but it don't work, the code is this: if($vote!=1) { $time=time(); $time=$time + 36000; setcookie("vote","1",$time); } If the visitor vote, the vote counts, than if he try to vote again the vote don't count, but if he try again it counts, the cookie is delete and i don't know why, i use IE 5.5. Can some one help me.
Re: [PHP] FreeHostage:PHPMySQL
Are you looking for a place to host your site- or a place for people to download apps you've written? Bruno Mrio Amaral Almeida wrote: Hi everyone, Can anyone tell me where can i find a place where to put my PHP/MySQL applications for free? Many thanks Bye Bruno -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior 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]
[PHP-CVS] cvs: php4 /ext/standard string.c
jmoore Mon Feb 26 05:04:01 2001 EDT Modified files: /php4/ext/standard string.c Log: Fix for bug #9449 to stop infinate loop in wordwrap. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.191 php4/ext/standard/string.c:1.192 --- php4/ext/standard/string.c:1.191Sun Feb 25 22:07:23 2001 +++ php4/ext/standard/string.c Mon Feb 26 05:04:00 2001 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.191 2001/02/26 06:07:23 andi Exp $ */ +/* $Id: string.c,v 1.192 2001/02/26 13:04:00 jmoore Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -463,6 +463,7 @@ break; } } + l ++; } } i += l+1; -- PHP CVS 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] FreeHostage:PHPMySQL
Have you tried www.isamillionaire.com ? they have php4 / mySQL support, they are free and have no banner ads. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Bruno Mrio Amaral Almeida [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 9:00 PM To: [EMAIL PROTECTED] Subject: [PHP] FreeHostage:PHPMySQL Hi everyone, Can anyone tell me where can i find a place where to put my PHP/MySQL applications for free? Many thanks Bye Bruno -- 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] PHP4 directives in httpd.conf not working
try these: php_value include_path "/my/phpinc/path" but why instead not to create a .htaccess file, or if you don't want it to be modified by user to make a one single auto_prepend with: $file = "$DOCUMENT_ROOT/my/phpinc/path"; if(file_exists($file)) include_once($file); this wouyld work for you better since there would be no chances that the file does not exist (or was deleted by user) and that it won't be included more then once Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Brian White [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:01 PM To: PHP Subject: [PHP] PHP4 directives in httpd.conf not working I have php4 running under Apache. Under that apache I have several VirtualHosts. I want to set to some of the PHP.INI values under one of those hosts. So far I have tried the following values in my httpd.conf file: 1) include_path "/my/phpinc/path" 2) php_include_path "/my/phpinc/path" 3) php3_include_path "/my/phpinc/path" 4) php4_include_path "/my/phpinc/path" None of them have worked - I can't even restart Apache with them in place. "/my/phpinc/path" definitely exists. What am I doing wrong? Regs Brian White - Brian White Step Two Designs Pty Ltd - SGML, XML HTML Consultancy Phone: +612-93197901 Web: http://www.steptwo.com.au/ Email: [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_info()
Yes you are wrong, what you can do is to search for the SQL queries in tutorials which will return you that information. also phpinfo() has some very little and necessary coverage of basic php-mysql configurations, if you download phpmyadmin you will have this option there (even with edit). Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: grios [mailto:grios]On Behalf Of Gustavo Vieira Goncalves Coelho Rios Sent: Monday, February 26, 2001 9:16 AM To: [EMAIL PROTECTED] Subject: [PHP] mysql_info() Am i wrong or php does not support mysql_info() function ? Is there plans to support it? thanks in advance! -- 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] Printing long strings
Yes, you could use stripslashes($string) on it's output, in this way it will be no different as it was inputted. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 9:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Printing long strings How can I get php to print a long string and ignore any of the characters in the string? ie: $string = "some'strin^g"; print $string; isn't there some kind of command to use that keeps the string exactly as it is? Clayton Dukes CCNA, CCDA, CCDP, CCNP Internetwork Solutions Engineer Internetwork Management Engineer Thrupoint, Inc. Tampa, FL (c) 904.477.7825 (h) 904.292.1881
RE: [PHP] Using one invocation of PHP executable to generate multiple pages?
Could you please be more specific on your need? Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jim Lum [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 9:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Using one invocation of PHP executable to generate multiple pages? Hi, I have PHP installed on a Win95 machine. What I'd like to do is to use a PHP page that will create multiple HTML pages. I guess that I can execute PHP.EXE multiple times, but was thinking that this means that it's going thru the overhead of starting up PHP.EXE each time. Is there any way to tell PHP.EXE to build multiple HTML pages, i.e., kind of like a loop? Jim -- 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] Simple String Replace Question
Would $string_new = ereg_replace("\n[ \t\r\n]*\n", "\n", $string); work for you? Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 3:37 AM To: PHP Subject: [PHP] Simple String Replace Question I would like to get rid of \n characters unless there are two or more in a row. So for example if there is a long email formatted like we do here with line break I want to remove the line breaks so text can be wrapped by a browser, but also show paragraph breaks where necessary. This is what I have: $string_new = str_replace("\n", "", $string); How can I augment this to not replace: \n \n Thanks. Jeff Oien -- 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] FreeHostage:PHPMySQL
Use SourceForge.com, in case you still are building your OpenSource application, you can then host it and use it there. Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Michael A. Peters Sent: Monday, February 26, 2001 9:56 PM To: Bruno Mrio Amaral Almeida Cc: [EMAIL PROTECTED] Subject: Re: [PHP] FreeHostage:PHPMySQL Are you looking for a place to host your site- or a place for people to download apps you've written? Bruno Mrio Amaral Almeida wrote: Hi everyone, Can anyone tell me where can i find a place where to put my PHP/MySQL applications for free? Many thanks Bye Bruno -- -=-=-=-=-=-=-=-=-=-=-=-=- Michael A. Peters Abriasoft Senior 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] -- 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] null@terra.com.br - should get removed
Mensagem Automatica do Terra [[EMAIL PROTECTED]] Could anyone please remove this guy? his mailbox has exceeded by size, guess he didn't know how many subscribers are on this list Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.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: [PHP] FreeHostage:PHPMySQL
http://www.f2s.com/ is another option. Jeff Oien Hi everyone, Can anyone tell me where can i find a place where to put my PHP/MySQL applications for free? Many thanks Bye Bruno -- 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] ftp connection
I need some help... I try to do a ftp connection with php, but when i run the script it claims that ftp_connect is "call to undefined function. I have done a call to phpinfo, and it shows that ftp IS enabled! - Whats wrong? Here is what i use: $conn_id = ftp_connect("MyFtpSite"); $login_result = ftp_login($conn_id, "MyUserName", "MyPassword"); etc... thanks for any help you can give me. Jon 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] AS400/Java Toolkit and PHP
I am using php 4.0.4pl1. I added the AS400 toolkit to the JVM so I can interface with an AS400. but for some reason when I go to use a class in the JVM it says. Fatal error: Cannot instantiate non-existent class: java in c:\Inetpub\wwwroot/AS400/testtoolbox.php on line 11 Below is the code I used. ? include "c:\\Inetpub\\wwwroot\\library\\calfunction.inc"; include "c:\\Inetpub\\wwwroot\\library\\AS400lib\\standard.inc"; session_register('userinfo'); $user=$userinfo-user; $pass=$userinfo-pass; $printer=$userinfo-printer; //java constructor is AS400("system", "user", "pass") $as400 = new Java("com.ibm.as400.access.AS400", "X.X.X.X", "$user", "$pass") or die("Unable to Connect to AS400"); ? Ryan Conover -- 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] DNS Lookups Fail
PHP 4.0.4 pl1, Apache 1.3.17, BSD/OS 4.1 pl37 Good Morning! Please forgive me if this has been covered ad nauseum, but I have searched high and low for an answer with no luck. After building PHP as a module, following the online instructions, Apache complained that it could not resolve hostnames. I got around this by using IP's in httpd.conf and making wusage do the lookups. Is there a fix for this or is it an unpleasant side effect that we must accept and deal with? Thanks, Scott -- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Easley Internet Solutions 864.859.2400 * * Easley, SC USA Fax: 864.855.5864 * * http://www.easley.net/AIM: ExCavSGT * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -- 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] PERL to PHP
Hi :-) Can someone tell me how to do the equivalant of this Perl script in PHP? ## This function prints all lines between the dashes read in a text file### ### The file looks like this: # - # Somedata: something # Someother: something else # -- # #Several paragraphs # Several paragraphs # Several paragraphs # --END-- # #!/usr/bin/perl -w@rray = STDIN; $inside = 0;foreach $line (@rray) { if ($line =~ /-/ig) { $inside = 1; } elsif ($line =~ /-/gi) { $inside = 0; } if ($inside == 1) { print $line;}} TIA! Clayton DukesCCNA, CCDA, CCDP, CCNPInternetwork Solutions EngineerInternetwork Management EngineerThrupoint, Inc.Tampa, FL(c) 904.477.7825(h) 904.292.1881 -- 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] setcookie don't work well...
you have to set to path and the domain name too... setcookie('vote', '1', $time, '/', '.someite.com'); -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Nuno Costa"" [EMAIL PROTECTED] wrote in message 000e01c09ff0$feee9570$1e01a8c0@ncosta">news:000e01c09ff0$feee9570$1e01a8c0@ncosta... I try to use this function to prevent that the same visitor vote for more than one time in a hour but it don't work, the code is this: if($vote!=1) { $time=time(); $time=$time + 36000; setcookie("vote","1",$time); } If the visitor vote, the vote counts, than if he try to vote again the vote don't count, but if he try again it counts, the cookie is delete and i don't know why, i use IE 5.5. Can some one help me. -- 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] Very strange Nutscrape behavior - PHP/JS/DHTML???
This could be a JS issue but right now I'm really not sure. I have this code, } elseif ($cat == 'bikes' $sub_cat == 'Road') { $i = 1; while ( list($type,) = each($bikes[$sub_cat])) { echo "TDIMG SRC=\"images/spacer.gif\" WIDTH=\"25\" HEIGHT=\"1\" ALT=\"\" BORDER=\"0\"/TD\n"; echo "TDA HREF=\"#\" CLASS=\"menu\" onMouseOver=\"popUp('HM_Menu$i',event)\" onMouseOut=\"popDown('HM_Menu$i')\" onClick=\"return false\"$type/A/TD\n"; $i++; } echo "SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" TYPE=\"text/javascript\"/SCRIPT"; Which creates this (in IE), TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu1',event)" onMouseOut="popDown('HM_Menu1')" onClick="return false"Trek/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu2',event)" onMouseOut="popDown('HM_Menu2')" onClick="return false"Schwinn/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu3',event)" onMouseOut="popDown('HM_Menu3')" onClick="return false"LeMond/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu4',event)" onMouseOut="popDown('HM_Menu4')" onClick="return false"Moots/A/TD SCRIPT LANGUAGE="JavaScript1.2" SRC="HM_Loader.js" TYPE="text/javascript"/SCRIPT However, in NN it creates, TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu1',event)" onMouseOut="popDown('HM_Menu1')" onClick="return false"Trek/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu2',event)" onMouseOut="popDown('HM_Menu2')" onClick="return false"Schwinn/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu3',event)" onMouseOut="popDown('HM_Menu3')" onClick="return false"LeMond/A/TD TDIMG SRC="images/spacer.gif" WIDTH="25" HEIGHT="1" ALT="" BORDER="0"/TD TDA HREF="#" CLASS="menu" onMouseOver="popUp('HM_Menu4',event)" onMouseOut="popDown('HM_Menu4')" onClick="return false"Moots/A/TD Specifically the line, echo "SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" TYPE=\"text/javascript\" is simply missing and the JS of course does not work. Now, if I reload the page the Jscript WILL work however the line, echo "SCRIPT LANGUAGE=\"JavaScript1.2\" SRC=\"HM_Loader.js\" TYPE=\"text/javascript\" still does not show up in the source. This is version 4.08 and it only appears to happen with NN furthermore it only happens when the browser is first loaded. Once I go to the page and refresh it I can go to other pages, even other sites and come back to it and it will still be fine. But, as soon as I restart the browser and go to the site it happens again. What do you all think? Is this a PHP, Javascript, or DHTML issue? -Brian * -- 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] PERL to PHP
your can use the PCRE functions in php - much better than ereg and all that - if you know perl already... Clayton Dukes wrote: Hi :-) Can someone tell me how to do the equivalant of this Perl script in PHP? ### ### This function prints all lines between the dashes read in a text file ### ### The file looks like this: # - # Somedata: something # Someother: something else # -- # # Several paragraphs # Several paragraphs # Several paragraphs # --END-- # #!/usr/bin/perl -w @rray = STDIN; $inside = 0; foreach $line (@rray) { if ($line =~ /-/ig) { $inside = 1; } elsif ($line =~ /-/gi) { $inside = 0; } if ($inside == 1) { print $line; } } TIA! Clayton Dukes CCNA, CCDA, CCDP, CCNP Internetwork Solutions Engineer Internetwork Management Engineer Thrupoint, Inc. Tampa, FL (c) 904.477.7825 (h) 904.292.1881 attachment.txt Content-Type: text/plain -- 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] PERL to PHP
How? I don't know perl all that well, I am just trying to convert some scripts. - Original Message - From: "kevin1" [EMAIL PROTECTED] To: "Clayton Dukes" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 10:29 AM Subject: Re: [PHP] PERL to PHP your can use the PCRE functions in php - much better than ereg and all that - if you know perl already... Clayton Dukes wrote: Hi :-) Can someone tell me how to do the equivalant of this Perl script in PHP? ### ### This function prints all lines between the dashes read in a text file ### ### The file looks like this: # - # Somedata: something # Someother: something else # -- # # Several paragraphs # Several paragraphs # Several paragraphs # --END-- # #!/usr/bin/perl -w @rray = STDIN; $inside = 0; foreach $line (@rray) { if ($line =~ /-/ig) { $inside = 1; } elsif ($line =~ /-/gi) { $inside = 0; } if ($inside == 1) { print $line; } } TIA! Clayton Dukes CCNA, CCDA, CCDP, CCNP Internetwork Solutions Engineer Internetwork Management Engineer Thrupoint, Inc. Tampa, FL (c) 904.477.7825 (h) 904.292.1881 attachment.txt Content-Type: text/plain -- 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-CVS] cvs: php4 /ext/imap config.m4 php_imap.c php_imap.h
kalowskyMon Feb 26 07:17:12 2001 EDT Modified files: /php4/ext/imap config.m4 php_imap.c php_imap.h Log: Correctly checks for the proper header files, and excludes the QUOTA functions from non-imap2000 systems (unavailable for testing at this time). # anyone willing to test this out on non-imap2000? PR: Submitted by: Reviewed by: Sascha Schumann Obtained from: Index: php4/ext/imap/config.m4 diff -u php4/ext/imap/config.m4:1.23 php4/ext/imap/config.m4:1.24 --- php4/ext/imap/config.m4:1.23Sat Feb 24 20:41:18 2001 +++ php4/ext/imap/config.m4 Mon Feb 26 07:17:12 2001 @@ -1,6 +1,14 @@ -dnl $Id: config.m4,v 1.23 2001/02/25 04:41:18 kalowsky Exp $ +dnl $Id: config.m4,v 1.24 2001/02/26 15:17:12 kalowsky Exp $ -AC_DEFUN(IMAP_INC_CHK,[if test -r $i$1/rfc822.h; then IMAP_DIR=$i; IMAP_INC_DIR=$i$1]) +AC_DEFUN(IMAP_INC_CHK,[if test -r "$i$1/c-client.h"; then + AC_DEFINE(HAVE_IMAP2000, 1, [ ]) + IMAP_DIR=$i + IMAP_INC_DIR=$i$1 + elif test -r "$i$1/rfc822.h"; then + IMAP_DIR=$i; + IMAP_INC_DIR=$i$1 + +]) AC_DEFUN(IMAP_LIB_CHK,[ str="$IMAP_DIR/$1/lib$lib.*" Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.59 php4/ext/imap/php_imap.c:1.60 --- php4/ext/imap/php_imap.c:1.59 Sun Feb 25 22:06:58 2001 +++ php4/ext/imap/php_imap.cMon Feb 26 07:17:12 2001 @@ -25,7 +25,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.59 2001/02/26 06:06:58 andi Exp $ */ +/* $Id: php_imap.c,v 1.60 2001/02/26 15:17:12 kalowsky Exp $ */ #define IMAP41 @@ -101,8 +101,10 @@ PHP_FE(imap_createmailbox, NULL) PHP_FE(imap_renamemailbox, NULL) PHP_FE(imap_deletemailbox, NULL) +#ifdef HAVE_IMAP2000 PHP_FE(imap_get_quota, NULL) PHP_FE(imap_set_quota, NULL) +#endif PHP_FALIAS(imap_listmailbox, imap_list, NULL) PHP_FALIAS(imap_getmailboxes, imap_list_full, NULL) PHP_FALIAS(imap_scanmailbox, imap_listscan, NULL) @@ -357,6 +359,7 @@ sizeof(MESSAGELIST)); } +#ifdef HAVE_IMAP2000 /* Mail GET_QUOTA callback * Called via the mail_parameter function in c-client:src/c-client/mail.c * Author DRK @@ -370,6 +373,7 @@ IMAPG(quota_limit) = qlist-limit; } } +#endif /* Mail garbage collect MESSAGELIST * Accepts: pointer to MESSAGELIST pointer @@ -547,12 +551,13 @@ /* next UID to be assigned */ REGISTER_MAIN_LONG_CONSTANT("SA_UIDVALIDITY",SA_UIDVALIDITY , CONST_PERSISTENT | CONST_CS); /* UID validity value */ - +#ifdef HAVE_IMAP2000 sa_all |= GET_QUOTA; REGISTER_MAIN_LONG_CONSTANT("GET_QUOTA",GET_QUOTA , CONST_PERSISTENT | CONST_CS); /* Disk space taken up by mailbox. */ sa_all |= GET_QUOTAROOT; REGISTER_MAIN_LONG_CONSTANT("GET_QUOTAROOT",GET_QUOTAROOT , CONST_PERSISTENT | CONST_CS); +#endif /* Disk space taken up by all mailboxes owned by user. */ REGISTER_MAIN_LONG_CONSTANT("SA_ALL", sa_all, CONST_PERSISTENT | CONST_CS); /* get all status information */ @@ -1011,7 +1016,7 @@ } /* }}} */ - +#ifdef HAVE_IMAP2000 /* {{{ proto array imap_get_quota(int stream_id, string qroot) Returns the quota set to the mailbox account qroot */ PHP_FUNCTION(imap_get_quota) @@ -1053,7 +1058,6 @@ } /* }}} */ - /* {{{ proto int imap_set_quota(int stream_id, string qroot, int mailbox_size) Will set the quota for qroot mailbox */ PHP_FUNCTION(imap_set_quota) @@ -1084,6 +1088,7 @@ RETURN_LONG(imap_setquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot), limits)); } /* }}} */ +#endif /* {{{ proto int imap_expunge(int stream_id) Index: php4/ext/imap/php_imap.h diff -u php4/ext/imap/php_imap.h:1.6 php4/ext/imap/php_imap.h:1.7 --- php4/ext/imap/php_imap.h:1.6Sat Feb 24 20:41:18 2001 +++ php4/ext/imap/php_imap.hMon Feb 26 07:17:12 2001 @@ -6,12 +6,15 @@ #include "build-defs.h" #endif -/* +#ifdef HAVE_IMAP2000 + /* these are used for quota support */ + #include "c-client.h" /* includes mail.h and rfc822.h */ + #include "imap4r1.h" /* location of c-client quota functions */ +#else #include "mail.h" #include "rfc822.h" -*/ -#include "c-client.h" -#include "imap4r1.h" /* used for the imap_setquota function */ +#endif + #include "modules.h" extern zend_module_entry imap_module_entry; @@ -104,8 +107,10 @@ PHP_FUNCTION(imap_deletemailbox); PHP_FUNCTION(imap_listmailbox); PHP_FUNCTION(imap_scanmailbox); +#ifdef HAVE_IMAP2000 PHP_FUNCTION(imap_get_quota); PHP_FUNCTION(imap_set_quota); +#endif PHP_FUNCTION(imap_subscribe); PHP_FUNCTION(imap_unsubscribe); PHP_FUNCTION(imap_append); @@ -162,8 +167,10
[PHP] mcrypt and encrypted field length
First, can anyone point me to a good "mcrypt" primer or tutorial? Second, how can I determine what type and length I should make a database field that will hold encrypted data? Is there some table somewhere which tells how long a resulting encrypted field will be based on the encryption type and/or length of the plaintext field? Example: If I have a 20 character field and want to use Triple DES to encrypt it, can I find out how long the resulting field will be - what is the longest it will be? Will the resulting encrypted field always be the same length? Should I make the data type some variation of "text" or "varchar"? TIA. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.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]
[PHP-CVS] cvs: php4 / NEWS
kalowskyMon Feb 26 07:20:53 2001 EDT Modified files: /php4 NEWS Log: #Just adding in proper id (forgot to do it on the initial) PR: Submitted by: Reviewed by: Obtained from: Index: php4/NEWS diff -u php4/NEWS:1.599 php4/NEWS:1.600 --- php4/NEWS:1.599 Sun Feb 25 18:09:11 2001 +++ php4/NEWS Mon Feb 26 07:20:53 2001 @@ -3,7 +3,7 @@ ?? ??? 200?, Version 4.0.5 - IMAP quota support (imap_set_quota, imap_get_quota) enabled/added via - c-client2000 + c-client2000 (kalowsky) - Upgraded PCRE to version 3.4. (Andrei) - Added array_search which works similar to in_array but returns the key instead of a boolean. ([EMAIL PROTECTED]) -- PHP CVS 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-CVS] cvs: php4 /ext/iconv iconv.c
hirokawaMon Feb 26 07:41:38 2001 EDT Modified files: /php4/ext/iconv iconv.c Log: ob_iconv_handler changed to use for text data only. Index: php4/ext/iconv/iconv.c diff -u php4/ext/iconv/iconv.c:1.6 php4/ext/iconv/iconv.c:1.7 --- php4/ext/iconv/iconv.c:1.6 Sun Feb 25 22:06:57 2001 +++ php4/ext/iconv/iconv.c Mon Feb 26 07:41:38 2001 @@ -176,7 +176,8 @@ ZEND_WRONG_PARAM_COUNT(); } - if (php_iconv_string(Z_STRVAL_PP(zv_string), out_buffer, + if (SG(sapi_headers).send_default_content_type + php_iconv_string(Z_STRVAL_PP(zv_string), out_buffer, ICONVG(internal_encoding), ICONVG(output_encoding))==SUCCESS) { RETVAL_STRING(out_buffer, 0); @@ -189,29 +190,39 @@ } /* }}} */ -/* {{{ proto bool iconv_set_encoding(string int_charset, string out_charset) +/* {{{ proto bool iconv_set_encoding(string type, string charset) Sets internal encoding and output encoding for ob_iconv_handler() */ PHP_FUNCTION(iconv_set_encoding) { - zval **int_charset, **out_charset; + zval **type, **charset; + int argc = ZEND_NUM_ARGS(); ICONVLS_FETCH(); - if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, int_charset, out_charset) == FAILURE) { + if (argc != 2 || zend_get_parameters_ex(2, type, charset) == FAILURE) { WRONG_PARAM_COUNT; } - - convert_to_string_ex(int_charset); - convert_to_string_ex(out_charset); - if (ICONVG(internal_encoding)) { - free(ICONVG(internal_encoding)); - } - ICONVG(internal_encoding) = estrndup(Z_STRVAL_PP(int_charset), Z_STRLEN_PP(int_charset)); + convert_to_string_ex(type); + convert_to_string_ex(charset); - if (ICONVG(output_encoding)) { - free(ICONVG(output_encoding)); + if(!strcasecmp("input_encoding",Z_STRVAL_PP(type))) { + if (ICONVG(input_encoding)) { + free(ICONVG(input_encoding)); + } + ICONVG(input_encoding) = estrndup(Z_STRVAL_PP(charset), +Z_STRLEN_PP(charset)); + } else if(!strcasecmp("output_encoding",Z_STRVAL_PP(type))) { + if (ICONVG(output_encoding)) { + free(ICONVG(output_encoding)); + } + ICONVG(output_encoding) = estrndup(Z_STRVAL_PP(charset), +Z_STRLEN_PP(charset)); + } else if(!strcasecmp("internal_encoding",Z_STRVAL_PP(type))) { + if (ICONVG(internal_encoding)) { + free(ICONVG(internal_encoding)); + } + ICONVG(internal_encoding) = estrndup(Z_STRVAL_PP(charset), +Z_STRLEN_PP(charset)); + } else { + RETURN_FALSE; } - ICONVG(output_encoding) = estrndup(Z_STRVAL_PP(out_charset),Z_STRLEN_PP(out_charset)); RETURN_TRUE; } @@ -235,10 +246,14 @@ if (array_init(return_value) == FAILURE) { RETURN_FALSE; } + add_assoc_string(return_value, "input_encoding", +ICONVG(input_encoding), 1); add_assoc_string(return_value, "output_encoding", ICONVG(output_encoding), 1); add_assoc_string(return_value, "internal_encoding", ICONVG(internal_encoding), 1); + } else if (!strcasecmp("input_encoding",Z_STRVAL_PP(type))) { + RETVAL_STRING(ICONVG(input_encoding), 1); } else if (!strcasecmp("output_encoding",Z_STRVAL_PP(type))) { RETVAL_STRING(ICONVG(output_encoding), 1); } else if (!strcasecmp("internal_encoding",Z_STRVAL_PP(type))) { -- PHP CVS 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] Browser?
Is there a way to tell what browser is being used by the client in php? Thanks, Jay -- 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] Making a variable
How can I make this a variable? ie: foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } changed to: $data = foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } Simply adding the $data = in front of it doesn't work, I assume it needs to be enclosed by () or ; or something right? Thanks :-) Clayton Dukes -- 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 (cgi version) with Apache and suexec - help
The php.ini file has safe-mode = Off so I don't think that is the problem. Suexec is checking to see that the php binary has the same uid/gid as the virtual host user running the php script. Since the php binary is owned by the web server user and the script is owned by one of the virtual host users, the uids/gids do not match and I get an error. I don't see how this can work. If it is possible to run the php binary through suexec, what am I missing? Has anybody gotten the cgi version of php to work with Apache, suexec, and virtual hosting? All replies are appreciated. -john On Fri, 23 Feb 2001, Richard Lynch wrote: Don't use safe-mode in your suExec PHP CGI configure. suExec pretty much does everything safe mode does anyway, and more. -- Visit the Zend Store at http://www.zend.com/store/ Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm Volunteer a little time: http://chatmusic.com/volunteer.htm - Original Message - From: [EMAIL PROTECTED] Newsgroups: php.general Sent: Friday, February 23, 2001 1:18 PM Subject: [PHP] php (cgi version) with Apache and suexec - help I've been trying to get the cgi version of php working with Apache and suexec but so far I have not had much success. I've installed the Apache module version of php and it seems to work fine. I then installed the cgi version of php and it too seems to work fine as long as it doesn't run through suexec. Suexec works fine for other (perl, c, etc...) cgi's. Here's what I have in Apache's httpd.conf: AddType application/x-httpd-php .php Action application/x-httpd-php /cgi-bin/php.cgi When I try to access a .php file I get an error about the command not being in the document root. This is one of the tests suexec performs and it is true, the cgi-bin directory (and hence the php binary) is not under the document root (although the .php file is). If I change httpd.conf to this: ScriptAlias /php-bin/ "/local/www/php/" AddType application/x-httpd-php .php Action application/x-httpd-php /php-bin/php.cgi Now the php binary is under the document root but when I try to access a .php file I get an error that the target uid/gid does not match that of the directory or program. This is also true since the php binary is owned by the web server and the .php file is owned by another user. So my question is "What am I missing?". How can I ever get the cgi version of php to work with suexec? The php binary is owned by the web server but the .php files will be owned by other users. Here is some more information about the environment in which I am working in case it is relevant: Solaris 7 Apache 1.3.17 php 4.04pl1 I'm just about ready to give up on this one. Thanks in advance for any and all help. -john -- 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] header() and require()
Hi. In some of my files, I have a require statement to get some global stuff accessable. I also have some header() redirects. They don't work (they worked before I added the requires). I moved the require under one of the header()s and that one works now, but I can't move it under the other one because stuff has to happen before the redirect and it needs the required stuff. So my question is do require statements produce output that I can't see (which would make the redirects not work)? The files I'm requiring don't have any output, which is why I'm confused. 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]
[PHP-CVS] cvs: php4 /ext/standard string.c
andiMon Feb 26 07:49:38 2001 EDT Modified files: /php4/ext/standard string.c Log: - Fix whitespace Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.192 php4/ext/standard/string.c:1.193 --- php4/ext/standard/string.c:1.192Mon Feb 26 05:04:00 2001 +++ php4/ext/standard/string.c Mon Feb 26 07:49:38 2001 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: string.c,v 1.192 2001/02/26 13:04:00 jmoore Exp $ */ +/* $Id: string.c,v 1.193 2001/02/26 15:49:38 andi Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -378,7 +378,7 @@ l = 0; while (newtext[i+l] != breakchar[0]) { if (newtext[i+l] == '\0') { - l --; + l--; break; } l++; @@ -392,7 +392,7 @@ newtext[i+l] = breakchar[0]; break; } - l --; + l--; } if (l == -1) { /* couldn't break is backwards, try looking forwards */ @@ -402,7 +402,7 @@ newtext[i+l] = breakchar[0]; break; } - l ++; + l++; } } } @@ -425,7 +425,7 @@ if (breakcharlen == 1 || strncmp(text+i+l, breakchar, breakcharlen)==0) break; } - l ++; + l++; } if (l = linelength) { pgr = l; @@ -439,7 +439,7 @@ last = i + l + 1; break; } - l --; + l--; } if (l == -1) { /* couldn't break it backwards, try looking forwards */ @@ -463,7 +463,7 @@ break; } } - l ++; + l++; } } i += l+1; -- PHP CVS 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] Making a variable
you can concatentate the variable inside the foreach loop. foreach (file("$file.txt") as $line) { $data .= ("" . trim(str_replace("'", "''", $line)) . "\n"); } -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Making a variable How can I make this a variable? ie: foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } changed to: $data = foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } Simply adding the $data = in front of it doesn't work, I assume it needs to be enclosed by () or ; or something right? Thanks :-) Clayton Dukes -- 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] hiding .php
hi, i would like to set up a script "forum" such that you can call a url http://www.server.com/forum/general and it will php-parse forum and pass /general as PATH_INFO. it's easy to get done as http://www.server.com/forum.php/general, but i would like to disclose the script name for reasons of obscurity. in fact, i would really like every request to be fed through something like /index.php, where the actual relative URI of the site is passed as PATH_INFO. so something of the form http://www.server.com/url/to/a/page would call /index.php with PATH_INFO=/url/to/a/page, and index.php could take care of whatever needs to be done to display that information. this can easily be done with a 404.php script, but i'd much rather do it transparently without this sort of abuse of the 404 feature. thanks, martin [greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net -- "and no one sings me lullabies, and no one makes me close my eyes, and so i throw the windows wide, and call to you across the sky" -- pink floyd, 1971 -- 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] Making a variable
Thanks! - Original Message - From: "Dan Olsen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 11:39 AM Subject: RE: [PHP] Making a variable you can concatentate the variable inside the foreach loop. foreach (file("$file.txt") as $line) { $data .= ("" . trim(str_replace("'", "''", $line)) . "\n"); } -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Making a variable How can I make this a variable? ie: foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } changed to: $data = foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } Simply adding the $data = in front of it doesn't work, I assume it needs to be enclosed by () or ; or something right? Thanks :-) Clayton Dukes -- 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] Making a variable -Trim output
Thanks again, Is there a way I can tell it to print all but the first 13 lines and the last two lines of the text file? -Clayton - Original Message - From: "Dan Olsen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 11:39 AM Subject: RE: [PHP] Making a variable you can concatentate the variable inside the foreach loop. foreach (file("$file.txt") as $line) { $data .= ("" . trim(str_replace("'", "''", $line)) . "\n"); } -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:17 AM To: [EMAIL PROTECTED] Subject: [PHP] Making a variable How can I make this a variable? ie: foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } changed to: $data = foreach (file("$file.txt") as $line) { print ("" . trim(str_replace("'", "''", $line)) . "\n"); } Simply adding the $data = in front of it doesn't work, I assume it needs to be enclosed by () or ; or something right? Thanks :-) Clayton Dukes -- 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] How to enable GD with PHP
Hi, I downloaded the GD libary and want to enable it with PHP but I cant figure out how to do that - can anyone tell me how to do it? Do I have to put the path to GD-libary inside the PHP.ini and if so, where? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- -- 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-CVS] cvs: php4 /main php.h
dbeuMon Feb 26 08:32:57 2001 EDT Modified files: /php4/main php.h Log: nuke warnings Index: php4/main/php.h diff -u php4/main/php.h:1.132 php4/main/php.h:1.133 --- php4/main/php.h:1.132 Sun Feb 25 22:07:31 2001 +++ php4/main/php.h Mon Feb 26 08:32:57 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: php.h,v 1.132 2001/02/26 06:07:31 andi Exp $ */ +/* $Id: php.h,v 1.133 2001/02/26 16:32:57 dbeu Exp $ */ #ifndef PHP_H #define PHP_H @@ -41,11 +41,6 @@ #define sprintf php_sprintf #endif -extern unsigned char first_arg_force_ref[]; -extern unsigned char first_arg_allow_ref[]; -extern unsigned char second_arg_force_ref[]; -extern unsigned char second_arg_allow_ref[]; - #ifdef PHP_WIN32 #include "win95nt.h" # ifdef PHP_EXPORTS @@ -59,6 +54,11 @@ #define THREAD_LS #define PHP_DIR_SEPARATOR '/' #endif + +PHPAPI extern unsigned char first_arg_force_ref[]; +PHPAPI extern unsigned char first_arg_allow_ref[]; +PHPAPI extern unsigned char second_arg_force_ref[]; +PHPAPI extern unsigned char second_arg_allow_ref[]; #include "php_regex.h" -- PHP CVS 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] Detecting JavaScript
Nothing tested, just off the top of my head. The single most reliable way to do that would be to have a page that runs JavaScript. For instance, if the JavaScript executes, it redirects to your JavaScript enabled page, if not, the page does a refresh to a non JavaScript enabled page. htmlheadtitletester/title script language='JavaScript' window.location('http://some.javascript.enabled.page'); /script meta http-equiv=refresh content='5;url=http://some.nonjavascripting.page' /head The trick would be a matter of timing, the JavaScript must successfully execute before the timer runs out on the refresh tag. You can of course get much fancier, changing the redirect based on the client information that PHP has available. PHP could effectively write the JavaScript to the page based on the known capabilities of the client. For instance the refresh tag is generally useless for browsers like Lynx, as is the JavaScript. Alternatively, you could (just supposing now...) have the first page do an instant refresh, using JavaScript to trigger a value in PHP. If the value is set, JavaScript was enabled, if it is not, JavaScript was turned off. But I've not tried it. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.com From: Jochen Kchelin [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Sun, 25 Feb 2001 05:37:17 +0100 To: "Php-General@Lists. Php. Net" [EMAIL PROTECTED] Subject: [PHP] Detecting JavaScript Who can give me a PHP-Script to detect if JavaScript is enabled? It should work with both, IE and NN! thanks -- Ihr WEBberater Stuttgarter Str.3, D-73033 Gppingen Tel. +49(0)7161-929594 - Fax. +49(0)7161-929598 http://www.wa-p.de ** mailto:[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] Making a variable -Trim output
yes but you might want to use a for() loop instead since you know what you want. $arrayoflines = file($file.txt); $arraysize = sizeof($arrayoflines); $limit = $arraysize - 2; for (i=0; i$arraysize; i++) { if ( (i12) (i$limit) ) { $output .= $arrayoflines[i]; } } youll have to debug, but it should work. DanO -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:43 AM To: Dan Olsen; [EMAIL PROTECTED] Subject: Re: [PHP] Making a variable -Trim output Thanks again, Is there a way I can tell it to print all but the first 13 lines and the last two lines of the text file? -Clayton - Original Message - From: "Dan Olsen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 11:39 AM Subject: RE: [PHP] Making a variable you can concatentate the variable inside the foreach loop. foreach (file("$file.txt") as $line) { $data .= ("" . trim(str_replace("'", "''", $line)) . "\n"); } -- 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] Detecting JavaScript
this is a function that is BUILT-IN to HTML for the last few versions. script //some script here /script noscript meta http-equiv=refresh content='5;url=http://some.nonjavascripting.page' /noscript -- this will redirect non-javascript browsers to a non-javascript page. DanO -Original Message- From: Dave Goodrich [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 8:56 AM To: [EMAIL PROTECTED] Cc: php Subject: Re: [PHP] Detecting JavaScript Nothing tested, just off the top of my head. The single most reliable way to do that would be to have a page that runs JavaScript. For instance, if the JavaScript executes, it redirects to your JavaScript enabled page, if not, the page does a refresh to a non JavaScript enabled page. htmlheadtitletester/title script language='JavaScript' window.location('http://some.javascript.enabled.page'); /script meta http-equiv=refresh content='5;url=http://some.nonjavascripting.page' /head The trick would be a matter of timing, the JavaScript must successfully execute before the timer runs out on the refresh tag. You can of course get much fancier, changing the redirect based on the client information that PHP has available. PHP could effectively write the JavaScript to the page based on the known capabilities of the client. For instance the refresh tag is generally useless for browsers like Lynx, as is the JavaScript. Alternatively, you could (just supposing now...) have the first page do an instant refresh, using JavaScript to trigger a value in PHP. If the value is set, JavaScript was enabled, if it is not, JavaScript was turned off. But I've not tried it. DAve -- Dave Goodrich Director of Interface Development Reality Based Learning Company 9521 NE Willows Road, Suite 100 Redmond, WA 98052 Toll Free 1-877-869-6603 ext. 237 Fax (425) 558-5655 [EMAIL PROTECTED] http://www.rblc.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]
php-general Digest 26 Feb 2001 17:00:56 -0000 Issue 535
php-general Digest 26 Feb 2001 17:00:56 - Issue 535 Topics (messages 41650 through 41704): Re: Simple String Replace Question 41650 by: Jeff Oien 41679 by: PHPBeginner.com Re: PHP4 directives in httpd.conf not working 41651 by: David Robley 41675 by: PHPBeginner.com php4 as a module AND a cgi 41652 by: colin olkowski 41660 by: Michael A. Peters 41662 by: Jason Brooke Escape % 41653 by: Website4S.aol.com 41654 by: John LYC 41655 by: Website4S.aol.com register stop working with a site 41656 by: Plamen Slavov My system don't store session data, anybody can help me!! 41657 by: Securez 41666 by: Securez 41668 by: Christian Reiniger Re: a good hosting experience 41658 by: Michael A. Peters Newbie: why do I get this error? 41659 by: Harshdeep S Jawanda 41663 by: Harshdeep S Jawanda 41667 by: Yasuo Ohgaki installation problem 41661 by: tribal00.libero.it Re: Download PHP from Linux machine? 41664 by: Rick Hodger multiple file upload.. 41665 by: John LYC 41671 by: Yasuo Ohgaki FreeHostage:PHPMySQL 41669 by: Bruno Mário Amaral Almeida 41673 by: Michael A. Peters 41674 by: PHPBeginner.com 41680 by: PHPBeginner.com 41682 by: Jeff Oien Fopen only absolute IP 41670 by: Paolo Ciraci setcookie don't work well... 41672 by: Nuno Costa 41688 by: Chris Lee Re: mysql_info() 41676 by: PHPBeginner.com Re: Printing long strings 41677 by: PHPBeginner.com Re: Using one invocation of PHP executable to generate multiple pages? 41678 by: PHPBeginner.com [EMAIL PROTECTED] - should get removed 41681 by: Maxim Maletsky ftp connection 41683 by: Jon A Re: Join causing Error? 41684 by: Johnny Withers AS400/Java Toolkit and PHP 41685 by: Conover, Ryan DNS Lookups Fail 41686 by: Scott Rothgaber PERL to PHP 41687 by: Clayton Dukes 41690 by: kevin1 41691 by: Clayton Dukes Very strange Nutscrape behavior - PHP/JS/DHTML??? 41689 by: Brian V Bonini mcrypt and encrypted field length 41692 by: Hardy Merrill Browser? 41693 by: Paulson, Joseph V. \"Jay\" Making a variable 41694 by: Clayton Dukes 41697 by: Dan Olsen 41699 by: Clayton Dukes Re: php (cgi version) with Apache and suexec - help 41695 by: jhagan.binghamton.edu header() and require() 41696 by: Jason Jacobs hiding .php 41698 by: MaD dUCK Re: Making a variable -Trim output 41700 by: Clayton Dukes 41703 by: Dan Olsen How to enable GD with PHP 41701 by: SED Re: Detecting JavaScript 41702 by: Dave Goodrich 41704 by: Dan Olsen Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- html body form method=post textarea name="str" cols=50 rows=10/textareabr input type=submit /form hrpre ?php $str = ereg_replace("([^\r\n])\r\n([^\r\n])", "\\1 \\2", $str); echo $str; ? /pre /body /html Got it now. I didn't didn't have pre/pre tags in mine. With the pre tags it works as prescribed. Thanks! The other troubleshooting examples were helpful too to know what's going on with those characters. Jeff Oien Would $string_new = ereg_replace("\n[ \t\r\n]*\n", "\n", $string); work for you? Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: Jeff Oien [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 3:37 AM To: PHP Subject: [PHP] Simple String Replace Question I would like to get rid of \n characters unless there are two or more in a row. So for example if there is a long email formatted like we do here with line break I want to remove the line breaks so text can be wrapped by a browser, but also show paragraph breaks where necessary. This is what I have: $string_new = str_replace("\n", "", $string); How can I augment this to not replace: \n \n Thanks. Jeff Oien -- 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] On Mon, 26 Feb 2001 15:30, Brian White wrote: I have php4 running under Apache. Under that apache I have several VirtualHosts. I want to set to some of the PHP.INI values under one of those hosts. So far I have tried the following values in my httpd.conf file: 1) include_path "/my/phpinc/path" 2) php_include_path "/my/phpinc/path" 3) php3_include_path "/my/phpinc/path"
RE: [PHP] isset()
Wow, I hope you all will forgive me for one last go around on this thread :) Technically, what does "set" mean? It is not the same as "is registered" or "has a value", right? What is "is set"? Is it "introduced to the global namespace"? TIA Kirk Except that it will throw a warning in PHP4 if $var is not set. = isset () should be used. man, this is like the thread that will not die. -- 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] Help, Perl can, Php can't !
I am trying to post some info to my php script using the microsoft internet control: strurl = http://www.myserver.com/test.asp strdata = "lah=sddta=test Inet1.Execute strurl, "POST", strdata PHP returns HTTP_POST_VARS as being empty. Yet, if I use PERL, I can read the posted info just fine. PHP does work fine with normal php forms. Why can PERL recognize my data, but PHP not, how are they handling the posted info differently? Is there a way I can get PHP to display the raw data that the script receives so I can see what is happening? Thanks for any help, Chris
RE: [PHP] Browser?
HTTP_USER_AGENT http://php.net/manual/en/language.variables.predefined.php -Brian -Original Message- From: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP] Browser? Is there a way to tell what browser is being used by the client in php? Thanks, Jay -- 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.sock
The problem I had with this in the past is that I didn't have permission to write to the dir mysql.sock was supposed to be in so when Mysql tried to start it would fail. -- phill -- 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] DNS Lookups Fail
Addressed to: "Scott Rothgaber" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Scott Rothgaber" [EMAIL PROTECTED] Mon, 26 Feb 2001 09:45:42 -0500 PHP 4.0.4 pl1, Apache 1.3.17, BSD/OS 4.1 pl37 Good Morning! Please forgive me if this has been covered ad nauseum, but I have searched high and low for an answer with no luck. After building PHP as a module, following the online instructions, Apache complained that it could not resolve hostnames. I got around this by using IP's in httpd.conf and making wusage do the lookups. Is there a fix for this or is it an unpleasant side effect that we must accept and deal with? The official word on the Apache config files is that you _should_ use IP addresses rather than host names. That said, I don't do it. I find the host names more understandable when I am working on the file. The problem is you MUST make sure DNS or /etc/hosts name resolution is available BEFORE you start the web server. The first thing to try is get a list of the host names that fail and do a nslookup to make sure you can resolve them. You may have bigger problems with DNS. If the problem happens only when you boot the computer, make sure you start networking ans named long before you try to start the web server. A way to side step the entire DNS issue is to list each of your web IP addresses in /etc/hosts, and make sure that /etc/resolv.conf looks in that file before it goes out to DNS. Even if you do this you need to find out why the host names can not be resolved. If the master DNS server is setup wrong, no one will be able to see the site. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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: [PHP] Help, Perl can, Php can't !
Put phpinfo() in the script to see what is going on.. On Monday, 26 February 2001, at 09:12:11 (-0800), Chris wrote: I am trying to post some info to my php script using the microsoft internet control: strurl = http://www.myserver.com/test.asp strdata = "lah=sddta=test Inet1.Execute strurl, "POST", strdata PHP returns HTTP_POST_VARS as being empty. Yet, if I use PERL, I can read the posted info just fine. PHP does work fine with normal php forms. Why can PERL recognize my data, but PHP not, how are they handling the posted info differently? Is there a way I can get PHP to display the raw data that the script receives so I can see what is happening? Thanks for any help, Chris -- David Raufeisen [EMAIL PROTECTED] Cell: (604) 818-3596 -- 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] Making a variable -Trim output
Dan... You are the man, thanks! :-) - Original Message - From: "Dan Olsen" [EMAIL PROTECTED] To: "Clayton Dukes" [EMAIL PROTECTED] Sent: Monday, February 26, 2001 12:30 PM Subject: RE: [PHP] Making a variable -Trim output clayton- the only problems were syntactic. there was an extra $ on the filename for file.txt, and there were no $'s on the loop variable i (happens to me all the time, switching from perl to java(script) to php depending on what day it is). this code compiles and runs fine. ? $arrayoflines = file('file.txt'); $arraysize = sizeof($arrayoflines); $limit = $arraysize - 2; $output = ""; for ( $i=0; $i$arraysize; $i++) { if ( ($i12) ($i$limit) ) { $output .= $arrayoflines[$i]; } } print $output; ? enjoy, DanO -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 9:08 AM To: Dan Olsen Subject: Re: [PHP] Making a variable -Trim output Thanks so much for your help Dan, here's what I get when I try it: Parse error: parse error, expecting `';'' in - on line 7 line 7 is: for (i=0; i\$arraysize; i++) { any ideas? - Original Message - From: "Dan Olsen" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, February 26, 2001 12:02 PM Subject: RE: [PHP] Making a variable -Trim output yes but you might want to use a for() loop instead since you know what you want. $arrayoflines = file("$file.txt"); $arraysize = sizeof($arrayoflines); $limit = $arraysize - 2; for (i=0; i$arraysize; i++) { if ( (i12) (i$limit) ) { $output .= $arrayoflines[i]; } } you'll have to debug, but it should work. DanO -- 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] header() and require()
Addressed to: "Jason Jacobs" [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from "Jason Jacobs" [EMAIL PROTECTED] Mon, 26 Feb 2001 11:28:37 -0500 Hi. In some of my files, I have a require statement to get some global stuff accessable. I also have some header() redirects. They don't work (they worked before I added the requires). I moved the require under one of the header()s and that one works now, but I can't move it under the other one because stuff has to happen before the redirect and it needs the required stuff. So my question is do require statements produce output that I can't see (which would make the redirects not work)? The files I'm requiring don't have any output, which is why I'm confused. Thanks. The most common cause of this problem is a blank line, or evan a space in the wrong place in one of the required files. The following examples will cause the problem: -- ? some code here ? -- -- ? some code here ? -- -- ? some code here ? -- -- ? some code here ? NOTE: even a single space after the will cause a problem. -- -- ? some code ? ? some more code ? -- What they all have in common, is ANYTHING outside of ? and ? in the file. Rick Widmer Internet Marketing Specialists http://www.developersdesk.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]
[PHP-CVS] cvs: php4 /ext/imap php_imap.c
kalowskyMon Feb 26 08:36:08 2001 EDT Modified files: /php4/ext/imap php_imap.c Log: # Bad patch job on the last commit by me. I take the BAD_CODER award for # the day. Removes two unnecessary REGISTER_MAIN_LONG_CONSTANT's. # what should be done about the PHP_MINFO_FUNCTION Index: php4/ext/imap/php_imap.c diff -u php4/ext/imap/php_imap.c:1.60 php4/ext/imap/php_imap.c:1.61 --- php4/ext/imap/php_imap.c:1.60 Mon Feb 26 07:17:12 2001 +++ php4/ext/imap/php_imap.cMon Feb 26 08:36:08 2001 @@ -25,7 +25,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.60 2001/02/26 15:17:12 kalowsky Exp $ */ +/* $Id: php_imap.c,v 1.61 2001/02/26 16:36:08 kalowsky Exp $ */ #define IMAP41 @@ -551,14 +551,6 @@ /* next UID to be assigned */ REGISTER_MAIN_LONG_CONSTANT("SA_UIDVALIDITY",SA_UIDVALIDITY , CONST_PERSISTENT | CONST_CS); /* UID validity value */ -#ifdef HAVE_IMAP2000 - sa_all |= GET_QUOTA; -REGISTER_MAIN_LONG_CONSTANT("GET_QUOTA",GET_QUOTA , CONST_PERSISTENT | CONST_CS); - /* Disk space taken up by mailbox. */ - sa_all |= GET_QUOTAROOT; -REGISTER_MAIN_LONG_CONSTANT("GET_QUOTAROOT",GET_QUOTAROOT , CONST_PERSISTENT | CONST_CS); -#endif - /* Disk space taken up by all mailboxes owned by user. */ REGISTER_MAIN_LONG_CONSTANT("SA_ALL", sa_all, CONST_PERSISTENT | CONST_CS); /* get all status information */ @@ -1042,12 +1034,13 @@ /* set the callback for the GET_QUOTA function */ mail_parameters(NIL, SET_QUOTA, (void *) mail_getquota); - if(!imap_getquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot))) { php_error(E_WARNING, "c-client imap_getquota failed"); RETURN_FALSE; } + /* MAKE_STD_ZVAL(quota_array); */ + /* if (array_init(quota_array) != SUCCESS) { */ if (array_init(return_value) == FAILURE) { php_error(E_WARNING, "Unable to allocate array memory"); RETURN_FALSE; @@ -1058,6 +1051,7 @@ } /* }}} */ + /* {{{ proto int imap_set_quota(int stream_id, string qroot, int mailbox_size) Will set the quota for qroot mailbox */ PHP_FUNCTION(imap_set_quota) @@ -1085,7 +1079,7 @@ php_error(E_WARNING, "Unable to find stream pointer"); RETURN_FALSE; } - RETURN_LONG(imap_setquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot), limits)); + RETURN_LONG(imap_setquota(imap_le_struct-imap_stream, Z_STRVAL_PP(qroot), +limits)); } /* }}} */ #endif -- PHP CVS 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 trace route?
Hello, I am looking for a php trace route that I can have get the IP of the person browsing the site and do a trace route from the server. Then I want to reverse the results so It looks like they are doing a trace route on the server rather than the server doing a trace route on them. Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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]
[PHP] Sessions question
How can I have an new session id without closing the browser? session.inc contains basically the postgresql session functions (user handler) in http://www.php.net/manual/en/ref.session.php I have change pg_pconnect for pg_connect and I have added pg_destroy_session. 1. There is a login/password page 2. Afterwards all pages that access the DB have the following include file: ? include('sesion.inc'); if (!isset($g_login)) {// flag that indicates that validation was succesful echo "script language='javascript' !-- var lugar = window.location.href; if ( lugar != \"http://www.my_web.com/login.php\" ) { window.location.assign('http://www.my_web.com/login.php'); } //-- /script"; } if (isset($g_hora)) { $timeout = 3600 ; $lapso = time() - $g_hora; if ( $lapso = $timeout ) { session_destroy();// delete session from database session_unset(); // suppose to delete session variable from memory $sesion = md5(uniqid("prueba")); session_id($sesion); // new session echo "script language='javascript' !-- var lugar = window.location.href; var lugars; window.alert('La sesin ha expirado'); var lugar = window.location.href; if ( lugar != \"http://www.my_web.com/login.php\" ) { window.location.assign('http://www.my_web.com/login.php'); } //-- /script"; } } ? 3. How am I supposed to create a new session identificator ? session_unset is suppose to "free" (delete?) all session variables currently registered, isn't it? After timeout, it goes to login page but I have still the old session id instead of the new one. What am I missing? TIA -- Evelio Martnez
Re: [PHP] Logging out a user
On Mon, 26 Feb 2001, Chris Aitken wrote: Okay, I got a bit of a curley one that I havent been able to solve by looking at the archives and in the manual. Its kind of a PHP/Apache question. I have a system where a user logs in through .htaccess, it queries my mysql database, sets a cookie which logs their username and access level number. What I want to be able to do it this.. Give the option to "Log Out" which will clear the cookie, and also make htaccess re-request a login. Once it logs in again, the current scripts do their thang and log the new user in. Is there any direction anyone can point me to start looking cause I have a feeling im off the track on what im searching for in TFM and in TFA. I've got a setup similar to this, but it doesn't use htaccess for authentication. If you send a 401 back at the client, it will void its cached username/password. You could do this at the top of your code: header("WWW-Authenticate: Basic realm=\"stuff\""); header("HTTP/1.0 401 Unauthorized"); exit; ..if 1) the login cookie is not present, and 2) the user is not currently logging in (trying to get the cookie) on that hit. If you want to do it quietly, just unset the cookie and bounce them to somewhere outside of the realm of your htaccess protection. Next time they enter, the cookie will not exist, so they'll be forced to re-login anyway. -- Douglas R. Winslow III MetroNet Internet Services, Inc. -- 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-DB] To use paradox??..
Hi All, I have been using PHP for the last 5 months, and it's great, Unitl now, I have been using connections to informix and everything is OK. Now I need to connect from a linux-apache server to a paradox db in other machine (Windows NT), so the question is, What do I need to make the connection, for what I have readed in the mailing list archives I need an ODBC Driver for paradox, where can I get it, and where I heve to put it, and what else do I need to do??? Thanks Rene -- 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-DB] To use paradox??..
Rene, You can use OpenLink's Multi-Tier driver. We don't directly support Paradox, but there is a MS driver on most NT systems that we can work with, in a 'piggyback' method. Use the iODBC-PHP HOWTO at http://www.iodbc.org/odbc-phpHOWTO.html Install the OpenLink Multi-Tier drivers for linux client and Windows server, from http://www.openlinksw.com Then: 1. create DSN on the Win box using the MS Driver for Paradox, call it 'foo' for this example 2. create a DSN on the Linux box, using OpenLink's driver, and: - hostname is the Win box - ServerType is Odbc - Database is foo - other parameters as needed If you run into problems, free support is available at http://www.openlinksw.com/support/suppindx.htm Best regards, Andrew -- Andrew Hill - OpenLink Software Director Technology Evangelism eBusiness Infrastructure Technology http://www.openlinksw.com -Original Message- From: Rene Maldonado [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 1:18 PM To: Lista PHP Subject: [PHP] [PHP-DB] To use paradox??.. Hi All, I have been using PHP for the last 5 months, and it's great, Unitl now, I have been using connections to informix and everything is OK. Now I need to connect from a linux-apache server to a paradox db in other machine (Windows NT), so the question is, What do I need to make the connection, for what I have readed in the mailing list archives I need an ODBC Driver for paradox, where can I get it, and where I heve to put it, and what else do I need to do??? Thanks Rene -- 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] Newbie: why do I get this error?
At 3:47 PM +0530 2/26/01, Harshdeep S Jawanda wrote: Hello everybody, I am a newbie, so please help me out with my rather basic question. Please take a look at the following code snippet: class HTMLTable extends HTMLElement { var $attributes; function HTMLTable() { $attributes[] = array("border", "0"); $attributes[] = array("cellpadding", "0"); // and some other things } function emit() { // I get an error on this line $arrLength = count($this-attributes[1]); } } On the line indicated above, I get the error: "Warning: Undefined property: attributes in html_base_classes.inc on line line-number" Can anybody give me a clue as to why this is happening? In your HTMLTable() function, use $this-attributes[] = array("border", "0"); $this-attributes[] = array("cellpadding", "0"); otherwise, PHP thinks $attributes is a variable local to that function, rather that a class variable. -steve -- Regards, Harshdeep Singh Jawanda. -- +--- "They've got a cherry pie there, that'll kill ya" --+ | Steve Edberg University of California, Davis | | [EMAIL PROTECTED] Computer Consultant | | http://aesric.ucdavis.edu/ http://pgfsun.ucdavis.edu/ | +-- FBI Special Agent Dale Cooper ---+ -- 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-CVS] cvs: php4 / configure.in /ext/gettext php_gettext.h /ext/icap php_icap.c /ext/imap php_imap.h /ext/mcal php_mcal.c /ext/mcrypt php_mcrypt.h /ext/mhash php_mhash.h /ext/midgard php_midgard.h /ext/ovrimos php_ovrimos.h /main internal_functions.c.in internal_functions_win32.c php.h /sapi/cgi cgi_main.c
andiMon Feb 26 10:14:32 2001 EDT Modified files: /php4 configure.in /php4/ext/gettext php_gettext.h /php4/ext/icap php_icap.c /php4/ext/imap php_imap.h /php4/ext/mcal php_mcal.c /php4/ext/mcryptphp_mcrypt.h /php4/ext/mhash php_mhash.h /php4/ext/midgard php_midgard.h /php4/ext/ovrimos php_ovrimos.h /php4/main internal_functions.c.in internal_functions_win32.c php.h /php4/sapi/cgi cgi_main.c Log: - Finally rename modules.h to zend_modules.h for consistency (first try was 2000-03-11). - Remove the first_arg_force_ref[]; and friends extern from php.h as they are included via zend_API.h Index: php4/configure.in diff -u php4/configure.in:1.218 php4/configure.in:1.219 --- php4/configure.in:1.218 Wed Feb 14 21:21:27 2001 +++ php4/configure.in Mon Feb 26 10:14:27 2001 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.218 2001/02/15 05:21:27 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.219 2001/02/26 18:14:27 andi Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -699,7 +699,7 @@ PART2=non-zts fi -ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' $srcdir/Zend/modules.h|sed 's/#define ZEND_MODULE_API_NO //'` +ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO ' +$srcdir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO //'` EXTENSION_DIR="$prefix/lib/php/extensions/$PART1-$PART2-$ZEND_MODULE_API_NO" Index: php4/ext/gettext/php_gettext.h diff -u php4/ext/gettext/php_gettext.h:1.10 php4/ext/gettext/php_gettext.h:1.11 --- php4/ext/gettext/php_gettext.h:1.10 Sun Feb 25 22:06:56 2001 +++ php4/ext/gettext/php_gettext.h Mon Feb 26 10:14:28 2001 @@ -16,14 +16,14 @@ +--+ */ -/* $Id: php_gettext.h,v 1.10 2001/02/26 06:06:56 andi Exp $ */ +/* $Id: php_gettext.h,v 1.11 2001/02/26 18:14:28 andi Exp $ */ #ifndef PHP_GETTEXT_H #define PHP_GETTEXT_H #if HAVE_LIBINTL #ifndef INIT_FUNC_ARGS -#include "modules.h" +#include "zend_modules.h" #endif extern zend_module_entry php_gettext_module_entry; Index: php4/ext/icap/php_icap.c diff -u php4/ext/icap/php_icap.c:1.21 php4/ext/icap/php_icap.c:1.22 --- php4/ext/icap/php_icap.c:1.21 Wed Oct 25 10:43:51 2000 +++ php4/ext/icap/php_icap.cMon Feb 26 10:14:28 2001 @@ -45,7 +45,7 @@ #include stdarg.h #include "cal.h" #include "php_icap.h" -#include "modules.h" +#include "zend_modules.h" #include "ext/standard/info.h" #include "ext/standard/basic_functions.h" #ifdef PHP_WIN32 Index: php4/ext/imap/php_imap.h diff -u php4/ext/imap/php_imap.h:1.7 php4/ext/imap/php_imap.h:1.8 --- php4/ext/imap/php_imap.h:1.7Mon Feb 26 07:17:12 2001 +++ php4/ext/imap/php_imap.hMon Feb 26 10:14:28 2001 @@ -15,7 +15,7 @@ #include "rfc822.h" #endif -#include "modules.h" +#include "zend_modules.h" extern zend_module_entry imap_module_entry; #define imap_module_ptr imap_module_entry Index: php4/ext/mcal/php_mcal.c diff -u php4/ext/mcal/php_mcal.c:1.40 php4/ext/mcal/php_mcal.c:1.41 --- php4/ext/mcal/php_mcal.c:1.40 Sun Feb 25 22:07:01 2001 +++ php4/ext/mcal/php_mcal.cMon Feb 26 10:14:28 2001 @@ -34,7 +34,7 @@ #include stdarg.h #include "mcal.h" #include "php_mcal.h" -#include "modules.h" +#include "zend_modules.h" #include "ext/standard/info.h" #include "ext/standard/basic_functions.h" #ifdef PHP_WIN32 Index: php4/ext/mcrypt/php_mcrypt.h diff -u php4/ext/mcrypt/php_mcrypt.h:1.15 php4/ext/mcrypt/php_mcrypt.h:1.16 --- php4/ext/mcrypt/php_mcrypt.h:1.15 Sun Aug 13 04:53:04 2000 +++ php4/ext/mcrypt/php_mcrypt.hMon Feb 26 10:14:29 2001 @@ -9,7 +9,7 @@ #if PHP_API_VERSION 19990421 #define zend_module_entry zend_module_entry -#include "modules.h" +#include "zend_modules.h" #include "internal_functions.h" #endif Index: php4/ext/mhash/php_mhash.h diff -u php4/ext/mhash/php_mhash.h:1.6 php4/ext/mhash/php_mhash.h:1.7 --- php4/ext/mhash/php_mhash.h:1.6 Wed Oct 25 11:09:23 2000 +++ php4/ext/mhash/php_mhash.h Mon Feb 26 10:14:29 2001 @@ -5,7 +5,7 @@ #if PHP_API_VERSION 19990421 #define zend_module_entry zend_module_entry -#include "modules.h" +#include "zend_modules.h" #include "internal_functions.h" #endif Index: php4/ext/midgard/php_midgard.h diff -u php4/ext/midgard/php_midgard.h:1.6 php4/ext/midgard/php_midgard.h:1.7 --- php4/ext/midgard/php_midgard.h:1.6 Sat Feb 24 13:12:11 2001 +++ php4/ext/midgard/php_midgard.h Mon Feb 26 10:14:29 2001 @@ -1,4 +1,4 @@ -/* $Id: php_midgard.h,v 1.6 2001/02/24 21:12:11 davidg Exp $ +/* $Id: php_midgard.h,v 1.7 2001/02/26 18:14:29 andi Exp $ Copyright (C) 1999 Jukka Zitting [EMAIL PROTECTED] Copyright (C) 2000 The Midgard Project ry Copyright (C) 2000 Emile Heyns, Aurora SA [EMAIL PROTECTED] @@ -31,7 +31,7 @@ #include php.h #include midgard/midgard.h #include midgard/apache.h
[PHP] Screen Size?
How do you determine a user's screen size (resolution)? Isn't there a variable/function for this? -- Focus Design Group, Inc. http://www.focusdesigngroup.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: [PHP] Screen Size?
How do you determine a user's screen size (resolution)? Isn't there a variable/function for this? I doubt you could do this in PHP, since your browser doesn't normally include screen size information in the headers it sends across to web servers. However, JavaScript can do this -- there's a screen object, with properties called screen.width and screen.height that specify (surprisingly enough) the width and height of the user's screen. You could create a form with some hidden inputs, and have a JavaScript body onLoad() event that would set the values of these hidden inputs to your user's screen size. When PHP receives this form. it could process the information from there. Hope this helps... --Todd -Original Message- From: Jason Bryner :: Focus Design Group, Inc. [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 10:52 PM To: PHP Subject: [PHP] Screen Size? How do you determine a user's screen size (resolution)? Isn't there a variable/function for this? -- Focus Design Group, Inc. http://www.focusdesigngroup.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]
[PHP] archive location
What is the newsgroup archive location ? marc.themaesgroup.something ? Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.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]
[PHP] phpAtlanta User Group
Hello everyone, I know this is a bit of an deviation from the normal type of email this list gets, so I'll keep it short. If you are reading this, then you have probably judged by the title that this has to do with a user group, in Atlanta. If you live in Atlanta, GA (or close enough that you tell people you live here) then you may want to come join us and help us form a user group. We are relatively new but we are already getting things rolling as far as meetings, newsletters and the such. If this interests you, come on over to http://www.phpatlanta.org/ for more info. If you don't live in/around Atlanta please forward this message to someone who does, or just delete it. Thanks for your time. Stephen VanDyke [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] Weird Problem
Hi everyone, First, let me explain I am a very knowledgable php developer. I'm not someone trying to write their first script. I have been working on a very large and complex problem for some time now when it suddenly stopped working. I did not change anything in any configurations or edit any code that would have affected how my database functionality class would function. But, all of my connections started to bomb out. Follows are the entire contents of a file simp.php (minus the line numbers): 1 ? 2 3 $db = mysql_connect("localhost", "web", "pw") || print "error connecting ".mysql_error()." ".mysql_errno(); 4 mysql_select_db("surveys"); 5 6 $result = mysql_query("select * from attract") || print "error querying ".mysql_error()." ".mysql_errno(); 7 8 $i = 0; 9 while ($row = mysql_fetch_array(mysql_query("select * from attract"))){ // ($i++ 5)){ 10 echo $row[0]." ".$row[1]."br"; 11 } 12 ? Please note that the user web@localhost identified by pw has permissions to select from the table attract. Here is what I have identified so far: A - If I use $result in mysql_fetch_array() line 9, I get the error: Warning: Supplied argument is not a valid MySQL result resource in simp.php3 on line 9 But if I use the statement mysql_query("select * from attract") in its place, the loop (although infinite) will produce expected results, ie print out the first and second columns of the first row of the table infinitely. So basically, I would conclude the life of the variable result is terminiating before I can use it. Why, I don't have a clue. B - Being tired of an infinite loop in my investigation, I added line 8 and I placed the statement ($i++ 5) inside the while loop condition. Now, only the br and spaces from line 10 will print, not the actual values of the $row array. The output is br br br br br, with no values from the table attract. This is where I stand now, completely flabberghasted and nearly insane. Can anyone shed any light on this before I have to commit to bringing down the webserver while I reinstall php4. (oh, btw I am running Apache/1.3.14 (Unix) PHP/4.0.4pl1 on Red Hat 6.2 (I hate redhat, but the bossman says its better supported than slakware. bah.)) Thank you all for your help. steve -- 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 trace route?
Use passthru to run traceroute on the ip of interest, then output the results of that command, line by line, starting with the last line. J on 2/26/01 9:48 AM, Brandon Orther at [EMAIL PROTECTED] wrote: Hello, I am looking for a php trace route that I can have get the IP of the person browsing the site and do a trace route from the server. Then I want to reverse the results so It looks like they are doing a trace route on the server rather than the server doing a trace route on them. Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.com -- Julian Wood Multimedia Developer University of Calgary -- 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] Change dir mode to writable for uploading..
Another neat trick is to use ftp to upload, avoiding the need to change permssions. - Original Message - From: "Dhaval Desai" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 24, 2001 12:25 AM Subject: [PHP] Change dir mode to writable for uploading.. Hi! I have problem uploading the file to a directory... It says permission denied. THe problem is taht ther directory is on the web. I connect using WS_ftp. THe directory is set to: drwxr-xr-x How do I make it writable..? I am using form to upload the files there.. Is there any way I can make the directory writable..? Thank You! Dhaval Desai __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.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] -- 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-CVS] cvs: CVSROOT / cvsusers
sas Mon Feb 26 10:34:07 2001 EDT Modified files: /CVSROOTcvsusers Log: update email address of eskaly Index: CVSROOT/cvsusers diff -u CVSROOT/cvsusers:1.228 CVSROOT/cvsusers:1.229 --- CVSROOT/cvsusers:1.228 Sun Feb 25 16:25:35 2001 +++ CVSROOT/cvsusersMon Feb 26 10:34:07 2001 @@ -269,5 +269,5 @@ theseer Arne Blankerts [EMAIL PROTECTED]German translation cevm Carlos Eduardo Vargas Miranda [EMAIL PROTECTED] Brazilian Portuguese translation noribsd Jaemin Byon [EMAIL PROTECTED]Korean translation -eskalyBenjamin Schulz [EMAIL PROTECTED] Documentation +eskalyBenjamin Schulz [EMAIL PROTECTED] +Documentation abAlexander Bokovoy [EMAIL PROTECTED] Midgard -- PHP CVS 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] Printing long strings
On Monday 26 February 2001 14:38, PHPBeginner.com wrote: Yes, you could use stripslashes($string) on it's output, in this way it will be no different as it was inputted. -Original Message- From: Clayton Dukes [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 9:57 AM To: [EMAIL PROTECTED] Subject: [PHP] Printing long strings How can I get php to print a long string and ignore any of the characters in the string? ie: $string = "some'strin^g"; print $string; Hmm, perhaps he looks for a way to let the *browser* preserve the string (and not e.g. parse the "" as start of a tag). htmlentities () ist the function of choice then... -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "use the source, luke." (obi-wan gnuobi) -- 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] isset()
On Monday 26 February 2001 18:07, Johnson, Kirk wrote: Wow, I hope you all will forgive me for one last go around on this thread :) Technically, what does "set" mean? It is not the same as "is registered" or "has a value", right? What is "is set"? Is it "introduced to the global namespace"? "introduced to the *current* namespace" -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) "use the source, luke." (obi-wan gnuobi) -- 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-CVS] cvs: CVSROOT / avail cvsusers gen_acl_file.m4
rasmus Mon Feb 26 11:34:09 2001 EDT Modified files: /CVSROOTavail cvsusers gen_acl_file.m4 Log: Doc account for Julio Cesar Carvalho Rocha Index: CVSROOT/avail diff -u CVSROOT/avail:1.103 CVSROOT/avail:1.104 --- CVSROOT/avail:1.103 Sun Feb 25 16:25:35 2001 +++ CVSROOT/avail Mon Feb 26 11:34:09 2001 @@ -7,7 +7,7 @@ avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,hholzgra|functable avail|rasmus,sterling,jimw|pres avail|jalal,zak,andre,ultrapingo,lyric,jmoore,ronabop,sbergmann,joey,sniper,torben,hellekin,cnewbill|qaweb -avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly|phpdoc +avail|andi,andrei,jimw,rasmus,rubys,sas,ssb,thies,zeev,shane,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez,php_ext,chad,torben,lynch,kk,ted,kwazy,aka,affinity,paul,skaag,pglat,mbritton,coar,lwest,joey,bibi,mrobinso,lwh,perugini,hamoralesr,tzwenny,hirokawa,drews,paulsen,hartmann,philross,leon,valdirh,dmarion,dubois,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,cris,goba,samesch,jon,soneca,kaufm,ronabop,glace,latoserver,phpguru_dk,lojmann,rafael,jan,jcmeloni,chrullrich,mk,sbergmann,troels,mathieu,voize,phaethon,mgx,mj,corean,pandach,brown,cycle98,vizvil,openlife,regina,cynic,jpm,dams,alponce,menuconfig,obst,topgoods,karoora,pcraft,suvia,zak,zimt,mgx,sintoris,jmoore,ftfuture,uttam,ag315,ropik,jbi1979,bbonev,malo,afortaleza,neotron,cg,delrom,dickmeiss,jkj,hellekin,kgergely,andreroq,eduardh,cnewbill,fuzzy74,inki,bjoern,fams,smasiello,dim,lucasr,cpereira,lagflores,kjh90,ernani,theseer,cevm,noribsd,eskaly,mctrash|phpdoc avail|andrei,fmk,zimt,jan|php-gtk avail|emile,davidg,alan_k,ab|php4/ext/midgard avail|rasmus|php4/ext/aspell Index: CVSROOT/cvsusers diff -u CVSROOT/cvsusers:1.229 CVSROOT/cvsusers:1.230 --- CVSROOT/cvsusers:1.229 Mon Feb 26 10:34:07 2001 +++ CVSROOT/cvsusersMon Feb 26 11:34:09 2001 @@ -271,3 +271,4 @@ noribsd Jaemin Byon [EMAIL PROTECTED]Korean translation eskalyBenjamin Schulz [EMAIL PROTECTED] Documentation abAlexander Bokovoy [EMAIL PROTECTED] Midgard +mctrash Julio Cesar Carvalho Rocha [EMAIL PROTECTED] +Brazilian Portuguese translation Index: CVSROOT/gen_acl_file.m4 diff -u CVSROOT/gen_acl_file.m4:1.107 CVSROOT/gen_acl_file.m4:1.108 --- CVSROOT/gen_acl_file.m4:1.107 Sun Feb 25 16:25:35 2001 +++ CVSROOT/gen_acl_file.m4 Mon Feb 26 11:34:09 2001 @@ -3,7 +3,7 @@ dnl PHP Developers (full access to the source trees) define(`php_dev', `php_group,fmk,hirokawa,jah,eschmid,dbeu,sbergmann,samjam,avsm,ronabob,derick,sterling,venaas,stas,hholzgra,cmv,phildriscoll,jmoore,andre,sniper,changelog,sr,david,jdonagher,chagenbu,jon,elixer,joosters,jason,mysql,kalowsky,opaquedave,steinm,phanto,gluke,shuric,svanegmond,rjs,vlad,jimjag,emile,wez') dnl PHP Documentation Group -define(`php_doc',
[PHP] File Upload Strangeness
Hi there, We are currently using 3.0.16 (I know :(). I have a form action pointing to $PHP_SELF. After submitting the form information, $userfile contains what I expect in $userfile_name. I have had all sorts of troubles with file uploads lately, but eventually they start working. Not this time. Can someone give me a clue, please? Thanks, Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB -- 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] 2 columns same name cuz of a join
Hi again. :) Does anyone know how to reference a value in an array or object if the returned table has 2 fields of the same name. IE, I am querying 2 tables and returning an id value from each. On both tables, the id fieldname is "id". I know I can access the vals like $array[0] and $array[1], but is there a way I can fetch_object do do that? Can I reference them like $object-table1.id and $object-table2.id? I would assume not since it just makes a new table when it returns the data. Thanks for the help, and I hope my question is clear. :) 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]
[PHP] mod_php4
Greetings - FYI: I have WinNT + Apache + PHP Does anyone know the difference between the cgi version of php4 (php.exe) as opposed to setting up php4 as a server's module? I have both versions installed its just that I do not know what is the difference when it comes to functionality. Does the cgi version execute faster then the other...things like this! A Web site would be great an explanation would be ideal. Thanx in advance -- 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] Lets nock off any numbers at the begging of a string...
Hello, Is there a way to remove the first numbers of a string? Here is an example: $string1 = "12 this is number twelve"; when done: " this is number twelve"; $sting1 = "123 this is number one twenty three" when done: " this is number one twenty three"; Thank you, Brandon Orther WebIntellects Design/Development Manager [EMAIL PROTECTED] 800-994-6364 www.webintellects.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]
[PHP] Walking Through Mail Headers
Hi, I need a way to walk through mail headers and search for a specific string in the subject. If the message contains the string, it will be forwarded to a different account, otherwise it will trigger an autoresponse with a certain message to the sender. Does anyone have any infomation on doing this, or can point me where to start. I think the thing I'm caught up on is how I walk through the mail headers in the mail file (We are on FreeBSD). 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] Walking Through Mail Headers
On the surface this sounds like a job for procmail (www.procmail.org). On Mon, 26 Feb 2001, Jason wrote: Date: Mon, 26 Feb 2001 11:58:53 -0800 From: Jason [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP] Walking Through Mail Headers Hi, I need a way to walk through mail headers and search for a specific string in the subject. If the message contains the string, it will be forwarded to a different account, otherwise it will trigger an autoresponse with a certain message to the sender. Does anyone have any infomation on doing this, or can point me where to start. I think the thing I'm caught up on is how I walk through the mail headers in the mail file (We are on FreeBSD). 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] Kelly 303-444-1671 Boulder, Colorado -- 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] Payflow Pro
Hello, I am attempting to install php4.04 and apache1.3.14 php configure commands: ./configure --with-apache=../apachessl-1.3.14 \ --with-jpeg-dir=/usr/local/lib --with-pgsql --with-gd \ --with-ttf=/usr/local/lib --with-t1lib=/usr/local/lib \ --enable-gd-imgstrttf --with-pfpro=/usr/local/lib apache configure commands: ./configure \ "--with-layout=Apache" \ "--target=https" \ "--prefix=/usr/local/apache-ssl" \ "--activate-module=src/modules/php4/libphp4.a" \ php4.04 compiles without complaint, yet when I compile apache, it dies on this error: = modules/php4/libphp4.a(pfpro.o): In function `php_info_pfpro': /usr/local/src/php-4.0.4-ssl/ext/pfpro/pfpro.c:113: undefined reference to `PNVersion' modules/php4/libphp4.a(pfpro.o): In function `php_if_pfpro_version': /usr/local/src/php-4.0.4-ssl/ext/pfpro/pfpro.c:129: undefined reference to `PNVersion' Anyone know what is going on here? I have copied pfpro.h to /usr/local/include and libpfpro.so /usr/local/lib and I ran ldconfig. Thanks Dan -- 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] 2 columns same name cuz of a join
Jason Jacobs wrote: Hi again. :) Does anyone know how to reference a value in an array or object if the returned table has 2 fields of the same name. IE, I am querying 2 tables and returning an id value from each. On both tables, the id fieldname is "id". I know I can access the vals like $array[0] and $array[1], but is there a way I can fetch_object do do that? Can I reference them like $object-table1.id and $object-table2.id? I would assume not since it just makes a new table when it returns the data. Thanks for the help, and I hope my question is clear. :) Jason Something like select tbl1.id as tbl1_id, tbl2.id as tbl2_id $ob-tbl1_id; should work... o fthe top of my head. Jason -- Jason Murray Developer http://www.jwebmedia.com/ 1 877 525 jWEB -- 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-CVS] cvs: php4 /ext/standard basic_functions.c
sas Mon Feb 26 12:26:07 2001 EDT Modified files: /php4/ext/standard basic_functions.c Log: Provide proper function aliases, if the sendmail functions don't exist. Submitted by: Nadir Amra [EMAIL PROTECTED] Index: php4/ext/standard/basic_functions.c diff -u php4/ext/standard/basic_functions.c:1.309 php4/ext/standard/basic_functions.c:1.310 --- php4/ext/standard/basic_functions.c:1.309 Sun Feb 25 22:07:16 2001 +++ php4/ext/standard/basic_functions.c Mon Feb 26 12:26:07 2001 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.309 2001/02/26 06:07:16 andi Exp $ */ +/* $Id: basic_functions.c,v 1.310 2001/02/26 20:26:07 sas Exp $ */ #include "php.h" #include "php_main.h" @@ -503,8 +503,13 @@ PHP_FE(diskfreespace, NULL) /* functions from mail.c */ +#ifdef HAVE_SENDMAIL PHP_FE(mail,NULL) PHP_FE(ezmlm_hash, NULL) +#else + PHP_FALIAS(mail,warn_not_available, NULL) + PHP_FALIAS(ezmlm_hash, warn_not_available, NULL) +#endif /* functions from syslog.c */ #ifdef HAVE_SYSLOG_H -- PHP CVS 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] Lets nock off any numbers at the begging of a string...
On Mon, 26 Feb 2001 11:57:04 -0800, Brandon Orther ([EMAIL PROTECTED]) wrote: Hello, Is there a way to remove the first numbers of a string? Here is an example: $string1 = "12 this is number twelve"; when done: " this is number twelve"; $sting1 = "123 this is number one twenty three" when done: " this is number one twenty three"; $string1=ereg_replace("^[0-9]+","",$string1); -- 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 as a module AND a cgi
hi all, thanks for the replies. many of you asked why I want to use php4 as a cgi. basically it boils down to this, using PHP as CGI you can run PHP scripts via cron tab, which eliminates the need for shell scripting (yeah baby). i did some investigation a few months ago (when I was on a virtual host) and found that cron could not call PHP scripts due to the fact that it's Apache calling the cron process not root (or another user). a work around seems to be sending everything to Lynx (or the equivalent) but at the time my hosting provider would not allow me to do this. anyone have a faster, more secure way to call PHP via cron? p.s. in reply to my earlier post i got differing reports as to the security concerns of running PHP as a cgi. one person replied that cgi shoudl be avoided at all costs while another said that he thought it was the way to go. thoughts? p.p.s thanks for the replies to my questions, it's extremely helpful. colin o. colin olkowski - [EMAIL PROTECTED] cell 917.549.8395 land 212.414.4481 -- 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 quit working
I just installed php as an apache DSO module on the first try of a phpinfo(); it worked just as it should, then I loaded phpmyadmin and now when I make a request for a php file it tries to download, my httpd.conf file seems to be in order...any ideas? Jerry Lake- [EMAIL PROTECTED] Web Designer Europa Communications - http://www.europa.com Pacifier Online - http://www.pacifier.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]
[PHP] RE: Join causing Error?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Maybe this will help: Break the query up into a variable so PHP can string it together better. Exec. the query, check the result, if good, check the results for rows, if results, display results, else, do nothing, if query faield, set err to 1 and set an error message. mysql_select_db("centraldb",$db); $qorder++; $query="SELECT q.questid, q.question, q.answer, q.qorder, q.depart, q.catid, " ."q.active, q.global, q.adate, q.author, q.authoremail, q.askemail, ."c.catid, c.category, c.under, c.corder, c.active " ." FROM central_groupfaqq q, central_groupfaqcat c " ."WHERE q.active = '1' AND q.global = '1' AND c.active = '1' " ."ORDER BY c.under, c.order, q.qorder;" ; if($result=mysql_query($query)) { if($num=mysql_num_ros($result)) { while ($myrow = mysql_fetch_row($result)) //display resutls } } else { //no results } } else { //bad query $err=1 $errMsg="Failed Query: $querybr".mysql_errno()." : ".mysql_error(); } ---somehwere in html file if(!$err) { //display results and info here } else { printf("%s\n",$errMsg); } - - Johnny Withers [EMAIL PROTECTED] p. 601.853.0211 c. 601.954.9133 - -Original Message- From: Keith Spiller [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 25, 2001 2:30 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Join causing Error? Can anyone tell me why this: Line 282mysql_select_db("centraldb",$db); Line 283$qorder++; Line 284$result = mysql_query("SELECT q.questid, q.question, q.answer, q.qorder, q.depart, q.catid, q.active, q.global, q.adate, q.author, q.authoremail, q.askemail, c.catid, c.category, c.under, c.corder, c.active FROM central_groupfaqq q, central_groupfaqcat c WHERE q.active = '1' AND q.global = '1' AND c.active = '1' ORDER BY c.under, c.order, q.qorder",$db); Line 285while ($myrow = mysql_fetch_row($result)) Would cause this error: Warning: Supplied argument is not a valid MySQL result resource in faqbody.php3 on line 285 When changing the same SELECT statement to: Line 284$result = mysql_query("SELECT * FROM central_groupfaqq WHERE active = '1' ORDER BY qorder",$db); Works perfectly? Keith Spiller a.k.a. Larentium -BEGIN PGP SIGNATURE- Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com iQA/AwUBOpppHLFNxPoD98ryEQL95QCffp7UNf0lJdx0lwSUjFdRKRths94AoIsS 4fpFCCXraXVYdkR2Hg5mKd0P =vlca -END PGP SIGNATURE- -- 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] hiding .php
also sprach Fredrik Arild Takle (on Mon, 26 Feb 2001 10:34:11PM +0100): did you get answers to your problem? not from the list. but i found two solutions, both of which require modification of httpd.conf, and both of which are ergo apache-specific: http://www.zend.com/tips/tips.php?id=145single=1 http://www.zend.com/tips/tips.php?id=147single=1 i will be using the first one because it provides greater flexibility. martin [greetings from the heart of the sun]# echo madduck@!#:1:s@\@@@.net -- windows nt crashed. i am the blue screen of death. no one hears your screams. -- 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] Table looking odd as a result of while loop?
Hi all, This is probably something dumb I'm missing, but I am using the following code: echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic']; if (($photocount % 3) == 2) { echo "/tr\ntr\n"; } echo "td$smallpic/td\n"; $photocount++; } echo "/tr\n"; echo "/table"; and it's outputting a table like this: table border="0" tr tdsm982438092.gif/td tdsm982437452.gif/td /tr tr tdsm982439016.gif/td tdsm982529915.gif/td tdsm983222652.gif/td /tr tr tdsm983222686.gif/td tdsm983222868.gif/td tdsm983222919.gif/td /tr /table (There are currently 8 pics that have been uploaded). As you can see that the first row has returned just two columns. I'd like the photos to be displayed in rows of three, and if there are only 8 pictures (or any othe number that's not directly divisible by three) to be displayed on the last row. At the moment it's doing it "upside down." Any ideas? And I know, I'm going to have to force an extra cell for it to display correctly Thanks as always, James. -- 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] Table looking odd as a result of while loop?
Is it because 1 % 3 is 0 with a remainder of 2? Looks like the code is doing just what it is written to do. The "if" evaluates to true on the second picture. Kirk -Original Message- From: James, Yz [mailto:[EMAIL PROTECTED]] Sent: Monday, February 26, 2001 2:55 PM To: [EMAIL PROTECTED] Subject: [PHP] Table looking odd as a result of while loop? Hi all, This is probably something dumb I'm missing, but I am using the following code: echo "table border=\"0\"\n"; echo "tr\n"; $photocount = 0; while($row = mysql_fetch_array($result)) { $smallpic = $row['smallpic']; if (($photocount % 3) == 2) { echo "/tr\ntr\n"; } (There are currently 8 pics that have been uploaded). As you can see that the first row has returned just two columns. I'd like the photos to be displayed in rows of three, and if there are only 8 pictures (or any othe number that's not directly divisible by three) to be displayed on the last row. At the moment it's doing it "upside down." Any ideas? -- 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 apache protected directories
Yes, try lib cURL it supports authentification and even SSL. http://www.php.net/manual/en/ref.curl.php Mike -Original Message- From: Marius David [mailto:[EMAIL PROTECTED]] Sent: Friday, February 23, 2001 5:33 PM To: [EMAIL PROTECTED] Subject: [PHP] php and apache protected directories I want to open a html file from a php script. The problem is that the html file is located in a password protected directory on an apache web server. I know the user/password for that directory and I want the php script to handle the authentification automaticly. Is there a way to acomplish this ? Thank you, Marius -- 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]