Re: [PHP] automatic credit card processing
great! it works! thank you very much! this is the code which does exactly what I wanted: $ch = curl_init (); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_POSTFIELDS, RESP_FORMAT=1); $result= curl_exec ($ch); curl_close ($ch); cheerio Martin Towell wrote: either use curl, and set to option to return the results to you to on or use ob_start(), ob_get_contents(), etc -Original Message- From: Dominic [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 4:11 PM To: [EMAIL PROTECTED] Subject: [PHP] automatic credit card processing Hi all I try to automatically process cc payment. I use online clearing via a third party -- so what I have to do: 1. SSL-TCP/IP connection to this third party-server 2. perform basic http authentication 3. send authorization request parameters to the software (via POST or GET) 4. receive + parse authorization response 1-3 is not a real problem, but how can I receive the response, before it is printed out to the browser/screen? I know I should get the response string into a variable so the whole procedure is silent, but how? thanks a lot for every little help! cheers dominic -- dominic brander dominic brander - snowflake productions gmbh - http://www.snowflake.ch tel. 01 451 75 71 - fax. 01 451 63 80 - mobile 076 543 17 94 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions without cookies : forms
Hi, thanks for all the replies on my two previous postings relating to sessions and cookies. I have set my mind on using sessions but without cookies, so that entails passing the SID via relative URL's. My problem comes in here, when I create a simple login page with a form that send username and password to the next page, I start_session(); and then in the form action, I append the url with ?=SID? , but that causes two parse errors. Warning: Cannot send session cookie - headers already sent by (output started at /home/www/index.php:3) in /home/www/index.php on line 4 Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/index.php:3) in /home/www/index.php on line 4 The code is like so: html head ?php session_start(); ? /head body form name=form1 method=post action=admin_select_project.php??=SID? table border=0 cellspacing=0 cellpadding=0 tr bgcolor=#CFCFCF td colspan=2Admin Login /td /tr tr tdUsername: /td tdinput type=text name=username /td /tr tr tdPassword: /td tdinput type=text name=password /td /tr tr td input type=submit name=Submit4 value=Submit /td /tr /table /form /body /html What am I missing... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sessions without cookies : forms
You need to start the session before any html. So: ?php session_start(); ? html Cheers! Rick Too much caution is bad for you. By avoiding things you fear, you may let yourself in for unhappy consequences. It is usually wiser to stand up to a scary-seeming experience and walk right into it, risking the bruises as hard knocks. You are likely to find it is not as tough as you had thought. Or you may find it plenty tough, but also discover you have what it takes to handle it. - Norman Vincent Peale From: PHPCoder [EMAIL PROTECTED] Date: Mon, 22 Jul 2002 08:36:44 +0200 To: php-general [EMAIL PROTECTED] Subject: [PHP] Sessions without cookies : forms Hi, thanks for all the replies on my two previous postings relating to sessions and cookies. I have set my mind on using sessions but without cookies, so that entails passing the SID via relative URL's. My problem comes in here, when I create a simple login page with a form that send username and password to the next page, I start_session(); and then in the form action, I append the url with ?=SID? , but that causes two parse errors. Warning: Cannot send session cookie - headers already sent by (output started at /home/www/index.php:3) in /home/www/index.php on line 4 Warning: Cannot send session cache limiter - headers already sent (output started at /home/www/index.php:3) in /home/www/index.php on line 4 The code is like so: html head ?php session_start(); ? /head body form name=form1 method=post action=admin_select_project.php??=SID? table border=0 cellspacing=0 cellpadding=0 tr bgcolor=#CFCFCF td colspan=2Admin Login /td /tr tr tdUsername: /td tdinput type=text name=username /td /tr tr tdPassword: /td tdinput type=text name=password /td /tr tr td input type=submit name=Submit4 value=Submit /td /tr /table /form /body /html What am I missing... Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] separated string by comas
I have a string that is separated by spaces like this $string=test test1 test2 test3; how can I make the string so it is separated by comas like this $string=test,test1,test2,test3; I know this is probably simple but I just can't figure it out -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Session Tracking
Hello all, This may be a pretty naive question. Do we have to use the key word session_register(variablename); in every single page, in which we plan to use the variablename?. Or is it possible that we register the variablename once, and in the subsequent pages continue to access it using $variablename ? Thanks in advance, Sachin. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] separated string by comas
$string = str_replace( , ,, $string); -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 4:57 PM To: php-general Subject: [PHP] separated string by comas I have a string that is separated by spaces like this $string=test test1 test2 test3; how can I make the string so it is separated by comas like this $string=test,test1,test2,test3; I know this is probably simple but I just can't figure it out -- Best regards, rdkurth mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Redirect Question
That answers my question. Thanks, -- JJ Harrison [EMAIL PROTECTED] www.tececo.com Tim Luoma [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... FWIW, a user note at http://www.php.net/manual/en/function.header.php says : There is this nasty bug in IE 5 for Windows prior to service pack 2, described in Microsoft knowledgebase article Q281197 which causes a problem with redirecting.. if you submit a POST form to a page that uses header() to redirect to another page after processing the form data, then IE will not display some of the images on the page, if the user has an external HTTP namespace handler (RealDownload for example) installed. It took me a very long time to figure this out; I had no idea why my ads weren't displaying on IE for windows but worked fine everywhere else. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: $HTTP_SERVER_VARS not accessible in Functions (fwd)
What is your PHP Version ? Try putting the global $HTTP_SERVER_VARS; print_r($HTTP_SERVER_VARS); in your custom function and check out what is it printing... -S. Sukumar I'm trying to access some settings in the $HTTP_SERVER_VARS[] array, but, within a custom function() this array appears empty. In the calling script, however, the $HTTP_SERVER_VARS[] array is defined. I thought this was supposed to be superglobal and available on every level? If not, is there another command I can use? I also tried $_SERVER[] but this appears to be always empty no matter what level I call it on. Thanks. Monty . -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Images of GD Library
On Monday 22 July 2002 15:35, Lord Loh. wrote: 1. How can I store an image in a database.. ? 2. How can this be now used to create an image ? Search archives for various combinations of: upload, image, mysql 3. Is there any way I can read an image from a remote site and save it's minature view in my DB / file ? (How can an image be resized ?) After you've figured out 1 2, read up on fopen(). -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Some don't prefer the pursuit of happiness to the happiness of pursuit. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] separated string by comas
On Monday 22 July 2002 14:56, [EMAIL PROTECTED] wrote: I have a string that is separated by spaces like this $string=test test1 test2 test3; how can I make the string so it is separated by comas like this $string=test,test1,test2,test3; I know this is probably simple but I just can't figure it out str_replace() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Forced to support NT servers; sysadmins quit. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] $HTTP_SERVER_VARS not accessible in Functions
On Monday 22 July 2002 13:46, Monty wrote: I'm trying to access some settings in the $HTTP_SERVER_VARS[] array, but, within a custom function() this array appears empty. In the calling script, however, the $HTTP_SERVER_VARS[] array is defined. I thought this was supposed to be superglobal and available on every level? If not, is there another command I can use? I also tried $_SERVER[] but this appears to be always empty no matter what level I call it on. $HTTP_SERVER_VARS was never a superglobal. $_SERVER is a superglobal but only available on php 4.1.X or above. Read the docs for the details. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Unprovided with original learning, unformed in the habits of thinking, unskilled in the arts of composition, I resolved to write a book. -- Edward Gibbon */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Session Tracking
Do we have to use the key word session_register(variablename); in every single page, in which we plan to use the variablename?. Or is it possible that we register the variablename once, and in the subsequent pages continue to access it using $variablename ? You just have to call it once. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] imagecolortransparent()
i get php to allocate a colour then make it transparent using imagecolortransparent() instead of turning it transparent it becomes black. Is it something i'm doing wrong? can anyone help me? thanx in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] xslt_process
Hi all, I'm trying to use xslt_process() to transform a variable containing XML data with an xsl file into a result using PHP. Incidentally the XML is from an external source, i.e. a database. However despite following the examples in www.php.net I am unable to do so. The code works out to something like this: if (! empty($searchword )) $query = SELECT aml FROM arguments WHERE aml LIKE '%$searchword%'; $result = mysql_query($query) or die (Query failed); $line = mysql_fetch_array($result, MYSQL_ASSOC); var_dump($line); // Create an array $arguments = array('/_xml'= $line); //XSL file $xsl = ./sheet1.xsl; // Create an XSLT processor $xslthandler = xslt_create(); // Perform the transformation $html = xslt_process( $xslthandler, 'arg:/_xml', $xsl, NULL, $arguments); // Detect errors if (!$html) die ('XSLT processing error: '.xslt_error($xslthandler)); // Destroy the XSLT processor xslt_free($xslthandler); // Output the resulting HTML print $html; What I get on the screen is: Array ( [0] = With the contents of my variable...) And: Warning: Sablotron error on line 1: XML parser error 2: syntax error in /home/httpd/html/ctan/resultworkingcopy2.php on line 93 XSLT processing error: XML parser error 2: syntax error What gives? I'm really frustrated and would greatly appreciate it if someone would point out where I've made an error before I start ripping all my hair out! Thanks... Thanks... Thanks! Regards, Chia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecolortransparent()
Hello Nick, Monday, July 22, 2002, 8:47:39 PM, you wrote: N i get php to allocate a colour then make it transparent using N imagecolortransparent() N instead of turning it transparent it becomes black. N Is it something i'm doing wrong? can anyone help me? N thanx in advance Post a bit of the code so we can see what you are doing -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie's question about \n
Dear ALL, It seems that i have a very silly problem. I can't get the new line escape character to work. the following is my SIMPLE script and corresponding output. PHP script: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleTEST/title /head body bgcolor=#ff ?php echo this should be printed out:\n; echo this is a second line; ? /body /html Output in IE6: this should be printed out: this is a second line regards, KK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie's question about \n
If you check the source of your code you'll see that in source the text is in two lines. \n doesn't work as br, so this is about how HTML works, not plain text. Niklas -Original Message- From: KK Lee [mailto:[EMAIL PROTECTED]] Sent: 22. heinäkuuta 2002 14:01 To: [EMAIL PROTECTED] Subject: [PHP] Newbie's question about \n Dear ALL, It seems that i have a very silly problem. I can't get the new line escape character to work. the following is my SIMPLE script and corresponding output. PHP script: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleTEST/title /head body bgcolor=#ff ?php echo this should be printed out:\n; echo this is a second line; ? /body /html Output in IE6: this should be printed out: this is a second line regards, KK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie's question about \n
Hello KK, Monday, July 22, 2002, 9:00:47 PM, you wrote: KL Dear ALL, KL It seems that i have a very silly problem. KL I can't get the new line escape character to work. KL the following is my SIMPLE script and corresponding output. KL PHP script: KL !DOCTYPE HTML PUBLIC KL-//W3C//DTD HTML 4.0 Transitional//EN KLhttp://www.w3.org/TR/html4/loose.dtd; KL html KL head KL titleTEST/title KL /head KL body bgcolor=#ff KL ?php KL echo this should be printed out:\n; KL echo this is a second line; KL ? KL /body KL /html KL Output in IE6: KL this should be printed out: this is a second line KL regards, KL KK The browser will ignore newlines use br instead. to use newlines the text could be enclosed in pre text\n more text\n/pre tags, but br is probably what you need. -- Best regards, Tommailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie's question about \n
nl2br() KK Lee wrote: ** This Message Was Virus Checked With : SAVI 3.59 May 2002 Last Updated 8th July 2002 ** Dear ALL, It seems that i have a very silly problem. I can't get the new line escape character to work. the following is my SIMPLE script and corresponding output. PHP script: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; html head titleTEST/title /head body bgcolor=#ff ?php echo this should be printed out:\n; echo this is a second line; ? /body /html Output in IE6: this should be printed out: this is a second line regards, KK -- -- www.curvedvision.com -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTML E-mails
Hello, On 07/20/2002 07:14 PM, Alex Kirk wrote: I've just set out to build a PHP-based mail system that will be able to send HTML e-mails to a variety of mail clients. So far, I'm having moderate success: I can get Yahoo! and Hotmail to see the HTML, but not Netscape Mail or Outlook Express. I was wondering, is there anything special I should be putting in my mail() call to achieve broad compatibility? I'm already sending a header that includes: MIME-Version: 1.0\r\n Content-type: text/html; charset=iso-8859-1\r\n Also, does anyone know of a list of mail client compatiblity levels with HTML e-mail? Just avoid using Javascript because most mail programs will disable it. Other than that you ought to always send multipart-alternative MIME messages where the HTML version is indeed an alternative to a text version of your message. If you do not do that, some people will discard your messages confusing them with SPAM, unless what you are sendind is really solicited mail. -- Regards, Manuel Lemos -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] multiple search
My question is what can I do if someone searches for php script for search? I would want to use OR in my SQL statment. The problem is how do I write the query so that it will detect the number of words sent then put enough ORs and LIKE '%$search[1]% in? Thanks. Here is the script. ? include includes/required.php; $query = SELECT count(article_keyword.weight) as score, article_keyword.aid, article_data.name, article_data.time, article_data.description FROM article_keyword,article_data WHERE article_keyword.aid = article_keyword.aid AND article_keyword.keyword LIKE '%$search%' GROUP BY article_keyword.aid ORDER BY score DESC ; $result = mysql_query($query) or die(Query failed: $querybr . mysql_error()); $num_results = mysql_num_rows($result); if($num_results == 0){ echo Your search returned no results. Try other keyword(s).; exit; } elseif($num_results 0){ for ($i=0; $i $num_results; $i++) { $row = mysql_fetch_array($result); echo 'trtd'; do_hr(); echo 'a href=full_article.php?aid='.$row['aid'].''; do_h($row['name'].' - '.date('jS-M-Y',$row['time']), 3, 'n'); echo '/a'; echo '/td/trtrtd'.$row['description'].\n; echo '/td/tr'; } } ? Jj Harrison [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... To add search functionality I decieded this was the best table structure I could come up with for a keywords table. Here it is: CREATE TABLE article_keyword ( aid int(11) unsigned NOT NULL default '0', keyword char(50) NOT NULL default '', weight tinyint(2) unsigned NOT NULL default '0', PRIMARY KEY (aid), KEY keyword (keyword), KEY aid (aid), KEY weight (weight) ) TYPE=MyISAM; Using that structure could I get a decent search? I would probably add up the weight for each keyword(Where it is searched for). Then sort it by the most 'relevent' then I could use a join to get the title, time etc of the article and return the results. What I am asking is that if this is a good table structure for something like this(N00B alert!). If not could you please give me a better one? -- JJ Harrison [EMAIL PROTECTED] www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] include() and div align=top
[snip] When i use div align=top on an include inside of a table cell it dosen't work. Any reason? Almost certainly there'll be a reason. Browse the page in question in your web browser and then view the source - see if you've ended up with your page source as you'd intended. Most of these sorts of problems come down to html that isn't valid for whatever reason. [/snip] DIV has no top attribute, all DIV are loaded from the top - down. http://www.w3.org/TR/html4/struct/global.html#h-7.5.4 . You may want to use CSS to define your divs'. Also, make sure that your include is call before any HTML head where the LINK REL to the stylesheet might be. HTH! Jay Reality is for people who lack imagination * * Want to meet other PHP developers * * in your area? Check out: * * http://php.meetup.com/* * No developer is an island ... * * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Using Javascript
Just my opinion, but it is ALWAYS a good idea to terminate statements with semicolons, no matter if there is or isn't additional statements. But thanks Chris for at least using standardized HTML coding practices. I can't stand it when I see tags and the like that don't cooperate with standards. Martin Chris Earle [EMAIL PROTECTED] 07/22/02 01:18AM You use the onClick feature like this: input type=text name=text1 onClick=dd.value='? echo $correct; ?' no semicolon unless there is more than one thing being called/defined -- you use single quotes within the onClick's double quotes Uma Shankari T. [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello, I need to display a value on the text box during onClick event where the data is fetched from the database..I have given the code like this but it is giving unterminated string constant.. input type=text name=text1 onClick=(dd.value=? echo $correct; ?); Can anyone please tell me how to solve this ... Thanks Regards, Uma -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: xslt_process
Ctan wrote: Hi all, I'm trying to use xslt_process() to transform a variable containing XML data with an xsl file into a result using PHP. Incidentally the XML is from an external source, i.e. a database. However despite following the examples in www.php.net I am unable to do so. The code works out to something like this: if (! empty($searchword )) $query = SELECT aml FROM arguments WHERE aml LIKE '%$searchword%'; $result = mysql_query($query) or die (Query failed); $line = mysql_fetch_array($result, MYSQL_ASSOC); var_dump($line); // Create an array $arguments = array('/_xml'= $line); //XSL file $xsl = ./sheet1.xsl; // Create an XSLT processor $xslthandler = xslt_create(); // Perform the transformation $html = xslt_process( $xslthandler, 'arg:/_xml', $xsl, NULL, $arguments); // Detect errors if (!$html) die ('XSLT processing error: '.xslt_error($xslthandler)); // Destroy the XSLT processor xslt_free($xslthandler); // Output the resulting HTML print $html; What I get on the screen is: Array ( [0] = With the contents of my variable...) And: Warning: Sablotron error on line 1: XML parser error 2: syntax error in /home/httpd/html/ctan/resultworkingcopy2.php on line 93 XSLT processing error: XML parser error 2: syntax error What gives? I'm really frustrated and would greatly appreciate it if someone would point out where I've made an error before I start ripping all my hair out! Thanks... Thanks... Thanks! Regards, Chia I may be missing something, but your not parsing XML. Your $line contains an array of data from the database, not xml. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 22 Jul 2002 12:54:28 -0000 Issue 1479
php-general Digest 22 Jul 2002 12:54:28 - Issue 1479 Topics (messages 108782 through 108851): Re: Hex Help Please... 108782 by: Georgie Casey 108824 by: Martin Towell Re: get a list of clients with PHP 108783 by: Norbert Pfeiffer Traversing an appendable file 108784 by: Chris Earle Amazon Web Service implemented in PHP 108785 by: Daniel Kushner Re: Sessions vs passing variables 108786 by: Chris Earle 108789 by: John Holmes 108798 by: Mike Mannakee 108800 by: John Holmes 108803 by: Mike Mannakee 108805 by: John Holmes 108809 by: Mike Mannakee Re: Submitting to cgi script 108787 by: rdkurth.starband.net 108791 by: Peter James Re: HTML E-Mail 108788 by: Alex Kirk server performance 108790 by: eat pasta type fasta 108795 by: Chris Earle Re: HTML E-mails 108792 by: Chris Earle 108846 by: Manuel Lemos Re: Redirect Question 108793 by: Chris Earle 108794 by: Chris Earle 108796 by: Jason Wong 108799 by: Tim Luoma 108833 by: JJ Harrison NOT an easy upload 108797 by: César Aracena 108804 by: Chris Earle Faster: Includes or DB Queries?? 108801 by: Monty 108802 by: John Holmes Oh, the problem 108806 by: Chris Earle 108811 by: César Aracena 108816 by: Chris Earle email 108807 by: Bob Lockie 108812 by: Bob Lockie 108814 by: Peter 108815 by: David Robley Inline Images ? 108808 by: Roberto Ramírez 108810 by: John Holmes 108813 by: Justin French Using Javascript 108817 by: Uma Shankari T. 108818 by: Chris Earle 108850 by: Martin Clifford Re: Cookies - good or bad??? 108819 by: Chris Earle Images of GD Library 108820 by: Lord Loh. 108835 by: Jason Wong $HTTP_SERVER_VARS not accessible in Functions 108821 by: Monty 108837 by: Jason Wong Re: html entry within XML database 108822 by: Chris Earle Re: how can this be? GET instead of POST - db error 108823 by: Chris Earle automatic credit card processing 108825 by: Dominic 108826 by: Martin Towell 108827 by: Dominic Sessions without cookies : forms 108828 by: PHPCoder 108829 by: Richard Baskett separated string by comas 108830 by: rdkurth.starband.net 108832 by: Martin Towell 108836 by: Jason Wong Session Tracking 108831 by: Sachin Keshavan 108838 by: John Holmes Re: $HTTP_SERVER_VARS not accessible in Functions (fwd) 108834 by: Sukumar .S imagecolortransparent() 108839 by: Nick 108841 by: Tom Rogers xslt_process 108840 by: ctan 108851 by: Peter Clarke Newbie's question about \n 108842 by: KK Lee 108843 by: Niklas Lampén 108844 by: Tom Rogers 108845 by: Neil Freeman 108848 by: KK Lee multiple search 108847 by: JJ Harrison Re: include() and div align=top 108849 by: Jay Blanchard 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] -- ---BeginMessage--- OK, i thought I found my solution but... How come if I convert from 1000 from Binary to Hex in calculator, it returns 8, but when I use the PHP bin2hex function, it returns loads of 3s and 0s Georgie Casey [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Rite, There's a PHP script that takes a monochrome BMP and converts it into some sort of hex code and I've noticed some patterns with this code. This image is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned, theres 252 chars, which is 1008 divided by 4. So I guessed the image is split into 4 pixels each. So if I pass an image with the first pixel black and everyhting else white, it returns 8 for those 4. If I pass an image with the first and second black, it returns c. With the first three black, it returns e. With the first 4, f. And if I have the 5th pixel black it goes onto the next char code, eg returning f for the first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the next 4. In total it returns f8. PS I tried reading in each pixel of the script, checking if it was black or white, 1 for black, 0 for white. Then converting these 0s and 1s from decimal to hex, then converting from binary to hex, but to no avail. Then I tried taking a set of 4 1s or 0s and converting them, but still no luck. So my questions is, does anyone know how theyre encoding the image I could probably could decipher the coding with some experimentation but it really looks like hex and I might be
RE: [PHP] Re: xslt_process
Thanks for the quick response... See the thing is the XML is stored in a MySQL database. Is that what you mean Peter? Chia -Original Message- From: Peter Clarke [mailto:[EMAIL PROTECTED]] Sent: 22 July 2002 13:56 To: [EMAIL PROTECTED]; Ctan Cc: [EMAIL PROTECTED] Subject: [PHP] Re: xslt_process I may be missing something, but your not parsing XML. Your $line contains an array of data from the database, not xml. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: xslt_process
Ctan wrote: Hi all, I'm trying to use xslt_process() to transform a variable containing XML data with an xsl file into a result using PHP. Incidentally the XML is from an external source, i.e. a database. However despite following the examples in www.php.net I am unable to do so. The code works out to something like this: if (! empty($searchword )) $query = SELECT aml FROM arguments WHERE aml LIKE '%$searchword%'; $result = mysql_query($query) or die (Query failed); $line = mysql_fetch_array($result, MYSQL_ASSOC); var_dump($line); // Create an array $arguments = array('/_xml'= $line); //XSL file $xsl = ./sheet1.xsl; // Create an XSLT processor $xslthandler = xslt_create(); // Perform the transformation $html = xslt_process( $xslthandler, 'arg:/_xml', $xsl, NULL, $arguments); // Detect errors if (!$html) die ('XSLT processing error: '.xslt_error($xslthandler)); // Destroy the XSLT processor xslt_free($xslthandler); // Output the resulting HTML print $html; What I get on the screen is: Array ( [0] = With the contents of my variable...) And: Warning: Sablotron error on line 1: XML parser error 2: syntax error in /home/httpd/html/ctan/resultworkingcopy2.php on line 93 XSLT processing error: XML parser error 2: syntax error What gives? I'm really frustrated and would greatly appreciate it if someone would point out where I've made an error before I start ripping all my hair out! Thanks... Thanks... Thanks! Regards, Chia I may be missing something, but your not parsing XML. Your $line contains an array of data from the database, not xml. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] == vs = should generate a warning or error -- was: Why won't this work?
If you want to get a warning when you accidentally do an assignment instead of a comparison ( = instead of == ), get in the habbit of putting the constant/function FIRST when you're doing a comparison. For example, using 'while(mysql_fetch_row($result) = $row)' or 'if(5 = $x)' should give the warning you're looking for because you can't assign $row to mysql_fetch_row, or $x to 5. - Theo -Original Message- From: Daevid Vincent [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 20, 2002 7:34 AM To: [EMAIL PROTECTED] Cc: 'Rasmus Lerdorf' Subject: RE: [PHP] == vs = should generate a warning or error -- was: Why won't this work? That would suck since many many PHP programs use stuff like: while($row=mysql_fetch_row($result)) { ... } There is absolutely nothing wrong with doing an assignment in a conditional and if it generated a warning it would drive a lot of people crazy. First off, I have to LMAO at that would suck. So unexpected but humorus. But seriously, this is why I suggest it be a config file option. Not a new way of doing things, to break old code. But something toggle-able. Or, I'm sure the PHP parser could be made smarter to look for common 'assigments' that are supposed to be 'conditions'. For example I seriously doubt that NOBODY EVER means to do if ($x = 5) { } That CLEARLY is supposed to be using a == and not = And I'm sure there are other such obvious cases that the parser could check for somehow. Just a suggestion. Thass all. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie getting close, form submission
I am a complete newbie, search the web for examples right now and use them. The host has php 3.0 Having problems with for submission Right now, no error messages, but does not actually send the email. Ideas? ? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = Get Involved List; if (!$MailFromAddress) { $MailFromAddress = $email; } $Header = ; $Footer = ; ? ? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= $key = $val\n; } if ($Header) { $Message = $Header.\n\n.$Message; } if ($Footer) { $Message .= \n\n.$Footer; } mail( $MailToAddress, $MailSubject, $Message, From: $MailFromAddress); ?
Re: [PHP] Newbie's question about \n
I often use: br\n That way I get a new line in a browser and plain text as well. KK Lee [EMAIL PROTECTED] wrote: Dear ALL, It seems that i have a very silly problem. I can't get the new line escape character to work. the following is my SIMPLE script and corresponding output. PHP script: -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; echo this should be printed out:\n; echo this is a second line; ? Output in IE6: this should be printed out: this is a second line regards, KK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do You Yahoo!? Yahoo! Health - Feel better, live better
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and4.2.1
On July 22, 2002 10:12 am, 1LT John W. Holmes wrote: [snip] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 [/snip] Looks like everyone will be using the new super globals, now... :) Well, I guess I'm still assuming that in a perfect world, people will upgrade because of security issues... ---John Holmes... As the Advisory suggests, the security fault affects only the 2 latest versions of PHP, all the people running older PHPs are not affected, so unless you've had the very latest stuff running this won't affect you and there will be no need to upgrade. If anything this will only convince people looking for 'stable' PHP to wait even longer before upgrading their releases because of potential bugs such as this one creeping up in 'new' releases. Ilia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie's question about \n
Think of it this way: br creates a line break in HTML Output, \n creates a line break in HTML Code. echo I really\n like\n PHP!; HTML Code: I really like PHP! HTML Output: I really like PHP! HTH It seems that i have a very silly problem. I can't get the new line escape character to work. the following is my SIMPLE script and corresponding output. PHP script: -//W3C//DTD HTML 4.0 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; echo this should be printed out:\n; echo this is a second line; ? Output in IE6: this should be printed out: this is a second line regards, KK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Do You Yahoo!? Yahoo! Health - Feel better, live better Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie getting close, form submission
From: Dean Ouellette [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 9:43 AM Subject: [PHP] Newbie getting close, form submission I am a complete newbie, search the web for examples right now and use them. The host has php 3.0. ^ That's really old, you really ought to be using 4.2.x Having problems with for submission Right now, no error messages, but does not actually send the email. Ideas? ? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = Get Involved List; if (!$MailFromAddress) { $MailFromAddress = $email; } $Header = ; $Footer = ; ? ? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= $key = $val\n; } if ($Header) { $Message = $Header.\n\n.$Message; } if ($Footer) { $Message .= \n\n.$Footer; // could put $Footer inside double quotes, vars expand then } mail( $MailToAddress, $MailSubject, $Message, From: // no need to quote these $MailFromAddress); ? There's no need to be doing all of the array manipulation. Just use the variables in the array. Also turn off magic_quotes_gpc in a .htaccess file so that you don't have to strip slashes. ?php If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { $MailToAddress = '[EMAIL PROTECTED]'; $MailSubject = 'Get Involved List'; ? form here ?php exit; } ? ? If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { if (isset($HTTP_POST_VARS['email'])) { $MailFromAddress = $HTTP_POST_VARS['email']; // I'm assuming the vars were posted from a form } else { $MailFromAddress = '[EMAIL PROTECTED]'; // vars don't expand in single quotes, but we don't have any here. } $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { $Message = {$HTTP_POST_VARS['Header']}\n\n$Message; // need to wrap arrays in double quotes in {} to parse } if (isset($HTTP_POST_VARS['Footer'])) { $Message .= \n\n{$HTTP_POST_VARS['Footer']}; } mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Can a form submit to two PHP form processers in succession?
Hi, I'm not sure how to do this but I have a form which I wish to do the following. When the uses clicks the submit button, I wish to perform a check where I look for a value in a MySQL database. If found, I need to return an error page telling the user that the value already exists. I assume that I can just POST to a PHP page that performs the check. If the value was not found, I would like to POST the results to a PHP form handling script I use. The above tow are separate PHP documents that are not connected. In essence, it is akin to one form processing page handing off the information to another page. Can this be done in PHP? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie getting close, form submission
I do not control server they will not upgrade. It is a tiny local host, they suck, but the owner of site insists on using them. Getting this Parse error: parse error, expecting `STRING' or `NUM_STRING' or `'$'' in /www/docs/site/email.php on line 78 This is the section $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { This is 78 $Message = {$HTTP_POST_VARS['Header']}\n\n$Message; // need to wrap arrays in double quotes in {} to parse } -Original Message- From: Matt Schroebel [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:36 AM To: 'Dean Ouellette'; [EMAIL PROTECTED] Subject: RE: [PHP] Newbie getting close, form submission From: Dean Ouellette [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 9:43 AM Subject: [PHP] Newbie getting close, form submission I am a complete newbie, search the web for examples right now and use them. The host has php 3.0. ^ That's really old, you really ought to be using 4.2.x Having problems with for submission Right now, no error messages, but does not actually send the email. Ideas? ? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = Get Involved List; if (!$MailFromAddress) { $MailFromAddress = $email; } $Header = ; $Footer = ; ? ? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= $key = $val\n; } if ($Header) { $Message = $Header.\n\n.$Message; } if ($Footer) { $Message .= \n\n.$Footer; // could put $Footer inside double quotes, vars expand then } mail( $MailToAddress, $MailSubject, $Message, From: // no need to quote these $MailFromAddress); ? There's no need to be doing all of the array manipulation. Just use the variables in the array. Also turn off magic_quotes_gpc in a .htaccess file so that you don't have to strip slashes. ?php If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { $MailToAddress = '[EMAIL PROTECTED]'; $MailSubject = 'Get Involved List'; ? form here ?php exit; } ? ? If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { if (isset($HTTP_POST_VARS['email'])) { $MailFromAddress = $HTTP_POST_VARS['email']; // I'm assuming the vars were posted from a form } else { $MailFromAddress = '[EMAIL PROTECTED]'; // vars don't expand in single quotes, but we don't have any here. } $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { $Message = {$HTTP_POST_VARS['Header']}\n\n$Message; // need to wrap arrays in double quotes in {} to parse } if (isset($HTTP_POST_VARS['Footer'])) { $Message .= \n\n{$HTTP_POST_VARS['Footer']}; } mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and4.2.1
IIRC, just about every upgrae has security fixes, you may be hard pressed to find an older version that doesn't have any big holes in it. On Mon, 2002-07-22 at 10:55, Ilia A. wrote: On July 22, 2002 10:12 am, 1LT John W. Holmes wrote: [snip] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 [/snip] Looks like everyone will be using the new super globals, now... :) Well, I guess I'm still assuming that in a perfect world, people will upgrade because of security issues... ---John Holmes... As the Advisory suggests, the security fault affects only the 2 latest versions of PHP, all the people running older PHPs are not affected, so unless you've had the very latest stuff running this won't affect you and there will be no need to upgrade. If anything this will only convince people looking for 'stable' PHP to wait even longer before upgrading their releases because of potential bugs such as this one creeping up in 'new' releases. Ilia -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Jeff Bearer, RHCE Webmaster, PittsburghLIVE.com 2002 EPpy Award Winner, Best Newspaper Website -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can a form submit to two PHP form processers in succession?
//post to this script if($value_found_in_database) include('error_document.php'); else include('handling_script.php'); Op maandag 22 juli 2002 16:59, schreef DonPro: Hi, I'm not sure how to do this but I have a form which I wish to do the following. When the uses clicks the submit button, I wish to perform a check where I look for a value in a MySQL database. If found, I need to return an error page telling the user that the value already exists. I assume that I can just POST to a PHP page that performs the check. If the value was not found, I would like to POST the results to a PHP form handling script I use. The above tow are separate PHP documents that are not connected. In essence, it is akin to one form processing page handing off the information to another page. Can this be done in PHP? Thanks, Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Doing an HTML POST using header()
I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie getting close, form submission
From: Dean Ouellette [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:56 AM Subject: RE: [PHP] Newbie getting close, form submission $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { This is 78 $Message = {$HTTP_POST_VARS['Header']}\n\n$Message; Oops, PHP 3.0 may need: $Message = $HTTP_POST_VARS['Header'] . \n\n$Message; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php 4.2.1 and MySQL
We recently upgraded to php 4.2.1 with Apache and our scripts that access MySQL now fail in mysql_connect().Apache shows the following: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Sorry... Could not connect to database Not sure why it says it's using password: YES. The call is mysql_connect(host, fred, password) as it always has been. I thought that perhaps the function call has changed to include an extra parameter or something, but haven't found anything that says that's true. Can someone tell me what I can do to get these scripts working again? All of my scripts that use MySQL are failing in this same way. Thanks, Brian McLaughlin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Doing an HTML POST using header()
Don't redirect, use curl to post your data to the new page. Francis wrote: I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php 4.2.1 and MySQL
No extra parameters have been added to the mysql_connect() function. The error you're seeing is straight from mysql...so it's really not php. Mysql says Using password: YES because you're trying to login in with a password. If you took out password in the mysql_connect() function, it'd say Using password: NO. Go into mysql and make sure the username/password haven't been changed and make sure the machine that php is on is allowed to connect to the mysql server. Good luck, -- Tyler Longren Captain Jack Communications [EMAIL PROTECTED] www.captainjack.com On Mon, 22 Jul 2002 08:32:35 -0700 Brian McLaughlin [EMAIL PROTECTED] wrote: We recently upgraded to php 4.2.1 with Apache and our scripts that access MySQL now fail in mysql_connect().Apache shows the following: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Sorry... Could not connect to database Not sure why it says it's using password: YES. The call is mysql_connect(host, fred, password) as it always has been. I thought that perhaps the function call has changed to include an extra parameter or something, but haven't found anything that says that's true. Can someone tell me what I can do to get these scripts working again? All of my scripts that use MySQL are failing in this same way. Thanks, Brian McLaughlin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie getting close, form submission
Last line Same error for this message Parse error: parse error, expecting `STRING' or `NUM_STRING' or `'$'' in /www/docs/www.electjoemarine.com/email.php on line 82 Was $Message .= \n\n{$HTTP_POST_VARS['Footer']}; Tried this, but same message $Message .= \n\n$HTTP_POST_VARS['Footer']; -Original Message- From: Matt Schroebel [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:21 AM To: 'Dean Ouellette'; Matt Schroebel; [EMAIL PROTECTED] Subject: RE: [PHP] Newbie getting close, form submission From: Dean Ouellette [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 10:56 AM Subject: RE: [PHP] Newbie getting close, form submission $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { This is 78 $Message = {$HTTP_POST_VARS['Header']}\n\n$Message; Oops, PHP 3.0 may need: $Message = $HTTP_POST_VARS['Header'] . \n\n$Message; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is php.net down ?
Hi guys, any one else able to get into www.php.net ? I'm getting this Warning: main(geoip.inc) - No such file or directory in /local/Web/sites/phpweb/include/prepend.inc on line 6 Fatal error: Failed opening required 'geoip.inc' (include_path='.:/local/Web/sites/phpweb/include') in /local/Web/sites/phpweb/include/prepend.inc on line 6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is php.net down ?
They seem to be working on it. It comes up every few minutes so keep trying. I managed to sneak it just long enough to snag 4.2.2. On Mon, 22 Jul 2002, R'twick Niceorgaw wrote: -Hi guys, -any one else able to get into www.php.net ? - -I'm getting this - -Warning: main(geoip.inc) - No such file or directory in -/local/Web/sites/phpweb/include/prepend.inc on line 6 - -Fatal error: Failed opening required 'geoip.inc' -(include_path='.:/local/Web/sites/phpweb/include') in -/local/Web/sites/phpweb/include/prepend.inc on line 6 - - - - - --- -PHP General Mailing List (http://www.php.net/) -To unsubscribe, visit: http://www.php.net/unsub.php - ** John Huggins VANet [EMAIL PROTECTED] http://www.va.net/ ** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is php.net down ?
[snip] any one else able to get into www.php.net ? [/snip] Nope... :^[ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is php.net down ?
You could try one of the mirrors. For example, http://php.ca is up and running. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:56 AM To: 'R'twick Niceorgaw'; [EMAIL PROTECTED] Subject: RE: [PHP] is php.net down ? [snip] any one else able to get into www.php.net ? [/snip] Nope... :^[ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] is php.net down ?
I can get in. Try a mirror if you having trouble. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:56 AM To: 'R'twick Niceorgaw'; [EMAIL PROTECTED] Subject: RE: [PHP] is php.net down ? [snip] any one else able to get into www.php.net ? [/snip] Nope... :^[ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is php.net down ?
It took me about 30 minutes to get it...just keep trying...some mirrors are really good...i used a canadian mirror and that worked great... .: B i g D o g :. - Original Message - From: Brian V Bonini [EMAIL PROTECTED] To: Jay Blanchard [EMAIL PROTECTED]; 'R'twick Niceorgaw' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 22, 2002 10:05 AM Subject: RE: [PHP] is php.net down ? I can get in. Try a mirror if you having trouble. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:56 AM To: 'R'twick Niceorgaw'; [EMAIL PROTECTED] Subject: RE: [PHP] is php.net down ? [snip] any one else able to get into www.php.net ? [/snip] Nope... :^[ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Temporary Mirror for PHP 4.2.2 Binaries
Hi PHPers, To help along with the new PHP download crises I have added a temporary mirror: http://www.thehostingcompany.us/php/ Regards, Daniel Kushner -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is php.net down ?
They are moving to another machine. The intention is to move the download resource to another resource to free the resources ot the current machine because there are too many working apache processes. And this is a problem for other applications. It will be fine soon. Regards, Andrey - Original Message - From: R'twick Niceorgaw [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 22, 2002 6:51 PM Subject: [PHP] is php.net down ? Hi guys, any one else able to get into www.php.net ? I'm getting this Warning: main(geoip.inc) - No such file or directory in /local/Web/sites/phpweb/include/prepend.inc on line 6 Fatal error: Failed opening required 'geoip.inc' (include_path='.:/local/Web/sites/phpweb/include') in /local/Web/sites/phpweb/include/prepend.inc on line 6 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Doing an HTML POST using header()
using NT? all I need it for is so the user can skip a registration step put its all coded using POST rather than GET, its gonna be quite simple but whats the syntax? there must be a way to do it... Pete James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Don't redirect, use curl to post your data to the new page. Francis wrote: I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] is php.net down ?
cool... thanks guys - Original Message - From: Sam Masiello [EMAIL PROTECTED] To: 'Jay Blanchard' [EMAIL PROTECTED]; 'R'twick Niceorgaw' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, July 22, 2002 11:59 AM Subject: RE: [PHP] is php.net down ? You could try one of the mirrors. For example, http://php.ca is up and running. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:56 AM To: 'R'twick Niceorgaw'; [EMAIL PROTECTED] Subject: RE: [PHP] is php.net down ? [snip] any one else able to get into www.php.net ? [/snip] Nope... :^[ Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie getting close, form submission
On Monday 22 July 2002 23:44, Dean Ouellette wrote: Tried this, but same message $Message .= \n\n$HTTP_POST_VARS['Footer']; $Message .= \n\n$HTTP_POST_VARS[Footer]; -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* You can extend EXTRAVERSION infinitely, but after the first 10 or so characters, it starts to get silly. - Russell King on linux-kernel */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie getting close, form submission
Work by process of elimination... Here goes... Start with testing whether your mail will actually send the mail by executing a one line script... Just out of curiosity: how come your host is running an old version of php... Test the following: ?php ( [EMAIL PROTECTED], Testing, Just a Test, ); ? if possible try and run it as a script by connecting to your host via telnet or whatever (I am assuming the platform is UNIX or Linux): php MyMailScript If you are using Linux or UNIX and this doesn't work then there ought to be something wrong with the sendmail file... If you are on a MS Windows platform then there ought to be a problem in the ini file with the smtp setting... If it sends then we can start sticking echo statements in your script to see where the breakdown is... Drop another line on the news group if you still need help, I'll be behind this monitor for a while as will others I'm sure... Spike... Dean Ouellette [EMAIL PROTECTED] wrote in message 004d01c23185$a8822cb0$9c89adac@yoda">news:004d01c23185$a8822cb0$9c89adac@yoda... I am a complete newbie, search the web for examples right now and use them. The host has php 3.0 Having problems with for submission Right now, no error messages, but does not actually send the email. Ideas? ? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = Get Involved List; if (!$MailFromAddress) { $MailFromAddress = $email; } $Header = ; $Footer = ; ? ? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); $Message .= $key = $val\n; } if ($Header) { $Message = $Header.\n\n.$Message; } if ($Footer) { $Message .= \n\n.$Footer; } mail( $MailToAddress, $MailSubject, $Message, From: $MailFromAddress); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Newbie getting close, form submission
Sorry I forgot to stick the mail function there ?php mail( [EMAIL PROTECTED], Testing, Just a Test, ); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Parse error
PHP 3.0 (I know I don't control it) Getting Parse error on last line of code which is just html Here is php code on page ?php If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { $MailToAddress = '[EMAIL PROTECTED]'; $MailSubject = 'Get Involved List'; ? ?php exit; } ? ? If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { if (isset($HTTP_POST_VARS['email'])) { $MailFromAddress = $HTTP_POST_VARS['email']; // I'm assuming the vars were posted from a form } else { $MailFromAddress = '[EMAIL PROTECTED]'; // vars don't expand in single quotes, but we don't have any here. } $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { $Message = $HTTP_POST_VARS['Header'] . \n\n$Message; // need to wrap arrays in double quotes in {} to parse } if (isset($HTTP_POST_VARS['Footer'])) { $Message .= \n\n$HTTP_POST_VARS[Footer]; } mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ?
RE: [PHP] Parse error
[snip] Getting Parse error on last line of code which is just html Here is php code on page ... [/snip] Check your curly braces, this is the most often cause of a last line error. You either have too many or not enough. HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Parse error
On Tuesday 23 July 2002 00:32, Dean Ouellette wrote: PHP 3.0 (I know I don't control it) Getting Parse error on last line of code which is just html mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ? Make sure that the '} ?' are on a separate line (ie not a continuation of your comment -- // don't have to quote ...) -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* I've got a very bad feeling about this. -- Han Solo */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Windows NT Server, FORK, SOCKETS, and seperate processes
I've got effectivly a glorified chat server which upon the arrival of a message thorugh a socket connection goes off and runs a bunch of database processed. My questions is this: How can I seperate the database processing into a seperate processor process? I really don't want the chat server to have to wait until after the database processing is done to go intercept and process another request--this just doesn't seem right. I want the chat server process to be able to deal with getting and receiving messages, and another process to deal with the database processing. That way if one of the processes get's slow, the other isn't affected. Something like the fork command would work really well, but fork doesn't exist in NT. Anyone have any ideas? I'm running Windows NT4.0 sp6a Apache Server 1.3.xx MySQL and of course, PHP 4.2.1
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0and 4.2.1
On Mon, 22 Jul 2002, Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Not only did I get to re-write all my apps the past few months because of the new register_globals default that was imposed by `the php group`... Now I get to upgrade my PHP install once a month or so cause of new security holes.. Yay! Wasn't this new register_globals setting supposed to enhance security? How would you like to be a sys admin with dozens of machines to upgrade before you can proceed with anythign else? Can anyone say Ruby? -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Hey man, if you can't stand the heat, get out of the freakin sun. Atleast PHP tells you about holes, not like Microsoft who will fix it six months down the line (if they even admit a hole exists). Plus, if your running anything past 4.1.2 on production systems, it's your own damn fault because several times it has been said that the 4.2 series wasn't considered safe for production use. And by the way, don't want to use PHP anymore because of this? Then don't. PHP doesn't need you, the rest of the people who can handle an update without whining will be fine. Adam Voigt [EMAIL PROTECTED] On Mon, 2002-07-22 at 12:55, Greg Donald wrote: On Mon, 22 Jul 2002, Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Not only did I get to re-write all my apps the past few months because of the new register_globals default that was imposed by `the php group`... Now I get to upgrade my PHP install once a month or so cause of new security holes.. Yay! Wasn't this new register_globals setting supposed to enhance security? How would you like to be a sys admin with dozens of machines to upgrade before you can proceed with anythign else? Can anyone say Ruby? -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Parse error
?php If ('GET' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { $MailToAddress = '[EMAIL PROTECTED]'; $MailSubject = 'Get Involved List'; ? ?php exit; } ? You appear to be moving in and out of PHP Mode that could be pretty tough to follow... I've practically been looking at php Code 8 hours a day for the past 3 months with a good deal of former CGI Scripting experience and I'm still scared of learning this tactic... However I have never had to use it before so the circumstances may be different... ? If ('POST' == $HTTP_SERVER_VARS['REQUEST_METHOD']) { if (isset($HTTP_POST_VARS['email'])) { $MailFromAddress = $HTTP_POST_VARS['email']; // I'm assuming the vars were posted from a form } else { $MailFromAddress = '[EMAIL PROTECTED]'; // vars don't expand in single quotes, but we don't have any here. } $Message = $HTTP_POST_VARS['Message']; // should single quote associative array indexes if (isset($HTTP_POST_VARS['Header'])) { $Message = $HTTP_POST_VARS['Header'] . \n\n$Message; // need to wrap arrays in double quotes in {} to parse } if (isset($HTTP_POST_VARS['Footer'])) { $Message .= \n\n$HTTP_POST_VARS[Footer]; } mail($MailToAddress,$MailSubject,$Message,$MailFromAddress); // don't have to quote vars on parms } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Windows NT Server, FORK, SOCKETS, and seperate processes
You can use threads with NT to accomplish what you are asking. -Original Message- From: David Buerer [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:29 AM To: '[EMAIL PROTECTED]' Subject: [PHP] Windows NT Server, FORK, SOCKETS, and seperate processes I've got effectivly a glorified chat server which upon the arrival of a message thorugh a socket connection goes off and runs a bunch of database processed. My questions is this: How can I seperate the database processing into a seperate processor process? I really don't want the chat server to have to wait until after the database processing is done to go intercept and process another request--this just doesn't seem right. I want the chat server process to be able to deal with getting and receiving messages, and another process to deal with the database processing. That way if one of the processes get's slow, the other isn't affected. Something like the fork command would work really well, but fork doesn't exist in NT. Anyone have any ideas? I'm running Windows NT4.0 sp6a Apache Server 1.3.xx MySQL and of course, PHP 4.2.1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] stores / ecommerce
What are some good e-commerce stores written out there for PHP and mySQL?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Well from the sound of it, it's a quick painless process to upgrade php to the newest version using the patch. Can anyone that has done it comment on the complexities of the upgrade? Im just going on what it says on the php homepage... Rick When you walk to the edge of all the light you have and take that first step into the darkness of the unknown you must believe that one of two things will happen: There will be something solid for you to stand upon or, you will be taught how to fly. - Patrick Overton From: Greg Donald [EMAIL PROTECTED] Date: Mon, 22 Jul 2002 12:30:50 -0500 (CDT) To: [EMAIL PROTECTED] Subject: Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 On 22 Jul 2002, Adam Voigt wrote: Hey man, if you can't stand the heat, get out of the freakin sun. Atleast PHP tells you about holes, not like Microsoft who will fix it six months down the line (if they even admit a hole exists). Plus, if Who said anything about M$? I don't use their crappy products so I don't have to deal with their security issues. your running anything past 4.1.2 on production systems, it's your own damn fault because several times it has been said that the 4.2 series wasn't considered safe for production use. And by the way, don't want to If PHP 4.2 is unsafe then why is it listed at the top of the page for download? There is not a shread of text saying do not use in production, no unsafe warnings whatsoever. How am I supposed to magically find the 'do not use' warnings? use PHP anymore because of this? Then don't. PHP doesn't need you, the rest of the people who can handle an update without whining will be fine. It's not about that.. It's about the hell I've already been through with the new register_globals setting. Then two huge ass security holes following in the next couple of months after that. If it doesn't bother you the hassles 'the php group' is putting me, you, and alot of others through then I guess that's just you. I can't help but get pissed about it. I did not have the time to do these upgrades, but now I have to make time. -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
I actually enjoy all the security releases. They give me something to do at work! tyler On Mon, 22 Jul 2002 11:55:31 -0500 (CDT) Greg Donald [EMAIL PROTECTED] wrote: On Mon, 22 Jul 2002, Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Not only did I get to re-write all my apps the past few months because of the new register_globals default that was imposed by `the php group`... Now I get to upgrade my PHP install once a month or so cause of new security holes.. Yay! Wasn't this new register_globals setting supposed to enhance security? How would you like to be a sys admin with dozens of machines to upgrade before you can proceed with anythign else? Can anyone say Ruby? -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dbf Help
Hi, I have already php installed on linux running with mysql enabled. Now I wanted to read dbf files and I came to know that we need to install php with ** Installation In order to use these functions, you must compile PHP with the --enable-dbase option. ** Does this means I have to uninstall my existing php and reinstall as above ? Can I keep my existing setting and have dbf function install without reinstalling whole php? Thanks Vinod -- Vinod Palan A Calypso Technology, Inc. [EMAIL PROTECTED] (415) 817-2463 Phone -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
Quoting Greg Donald [EMAIL PROTECTED]: It's not about that.. It's about the hell I've already been through with the new register_globals setting. Then two huge ass security holes following in the next couple of months after that. If it doesn't bother you the hassles 'the php group' is putting me, you, and alot of others through then I guess that's just you. I can't help but get pissed about it. I did not have the time to do these upgrades, but now I have to make time. php.ini: register_globals = on; this would have allowed you to upgrade and keep your projects running until you converted them to $_ arrays. And I think you seem to be taking things a little to personally. ...hassles the php group is putting YOU through? Let's see...does Andi, Zeev and Rasmus get paid to produce new versions of PHP? Do you pay licensing fees for the product? Maybe if there were fees, the Holy Trinity (grin) could create an update app that made your life easier for you. The night CERT released the security alert, I upgraded 23 servers in less than an hour. It is not hard work running three commands. You are not going to get alot of sympathy from the 'group'. -- Michael Geier CDM Sports, Inc. - Systems Administrator email: [EMAIL PROTECTED] phone: 314.991.1511 x 6505 pager: 314.318.9414 || [EMAIL PROTECTED] - This email sent using CDM Sports Webmail v2 [ http://webmail.cdmsports.com ] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dbf Help
From: Vinod Palan [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 1:41 PM Subject: [PHP] dbf Help I have already php installed on linux running with mysql enabled. Now I wanted to read dbf files and I came to know that we need to install php with ** Installation In order to use these functions, you must compile PHP with the --enable-dbase option. ** Does this means I have to uninstall my existing php and reinstall as above ? Can I keep my existing setting and have dbf function install without reinstalling whole php? Your previous compile options are in config.nice so you can simply: ./config.nice --enable-dbase-functions make stop apache make install start apache -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Well from the sound of it, it's a quick painless process to upgrade php to the newest version using the patch. Can anyone that has done it comment on the complexities of the upgrade? Im just going on what it says on the php homepage... Nice and easy for me, I'm running it on windows, though. Just delete the old PHP folder, unzip and copy the new one, and restart IIS. (php.ini is elsewhere). This other guy needs to quit his freakin whining and just do his job. Or go use ASP...the choice is yours. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Heh ASP. Hehehehehe Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 1:52 PM To: Richard Baskett; PHP General Subject: Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1 Well from the sound of it, it's a quick painless process to upgrade php to the newest version using the patch. Can anyone that has done it comment on the complexities of the upgrade? Im just going on what it says on the php homepage... Nice and easy for me, I'm running it on windows, though. Just delete the old PHP folder, unzip and copy the new one, and restart IIS. (php.ini is elsewhere). This other guy needs to quit his freakin whining and just do his job. Or go use ASP...the choice is yours. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
[snip] Can anyone that has done it comment on the complexities of the upgrade? [/snip] Well, trying to updrade on Slackware Linux 8.0 and compiling with the GD (1.8.4) libraries are giving us some headaches. Some of what seems to be wrong; phpinfo() does not show new build times for each compile, not seemingly a caching problem (we have shut down browsers and then re-opened them to no avail as far as updated information). The configure command portion of phpinfo() does not show items we configured with PHP. GD throws errors; imageCreate() as an undefined function. We haven't moved on to our FreeBSD boxes yet. Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] stores / ecommerce
-Original Message- From: Chris Edwards [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 1:11 PM Subject: [PHP] stores / ecommerce What are some good e-commerce stores written out there for PHP and mySQL?? http://marc.theaimsgroup.com/?l=php-generalm=101839857008918w=2 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script executing Telnet Shell Command...
I am trying to execute a Script running a telnet command testing through a range of IP connections... Here goes: ? $str = 123.456.789.; $count = 0; while ($count 999){ $runTheScriptCommand... } ? What I want to stick into the while loop is if connection was successful, break... Is there a way I can check whether telnet connection was successful on each step through the loop or do I have to restructure my program and try connecting to a port via fsockopen... By the way does anyone know what port number telnet connects to... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions4.2.0
The correct path for the windows binary version is http://www.php.net/do_download.php?download_file=php-4.2.2-Win32.zip /lasso ([EMAIL PROTECTED]) Rouvas Stathis wrote: Hi all, Just wanting to notify everyone that the link for the PHP.4.2.2 download is broken. -Stathis. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php 4.2.1 and MySQL
Did you do anything to Apache when you upgraded PHP e.g. change the host name? My MySQL scripts have worked through every upgrage from 4.0.6 to 4.2.1 without needing any modification. Brian McLaughlin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... We recently upgraded to php 4.2.1 with Apache and our scripts that access MySQL now fail in mysql_connect().Apache shows the following: Warning: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Warning: MySQL Connection Failed: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES) in /var/apache/share/scripts/ais/itweb/projects.php on line 40 Sorry... Could not connect to database Not sure why it says it's using password: YES. The call is mysql_connect(host, fred, password) as it always has been. I thought that perhaps the function call has changed to include an extra parameter or something, but haven't found anything that says that's true. Can someone tell me what I can do to get these scripts working again? All of my scripts that use MySQL are failing in this same way. Thanks, Brian McLaughlin [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and4.2.1
PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Issued on: July 22, 2002 Software: PHP versions 4.2.0 and 4.2.1 Platforms: All The PHP Group has learned of a serious security vulnerability in PHP versions 4.2.0 and 4.2.1. An intruder may be able to execute arbitrary code with the privileges of the web server. This vulnerability may be exploited to compromise the web server and, under certain conditions, to gain privileged access. Description PHP contains code for intelligently parsing the headers of HTTP POST requests. The code is used to differentiate between variables and files sent by the user agent in a multipart/form-data request. This parser has insufficient input checking, leading to the vulnerability. The vulnerability is exploitable by anyone who can send HTTP POST requests to an affected web server. Both local and remote users, even from behind firewalls, may be able to gain privileged access. Impact Both local and remote users may exploit this vulnerability to compromise the web server and, under certain conditions, to gain privileged access. So far only the IA32 platform has been verified to be safe from the execution of arbitrary code. The vulnerability can still be used on IA32 to crash PHP and, in most cases, the web server. Solution The PHP Group has released a new PHP version, 4.2.2, which incorporates a fix for the vulnerability. All users of affected PHP versions are encouraged to upgrade to this latest version. The downloads web site at http://www.php.net/downloads.php has the new 4.2.2 source tarballs, Windows binaries and source patches from 4.2.0 and 4.2.1 available for download. Workaround If the PHP applications on an affected web server do not rely on HTTP POST input from user agents, it is often possible to deny POST requests on the web server. In the Apache web server, for example, this is possible with the following code included in the main configuration file or a top-level .htaccess file: Limit POST Order deny,allow Deny from all /Limit Note that an existing configuration and/or .htaccess file may have parameters contradicting the example given above. Credits The PHP Group would like to thank Stefan Esser of e-matters GmbH for discovering this vulnerability. Copyright (c) 2002 The PHP Group. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and4.2.1
[snip] PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 [/snip] Looks like everyone will be using the new super globals, now... :) Well, I guess I'm still assuming that in a perfect world, people will upgrade because of security issues... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
Can you post this to php.announce as well? Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Issued on: July 22, 2002 Software: PHP versions 4.2.0 and 4.2.1 Platforms: All The PHP Group has learned of a serious security vulnerability in PHP versions 4.2.0 and 4.2.1. An intruder may be able to execute arbitrary code with the privileges of the web server. This vulnerability may be exploited to compromise the web server and, under certain conditions, to gain privileged access. Description PHP contains code for intelligently parsing the headers of HTTP POST requests. The code is used to differentiate between variables and files sent by the user agent in a multipart/form-data request. This parser has insufficient input checking, leading to the vulnerability. The vulnerability is exploitable by anyone who can send HTTP POST requests to an affected web server. Both local and remote users, even from behind firewalls, may be able to gain privileged access. Impact Both local and remote users may exploit this vulnerability to compromise the web server and, under certain conditions, to gain privileged access. So far only the IA32 platform has been verified to be safe from the execution of arbitrary code. The vulnerability can still be used on IA32 to crash PHP and, in most cases, the web server. Solution The PHP Group has released a new PHP version, 4.2.2, which incorporates a fix for the vulnerability. All users of affected PHP versions are encouraged to upgrade to this latest version. The downloads web site at http://www.php.net/downloads.php has the new 4.2.2 source tarballs, Windows binaries and source patches from 4.2.0 and 4.2.1 available for download. Workaround If the PHP applications on an affected web server do not rely on HTTP POST input from user agents, it is often possible to deny POST requests on the web server. In the Apache web server, for example, this is possible with the following code included in the main configuration file or a top-level .htaccess file: Limit POST Order deny,allow Deny from all /Limit Note that an existing configuration and/or .htaccess file may have parameters contradicting the example given above. Credits The PHP Group would like to thank Stefan Esser of e-matters GmbH for discovering this vulnerability. Copyright (c) 2002 The PHP Group. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
Hi all, Just wanting to notify everyone that the link for the PHP.4.2.2 download is broken. -Stathis. -- Rouvas Stathis [EMAIL PROTECTED] http://www.di.uoa.gr/~rouvas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions 4.2.0and 4.2.1
The superglobals have been a round for a bit so it's not as if everything's got to be updated overnight. I run PHP on windows and upgrading is just a matter of unzipping the archive to my PHP folder and overwriting all the older files - dead simple. Don't even have to change php.ini if I don't want to! Greg Donald [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Mon, 22 Jul 2002, Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Not only did I get to re-write all my apps the past few months because of the new register_globals default that was imposed by `the php group`... Now I get to upgrade my PHP install once a month or so cause of new security holes.. Yay! Wasn't this new register_globals setting supposed to enhance security? How would you like to be a sys admin with dozens of machines to upgrade before you can proceed with anythign else? Can anyone say Ruby? -- Greg Donald http://destiney.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1
Yes. Please post something to php.announce! Nothing ever gets announced in there anymore. Steve Meyers [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Can you post this to php.announce as well? Marko Karppinen wrote: PHP Security Advisory: Vulnerability in PHP versions 4.2.0 and 4.2.1 Issued on: July 22, 2002 Software: PHP versions 4.2.0 and 4.2.1 Platforms: All The PHP Group has learned of a serious security vulnerability in PHP versions 4.2.0 and 4.2.1. An intruder may be able to execute arbitrary code with the privileges of the web server. This vulnerability may be exploited to compromise the web server and, under certain conditions, to gain privileged access. Description PHP contains code for intelligently parsing the headers of HTTP POST requests. The code is used to differentiate between variables and files sent by the user agent in a multipart/form-data request. This parser has insufficient input checking, leading to the vulnerability. The vulnerability is exploitable by anyone who can send HTTP POST requests to an affected web server. Both local and remote users, even from behind firewalls, may be able to gain privileged access. Impact Both local and remote users may exploit this vulnerability to compromise the web server and, under certain conditions, to gain privileged access. So far only the IA32 platform has been verified to be safe from the execution of arbitrary code. The vulnerability can still be used on IA32 to crash PHP and, in most cases, the web server. Solution The PHP Group has released a new PHP version, 4.2.2, which incorporates a fix for the vulnerability. All users of affected PHP versions are encouraged to upgrade to this latest version. The downloads web site at http://www.php.net/downloads.php has the new 4.2.2 source tarballs, Windows binaries and source patches from 4.2.0 and 4.2.1 available for download. Workaround If the PHP applications on an affected web server do not rely on HTTP POST input from user agents, it is often possible to deny POST requests on the web server. In the Apache web server, for example, this is possible with the following code included in the main configuration file or a top-level .htaccess file: Limit POST Order deny,allow Deny from all /Limit Note that an existing configuration and/or .htaccess file may have parameters contradicting the example given above. Credits The PHP Group would like to thank Stefan Esser of e-matters GmbH for discovering this vulnerability. Copyright (c) 2002 The PHP Group. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems Retrieving Session Variables on 2nd submit.
Hello folks, I'm wondering if anyone has experienced this before. I'm trying to get sessions working for a small utility site I've developed. I'm using PHP Vers 4.0.2 (I know its an oldie but I don't know how to update it without crashing my entire server) on a Cobalt RAQ3 (RedHat Linux). The url (if you're curious) is http://www.amazon-networks.com/bms The steps: 1. Someone goes to the homepage selects a name from the drop-down and hits 'Submit'. 2. The form on the homepage calls my main script (decide.php). 3. The decide.php script generates an instructions page and places the person's $name and $department on the generated page (This Works). 4. Once the person reads the instructions they are told to hit the 'Proceed' button and when they click 'Proceed,'this action (again) calls the decide.php page (the very same script that created this page). 5. What happens next is another page is created by the decide.php script and displayed but the $name and $department fields have now lost their value (even though they worked in Step #3 above). If this is confusing you can see how it works at: http://www.amazon-networks.com/bms Below is how the decide.php script registers the variables. ? session_start(); // Below I'm setting up the Date and Expiration variables. // Below I'm setting up the Date and Expiration variables. // Below I'm setting up the Date and Expiration variables. $expire = date(D, d M Y, mktime(0,0,0,date(n),date(d)+14,date(Y))); $date = date(D, d M Y, mktime(0,0,0,date(n),date(d),date(Y))); header (Expires: .$expire. 05:00:00 GMT); //header (Expires: Mon, 26 Jul 2010 05:00:00 GMT); // Below I'm registering all of the varibles that I will use for this application. // Below I'm registering all of the varibles that I will use for this application. // Below I'm registering all of the varibles that I will use for this application. if (!$phpsessid) { session_register($employee); session_register($employee_f_name); session_register($employee_l_name); session_register($employee_full_name); session_register($department); session_register($date); session_register($expire); session_register($col1); session_register($col2); session_register($col3); session_register($col4); session_register($col5); session_register($col6); session_register($row1); session_register($row2); session_register($row3); session_register($row4); session_register($row5); session_register($row6); session_register($row_1_title); session_register($row_2_title); session_register($row_3_title); session_register($row_4_title); session_register($row_5_title); session_register($row_6_title); session_register($where_from); } ? Any suggestions anyone can offer will be greatly appreciated. Thank You, Mario A. Salinas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0and 4.2.1
On Mon, 22 Jul 2002, 1LT John W. Holmes wrote: This other guy needs to quit his freakin whining and just do his job. Or go use ASP...the choice is yours. Or JSP, for that matter. I've just discussing with a friend about this security issue, and he was trying to convince me to move to Java... :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] getservbyname
getservbyname takes in the following arguments: getservbyname(string service, string protocol); is the parameter service similar to those diefined under unix's /etc/services file or is there something else to it? Thanks in advance... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Problems Retrieving Session Variables on 2nd submit.
session_register($employee); session_register($employee_f_name); session_register($employee_l_name); session_register($employee_full_name); session_register($department); session_register($date); session_register($expire); Try removing the $ from each session_register call: example: session_register(employee); Hope this helps! -Mark : Whirled Web Everybody needs a geek... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Security Advisory: Vulnerability in PHP versions 4.2.0
[delete some flaming] Hehe, and I thought I had to go to USENET to see a flamewar. This is great, a flamewar delivered directly to my mailbox, it doesn't get better... Let me put my $0.02 in. Security holes happen, no matter what software you use. PHP and open source in general, unlike M$, does not have a new vius of the week, or security hole of the month. Their recent couple of announcements is bad luck, not bad design/development and I still happily stand by the PHP guys. I think PHP users should also be grateful that the PHP guys have said there is a need to upgrade to fix this hole, rahter than just put out a new release and hope most people see it and think great, a new version, I will upgrade. As for the the implied terrible difficulty of upgrading, on my Linux systems it was tragically complicated - I chose to patch my 4.2.1 source, then recompile, install and restart apache: patch -p0 php-4.2.1-to-4.2.2.patch cd php-4.2.1 ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --with-ldap make make install /usr/local/apache/bin/apachectl restart Yes, with a script like this, it is terribly complicated. This whole process took less than 5 minutes. I had to do it on three machines, and there were no problems to be seen. If you are going to wine about having to upgrade software because of security holes, get off the net, it would be easier and take much less precious time. That's my $0.02 (or in my case 0.02 Euro). Now I will go back to trying to work out my ldap problems. Ian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] imagecolortransparent()
Tom Rogers [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hello Nick, Monday, July 22, 2002, 8:47:39 PM, you wrote: N i get php to allocate a colour then make it transparent using N imagecolortransparent() N instead of turning it transparent it becomes black. N Is it something i'm doing wrong? can anyone help me? N thanx in advance Post a bit of the code so we can see what you are doing -- Tom $im = imagecreate($size, 21); $bgcolour = imagecolorallocate($im,hexdec(substr($table[bg],0,2)),hexdec(substr($table[b g],2,2)),hexdec(substr($table[bg],4,2))); $fontcolour = imagecolorallocate($im,hexdec(substr($table[fg],0,2)),hexdec(substr($table[f g],2,2)),hexdec(substr($table[fg],4,2))); if ($table[bg] == no) { $trans = imagecolortransparent ($im,$bgcolour); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL - PHP combined log
The easiest way to do this would be to write a wrapper function to mysql_query() that does the writing to the log file and also executes the query and returns the result set. function my_mysql_query($query) { //assuming file would already be open... global $fp; $return = mysql_query($query); $error = mysql_error(); fwrite($fp,info you want to save); return $return; } Can be improved upon many many ways I'm sure...just an idea. ---John Holmes... - Original Message - From: PHPCoder [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, July 22, 2002 2:30 PM Subject: [PHP] MySQL - PHP combined log Hi, tried this on mysql list, no luck: I want to be able to view a single log that contains the following: IP of user : page_name (PHP only): time/date: MySQL query ( 'select * from xxx' etc.) : error msg from mysql/php if any So it's almost a hybrid between apache and mysql with some extra's I'm sure you all should see the benifit of this in troubleshooting and specially keeping track of who does what when it comes to PHP coding on ones server, specially with crappy code that kills the server. Is something like this possible, already there? PS, Running RedHat 7.0 with PHP4 and mysql 3.23.x Ta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL - PHP combined log
Or you can use the error_log functions within your function, instead of fopen/fwrite/fclose. ---John Holmes... The easiest way to do this would be to write a wrapper function to mysql_query() that does the writing to the log file and also executes the query and returns the result set. function my_mysql_query($query) { //assuming file would already be open... global $fp; $return = mysql_query($query); $error = mysql_error(); fwrite($fp,info you want to save); return $return; } Can be improved upon many many ways I'm sure...just an idea. ---John Holmes... - Original Message - From: PHPCoder [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, July 22, 2002 2:30 PM Subject: [PHP] MySQL - PHP combined log Hi, tried this on mysql list, no luck: I want to be able to view a single log that contains the following: IP of user : page_name (PHP only): time/date: MySQL query ( 'select * from xxx' etc.) : error msg from mysql/php if any So it's almost a hybrid between apache and mysql with some extra's I'm sure you all should see the benifit of this in troubleshooting and specially keeping track of who does what when it comes to PHP coding on ones server, specially with crappy code that kills the server. Is something like this possible, already there? PS, Running RedHat 7.0 with PHP4 and mysql 3.23.x Ta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)
Hi, I have been running 4.1.2 for a while with no problems. This morning, I downloaded 4.2.2, did a configure/make/make install. All seemed to have gone well. However, it broke all my sites that use PHP. Here is a description of how it appeared to be broken. This is just an example, as I dont really own fakename.com. User goes to http://www.fakename.com/index.php User clicks on help and gets the main index page instead of the help page. The URL for help is.. http://www.fakename.com/index.php?target=help It is like PHP gets passed variables and forgets them immediately. What do I need to do? I reinstalled 4.1.2 and things are working again. Naturally, I would like to safely upgrade to 4.2.2. Thanks in advance for any help out there. I am at a loss for ideas on solving this myself. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)
Upgrade and turn on register_globals in php.ini. ---John Holmes... - Original Message - From: Kristopher Yates [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, July 22, 2002 3:51 PM Subject: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2) Hi, I have been running 4.1.2 for a while with no problems. This morning, I downloaded 4.2.2, did a configure/make/make install. All seemed to have gone well. However, it broke all my sites that use PHP. Here is a description of how it appeared to be broken. This is just an example, as I dont really own fakename.com. User goes to http://www.fakename.com/index.php User clicks on help and gets the main index page instead of the help page. The URL for help is.. http://www.fakename.com/index.php?target=help It is like PHP gets passed variables and forgets them immediately. What do I need to do? I reinstalled 4.1.2 and things are working again. Naturally, I would like to safely upgrade to 4.2.2. Thanks in advance for any help out there. I am at a loss for ideas on solving this myself. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)
You *did* read the notice that came up at the end of your 'configure' run, right? (Specifically the part that said *** NOTE *** The default for register_globals is now off. If your application relies on register_globals being ON, you should explicitly set it to on in your php.ini file. Note that you are strongly encouraged to read http://www.php.net/manual/en/security.registerglobals.php about the implications of having register_globals set to on, and avoid using it if possible.) For more info, see the above link, or the External Variables section of the 4.2.1 release notes at http://www.php.net/release_4_2_1.php, or the manual section on predefined variables at http://www.php.net/manual/en/language.variables.predefined.php --- Mark Roedel | Blessed is he who has learned to laugh Systems Programmer| at himself, for he shall never cease LeTourneau University | to be entertained. Longview, Texas, USA | -- John Powell -Original Message- From: Kristopher Yates [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 2:52 PM To: php-general Subject: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2) I have been running 4.1.2 for a while with no problems. This morning, I downloaded 4.2.2, did a configure/make/make install. All seemed to have gone well. However, it broke all my sites that use PHP. Here is a description of how it appeared to be broken. This is just an example, as I dont really own fakename.com. [snip] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What does register_globals do?
I have never had a clear understanding about what this does, the php.ini has an explanation but being newer to PHP I don't understand it very well. Could someone prodive a human explanation about what register_globals does and why it is so important? Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
Re: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2)
I notice the INSTALL file in 4.2.2 mentions that people should write their scripts to work with this [register_globals] turned off. Based on what I've mentioned below, what can I do to conform to this statement made by the PHP authors? From what I know about programming, I am setting globals where appropriate already.. but apparently I am incorrect, since upgrading to 4.2.2 broke all my stuff unless I turn [register_globals] on. Any suggestions? Thanks for your reply, Kris 1LT John W. Holmes wrote: Upgrade and turn on register_globals in php.ini. ---John Holmes... - Original Message - From: Kristopher Yates [EMAIL PROTECTED] To: php-general [EMAIL PROTECTED] Sent: Monday, July 22, 2002 3:51 PM Subject: [PHP] upgrade 4.1.2 to 4.2.2 (passing vars problem with 4.2.2) Hi, I have been running 4.1.2 for a while with no problems. This morning, I downloaded 4.2.2, did a configure/make/make install. All seemed to have gone well. However, it broke all my sites that use PHP. Here is a description of how it appeared to be broken. This is just an example, as I dont really own fakename.com. User goes to http://www.fakename.com/index.php User clicks on help and gets the main index page instead of the help page. The URL for help is.. http://www.fakename.com/index.php?target=help It is like PHP gets passed variables and forgets them immediately. What do I need to do? I reinstalled 4.1.2 and things are working again. Naturally, I would like to safely upgrade to 4.2.2. Thanks in advance for any help out there. I am at a loss for ideas on solving this myself. Kris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Doing an HTML POST using header()
Forging a POST is a complicated task when compared to its GET cousin, and there is no 'easy' way You must either use CURL, or write your own mini web client... Francis wrote: using NT? all I need it for is so the user can skip a registration step put its all coded using POST rather than GET, its gonna be quite simple but whats the syntax? there must be a way to do it... Pete James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Don't redirect, use curl to post your data to the new page. Francis wrote: I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] What does register_globals do?
From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 3:59 PM Subject: [PHP] What does register_globals do? I have never had a clear understanding about what this does, the php.ini has an explanation but being newer to PHP I don't understand it very well. Could someone prodive a human explanation about what register_globals does and why it is so important? Register globals makes it *really* easy to code in php. It's what takes the uri or posted form data, and turns them into global variables in your script. So if a url looked like: http://www.fakename.com/index.php?target=help and with register-globals on, php will create a variable, $target, which has the value 'help' in it. It's very useful and friendly but, if you don't initialize your variables then some non-so-nice person could initialize them for you by passing them on the uri/post/cookie/etc so that your code no longer works as expected. You're safe with it on if you always initialize variables, and set error_reporting to E_ALL while testing so you catch any you might otherwise miss. If you leave it off, you need to use the associative arrays $_POST, $_GET etc. The above example would be $_GET['target']. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Doing an HTML POST using header()
Forging a POST is a complicated task when compared to its GET cousin, and there is no 'easy' way You must either use CURL, or write your own mini web client... Francis wrote: using NT? all I need it for is so the user can skip a registration step put its all coded using POST rather than GET, its gonna be quite simple but whats the syntax? there must be a way to do it... Pete James [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Don't redirect, use curl to post your data to the new page. Francis wrote: I'm trying to redirect to another website but doing a post to that website at the same time. (ie POST rather than a GET (eg: header(Location: www.anothersite.com/index.php?page=22); ) How do you do an HTML post using the header() whats the syntax? I just cant find it anywhere. Thanks google for posttohost; http://www.php-faq.com/postToHost.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What does register_globals do?
My way of thinking about is: With register_globals ON, all variables defined are available anywhere in the script (with the exception of functions and classes, unless defined otherwise), whereas with register_globals OFF, they are only available through the superglobals for the respective variable types. I'm sure there's a much better way to explain it, but it works for me :o) Martin Clifford Homepage: http://www.completesource.net Developer's Forums: http://www.completesource.net/forums/ Matt Babineau [EMAIL PROTECTED] 07/22/02 03:59PM I have never had a clear understanding about what this does, the php.ini has an explanation but being newer to PHP I don't understand it very well. Could someone prodive a human explanation about what register_globals does and why it is so important? Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php