[PHP] Re: REDIRECT
not with php directly, but you can do that with HTML meta tags, check google for "Meta refresh" "Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anybody know of a way to redirect to another page once you have already > outputted html to the screen. In other words, I want to output some text to > the screen for 10 secs and then re-direct to another page. > > Thanks, > Dale > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Page loading time
Hi What is the easiest way to find out how long a page takes to load? I have a client that is concerned about how long the pages are taking and I want to find some way of analysing it. Is there a PHP script that can do this? Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re:[PHP] Re: REDIRECT
Hi: May be you can try javascript: function goto($where,$string) { ?> alert(\"=$string;?>\"); location.href=\"=$where?>\"; http://www.yam.com\",\"thank you!\"); } --- Fongming from Taiwan. -- ¡»From: ¦¹«H¬O¥Ñ®ç¤p¹q¤l¶l¥ó1.5ª©©Òµo¥X... http://fonn.fongming.idv.tw [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Page loading time
The time that a page takes to load is a client side issue. Your php script can be done but the web server may still be sending information such as heavy graphics and such to the client. There are applications that let you measure the time a site and all of it's parts take to load as well as view the headers, sizes of objects and much more. I'm working with TracePlus Web Detective : http://www.sstinc.com/webanal.html Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Adrian Teasdale [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 9:50 AM To: [EMAIL PROTECTED] Subject: [PHP] Page loading time Hi What is the easiest way to find out how long a page takes to load? I have a client that is concerned about how long the pages are taking and I want to find some way of analysing it. Is there a PHP script that can do this? Ade -- 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] Re: REDIRECT
To save you the search : How to use META REFRESH to auto refresh an html page after x seconds. http://examples.weberdev.com/get_example.php3?count=124 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Bobby Patel [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 9:35 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: REDIRECT not with php directly, but you can do that with HTML meta tags, check google for "Meta refresh" "Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anybody know of a way to redirect to another page once you have already > outputted html to the screen. In other words, I want to output some > text to > the screen for 10 secs and then re-direct to another page. > > Thanks, > Dale > > -- 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] Gracefully dealing with Cookies OFF
Monty, The best way to avoid SID "Hijacks" is to assign an IP variable, and an expiration session_register("USERIP"); $_SESSION['USERIP'] = $_SERVER['REMOTE_ADDR']; session_register("EXPIRES"); $_SESSION['expires'] = time() + 900; // 900 seconds (15 mins) and then the session has the users Ip address assigned to it and an expirey, then to check you simply... if ($_SESSION['expires'] < time()){ die("Your session has expired after 15 minutes of inactivity");} if ($_SESSION['remoteip'] != $_SERVER['REMOTE_ADDR']){ die ('This session is not valid for you");} The only problem lies with people on AOL or those that use proxy's because their IP address can cgange from minute to minute. With the expirey, make sure you update the expirey on every page after you've checked it to keep it 15 minutes in the future. Any more help get in touch. Bix. "Monty" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > both the cookie and URL based session passed over without SSL is insecure. > > i'd love to know who told you otherwise. > > I can't remember the exact sites now, but, the issue was about how much > easier it is to spoof Sessions when IDs are passed via the URL as opposed to > being stored in a cookie. > > > perhaps now is the time to re-think all this stuff, decide if you are going > > to support everyone (which i would for any paying client with a wide target > > market), or skip over those who don't meet your definition of a web visitor. > > After your indepth response, I've re-thought my re-thinking and have gone > back to wanting to support all users whether or not they have cookies turned > on. And, miraculously, I've already got it working, so, thanks for your > detailed reply. > > But going back to the first point, if I'm passing Session IDs via the URL, > shouldn't I be doing something more to make the site a little more secure? I > don't store sensitive data in sessions vars, but, if it allows a non-paying > member to hijack a paying member's session, then this is going to be a > problem. But I'm not sure what more I can do to make the session a little > more secure and less likely that someone will hijack it. SSL is a little > overkill for this, as this isn't a bank or financial institution, it's just > a little community website. > > The log-in for the site is fairly simple: After verifying the username and > password against what's stored in the DB, it sets up a few session vars with > that member's access level and a few other preferences. This is so I don't > have to continually query the DB for this info on every page. > > Is there anything more I can do to make it harder to spoof sessions? > > > just to throw another spanner into it all, what happens if I have JS off? > > will I still be able to access the content of the pop-ups? i bet not :) > > Well, I have to draw the line somewhere. Javascript is used throughout this > site for simple things like resizable popups. I'm not willing to dumb it > down that much. > > Thanks! > > Monty > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Visual Studio .Net PHP Registry Hack
Hello, I while back somebody on this list posted me a link to a registry update which enabled syntax highlighting of PHP file in Visual Studio .Net. Due to some tragid data loss, I am now back with a unpatched Visual Studio .Net and I can't find the mentioned registry hack on google. If anybody knows what I am talking about it would be great if he or she could post the link again! Thanx in advance Ulrik
Re: [PHP] Web Server Firewall Suggested
How comfortable are you with IPTables? I'm running several web, email, etc services behind a very detailed iptables firewall. Granted for me though, the firewall is it's own server protecting a private net. I wouldn't do it any other way, well except something similar using freebsd and ipfilter. Personally, I don't trust those boxed firewalls, iptables is so configurable especially into options where boxed firewalls don't protect, like source routed packets and other routing trickery. Plus, I've yet to see one that can offer the nat'ing options to the excess that I use, or prerouting tables, for that matter. -- Jason k Larson Luis Lebron wrote: I know there is a lot of expertise on running web servers in this group. So, I'm going to ask a couple of questions. I am currently a public web server with an iptables firewall. A security consultant has suggested that we buy a separate firewall for the firewall instead of running iptables. He recommended a Symantec VelociRaptor or one of their firewall appliances. Does this sound like good advice? Are there any other models we sould look at? thanks, Luis R. Lebron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: REDIRECT
PUT THE CODE BELOW INTO < HEAD > TAG OF ANY PAGE TO REDIRECT IT:-
RE: [PHP] Re: REDIRECT
Should have been: http://www.eastlothian.org/03eloG.html not .php page which was the page it redirected to. Just have a look at source code of above page as this list message has removed a tag. Chris --- Quoting myphp <[EMAIL PROTECTED]>: > PUT THE CODE BELOW INTO < HEAD > TAG OF ANY PAGE TO > REDIRECT IT:- > >
Re: [PHP] Capturing HTTP Response
This is all dependent on how you are performing the transaction. Are you using raw sockets to connect or perhaps cURL? The answer lies in that when whatever is making the connection and reading the data returned, the headers will be sent there. -- Jason k Larson Ralph wrote: Hi, I'm currently setting up a form for CC processing. At the moment I am able to send the required flags to authorize the CC transaction, but then I do not know how I go about parsing the returned headers. After processing the transaction the merchant returns either HTTP 200 (ok) along with values or HTTP 400(ERRROR) with a string indicating reason for error. So how would I go about parsing these in my script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Helpdesk
Hi there Anyone have a PHP Helpdesk that they'd recommend. We are using Perldesk at the moment, so want something as good, but preferably better :) Thanks Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gracefully dealing with Cookies OFF
On Sat, 7 Jun 2003, Bix wrote: > Monty, > > The best way to avoid SID "Hijacks" is to assign an IP variable, and an > expiration > > session_register("USERIP"); > $_SESSION['USERIP'] = $_SERVER['REMOTE_ADDR']; > session_register("EXPIRES"); > $_SESSION['expires'] = time() + 900; // 900 seconds (15 mins) [snip] I've not followed this thread (nor do I want to get involved with his touchy and difficult topic) but must make a general comment on the above code. One should never mix use of the deprecated session_register() function with $_SESSION. If you're going to use $_SESSION, also use it to assign session variables. There is NO need for use of session_register() in the above code. >From the manual (various versions of this text is also in the manual): "If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use session_register(), session_is_registered(), and session_unregister()." And btw, EXPIRES != expires. And lastly, there is now session_regenerate_id() although it won't set session cookies until PHP 4.3.3. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] selecting count and then dumping to an array
Hi, Is there any way to get a COUNT of records (SELECT count(*) FROM main_my where type=$t) for 5 types using hopefully one select statement and then dumping that into an array? The reason I am asking is running 5 selects on the DB at once is not a very good idea...right? Thanks, -Ryan http://MrSahaf.com - The Iraqi (Dis)information ministers site ("We will slaughter you all!") -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems whit mysql_fetch_row
People, I have two blocks for phpnuke 6.5. These blocks show registers inside one marquee, of the left for the right. The first block is functioning normally. However, if I make some alterations in it, so that it pass to show registers of another table, it does not function and presents the error described after thise codes (in the end of this message). I consulted several experts in PHP and them they had not known to say which is the problem. Now I am submitting the problem to you! This is the code that functions funny: $usemarquee = 1; $scrolldirection = "left"; global $prefix, $multilingual, $currentlang, $dbi; if ($multilingual == 1) { $querylang = "WHERE (alanguage='$currentlang' OR alanguage='')"; } else { $querylang = ""; } $content = ""; $content .= ""; (Line 40) $result = sql_query("select sid, title, comments, counter from ".$prefix."_stories $querylang order by sid ASC limit 0,100", $dbi); (Line 41) while(list($sid, $title, $comtotal, $counter) = mysql_fetch_row($result, $dbi)) { $content .= " $title "; } $content .= ""; ?> + This is the code that does not function (see that I made very little alterations): $usemarquee = 1; $scrolldirection = "left"; global $prefix, $multilingual, $currentlang, $dbi; $sql = "DELETE FROM ".$prefix."_anuncios WHERE datafim"; $content .=" Últimos 10 Concursos"; $content .= ""; (Linha 40) $result = sql_query("SELECT categoria, nombre FROM ".$prefix."_anuncios ORDER BY RAND() LIMIT 0,30", $dbi); (Linha 41) while (list($categoria, $nombre) = mysql_fetch_row($result, $dbi)) { $content .= " $categoria $nombre "; } $content .= ""; ?> + This is the error message showed: Warning: Wrong parameter count for mysql_fetch_row() in f:\webdoc\html\blocks\block-Concurso.php on line 41 Thanks very much Marcelo --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.488 / Virus Database: 287 - Release Date: 5/6/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] selecting count and then dumping to an array
Try select type, count(*) from table group by type; This should return a count for each distinct type value. Regards Peter Goggin - Original Message - From: "Ryan A" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, June 08, 2003 12:13 AM Subject: [PHP] selecting count and then dumping to an array > Hi, > > Is there any way to get a COUNT of records (SELECT count(*) FROM main_my > where type=$t) for 5 types using hopefully one select statement and then > dumping that into an array? > > The reason I am asking is running 5 selects on the DB at once is not a very > good idea...right? > > Thanks, > -Ryan > > http://MrSahaf.com - The Iraqi (Dis)information ministers site ("We will > slaughter you all!") > > > -- > 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] GNU Distance Calculation - for the world in php
I have a way of getting the distances from one zip code to the next in the US, but I need to be able to do that for other countries as well. I've found a web site on the net that sells a database of all postal codes and their longitude and latitudes but they want a $1000 which I am not willing to pay, especially since I got all the US zips for free. Anyone know where I can get a database with all the postal codes and so forth or perhaps a couple different ones and hopefully the code in php to calculate the distances. I need to be able to at least do major countries in the world from one place in that country to the next. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Web Server Firewall Suggested
I am very big on Internet security and anyone running a web server should know IPChains and IPTables. If you don't get a couple of books and learn. Once you understand how things work you we will be much better equipped to handle any security issues that may come up. Having said that you don't really need to know these items (but again anyone running a web server that does not, IMHO, is crazy) when using Bastille-Linux (http://www.bastille-linux.org/). This is lock down yor box very well and create the scripts needed to protect your system. Be careful though and read all prompts carefully as it can lock the box down so tight it won't let you in. ;) V -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to determine if output buffering is on?
O.K. so how can I determine if output buffering has been started??? Thanks! Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] selecting count and then dumping to an array
Thanks guys, will give it a shot and write back if i have any problems. Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 7 Jun 2003 14:53:06 -0000 Issue 2103
php-general Digest 7 Jun 2003 14:53:06 - Issue 2103 Topics (messages 150560 through 150582): Scalable Vector Graphics 150560 by: Bob Strasser 150561 by: Hugh Bothwell REDIRECT 150562 by: Dale 150563 by: Bobby Patel 150567 by: Boaz Yahav 150571 by: myphp 150572 by: myphp Page loading time 150564 by: Adrian Teasdale 150566 by: Boaz Yahav Re:[PHP] Re: REDIRECT 150565 by: fongming Re: Gracefully dealing with Cookies OFF 150568 by: Bix 150575 by: Philip Olson Visual Studio .Net PHP Registry Hack 150569 by: Ulrik Re: Web Server Firewall Suggested 150570 by: Jason k Larson 150580 by: Vernon Re: Capturing HTTP Response 150573 by: Jason k Larson PHP Helpdesk 150574 by: Adrian Teasdale selecting count and then dumping to an array 150576 by: Ryan A 150578 by: Peter Goggin 150582 by: Ryan A Problems whit mysql_fetch_row 150577 by: Marcelo Luiz de Laia GNU Distance Calculation - for the world in php 150579 by: Vernon How to determine if output buffering is on? 150581 by: Shawn McKenzie 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] -- --- Begin Message --- I'm building a database visualization tool using SVG. Is it possibe to send information from a form on one html page to another html page with a SVG graphic enbedded in the page and have the php generated SVG graphic receive the post information. I have been able to do it when the receiving page is php generated and only the SVG graphic being displayed in the viewer but this is very limiting as I want to make a complete HTML page with other information on the page. Any information would be greatly appreciated as I have spent about 2 weeks experimenting with no luck. Thanks in advance Bob Strasser --- End Message --- --- Begin Message --- "Bob Strasser" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm building a database visualization tool using SVG. Is it possibe to send > information from a form on one html page to another html page with a SVG > graphic enbedded in the page and have the php generated SVG graphic receive > the post information. Not directly... If there is only a small amount of info to be passed, you could embed it as a url parameter to the image- generating script. If there is too much for that, I would have the form submit to a page which stuffs the needed information into session variables, then redirects to the page with the graphics. This page then passes the session-id to the script that generates the graphics. -- Hugh Bothwell [EMAIL PROTECTED] Kingston ON Canada v3.1 GCS/E/AT d- s+: a- C+++ L++>+++$ P+ E- W+++$ N++ K? w++ M PS+ PE++ Y+ PGP+ t-- 5++ !X R+ tv b DI+++ D-(++) G+ e(++) h-- r- y+ --- End Message --- --- Begin Message --- Does anybody know of a way to redirect to another page once you have already outputted html to the screen. In other words, I want to output some text to the screen for 10 secs and then re-direct to another page. Thanks, Dale --- End Message --- --- Begin Message --- not with php directly, but you can do that with HTML meta tags, check google for "Meta refresh" "Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anybody know of a way to redirect to another page once you have already > outputted html to the screen. In other words, I want to output some text to > the screen for 10 secs and then re-direct to another page. > > Thanks, > Dale > > --- End Message --- --- Begin Message --- To save you the search : How to use META REFRESH to auto refresh an html page after x seconds. http://examples.weberdev.com/get_example.php3?count=124 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Bobby Patel [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 9:35 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: REDIRECT not with php directly, but you can do that with HTML meta tags, check google for "Meta refresh" "Dale" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Does anybody know of a way to redirect to another page once you have already > outputted html to the screen. In other words, I want to output some > text to > the screen for 10 secs and then re-direct to another page. > > Thanks, > Dale > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- End Message --- --- Begin Message --- PUT THE CODE BELOW INTO < HEAD > TAG OF ANY PAGE TO REDIRECT IT:- setTimeout("location.href='http://www.your-page.com/index.php'", 200);
[PHP] Re: [PHP-DB] Possible to store arrays in mySQL without explode()/implode()
- Original Message - From: "Jakob Mund" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 9:04 AM Subject: [PHP-DB] Possible to store arrays in mySQL without explode()/implode() > is it possible to store an array in mySQL without using implode() / > explode(), like this: Serialize the array to make it a string and store that. Unserialize() to make it an array again. The column type you choose depends in the length of the values you might choose to put in the array. Serialize the array to a var and check it's length with strlen to get some ideas of what type you might need. http://www.php.net/serialize http://www.php.net/unserialize -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] selecting count and then dumping to an array
building on the only reply that I saw try this also. Say you had 12 different TYPE's that are in your table, and you only wanted 5 of them. Then you will want something like what follows. SELECT type, count(*) FROM table WHERE type='$1' OR type='$2' OR \ type='$3' OR type='$4' OR type='$5' GROUP BY type; another way you can write this is like the following, but it won't take advantage of indices SELECT type, count(*) FROM table WHERE type IN ('$1', '$2', '$3', '$4', '$5') GROUP BY type; Jim Lucas - Original Message - From: "Ryan A" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 8:53 AM Subject: Re: [PHP] selecting count and then dumping to an array > Thanks guys, > will give it a shot and write back if i have any problems. > Cheers, > -Ryan > > -- > 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] How to determine if output buffering is on?
output some html and then try and do an header() redirect. if it works, then some sort of buffering is turned on. if it fails and tells you that output has already been sent to the browser, then it isn't turned on. Jim Lucas - Original Message - From: "Shawn McKenzie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 7:39 AM Subject: [PHP] How to determine if output buffering is on? > O.K. so how can I determine if output buffering has been started??? > > Thanks! > Shawn > > > > -- > 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] How to determine if output buffering is on?
Yay, a hack! The correct answer is ob_get_level(). Jim Lucas wrote: output some html and then try and do an header() redirect. if it works, then some sort of buffering is turned on. if it fails and tells you that output has already been sent to the browser, then it isn't turned on. Jim Lucas - Original Message - From: "Shawn McKenzie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 7:39 AM Subject: [PHP] How to determine if output buffering is on? O.K. so how can I determine if output buffering has been started??? Thanks! Shawn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PATH_TRANSLATED
Is there some way to retrieve the phpvariable PATH_TRANSLATED on my local win2k+Apache2+php4.3.2 box? Using phpinfo() does not show PATH_TRANSLATED -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PATH_TRANSLATED
- Original Message - From: "Øystein Håland" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 11:37 AM Subject: [PHP] PATH_TRANSLATED > Is there some way to retrieve the phpvariable PATH_TRANSLATED on my local > win2k+Apache2+php4.3.2 box? echo "Path Translated: {$_SERVER['PATH_TRANSLATED']}"; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PATH_TRANSLATED
That gives the following error: Notice: Undefined index: PATH_TRANSLATED and the reason is the variable isn't set by Apache/PHP "Matt" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > > - Original Message - > From: "Øystein Håland" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, June 07, 2003 11:37 AM > Subject: [PHP] PATH_TRANSLATED > > > > Is there some way to retrieve the phpvariable PATH_TRANSLATED on my local > > win2k+Apache2+php4.3.2 box? > > echo "Path Translated: {$_SERVER['PATH_TRANSLATED']}"; > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: PGP?
Look up gpgext on http://freshmeat.net/projects/gpgext/?topic_id=44%2C809 Its a php extension that enable you to manage keys, encrypt, decrypt with gpg and php. Yann Larrivee www.phpquebec.org On Fri, 2003-06-06 at 18:44, Ryan Vennell wrote: > chances are, if it's possible it'd be a plugin or script on the PGP homepage. try > there. or maybe try http://php.resourceindex.com/ they may have something of use > to you > > -Ryan > > > > > >>> Ben Cheng<[EMAIL PROTECTED]> 06/06/03 08:54AM >>> > Any way in PHP to grab form info and then encrypt it with PGP before > sending it out as an email? > > -Ben > > > > > -- > 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] Gracefully dealing with Cookies OFF
On Saturday 07 June 2003 17:12, Bix wrote: > The best way to avoid SID "Hijacks" is to assign an IP variable, and an > expiration Never rely on an IP address to be unique to a particular browser/user. For reasons why search archives. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I'm pretending that we're all watching PHIL SILVERS instead of RICARDO MONTALBAN! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Server Firewall Suggested
On Saturday 07 June 2003 05:42, Luis Lebron wrote: > I know there is a lot of expertise on running web servers in this group. > So, I'm going to ask a couple of questions. > > I am currently a public web server with an iptables firewall. A security > consultant has suggested that we buy a separate firewall for the firewall > instead of running iptables. If you know what you're doing then an iptables based firewall is as secure as any paid-for product. > He recommended a Symantec VelociRaptor or one > of their firewall appliances. Did he give reasons why? > Does this sound like good advice? Are there any other models we sould look > at? Any consultant worth their fees should give a summary of what's available and pros and cons of each and why they have come to the recommendation that they have _based on your needs_. If you're still looking for a non-commercial solution then do a quick search on freshmeat.net and sourceforge.net. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* If any man wishes to be humbled and mortified, let him become president of Harvard. -- Edward Holyoke */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] please help, simple problem (i think)
Hi, Feeling a little braindead, please help. The below program as you can see is extremly simple, it connects to the database and runs a select (COUNT) query, this query will return 5 rows...so far so good, everything is working but I have no idea how to assign each of the rows to a variable so I can use it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3]; heres the code: Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IE Pagelength issue
I am running into a strange problem. I have a script that parses a database for results. It cycles through the data one record at a time looking for matches to the query. Up til now I haven't had any problems as the results have been limited in length. Now I have one that has a significant length and the bottom is cut off on IE6. I haven't tried any earlier versions of IE but Mozilla loads the entire page without this problem. Has anyone run across this? Is there a way around it? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Page loading time
> What is the easiest way to find out how long a page takes to load? > Is there a PHP script that can do this? There is no way to do this by just PHP script IMHO, but I can imagine something like this one. Very suck, but The idea is using PHP in order to write timestamp of the moment when script starts and put it in JavaScript code which will be onloaded. Script will calculate a difference and send it back to server. This doesn't solve a situation when user and server are in different timezones, this is point to improve. And also, I'm interesting in ways of passing values on server without page reloading. Currently I've done a trick with image's src, but it's a silly way. Maybe someone knows a better one? Please send me an idea (if off-topic, e-mails will be appreciated). Here is a code: CODE BEGIN= This is a long page ===CODE END== Well, a loading time will be sent to log.php Hope this helps. -- Best regards, Martchukov Anton aka vhmailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] please help, simple problem (i think)
Hi, Basically I am offering some packages and I want to say: These are the following packages with your account: package1 (-$row1-) package2 (-$row2-) package3 (-$row3-) package4 (-$row4-) package5 (-$row5-) how to do it? Thanks, -Ryan > Maybe you should tell us what you really want to do? > Usually you don't just assign a row value to a variable. > > Sincerely > > berber > > Visit http://www.weberdev.com/ Today!!! > To see where PHP might take you tomorrow. > > > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 8:54 PM > To: [EMAIL PROTECTED] > Subject: [PHP] please help, simple problem (i think) > > > Hi, > Feeling a little braindead, please help. > The below program as you can see is extremly simple, > it connects to the database and runs a select (COUNT) query, this query > will return 5 rows...so far so good, everything is working but I have no > idea how to assign each of the rows to a variable so I can use it... > something like: $one=$row[1]; $two=$row[2]; $thr=$row[3]; > > heres the code: > > require "configbwh.php"; > > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I > cannot connect to the database because: ' . mysql_error()); > mysql_select_db ("$db"); > > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', '3', > '4','5') GROUP BY ptype"; > > if($res= mysql_query($tt)) > { > while($row = mysql_fetch_row($res)) > { > print($row[1]); > } > } > ?> > > Cheers, > -Ryan > > > -- > 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] please help, simple problem (i think)
I guess you mean something like : PackageName "; } ?> Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 9:06 PM To: Boaz Yahav Cc: [EMAIL PROTECTED] Subject: Re: [PHP] please help, simple problem (i think) Hi, Basically I am offering some packages and I want to say: These are the following packages with your account: package1 (-$row1-) package2 (-$row2-) package3 (-$row3-) package4 (-$row4-) package5 (-$row5-) how to do it? Thanks, -Ryan > Maybe you should tell us what you really want to do? > Usually you don't just assign a row value to a variable. > > Sincerely > > berber > > Visit http://www.weberdev.com/ Today!!! > To see where PHP might take you tomorrow. > > > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 8:54 PM > To: [EMAIL PROTECTED] > Subject: [PHP] please help, simple problem (i think) > > > Hi, > Feeling a little braindead, please help. > The below program as you can see is extremly simple, > it connects to the database and runs a select (COUNT) query, this > query will return 5 rows...so far so good, everything is working but I > have no idea how to assign each of the rows to a variable so I can use > it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3]; > > heres the code: > > require "configbwh.php"; > > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I > cannot connect to the database because: ' . mysql_error()); > mysql_select_db ("$db"); > > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', > '3', > '4','5') GROUP BY ptype"; > > if($res= mysql_query($tt)) > { > while($row = mysql_fetch_row($res)) > { > print($row[1]); > } > } > ?> > > Cheers, > -Ryan > > > -- > 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] please help, simple problem (i think)
Hi, I dont have packageName therejust id,type Plus i need to do this in 2 placesso if i could assign each counts result to a variable...it would be reay easy. Cheers, -Ryan - Original Message - From: "Boaz Yahav" <[EMAIL PROTECTED]> To: "Ryan A" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 8:11 PM Subject: RE: [PHP] please help, simple problem (i think) > I guess you mean something like : > > $result=mysql_query("Select PackageName FROM Packages ORDER BY > PackageName") or die(mysql_error()); > While($row = mysql_fetch_object($result)) { > Echo"$row->PackageName "; > } > ?> > > > Sincerely > > berber > > Visit http://www.weberdev.com/ Today!!! > To see where PHP might take you tomorrow. > > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 9:06 PM > To: Boaz Yahav > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] please help, simple problem (i think) > > > Hi, > Basically I am offering some packages and I want to say: > > > These are the following packages with your account: > package1 (-$row1-) > package2 (-$row2-) > package3 (-$row3-) > package4 (-$row4-) > package5 (-$row5-) > > > how to do it? > > Thanks, > -Ryan > > > > Maybe you should tell us what you really want to do? > > Usually you don't just assign a row value to a variable. > > > > Sincerely > > > > berber > > > > Visit http://www.weberdev.com/ Today!!! > > To see where PHP might take you tomorrow. > > > > > > -Original Message- > > From: Ryan A [mailto:[EMAIL PROTECTED] > > Sent: Saturday, June 07, 2003 8:54 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] please help, simple problem (i think) > > > > > > Hi, > > Feeling a little braindead, please help. > > The below program as you can see is extremly simple, > > it connects to the database and runs a select (COUNT) query, this > > query will return 5 rows...so far so good, everything is working but I > > > have no idea how to assign each of the rows to a variable so I can use > > > it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3]; > > > > heres the code: > > > > > require "configbwh.php"; > > > > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I > > cannot connect to the database because: ' . mysql_error()); > > mysql_select_db ("$db"); > > > > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', > > '3', > > '4','5') GROUP BY ptype"; > > > > if($res= mysql_query($tt)) > > { > > while($row = mysql_fetch_row($res)) > > { > > print($row[1]); > > } > > } > > ?> > > > > Cheers, > > -Ryan > > > > > > -- > > 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
Re: [PHP] PATH_TRANSLATED
This is likely due to Win32 not being required to do any virtual to real mapping. This itself isn't PHP's fault, as the variable itself is set by Apache. Jason Reid [EMAIL PROTECTED] -- Exumweb Network www.exumweb.net - Original Message - From: "Øystein Håland" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 10:32 AM Subject: Re: [PHP] PATH_TRANSLATED > That gives the following error: Notice: Undefined index: PATH_TRANSLATED > and the reason is the variable isn't set by Apache/PHP > > "Matt" <[EMAIL PROTECTED]> skrev i meddelandet > news:[EMAIL PROTECTED] > > > > - Original Message - > > From: "Øystein Håland" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Saturday, June 07, 2003 11:37 AM > > Subject: [PHP] PATH_TRANSLATED > > > > > > > Is there some way to retrieve the phpvariable PATH_TRANSLATED on my > local > > > win2k+Apache2+php4.3.2 box? > > > > echo "Path Translated: {$_SERVER['PATH_TRANSLATED']}"; > > > > > > > > -- > 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] please help, simple problem (i think)
This was just an example :) You can do : id : $row->type "; } ?> You can reuse $result if you need to or you can just assign it all to a variable and dump it multiple times down the page... up to you Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Ryan A [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 9:13 PM To: Boaz Yahav Cc: [EMAIL PROTECTED] Subject: Re: [PHP] please help, simple problem (i think) Hi, I dont have packageName therejust id,type Plus i need to do this in 2 placesso if i could assign each counts result to a variable...it would be reay easy. Cheers, -Ryan - Original Message - From: "Boaz Yahav" <[EMAIL PROTECTED]> To: "Ryan A" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 8:11 PM Subject: RE: [PHP] please help, simple problem (i think) > I guess you mean something like : > > $result=mysql_query("Select PackageName FROM Packages ORDER BY > PackageName") or die(mysql_error()); > While($row = mysql_fetch_object($result)) { Echo"$row->PackageName > "; } > ?> > > > Sincerely > > berber > > Visit http://www.weberdev.com/ Today!!! > To see where PHP might take you tomorrow. > > -Original Message- > From: Ryan A [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 9:06 PM > To: Boaz Yahav > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] please help, simple problem (i think) > > > Hi, > Basically I am offering some packages and I want to say: > > > These are the following packages with your account: > package1 (-$row1-) > package2 (-$row2-) > package3 (-$row3-) > package4 (-$row4-) > package5 (-$row5-) > > > how to do it? > > Thanks, > -Ryan > > > > Maybe you should tell us what you really want to do? Usually you > > don't just assign a row value to a variable. > > > > Sincerely > > > > berber > > > > Visit http://www.weberdev.com/ Today!!! > > To see where PHP might take you tomorrow. > > > > > > -Original Message- > > From: Ryan A [mailto:[EMAIL PROTECTED] > > Sent: Saturday, June 07, 2003 8:54 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] please help, simple problem (i think) > > > > > > Hi, > > Feeling a little braindead, please help. > > The below program as you can see is extremly simple, > > it connects to the database and runs a select (COUNT) query, this > > query will return 5 rows...so far so good, everything is working but > > I > > > have no idea how to assign each of the rows to a variable so I can > > use > > > it... something like: $one=$row[1]; $two=$row[2]; $thr=$row[3]; > > > > heres the code: > > > > > require "configbwh.php"; > > > > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I > > cannot connect to the database because: ' . mysql_error()); > > mysql_select_db ("$db"); > > > > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', > > '3', > > '4','5') GROUP BY ptype"; > > > > if($res= mysql_query($tt)) > > { > > while($row = mysql_fetch_row($res)) > > { > > print($row[1]); > > } > > } > > ?> > > > > Cheers, > > -Ryan > > > > > > -- > > 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] Downloading PHP
Hello All, I have a problem with downloading new PHP 4.3.2. Whenever I try to download it from whichever mirror I got a HTTP 404 error. Could someone tell why? Thanks Milan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sessions problem
Hi, Heres the code (very simple stuff) but not working: if(session_is_registered('my_email')){} else{ do_session_crap(); } function do_session_crap() { if(isset($id[0])) {$p1=$id[0]; echo $p1; $_SESSION['p1'] = $p1; } if(isset($id[1])) {$p2=$id[1]; echo $p2; $_SESSION['p2'] = $p2; } if(isset($id[2])) {$p3=$id[2]; $_SESSION['p3'] = $p3; } if(isset($id[3])) {$p4=$id[3]; $_SESSION['p4'] = $p4; } if(isset($id[4])) {$p5=$id[4]; $_SESSION['p5'] = $p5; } else {echo "not working";} // header("Location: my.login.php"); exit; } it always gives me "not working" Any idea why? -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE:Sessions problem
Hi all, Please disregard the last mail. Cheers, -ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE Pagelength issue
Just as an additional note: the page has one continuous table so another potential problem would be a limit to the length of a table? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: Larry Brown [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 1:55 PM To: PHP List Subject: [PHP] IE Pagelength issue I am running into a strange problem. I have a script that parses a database for results. It cycles through the data one record at a time looking for matches to the query. Up til now I haven't had any problems as the results have been limited in length. Now I have one that has a significant length and the bottom is cut off on IE6. I haven't tried any earlier versions of IE but Mozilla loads the entire page without this problem. Has anyone run across this? Is there a way around it? Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -- 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: PATH_TRANSLATED
Are you sure it doesn't work? I thought it didn't at first, that variable doesn't exist unless you call the script with a index.php/dir/file.txt if you get what I mean... This was my case, pretty long ago so maybe things have changed... "ØYstein HåLand" <[EMAIL PROTECTED]> skrev i meddelandet news:[EMAIL PROTECTED] > Is there some way to retrieve the phpvariable PATH_TRANSLATED on my local > win2k+Apache2+php4.3.2 box? > Using phpinfo() does not show PATH_TRANSLATED > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dtd validation?
Is there anyway to do dtd validation of an xml file? I realize the expat implementation doesn't inherently support it. Is there anything that I could use from php to validate against the dtd? Josh -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mail() problem affecting output to browser on completion
Alright with the following code I am using is printing/echoing to the browser a "1" before the html output. It's like it's adding 2 variables together. Here is what I am trying to do. I have a form that enters information to a text file, and at the same time sends the information to a predetermined email address. This email example is one that I made up on my server, but will work for this example. I need it to stop printing the number "1" before the rest of the page's output. $address = "[EMAIL PROTECTED]"; $subject = "Your Feedback Page has been submitted\n"; $body = "The following is the information that was entered.\r\n"; $body .= "Message Type: $messageType\r\n"; $body .= "Subject: $subjectbody\r\n"; $body .= "Other Subject: $otherSubject\r\n"; $body .= "Comments: $comments\r\n"; $body .= "User Name: $username\r\n"; $body .= "Email Address: $email\r\n"; $body .= "Telephone Number: $telephone\r\n"; $body .= "Fax Number: $fax\r\n"; $body .= "Contact Option: $contact\r\n"; $moreheaders = "From: [EMAIL PROTECTED]: text/html\n"; $send = mail($address, $subject, $body, $moreheaders); echo $send; I noticed that the 1 is being entered in right as I call the Print command or in this case "echo" (I have tried using 'print $send' aswell). Knowing this doesn't solve my issue as all the echo/print command does in general is to start referencing my variables from earlier within the same script. Also if you need the whole script I can send that aswell. The part right here is what's bugging me,because if I take this out of the script, it works fine, just doesn't send an email but it still writes to the text fine and then displays without the 1, the problem is somewhere in this script section. I'm assuming, hehe Any help would be much appreciated. Thanks in advance -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mod_rewrite rules for the php.net rewritten urls
I was wondering where I could get the rewrite urls for the rewriting of urls like here on php.net. - Tularis P.S. I don't think they're in the phpweb on CVS, I checked that already -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to determine if output buffering is on?
it isn't a hack. that is a good way to tell. :) all depends on if he plans to continually use this check in his script or if he is just going to just test for it durning development. Jim Lucas - Original Message - From: "Leif K-Brooks" <[EMAIL PROTECTED]> To: "Jim Lucas" <[EMAIL PROTECTED]> Cc: "Shawn McKenzie" <[EMAIL PROTECTED]>; "php-general" <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 8:29 AM Subject: Re: [PHP] How to determine if output buffering is on? > Yay, a hack! The correct answer is ob_get_level(). > > Jim Lucas wrote: > > >output some html and then try and do an header() redirect. > > > >if it works, then some sort of buffering is turned on. > > > >if it fails and tells you that output has already been sent to the browser, > >then it isn't turned on. > > > >Jim Lucas > >- Original Message - > >From: "Shawn McKenzie" <[EMAIL PROTECTED]> > >To: <[EMAIL PROTECTED]> > >Sent: Saturday, June 07, 2003 7:39 AM > >Subject: [PHP] How to determine if output buffering is on? > > > > > > > > > >>O.K. so how can I determine if output buffering has been started??? > >> > >>Thanks! > >>Shawn > >> > >> > >> > >>-- > >>PHP General Mailing List (http://www.php.net/) > >>To unsubscribe, visit: http://www.php.net/unsub.php > >> > >> > >> > >> > > > > > > > > > > -- > The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. > > > > -- > 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] mail() problem affecting output to browser on completion
> Alright with the following code I am using is printing/echoing to the > browser a "1" before the html output. It's like it's adding 2 variables > together. > > Here is what I am trying to do. I have a form that enters information to a > text file, and at the same time sends the information to a predetermined > email address. This email example is one that I made up on my server, but > will work for this example. I need it to stop printing the number "1" > before > the rest of the page's output. > > $address = "[EMAIL PROTECTED]"; > $subject = "Your Feedback Page has been submitted\n"; > $body = "The following is the information that was entered.\r\n"; > $body .= "Message Type: $messageType\r\n"; > $body .= "Subject: $subjectbody\r\n"; > $body .= "Other Subject: $otherSubject\r\n"; > $body .= "Comments: $comments\r\n"; > $body .= "User Name: $username\r\n"; > $body .= "Email Address: $email\r\n"; > $body .= "Telephone Number: $telephone\r\n"; > $body .= "Fax Number: $fax\r\n"; > $body .= "Contact Option: $contact\r\n"; > $moreheaders = "From: > [EMAIL PROTECTED]: text/html\n"; > $send = mail($address, $subject, $body, $moreheaders); > echo $send; Why are you echoing $send? If mail() succeeds, it returns 1 (TRUE), which is assigned to $send, which you then print. The script is doing exactly what you tell it to do. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE Pagelength issue
> I am running into a strange problem. I have a script that parses a > database > for results. It cycles through the data one record at a time looking for > matches to the query. Up til now I haven't had any problems as the > results > have been limited in length. Now I have one that has a significant length > and the bottom is cut off on IE6. I haven't tried any earlier versions of > IE but Mozilla loads the entire page without this problem. Has anyone run > across this? Is there a way around it? > Just as an additional note: the page has one continuous table so another > potential problem would be a limit to the length of a table? Probably and IE "feature" of only being able to handle a certain table size. The "way around" it would be to end the table and start another every so many rows... or split your rows up into Prev/Next pages... Did I read correctly that you're selecting an entire database and then using PHP to match criteria? Are you using a WHERE clause to do the sorting? Sounds like you may be going about this the wrong way... if not, carry on. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] please help, simple problem (i think)
> Feeling a little braindead, please help. You post here more than I do. > The below program as you can see is extremly simple, > it connects to the database and runs a select (COUNT) query, this query > will > return 5 rows...so far so good, everything is working but I have no idea > how > to assign each of the rows to a variable so I can use it... > something like: > $one=$row[1]; > $two=$row[2]; > $thr=$row[3]; > > heres the code: > > require "configbwh.php"; > > $connected=mysql_connect ("$hostt", "$userr", "$passs") or die ('I cannot > connect to the database because: ' . mysql_error()); > mysql_select_db ("$db"); > > $tt = "SELECT ptype, count(*) FROM mylist WHERE ptype IN ('1', '2', '3', > '4','5') GROUP BY ptype"; > > if($res= mysql_query($tt)) > { > while($row = mysql_fetch_row($res)) > { > print($row[1]); $var[$row[0]] = $row[1]; Now $var is an array such as $var[type 1] = count 1 $var[type 2] = count 2 To cycle through and display it: foreach($var as $key => $value) { echo "$key : $value"; } ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE Pagelength issue
Example is a page that displays the concerts and bands at each concert for a given spectator. Table one gives information on the spectator and has a field that lists the concert events he/she has been to. Table two lists concerts along with location information and date along with bands and then another table that lists band information. There are several loops, the first one is "while $spectator..." and within it a "while $concert..." and within it a "while $band..." So the resulting page can have user information then a list with concert bands, concert bands, concert bands, for each he/she has been to. The one we are having a problem with has 27 concerts and IE stops at 25 and Mozilla goes all the way to the 27th. I will try and split each concert into its own table. Just as a not each concert listed gives the option to edit the concert information and a way to edit the band information in addition to removing any one of them. So there are various buttons throughout. Larry S. Brown Dimension Networks, Inc. (727) 723-8388 -Original Message- From: John W. Holmes [mailto:[EMAIL PROTECTED] Sent: Saturday, June 07, 2003 6:08 PM To: 'Larry Brown'; 'PHP List' Subject: RE: [PHP] IE Pagelength issue > I am running into a strange problem. I have a script that parses a > database > for results. It cycles through the data one record at a time looking for > matches to the query. Up til now I haven't had any problems as the > results > have been limited in length. Now I have one that has a significant length > and the bottom is cut off on IE6. I haven't tried any earlier versions of > IE but Mozilla loads the entire page without this problem. Has anyone run > across this? Is there a way around it? > Just as an additional note: the page has one continuous table so another > potential problem would be a limit to the length of a table? Probably and IE "feature" of only being able to handle a certain table size. The "way around" it would be to end the table and start another every so many rows... or split your rows up into Prev/Next pages... Did I read correctly that you're selecting an entire database and then using PHP to match criteria? Are you using a WHERE clause to do the sorting? Sounds like you may be going about this the wrong way... if not, carry on. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.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] mod_rewrite rules for the php.net rewritten urls
On Sat, 7 Jun 2003, Tularis wrote: > I was wondering where I could get the rewrite urls for the rewriting of > urls like here on php.net. > > - Tularis > > P.S. I don't think they're in the phpweb on CVS, I checked that already What you see in phpweb is what you get, there is no mod_rewrite, just a huge 404 handler. For the related sqlite stuff, see the systems cvs module. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Downloading PHP
Try a different mirror. On Sat, 7 Jun 2003 [EMAIL PROTECTED] wrote: > Hello All, > I have a problem with downloading new PHP 4.3.2. Whenever > I try to download it from whichever mirror I got a HTTP 404 error. > Could someone tell why? > > Thanks Milan > > > -- > 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] [Newman] How to pass an image through PHP.
I would like to know where i should be looking to pass an image through PHP Thanks / Phil
[PHP] Re: [Newman] How to pass an image through PHP.
Philip J. Newman wrote: I would like to know where i should be looking to pass an image through PHP Could you elaborate on what you mean by "pass an image through PHP"? I'm not quite sure what you mean. What exactly do you want to do? Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [Newman] How to pass an image through PHP.
> I would like to know where i should be looking to pass an image through > PHP Pass it from where to where? What to you mean by "pass"? ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] IE Pagelength issue
If you "view source" in IE, do you see the entire page? If so, then it's an IE display issue. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ > -Original Message- > From: Larry Brown [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 7:30 PM > To: [EMAIL PROTECTED]; PHP List > Subject: RE: [PHP] IE Pagelength issue > > Example is a page that displays the concerts and bands at each concert for > a > given spectator. Table one gives information on the spectator and has a > field that lists the concert events he/she has been to. Table two lists > concerts along with location information and date along with bands and > then > another table that lists band information. There are several loops, the > first one is "while $spectator..." and within it a "while $concert..." and > within it a "while $band..." So the resulting page can have user > information then a list with concert bands, concert bands, concert bands, > for each he/she has been to. The one we are having a problem with has 27 > concerts and IE stops at 25 and Mozilla goes all the way to the 27th. I > will try and split each concert into its own table. Just as a not each > concert listed gives the option to edit the concert information and a way > to > edit the band information in addition to removing any one of them. So > there > are various buttons throughout. > > Larry S. Brown > Dimension Networks, Inc. > (727) 723-8388 > > -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 07, 2003 6:08 PM > To: 'Larry Brown'; 'PHP List' > Subject: RE: [PHP] IE Pagelength issue > > > I am running into a strange problem. I have a script that parses a > > database > > for results. It cycles through the data one record at a time looking > for > > matches to the query. Up til now I haven't had any problems as the > > results > > have been limited in length. Now I have one that has a significant > length > > and the bottom is cut off on IE6. I haven't tried any earlier > versions of > > IE but Mozilla loads the entire page without this problem. Has anyone > run > > across this? Is there a way around it? > > > Just as an additional note: the page has one continuous table so > another > > potential problem would be a limit to the length of a table? > > Probably and IE "feature" of only being able to handle a certain table > size. > > The "way around" it would be to end the table and start another every so > many rows... or split your rows up into Prev/Next pages... > > Did I read correctly that you're selecting an entire database and then > using PHP to match criteria? Are you using a WHERE clause to do the > sorting? Sounds like you may be going about this the wrong way... if > not, carry on. > > ---John W. Holmes... > > Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.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] file upload script
Hello. I'm attempting to upload a file using the script below and I'm not having any success. The temp directory I'm using does exist and is writeable. When I browse for the file then hit the send button it appears to be working then displays the form again with no errors. I look for the file on the server and it isn't there. Any advice on how to get this working? Thanks! Rod --- Listing 9.14 A file upload script http://corros.colo.hosteurope.com/dev/php24/scrap/uploads";; foreach( $HTTP_POST_FILES as $file_name => $file_array ) { print "path: ".$file_array['tmp_name']."\n"; print "name: ".$file_array['name']."\n"; print "type: ".$file_array['type']."\n"; print "size: ".$file_array['size']."\n"; if ( is_uploaded_file( $file_array['tmp_name'] ) && $file_array['type'] == "image/gif" ) { move_uploaded_file( $file_array['tmp_name'], "$file_dir/$file_name") or die ("Couldn't copy"); print "\n\n"; } } ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sorry, I cannot run apxs
I can't build php-4.3.2 with apache 2.0 under a RedHat 9 box. I've upgraded apache to 2.0.46 by adapting a rpm source packet. The configure section within the spec file looks like this ./configure -C \ --prefix=%{_sysconfdir}/httpd \ --exec-prefix=%{_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir}/httpd/conf \ --includedir=%{_includedir}/httpd \ --libexecdir=%{_libdir}/httpd/modules \ --datadir=%{contentdir} \ --with-mpm=$mpm \ --enable-so \ --enable-suexec --with-suexec \ --enable-suexec --with-suexec \ --with-suexec-caller=%{suexec_caller} \ --with-suexec-docroot=%{contentdir} \ --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \ --with-suexec-bin=%{_sbindir}/suexec \ --with-suexec-uidmin=500 --with-suexec-gidmin=500 Apache is up and running. php compilation fails even when I try just: [EMAIL PROTECTED] php-4.3.2]# ./configure --with-apxs2=/usr/sbin/apxs creating cache ./config.cache checking host system type... i586-pc-linux-gnu checking for gcc... gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... yes checking whether gcc accepts -g... yes checking whether gcc and cc understand -c and -o together... yes checking how to run the C preprocessor... gcc -E checking for AIX... no checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking for ranlib... ranlib checking whether ln -s works... yes checking for gawk... gawk checking for bison... bison -y checking bison version... 1.35 (ok) checking for flex... flex checking for yywrap in -lfl... yes checking lex output file root... lex.yy checking whether yytext is a pointer... yes checking for working const... yes checking flex version... 2.5.4 (ok) checking for pthreads_cflags... -pthread checking for pthreads_lib... Configuring SAPI modules checking for AOLserver support... no checking for Apache 1.x module support via DSO through APXS... no checking for Apache 1.x module support... no checking for member fd in BUFF *... no checking for mod_charset compatibility option... no checking for Apache 2.0 module support via DSO through APXS... no checking for Apache 2.0 handler-module support via DSO through APXS... Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed) The output of /usr/sbin/apxs follows: Usage: apxs -g [-S =] -n apxs -q [-S =] ... apxs -c [-S =] [-o ] [-D [=]] [-I ] [-L ] [-l ] [-Wc,] [-Wl,] [-p] ... apxs -i [-S =] [-a] [-A] [-n ] ... apxs -e [-S =] [-a] [-A] [-n ] ... configure: error: Aborting Well: perl is installed, apxs is where it's supposed to be and apache 2 was built using --enable-so: [EMAIL PROTECTED] php-4.3.2]# httpd -l Compiled in modules: core.c prefork.c http_core.c mod_so.c What can I do? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] use print
Hi all How can I print table in my page without I use print command from file menu? I means just table not all page Can anybody help me? Thanks, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: use print
Mudhar wrote: How can I print table in my page without I use print command from file menu? I means just table not all page I'm not sure I understand ... what do you mean by print? Print to a paper printer or display in the web browser? Can you explain more clearly exactly what it is you want to do? Jean-Christian Imbeault -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sorry, I cannot run apxs
> I can't build php-4.3.2 with apache 2.0 under a RedHat 9 box. Okay, Apache2 has some issues, and Redhat itself always has issues with it's "unique" setups... [snip] > php compilation fails even when I try just: > > [EMAIL PROTECTED] php-4.3.2]# ./configure --with-apxs2=/usr/sbin/apxs Okay [snip] > Configuring SAPI modules > checking for AOLserver support... no > checking for Apache 1.x module support via DSO through APXS... no > checking for Apache 1.x module support... no > checking for member fd in BUFF *... no > checking for mod_charset compatibility option... no > checking for Apache 2.0 module support via DSO through APXS... no > checking for Apache 2.0 handler-module support via DSO through APXS... > > Sorry, I cannot run apxs. Possible reasons follow: [snip] What do these commands output? # /usr/sbin/httpd -v # /usr/sbin/apxs -q SBINDIR # /usr/sbin/apxs -q TARGET Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [Newman] How to pass an image through PHP.
Not sure what you mean, but try passthru(). Philip J. Newman wrote: I would like to know where i should be looking to pass an image through PHP Thanks / Phil -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] use print
> How can I print table in my page without I use print command from file > menu? I means just table not all page Make a "print-friendly" page that just contains your table. Printing is pretty much a client side issue, not a PHP issue. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] fsockopen and SSL
i'm trying to make a POST request to my merchant's https server using the following: foreach($HTTP_POST_VARS as $key => $value){ $value = urlencode(stripslashes($value)); $req .= "&$key=$value"; } $header .= "POST /gw/native/direct2.1 HTTP/1.0\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: ".strlen($req)." \r\n\r\n"; $fp = fsockopen('ssl://secure.netbilling.com', 443, $errno, $errstr, 30); if(!$fp){ echo $errstr($errno); } else { fputs($fp, $header . $req); while(!feof($fp)){ $res = fgets($fp, 1024); } fclose($fp); } but I get following error: Warning: fsockopen() [function.fsockopen]: no SSL support in this build in /usr/home/trivisions/html/sextoymerchant.com/payment/checkout_confirm.ph p on line 64 So does this mean that my PHP installation does not support SSL, and that I have to recompile PHP again? I looked at the PHP installation configure options but did not see anything regarding SSL, so how would I install this? I am running PHP Version 4.3.1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 8 Jun 2003 03:35:03 -0000 Issue 2104
php-general Digest 8 Jun 2003 03:35:03 - Issue 2104 Topics (messages 150583 through 150627): Re: [PHP-DB] Possible to store arrays in mySQL without explode()/implode() 150583 by: Matt Re: selecting count and then dumping to an array 150584 by: Jim Lucas Re: How to determine if output buffering is on? 150585 by: Jim Lucas 150586 by: Leif K-Brooks 150609 by: Jim Lucas PATH_TRANSLATED 150587 by: Øystein Håland 150588 by: Matt 150589 by: Øystein Håland 150599 by: Jason Reid 150605 by: DvDmanDT Re: PGP? 150590 by: Yann Larrivee Re: Gracefully dealing with Cookies OFF 150591 by: Jason Wong Re: Web Server Firewall Suggested 150592 by: Jason Wong please help, simple problem (i think) 150593 by: Ryan A 150596 by: Ryan A 150597 by: Boaz Yahav 150598 by: Ryan A 150600 by: Boaz Yahav 150612 by: John W. Holmes IE Pagelength issue 150594 by: Larry Brown 150604 by: Larry Brown 150611 by: John W. Holmes 150613 by: Larry Brown 150619 by: John W. Holmes Re: Page loading time 150595 by: vh Downloading PHP 150601 by: ReznicekM.gytool.cz 150615 by: Rasmus Lerdorf Sessions problem 150602 by: Ryan A RE:Sessions problem 150603 by: Ryan A dtd validation? 150606 by: Joshua Ruppert mail() problem affecting output to browser on completion 150607 by: PHP4 Emailer 150610 by: John W. Holmes mod_rewrite rules for the php.net rewritten urls 150608 by: Tularis 150614 by: Philip Olson [Newman] How to pass an image through PHP. 150616 by: Philip J. Newman 150617 by: Jean-Christian Imbeault 150618 by: John W. Holmes 150625 by: Leif K-Brooks file upload script 150620 by: Rodney Green Sorry, I cannot run apxs 150621 by: Pentothal 150624 by: Philip Olson use print 150622 by: mudhar 150623 by: Jean-Christian Imbeault 150626 by: John W. Holmes fsockopen and SSL 150627 by: Ralph 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] -- --- Begin Message --- - Original Message - From: "Jakob Mund" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 9:04 AM Subject: [PHP-DB] Possible to store arrays in mySQL without explode()/implode() > is it possible to store an array in mySQL without using implode() / > explode(), like this: Serialize the array to make it a string and store that. Unserialize() to make it an array again. The column type you choose depends in the length of the values you might choose to put in the array. Serialize the array to a var and check it's length with strlen to get some ideas of what type you might need. http://www.php.net/serialize http://www.php.net/unserialize --- End Message --- --- Begin Message --- building on the only reply that I saw try this also. Say you had 12 different TYPE's that are in your table, and you only wanted 5 of them. Then you will want something like what follows. SELECT type, count(*) FROM table WHERE type='$1' OR type='$2' OR \ type='$3' OR type='$4' OR type='$5' GROUP BY type; another way you can write this is like the following, but it won't take advantage of indices SELECT type, count(*) FROM table WHERE type IN ('$1', '$2', '$3', '$4', '$5') GROUP BY type; Jim Lucas - Original Message - From: "Ryan A" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 8:53 AM Subject: Re: [PHP] selecting count and then dumping to an array > Thanks guys, > will give it a shot and write back if i have any problems. > Cheers, > -Ryan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- End Message --- --- Begin Message --- output some html and then try and do an header() redirect. if it works, then some sort of buffering is turned on. if it fails and tells you that output has already been sent to the browser, then it isn't turned on. Jim Lucas - Original Message - From: "Shawn McKenzie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, June 07, 2003 7:39 AM Subject: [PHP] How to determine if output buffering is on? > O.K. so how can I determine if output buffering has been started??? > > Thanks! > Shawn > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > --- End Message --- --- Begin Message --- Yay, a hack! The correct answer is ob_get_level(). Jim Lucas wrote: output some html and then try and do an header() redirect. if it works, then some sort of buffering is
[PHP] thumbnail program
Anyone know of a good free thumbnail program that can be called from a PHP script using the exec() call or something similar? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] fsockopen and SSL
[snip] > but I get following error: > > Warning: fsockopen() [function.fsockopen]: no SSL support in this build > in > /usr/home/trivisions/html/sextoymerchant.com/payment/checkout_confirm.ph > p on line 64 > > So does this mean that my PHP installation does not support SSL, and > that I have to recompile PHP again? > > I looked at the PHP installation configure options but did not see > anything regarding SSL, so how would I install this? >From the manual: php.net/fsockopen "As of PHP 4.3.0, if you have compiled in OpenSSL support, you may prefix the hostname with either 'ssl://' or 'tls://' to use an SSL or TLS client connection over TCP/IP to connect to the remote host." php.net/openssl "To use PHP's OpenSSL support you must also compile PHP --with-openssl[=DIR]." Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail program
On Sat, 7 Jun 2003, Artoo wrote: > Anyone know of a good free thumbnail program that can be called from a PHP > script using the exec() call or something similar? By far, the most popular are the tools offered by ImageMagick, such as mogrify: http://www.imagemagick.org/www/mogrify.html Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] thumbnail program
> Anyone know of a good free thumbnail program that can be called from a PHP > script using the exec() call or something similar? Netpbm is used by Gallery. Works very well. ---John W. Holmes... Amazon Wishlist: http://www.amazon.com/o/registry/3BEXC84AB3A5E PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file upload script
By no errors, do you mean you have a PHP version greater than PHP 4.2.0 and checked the ['error'] code, and it has a value of 0? Are you sure you want the filename to be $file_name? I doubt you do. Regards, Philip ref: http://www.php.net/features.file-upload On Sat, 7 Jun 2003, Rodney Green wrote: > Hello. I'm attempting to upload a file using the script below and I'm not > having any success. The temp directory I'm using does exist and is > writeable. When I browse for the file then hit the send button it appears to > be working then displays the form again with no errors. I look for the file > on the server and it isn't there. Any advice on how to get this working? > > Thanks! > Rod > > > --- > > > > Listing 9.14 A file upload script > > $file_dir = "/home/corrdev/htdocs/php24/scrap/uploads"; > $file_url = "http://corros.colo.hosteurope.com/dev/php24/scrap/uploads";; > > foreach( $HTTP_POST_FILES as $file_name => $file_array ) { > print "path: ".$file_array['tmp_name']."\n"; > print "name: ".$file_array['name']."\n"; > print "type: ".$file_array['type']."\n"; > print "size: ".$file_array['size']."\n"; > > if ( is_uploaded_file( $file_array['tmp_name'] ) > && $file_array['type'] == "image/gif" ) { > move_uploaded_file( $file_array['tmp_name'], "$file_dir/$file_name") >or die ("Couldn't copy"); > print "\n\n"; > } > } > > ?> > > > > > > > > > > > > -- > 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] XML Parser Problem
Fatal error: Call to undefined function: xml_parser_create() in /home/httpd/rootdir/sstats/includes/XPath.class.php on line 1410 I now get this error on my phpsysinfo page. I have changed nothing in my install except for updating recently. My Linux Flavor is Gentoo if that helps. If you need further information, just ask. ;) D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail program
thanks. I'll give that a try. Happen to know where to get sample code that uses this program? "Philip Olson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > On Sat, 7 Jun 2003, Artoo wrote: > > > Anyone know of a good free thumbnail program that can be called from a PHP > > script using the exec() call or something similar? > > By far, the most popular are the tools offered by > ImageMagick, such as mogrify: > > http://www.imagemagick.org/www/mogrify.html > > Regards, > Philip > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML Parser Problem
On Sun, 8 Jun 2003, Dustin Pate wrote: > Fatal error: Call to undefined function: xml_parser_create() in > /home/httpd/rootdir/sstats/includes/XPath.class.php on line 1410 > > I now get this error on my phpsysinfo page. I have changed nothing in my > install except for updating recently. My Linux Flavor is Gentoo if that > helps. If you need further information, just ask. ;) Your new PHP lacks XML support, otherwise this (and all the other php.net/xml functions) will be defined. Look at a call to phpinfo(), you should see something like --disable-xml in the configure line, or maybe it's shared and not included... Anyway, bottom line is, your PHP must now lack XML support. Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with php_pdf?
Hi, I just installed PHP 4.3.2 and tried to run php_pdf. I found that I was able to generate a pdf in memory using pdf_open_file($pdf), but when I tried to generate a real file using pdf_open_file($pdf,$filename) nothing happened, no file was generated. What's going on? Just as a sanity check I did an fopen($filename,"w") and that worked fine. I did replace my existing php.ini with the new php.ini-recommended, but I don't think I'm missing anything there. Thanks in advance for your help. _ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] thumbnail program
On Sun, 8 Jun 2003, Artoo wrote: > thanks. I'll give that a try. Happen to know where to get sample code that > uses this program? After doing a google search for the terms mogrify php: http://www.google.com/search?q=mogrify+php The first result was this article, it appears to touch on the subject: Resizing Images with PHP and Mogrify http://www.phpbuilder.com/columns/michael20020712.php3 I'm sure there are many more examples around, and including PHP in the search field of google is very much optional. But, I guess this all depends on your knowledge of PHP... Maybe thumbnail is another good search term to throw into the mix. Regards, Philip > "Philip Olson" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > > > On Sat, 7 Jun 2003, Artoo wrote: > > > > > Anyone know of a good free thumbnail program that can be called from a > PHP > > > script using the exec() call or something similar? > > > > By far, the most popular are the tools offered by > > ImageMagick, such as mogrify: > > > > http://www.imagemagick.org/www/mogrify.html > > > > Regards, > > Philip > > > > > > -- > 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] Re: Using register_globals
On 04-Jun-2003 Jason Wong wrote: > In case 1, a malicious person can bypass your password checks by passing > admin=1 in the URL. > >> As Rasmus has correctly pointed out, the usage of "register_globals=off" >> per se cannot be considered a security measure. If you don't initialize >> and/or check *all* user-supported variables, you're dead. It's as simple >> as that. Is it annoying? Maybe. Is it necessary? *yes* > > I tend to think of it as a safety net. > > Of course the problems with case 1 could be prevented by explicitly > initialising the variables ... > > if ($user == 'me' && $password == 'correct') { > $admin = TRUE; } > else { > $admin = FALSE; > } > True. If everybody initialized variables or PHP errored out on undeclared vars then the question wouldn't have come up. > ... and extra meticulous coding: > > if ($admin === TRUE) { list_all_members_sordid_details(); } > Using a global like that could be an example of problem code. Sensitive stuff should be within a well defined routine: function isadmin() { global $PHP_AUTH_USER, $PHP_AUTH_PW; static $admlogin=FALSE, $didit=FALSE; if ($didit) return($admlogin); $didit=TRUE; if ((strcmp($PHP_AUTH_USER, ADMINNAME) | strcmp($PHP_AUTH_PW, ADMINPASS)) == 0 ) $admlogin=TRUE; return($admlogin); } ... if (isadmin()) ... register_globals=off won't make good code any better --it's just a safety net for the sloppy coders. The real lesson is: Don't be (or hire) a sloppy programmer. I understand why the PHP team made reg_g=off as the default. I don't like it, but i understand why. The main thing I don't like is that it seems to coddle the LCD of bad code. A craftsman rarely learns good practice if s/he is insulated from the results of bad practice. IMHO, of course. Regards, -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML Parser Problem
Thank you. I checked my php_info() and sure enough --disable_xml is present. Are there any Gentoo Users out there having this problem as well? Any Gentoo Users out there that might be able to help me work out a solution? I have 'xml' and 'xml2' in my make.conf use flags. D > On Sun, 8 Jun 2003, Dustin Pate wrote: > > > Fatal error: Call to undefined function: xml_parser_create() in > > /home/httpd/rootdir/sstats/includes/XPath.class.php on line 1410 > > > > I now get this error on my phpsysinfo page. I have changed nothing in my > > install except for updating recently. My Linux Flavor is Gentoo if that > > helps. If you need further information, just ask. ;) > > Your new PHP lacks XML support, otherwise this (and all > the other php.net/xml functions) will be defined. Look > at a call to phpinfo(), you should see something like > --disable-xml in the configure line, or maybe it's > shared and not included... Anyway, bottom line is, your > PHP must now lack XML support. > > Regards, > Philip > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Using register_globals
[snip] > > > register_globals=off won't make good code any better --it's just > a safety net for the sloppy coders. [snip] In some sense, register_globals = off makes both bad and good code better, because it means less pollution. So many unused variables get defined with register_globals on and this means wasted memory/resources. Pollution makes any environment worse! Granted this isn't what you meant, but still... ;) Regards, Philip -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] HARDWARE ID WITH PHP
Can anyone tell me if i can get the Hardisk serial number, by php code? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] popen() in 4.3.2
My webhost just upgraded to php 4.3.2, and now I have a problem with popen. I'm opening an output buffer then piping it through htmltidy to make nice looking output. This code worked perfectly before the upgrade, now "strlen( $newstr )" is only getting back 4096 bytes. Is anybody else having this issue, and how can I fix this? I don't see any configuration setting that looks like it fits to this situation. It is running under redhat with Apache/1.3.27 Thanks, Jeff -- Registered Linux user #304026. "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this message should conform to RFC 1855. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] popen() in 4.3.2
PHP 4.3.0-1 has a bug that made your previous code "work", have a look at the fread() docs for why, here's a quote: "Note: When reading from network streams or pipes, such as those returned when reading remote files or from popen() and proc_open(), reading will stop after a packet is available. This means that you should collect the data together in chunks as shown in the example below." It goes on to show that you must loop threw it to get fread() to do what you want in the below code. Although, the example it eludes to is wrong (a correct example will show when the manual next builds), you get the point... :) Regards, Philip On Sat, 7 Jun 2003, Jeff Harris wrote: > My webhost just upgraded to php 4.3.2, and now I have a problem with > popen. I'm opening an output buffer then piping it through htmltidy to > make nice looking output. > > ob_start(); > // Other unimportant coding goes here > > $str=addslashes(ob_get_contents()); > $fp=popen("echo \"" . $str . "\" | /bin/tidy - config /my/home/htmlrc", "r"); > @$newstr=fread($fp, 99); > ob_end_clean(); > header("Last-Modified: " . $gmt_modtime); > header( "Content-length: " . strlen( $newstr ) ); > echo stripslashes($newstr); > ?> > > > This code worked perfectly before the upgrade, now "strlen( $newstr )" is > only getting back 4096 bytes. Is anybody else having this issue, and how > can I fix this? I don't see any configuration setting that looks like it > fits to this situation. It is running under redhat with Apache/1.3.27 > > Thanks, Jeff > -- > Registered Linux user #304026. "lynx -source > http://jharris.rallycentral.us/jharris.asc | gpg --import" Key fingerprint > = 52FC 20BD 025A 8C13 5FC6 68C6 9CF9 46C2 B089 0FED Responses to this > message should conform to RFC 1855. > > > > -- > 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] TIMESTAMP -> Y-m-d
On 05-Jun-2003 nabil wrote: > Please help me how to print a timestamp string retrived from the > database, > and print it as -MM-DD > MySQL ? http://www.mysql.com/doc/en/Date_and_time_functions.html -- Don Read [EMAIL PROTECTED] -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php