php-general Digest 14 May 2009 09:19:17 -0000 Issue 6120
php-general Digest 14 May 2009 09:19:17 - Issue 6120 Topics (messages 292558 through 292562): Re: how to enable ttf support in php 5.2.9 292558 by: Ross McKay Re: handling chunked input from php://stdin 292559 by: whisperstream Re: fileinfo on RHEL5 292560 by: Michael A. Peters Re: shell_exec problem with bsdtar 292561 by: Lester Caine Cannot output the same data from text file in PHP 292562 by: Moses Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Ashley Sheridan wrote: Great idea in theory, if you can guarantee that they'll *only* be using MS Office to paste from. In my experience, you can only guarantee on the stupidity of the end users, nothing else. I was mostly being facetious :) The only thing that really works is getting the users to cooperate by giving them a button for Word and a button for Text and explaining to them how it *helps them* to use those buttons properly. But that only works while they remember, and they never remember when they're in a hurry (which is always). -- Ross McKay, Toronto, NSW Australia Darwin's rolling over in his coffin, 'cos the fittest are surviving much less often - NOFX ---End Message--- ---BeginMessage--- Thanks for the code, but I figured out the issue I was having. My problem was actually getting the data not parsing chunked text. After taking a wireshark trace of the traffic I realised that the chunked xml didn't even hit the php process and instead died somewhere in IIS's fastcgi process. If anyone else stumbles upon this, here is the problem and my solution. Production env was IIS 6.0, php 5.2.9-2, installed as module under fastcgi. XML posted form services was sent to the php script responsible for handling it However, if the xml data was chunked, IIS would die with a 500 Server Error message and the php processor would never even see the xml. From what I can gather (really not a whole lot of data out there), fastcgi under IIS 6.0 doesn't seem to handle chunked transfer-encoded data...(it seems like such a major flaw that I'm wondering if I missed some configuration setting to get it to work?) Solution: Since php5.2.9-2 no longer has the isapi module, I had to uninstall 5.2.9-2 and instead installed 5.2.6 with the php5isapi.dll. Once that was configured I retested and hey presto, the chunked data is sent to the php process without error. I didn't even need to decode the chunked data as it is done before I even get access to the data. Spent a day trying to figure out what was wrong, hopefully it'll save someone else some time. Nathan Rixham wrote: Shawn McKenzie wrote: whisperstream wrote: I have a server running that receives xml formatted events from other services I have no control over. For certain events the transfer-encoding is chunked. I was just doing $input = file_get_contents('php://stdin'); and this works well until there is chunked input. Then I tried $handle = fopen('php://input', rb); $input = ''; while (!feof($handle)) { $input .= fread($handle, 8192); } fclose($handle); And that gives about the same result, has anyone else come across this and how did they solve it? Thanks in advance There aren't really many examples around, but check http_chunked_decode() from PECL. simples! function HTTPChunkDecoder( $chunkedData ) { $decodedData = ''; do { $tempChunk = explode(chr(13).chr(10), $chunkedData, 2); $chunkSize = hexdec($tempChunk[0]); $decodedData .= substr($tempChunk[1], 0, $chunkSize); $chunkedData = substr($tempChunk[1], $chunkSize+2); } while (strlen($chunkedData) 0); return $decodedData; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- View this message in context: http://www.nabble.com/handling-chunked-input-from-php%3A--stdin-tp23512171p23533268.html Sent from the PHP - General mailing list archive at Nabble.com. ---End Message--- ---BeginMessage--- brian wrote: RHEL5/PHP 5.1.6 I'm having some trouble getting the Fileinfo package working. It installed fine, and phpinfo() says it's enabled. But it consistently returns an empty string when getting the MIME of a file. /usr/share/pear/bin/pecl install fileinfo vi /etc/php.d/fileinfo.ini extension=fileinfo.so ln -s /usr/share/file/magic /etc/magic.mime The code: define('FINFO_PATH', '/usr/share/file/magic'); ... $fi = new finfo(FILEINFO_MIME, FINFO_PATH); $type = $fi-file($file_path); $type is always empty. And, yes, the path to the file is good. This works fine on the dev box (PHP 5.2.6). Unfortunately, the decision to use RHEL5 for production was out of
php-general Digest 14 May 2009 21:43:09 -0000 Issue 6121
php-general Digest 14 May 2009 21:43:09 - Issue 6121 Topics (messages 292563 through 292593): Re: Cannot output the same data from text file in PHP 292563 by: Peter Ford 292564 by: Jan G.B. 292569 by: Mike Roberts 292570 by: Nathan Rixham 292579 by: Ashley Sheridan 292580 by: Andrew Ballard 292581 by: Ashley Sheridan 292582 by: Mike Roberts 292583 by: Ashley Sheridan 292587 by: Paul M Foster 292589 by: Andrew Ballard 292591 by: Ashley Sheridan Re: Sending SMS through website 292565 by: Select Performers When is __destruct called on an object in $_SESSION ? 292566 by: Peter Ford 292567 by: Stuart 292568 by: Peter Ford suggestion required 292571 by: Pravinc where what 292572 by: PJ Re: where what-SOLVED 292573 by: PJ include file syntax 292574 by: PJ 292576 by: Shawn McKenzie php html integration 292575 by: PJ 292577 by: Shawn McKenzie 292578 by: Tom Worster 292584 by: tedd 292588 by: Paul M Foster Software to read/write Excel to CD? 292585 by: Skip Evans 292590 by: Paul M Foster 292592 by: Ashley Sheridan php ssl connection timeout issue 292586 by: Jerry Zhao 292593 by: Shawn McKenzie Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Moses wrote: Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Not a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the letters. So you need something like: ?php $alldata = file(result.txt); echo tabletrtd style='white-space: pre; font-family: monospace;'; foreach($alldata as $line_num = $line) { echo $line.\n; } echo/td/tr/table; ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent ---End Message--- ---BeginMessage--- You could even make it shorter, if you don't need the line numbers anyway: pre ? echo nl2br(file_get_contents('file.txt')); ? /pre 2009/5/14 Peter Ford p...@justcroft.com: Moses wrote: Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Not a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the letters. So you need something like: ?php $alldata = file(result.txt); echo tabletrtd style='white-space: pre; font-family: monospace;'; foreach($alldata as $line_num = $line) { echo $line.\n; } echo/td/tr/table; ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---End Message--- ---BeginMessage--- Is there a moderator or some responsible
Re: [PHP] shell_exec problem with bsdtar
Lester Caine wrote: I'm trying to emulate Linux facilities on the windows servers, and have found bsdtar can be renamed tar.exe so that it will work the same as a shell_exec( tar ) call in Linux. The full paths are used to the files and the command line returns the extracted file name when run at a command prompt, and similar commands for unzip and unrar work fine, later in the check list, but using the 'tar' and also 'bsdtar' command simply returns NULL, and the extracted file is not created. Any ideas what I've got wrong? OK - had a sleep on it, and started again fresh. The bottom line is that WHAT shell_exec returns is rather variable. There is a comment about returning windows errors on the manual page, but in fact 2 may not JUST contain errors, it also has the normal return from some programs. So 2 'output' may be generally required to find out what has been returned, if the shell_exec return is NULL. -- Lester Caine - G8HFL - Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk// Firebird - http://www.firebirdsql.org/index.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP]Cannot output the same data from text file in PHP
Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Cannot output the same data from text file in PHP
Moses wrote: Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Not a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the letters. So you need something like: ?php $alldata = file(result.txt); echo tabletrtd style='white-space: pre; font-family: monospace;'; foreach($alldata as $line_num = $line) { echo $line.\n; } echo/td/tr/table; ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Cannot output the same data from text file in PHP
You could even make it shorter, if you don't need the line numbers anyway: pre ? echo nl2br(file_get_contents('file.txt')); ? /pre 2009/5/14 Peter Ford p...@justcroft.com: Moses wrote: Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses Not a PHP problem, but a HTML problem: First, HTML compresses white space into just one space, so all of those leading spaces on line 2 are lost. Second, you are (probably) displaying using a proportionally-spaced font, so the narrow pipeline characters take up less width than the letters. So you need something like: ?php $alldata = file(result.txt); echo tabletrtd style='white-space: pre; font-family: monospace;'; foreach($alldata as $line_num = $line) { echo $line.\n; } echo/td/tr/table; ? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- 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] Sending SMS through website
Per Jessen wrote: kyle.smith wrote: Most carriers have email-to-sms bridges. For example, I use ATT Wireless and you can text me by sending an email to myphonenum...@txt.att.net. Do you end up paying for that then - or who pays for it? Besides, none of the carriers around here have email-to-sms interfaces, so I'd disagree with your initial claim. /Per It's really only in the US (and possibly Canada) that they have the email-to-sms bridges. Here in the UK (and I think most of Europe) such a thing doesn't exist. Carriers in Europe like to charge a lot of money for SMS. At least we don't have to pay to receive calls like they do in the States! Ian
[PHP] When is __destruct called on an object in $_SESSION ?
I'm sure I've seen something about this before, but I can't find it: I'm creating a file which needs to live for the duration of a session, and ONLY the duration of the session. I made a little call which holds the name of the file like this: ?php class __TFR { private $file; public function __construct() { $this-file = '/tmp/'.session_id().'.xml'; } public function __get($name) { if ($name=='file') return $this-file; } public function __destruct() { @unlink($this-file); } } ? So I create an instance of this object and I put a reference to the object in the session: ?php $_SESSION['TFR'] = new __TFR(); ? I was then expecting TFR::__destruct() to only be called when the session was closed, with either a timeout, or a session_destroy() call. But it looks like the object destructor is called at the end of every page. Any ideas about working around that? -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] When is __destruct called on an object in $_SESSION ?
2009/5/14 Peter Ford p...@justcroft.com: I'm sure I've seen something about this before, but I can't find it: I'm creating a file which needs to live for the duration of a session, and ONLY the duration of the session. I made a little call which holds the name of the file like this: ?php class __TFR { private $file; public function __construct() { $this-file = '/tmp/'.session_id().'.xml'; } public function __get($name) { if ($name=='file') return $this-file; } public function __destruct() { �...@unlink($this-file); } } ? So I create an instance of this object and I put a reference to the object in the session: ?php $_SESSION['TFR'] = new __TFR(); ? I was then expecting TFR::__destruct() to only be called when the session was closed, with either a timeout, or a session_destroy() call. But it looks like the object destructor is called at the end of every page. Any ideas about working around that? The destructor will be called at the end of each page request because the object in memory is destroyed. When the object is serialized you will get __sleep being called, and when it's unserialized you'll get __wakeup. There is no way to detect when a session is destroyed unless you implement your own session handler. -Stuart -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] When is __destruct called on an object in $_SESSION ?
Stuart wrote: 2009/5/14 Peter Ford p...@justcroft.com: I'm sure I've seen something about this before, but I can't find it: I'm creating a file which needs to live for the duration of a session, and ONLY the duration of the session. I made a little call which holds the name of the file like this: ?php class __TFR { private $file; public function __construct() { $this-file = '/tmp/'.session_id().'.xml'; } public function __get($name) { if ($name=='file') return $this-file; } public function __destruct() { @unlink($this-file); } } ? So I create an instance of this object and I put a reference to the object in the session: ?php $_SESSION['TFR'] = new __TFR(); ? I was then expecting TFR::__destruct() to only be called when the session was closed, with either a timeout, or a session_destroy() call. But it looks like the object destructor is called at the end of every page. Any ideas about working around that? The destructor will be called at the end of each page request because the object in memory is destroyed. When the object is serialized you will get __sleep being called, and when it's unserialized you'll get __wakeup. There is no way to detect when a session is destroyed unless you implement your own session handler. -Stuart Oh bother. I guess it's a consequence of the statelessness of the PHP engine. I thought I might be able to set a flag in __sleep() to indicate that the session had been serialised rather than destroyed, but __destruct() is called before __sleep(). I will have to see whether it is worth coding a custom session handler or to just let the disk fill up... :) -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP]Cannot output the same data from text file in PHP
Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. Sincerely, Michael Roberts Civil Engineering Executive Recruiter Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com mailto:mrobe...@jobscss.com From: Moses [mailto:jam...@gmail.com] Sent: Thursday, May 14, 2009 5:19 AM To: php-general@lists.php.net Subject: [PHP]Cannot output the same data from text file in PHP Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses
Re: [PHP]Cannot output the same data from text file in PHP
as far as i know you just send an email to: php-general-unsubscr...@lists.php.net and then reply to the confirmation - its a standard mailing list which you subscribed to at some point, no profiles or such like. Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. Sincerely, Michael Roberts Civil Engineering Executive Recruiter Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com mailto:mrobe...@jobscss.com From: Moses [mailto:jam...@gmail.com] Sent: Thursday, May 14, 2009 5:19 AM To: php-general@lists.php.net Subject: [PHP]Cannot output the same data from text file in PHP Hi Folks, I have a written a script in PHP which outputs the result from a text file. The PHP script is as follows: ?php $alldata = file(result.txt); echo tabletrtd; foreach($alldata as $line_num = $line) { echo $line.br; } echo/td/tr/table; ? I have attached the result.txt file. However the output of the script is as follows: Query: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 Sbjct: 1 atggcaatcgtttcagcagattcgtaattcgagctcgcccatcgatcctcta 60 which is not exactly as in the result.txt file in that the pipelines are displaced. Any pointer to this problem shall be appreciated. Thanking you in advance. Moses -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] suggestion required
Hey all, I have one flex+PHP application. Main purpose of the site is to sell T-shirts online. Flex is used for generating different designs on available tshirt. Something similar to Cafepress dot com. I want to generate 300 DPI tshirt image from flex and send it to PHP side for processing. Now the question is Flex doen't support direct image generation. So flex send's a Bytearray for 300 dpi image which is quite Bigger.some time it crashes the browser while processing..because of heavy data.. And can not store in any of MySQL datatype. Also storing in a txt file is too much time taking process.. Any Suggestion or help to come out fron this issue.. Regards Pravin
[PHP] where what
Where and what do I look for to resolve this? My script is working fine on an active ISP web server. This morning, I crank up the local XP and the local FreeBSD 7.1 server. I start my editor, bring up Firefox, go to local server and everything works fine. I start to code and make a couple of minor changes, check the output on the local server - whooosh. Something isn't right. Only the logo shows from the included header script. I revert the files worked on to the original and nothing changes - output is not changed. I check the web server all is correct. I download the files from the web and check against the local files. Everything is identical (except for minor location changes) but the local setup just doesn't output correctly. There are no error messages, either in the browser or the var/log files? What puzzles me is the use of the include files and just how are they used/implemented? Perhaps there is something there that isn't right? This is rather weird? Anyone have any ideas? I'm lost. -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] where what-SOLVED
PJ wrote: Where and what do I look for to resolve this? My script is working fine on an active ISP web server. This morning, I crank up the local XP and the local FreeBSD 7.1 server. I start my editor, bring up Firefox, go to local server and everything works fine. I start to code and make a couple of minor changes, check the output on the local server - whooosh. Something isn't right. Only the logo shows from the included header script. I revert the files worked on to the original and nothing changes - output is not changed. I check the web server all is correct. I download the files from the web and check against the local files. Everything is identical (except for minor location changes) but the local setup just doesn't output correctly. There are no error messages, either in the browser or the var/log files? What puzzles me is the use of the include files and just how are they used/implemented? Perhaps there is something there that isn't right? This is rather weird? Anyone have any ideas? I'm lost. I have no idea where it came from but there was an entry in the db.php file that was preventing access to the db. Sorry - false alarm. :-[ -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] include file syntax
How does one deal with tag completion from an include file to the main(source)-file? i.e. c should a tag, such as head or div be closed withing the include file? Or can body be started in the include file and closed in the main-file? Crossing the border, so-to-speak, doesn't seem to matter; but how does this affect validation and execution? Anyone have a clarification, please? -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php html integration
I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) -- Hervé Kempf: Pour sauver la planète, sortez du capitalisme. - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: include file syntax
PJ wrote: How does one deal with tag completion from an include file to the main(source)-file? i.e. c should a tag, such as head or div be closed withing the include file? Or can body be started in the include file and closed in the main-file? It doesn't really matter, however it may be easier to decipher and/or change later if things are in the same file. i.e. many apps use a header.php that includes html, title, head, and meta tags, maybe body. They include this on every page, then at the bottom of every page they include a footer.php that may add a standard copyright and closes out body html etc. Many times, repeatable html after the body tag may be included in the header or in another include file like menu.php or something. Crossing the border, so-to-speak, doesn't seem to matter; but how does this affect validation and execution? Anyone have a clarification, please? Validation is done on the resultant html output so it's not affected. Every file include takes time to execute the include, however it's probably negligible unless you have a very high number of includes. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php html integration
PJ wrote: I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) Well, you place the php code wherever you want it executed. The file is parsed line by line top to bottom, so if you have some html for an image and you want the php to be executed before the image, then you must place it before the image and vice versa. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP]Cannot output the same data from text file in PHP
On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Cannot output the same data from text file in PHP
On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP]Cannot output the same data from text file in PHP
Ok, I think we are almost there. First I was given php-general-unsubscr...@lists.php.net but that bounced back. Second, I use MS outlook ( 03 or 07) which does not accurately display headers, probably ( in my case at all) because it's audience is less savvy than this audience, and too much information can be dangerous. Thirdly I want to thank everybody for their attempts, and ask if somebody can copy and past the address ( provided it is not the same as the one above that did not work). Sincerely, Michael Roberts Civil Engineering Executive Recruiter Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thursday, May 14, 2009 3:50 PM To: Andrew Ballard Cc: Mike Roberts; Moses; php-general@lists.php.net Subject: Re: [PHP]Cannot output the same data from text file in PHP On Thu, 2009-05-14 at 15:30 -0400, Andrew Ballard wrote: On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) Andrew No, but that would be a pretty neat idea! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP]Cannot output the same data from text file in PHP
On Thu, 2009-05-14 at 16:01 -0400, Mike Roberts wrote: Ok, I think we are almost there. First I was given php-general-unsubscr...@lists.php.net but that bounced back. Second, I use MS outlook ( 03 or 07) which does not accurately display headers, probably ( in my case at all) because it's audience is less savvy than this audience, and too much information can be dangerous. Thirdly I want to thank everybody for their attempts, and ask if somebody can copy and past the address ( provided it is not the same as the one above that did not work). Sincerely, Michael Roberts Civil Engineering Executive Recruiter Corporate Staffing Services 150 Monument Road, Suite 510 Bala Cynwyd, PA 19004 P 610-771-1084 F 610-771-0390 E mrobe...@jobscss.com -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Thursday, May 14, 2009 3:50 PM To: Andrew Ballard Cc: Mike Roberts; Moses; php-general@lists.php.net Subject: Re: [PHP]Cannot output the same data from text file in PHP On Thu, 2009-05-14 at 15:30 -0400, Andrew Ballard wrote: On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) Andrew No, but that would be a pretty neat idea! Ash www.ashleysheridan.co.uk Aforementioned headers (at least the important ones!) Mailing-List: contact php-general-h...@lists.php.net; run by ezmlm Precedence: bulk list-help: mailto:php-general-h...@lists.php.net list-unsubscribe: mailto:php-general-unsubscr...@lists.php.net list-post: mailto:php-general@lists.php.net List-Id: php-general.lists.php.net I believe for the unsubscribe the usual practice is to send an empty email with the subject line of 'UNSUBSCRIBE'. Empty means no signatures too ;) Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
At 2:35 PM -0400 5/14/09, PJ wrote: I'm a bit fuzzy on the relationship between the ? ? and the HTML code. Where should the php code be placed in a page so that execution is carried out smoothly? So far, my coding has managed to avoid horrendous snags; but as I delve deeper into the quagmire of coding, I would like to clear the fog before me. Perhaps I have been fortunate up to this point... :-) PJ: First, do not use ? ? -- that's a short tag and it has been depreciated and will not work with xml. Second, use ?php ? instead. Third, place the php code anywhere you want within the html document (top, bottom, middle, and any where). It makes no difference (other than readability) -- all of it will be executed before the browser see's anything. Fourth, if you want php to print something along with (inside) the html, simply echo() it, such as: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Software to read/write Excel to CD?
Hey all, I'm inheriting a project that was unsuccessfully off-shored and is now in such bad shape (I've seen the code. It's awful) that they are firing the off-shore company and starting over. One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but software on that CD that when placed in another computer will open the spreadsheet, allow it to be modified and rewritten back to the CD. This is part of the requirements. Does anyone know of such software and its name? Thanks, Skip -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison WI 53703 608.250.2720 http://bigskypenguin.com Those of you who believe in telekinesis, raise my hand. -- Kurt Vonnegut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] php ssl connection timeout issue
Hi, I am having trouble connecting to https sites using php's builtin ssl functions. I tried: file_get_contents('https://securesite') fsockopen('ssl://securesite', 443, $errno, $errstr,20) and same errors every time: SSL: connection timeout Failed to enable crypto Call to openssl_error_string() returns no error. Curl worked both within php and as standalone client. The strange thing is that the connection seemed to be dropped immediately upon contact with the server, i.e., the call to the above functions failed immediately, which I think contradicts the timeout error. Any tips on the cause of this issue or how to debug this is appreciated. Regards, Jerry.
Re: [PHP]Cannot output the same data from text file in PHP
On Thu, May 14, 2009 at 03:30:44PM -0400, Andrew Ballard wrote: On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) In most email clients, you can turn on full header display. As a list admin on about six lists and a member of numerous lists, I find it endlessly aggravating that people can't manage to unsubscribe their own addresses to email lists. Our LUG has a lists page on its website which clearly step-by-step indicates what must be done to unsubscribe. Yet people never even look to see if there is such a page. And then I've had people tell me they followed those instructions exactly, and it didn't work. No, they didn't or it would have worked, since people manage to follow those instructions successfully all the time. My stance is, if you're going to subscribe to an email list, learn how to unsubscribe, how to see if you've been inadvertantly unsubscribed, learn email netiquette on lists, etc. It reminds me of people who call tech support saying their mouse doesn't work. Then you find out they've picked it up and pointed it at the screen to make the pointer move (true story). If you're going to own a car, learn how to drive it. If you're going to own a computer, learn how to operate it. If you're going to program, read a book about it first (yes, you P.J.). /rant Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
On Thu, May 14, 2009 at 04:19:57PM -0400, tedd wrote: snip Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. Ohmygosh! I didn't realize Tedd was one of those using parentheses with an echo command guys. I'm sooo disappointed! Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Cannot output the same data from text file in PHP
On Thu, May 14, 2009 at 4:33 PM, Paul M Foster pa...@quillandmouse.com wrote: On Thu, May 14, 2009 at 03:30:44PM -0400, Andrew Ballard wrote: On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) In most email clients, you can turn on full header display. Yes, I know you CAN do that. I'm just saying that most people WON'T do that for two reasons 1) it's an extra step and people are inherently lazy and 2) it shows a lot more information that most people care to see. Often the headers are longer than the message. As a list admin on about six lists and a member of numerous lists, I find it endlessly aggravating that people can't manage to unsubscribe their own addresses to email lists. Our LUG has a lists page on its website which clearly step-by-step indicates what must be done to unsubscribe. Yet people never even look to see if there is such a page. And then I've had people tell me they followed those instructions exactly, and it didn't work. No, they didn't or it would have worked, since people manage to follow those instructions successfully all the time. My stance is, if you're going to subscribe to an email list, learn how to unsubscribe, how to see if you've been inadvertantly unsubscribed, learn email netiquette on lists, etc. It reminds me of people who call tech support saying their mouse doesn't work. Then you find out they've picked it up and pointed it at the screen to make the pointer move (true story). If you're going to own a car, learn how to drive it. If you're going to own a computer, learn how to operate it. If you're going to program, read a book about it first (yes, you P.J.). /rant Paul -- Paul M. Foster I agree with you for the most part. I'm just saying that the presence of unsubscribe information in the message headers themselves is of very little value to most people. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Software to read/write Excel to CD?
On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: Hey all, I'm inheriting a project that was unsuccessfully off-shored and is now in such bad shape (I've seen the code. It's awful) that they are firing the off-shore company and starting over. One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but software on that CD that when placed in another computer will open the spreadsheet, allow it to be modified and rewritten back to the CD. This is part of the requirements. Does anyone know of such software and its name? Maybe offshore, but not here. There are only two possibilities. First include a copy of Excel on the CD and somehow make it autorun. Yeah, Microsoft would *love* that. Second, include some other program which would do the same thing. Good luck with that. And now the kicker-- write the spreadsheet back to CD. Okay, maybe, if it's a CD-RW. But who's going to pay attention to that little detail? And as far as I know, writing to a CD is far more complicated than writing to a hard drive. You can't overwrite data on a CD-RW. Once written, it's written. You have to cover up the section that was written to (in software), and then write the contents again. Eventually, you'll run out of room. And it almost necessitates having a copy of some CD-writing software on the CD, since there may not be such software on the client machine. And all this assumes the user is running Windows. The binaries for one OS won't run on a different OS. Now, watch. Someone will get on and say, Oh sure, you can do that with such-and-such software. I did it the other day. In which case, just forget I said anything. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP]Cannot output the same data from text file in PHP
On Thu, 2009-05-14 at 16:33 -0400, Paul M Foster wrote: On Thu, May 14, 2009 at 03:30:44PM -0400, Andrew Ballard wrote: On Thu, May 14, 2009 at 3:29 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2009-05-14 at 09:29 -0400, Mike Roberts wrote: Is there a moderator or some responsible party who is in charge of this list. Please delete my profile and stop sending messages. This is the 6th such request. As I and many others have said before, the unsubscribe email address is on EVERY header sent from the PHP list. Note, I mean headers and not footers! Ash www.ashleysheridan.co.uk Perhaps, but how many people actually (think to) look at e-mail message headers, other than the basic To, Subject, and Date that are usually plainly visible in mail clients? And it's not even like mail clients read the headers and add an Unsubscribe link/button to the UI when reading a message. :-) In most email clients, you can turn on full header display. As a list admin on about six lists and a member of numerous lists, I find it endlessly aggravating that people can't manage to unsubscribe their own addresses to email lists. Our LUG has a lists page on its website which clearly step-by-step indicates what must be done to unsubscribe. Yet people never even look to see if there is such a page. And then I've had people tell me they followed those instructions exactly, and it didn't work. No, they didn't or it would have worked, since people manage to follow those instructions successfully all the time. My stance is, if you're going to subscribe to an email list, learn how to unsubscribe, how to see if you've been inadvertantly unsubscribed, learn email netiquette on lists, etc. It reminds me of people who call tech support saying their mouse doesn't work. Then you find out they've picked it up and pointed it at the screen to make the pointer move (true story). If you're going to own a car, learn how to drive it. If you're going to own a computer, learn how to operate it. If you're going to program, read a book about it first (yes, you P.J.). /rant Paul -- Paul M. Foster So, erm, driving without learning and getting a license is wrong? :p Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Software to read/write Excel to CD?
On Thu, 2009-05-14 at 16:50 -0400, Paul M Foster wrote: On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: Hey all, I'm inheriting a project that was unsuccessfully off-shored and is now in such bad shape (I've seen the code. It's awful) that they are firing the off-shore company and starting over. One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but software on that CD that when placed in another computer will open the spreadsheet, allow it to be modified and rewritten back to the CD. This is part of the requirements. Does anyone know of such software and its name? Maybe offshore, but not here. There are only two possibilities. First include a copy of Excel on the CD and somehow make it autorun. Yeah, Microsoft would *love* that. Second, include some other program which would do the same thing. Good luck with that. And now the kicker-- write the spreadsheet back to CD. Okay, maybe, if it's a CD-RW. But who's going to pay attention to that little detail? And as far as I know, writing to a CD is far more complicated than writing to a hard drive. You can't overwrite data on a CD-RW. Once written, it's written. You have to cover up the section that was written to (in software), and then write the contents again. Eventually, you'll run out of room. And it almost necessitates having a copy of some CD-writing software on the CD, since there may not be such software on the client machine. And all this assumes the user is running Windows. The binaries for one OS won't run on a different OS. Now, watch. Someone will get on and say, Oh sure, you can do that with such-and-such software. I did it the other day. In which case, just forget I said anything. ;-} Paul -- Paul M. Foster I've never heard of anything like that, there are so many unknown variables that I would really feel for the poor team who had to take that project on! You could do it with a USB drive and a small Linux distro that was set to run as a boot disk though, and it could do a whole lot more than just open a spreadsheet up! Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php ssl connection timeout issue
Jerry Zhao wrote: Hi, I am having trouble connecting to https sites using php's builtin ssl functions. I tried: file_get_contents('https://securesite') fsockopen('ssl://securesite', 443, $errno, $errstr,20) and same errors every time: SSL: connection timeout Failed to enable crypto Call to openssl_error_string() returns no error. Curl worked both within php and as standalone client. The strange thing is that the connection seemed to be dropped immediately upon contact with the server, i.e., the call to the above functions failed immediately, which I think contradicts the timeout error. Any tips on the cause of this issue or how to debug this is appreciated. Regards, Jerry. Check phpinfo(). What is listed for Registered PHP Streams and Registered Stream Socket Transports. Also, is openssl listed under extensions? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Email Setup problem
Hi Everyone I have tried to configure my php.in file so as allow me to send email in PHP from local server. I added the lines in php.ini file sendmail_path = /usr/sbin/sendmail -t sendmail_from = n...@localhost Therafter restarted my apache by: sudo /etc/init.d/apache2 restart However, I get the following error when I restart mt apache apache2: Could not reliably determine the server's fully qualified domain name, using 12... for ServerName Thanks. Moses
[PHP] Re: suggestion required
Pravinc wrote: Hey all, I have one flex+PHP application. Main purpose of the site is to sell T-shirts online. Flex is used for generating different designs on available tshirt. Something similar to Cafepress dot com. I want to generate 300 DPI tshirt image from flex and send it to PHP side for processing. Now the question is Flex doen't support direct image generation. So flex send's a Bytearray for 300 dpi image which is quite Bigger.some time it crashes the browser while processing..because of heavy data.. And can not store in any of MySQL datatype. Also storing in a txt file is too much time taking process.. Any Suggestion or help to come out fron this issue.. Hi, ByteArray should be fine, simply ensure you pack it before sending, then unpack it and read the floats back out with php to get the pixel values, you can then recompile with gd or suchlike (set pixel methods) and save as an image. Your alternative is to go with flash player 10 specific action script 3 and use vectors or fxg (on this note there are also some svg parsers for action script, 3rd party for fp9) - this approach will give you the same results but substantially less bytesize - whilst giving you no loss in quality seeing as they are vectors) one recommendation I would make is to use display objects throughout the process clientside, then BitmapData.draw( DisplayObject ) to a BitmapData, then getPixels on that to get your bytearray at the last minute. If you really come up short you can look at using alchemy to embed some C processing code in there, it really speeds up the process of working with huge ByteArrays as the c code is preoptimised and runs much faster. Many Regards, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Software to read/write Excel to CD?
Paul M Foster wrote: On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: Hey all, I'm inheriting a project that was unsuccessfully off-shored and is now in such bad shape (I've seen the code. It's awful) that they are firing the off-shore company and starting over. One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but software on that CD that when placed in another computer will open the spreadsheet, allow it to be modified and rewritten back to the CD. This is part of the requirements. Does anyone know of such software and its name? Maybe offshore, but not here. There are only two possibilities. First include a copy of Excel on the CD and somehow make it autorun. Yeah, Microsoft would *love* that. Second, include some other program which would do the same thing. Good luck with that. And now the kicker-- write the spreadsheet back to CD. Okay, maybe, if it's a CD-RW. But who's going to pay attention to that little detail? And as far as I know, writing to a CD is far more complicated than writing to a hard drive. You can't overwrite data on a CD-RW. Once written, it's written. You have to cover up the section that was written to (in software), and then write the contents again. Eventually, you'll run out of room. And it almost necessitates having a copy of some CD-writing software on the CD, since there may not be such software on the client machine. And all this assumes the user is running Windows. The binaries for one OS won't run on a different OS. Now, watch. Someone will get on and say, Oh sure, you can do that with such-and-such software. I did it the other day. In which case, just forget I said anything. ;-} Paul or take the easy approach and use a memory card instead - or better yet inform them that you are a web developer and in these crazy modern times you can actually do this online or even save to the internet - crazy as it may seem. and finally, the offshore company was fired for a reason, just say no they were talking bollocks but we can offer you x y and z google spreadsheets -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Email Setup problem
Moses wrote: Hi Everyone I have tried to configure my php.in file so as allow me to send email in PHP from local server. I added the lines in php.ini file sendmail_path = /usr/sbin/sendmail -t sendmail_from = n...@localhost Therafter restarted my apache by: sudo /etc/init.d/apache2 restart However, I get the following error when I restart mt apache apache2: Could not reliably determine the server's fully qualified domain name, using 12... for ServerName Thanks. Moses That has nothing to do with PHP or sendmail, it's in the Apache conf. You would see this whether you configured sendmail or not. AFAIK it's not a problem, especially on a dev box. -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php ssl connection timeout issue
Jerry Zhao wrote: Hi, I am having trouble connecting to https sites using php's builtin ssl functions. I tried: file_get_contents('https://securesite') fsockopen('ssl://securesite', 443, $errno, $errstr,20) and same errors every time: SSL: connection timeout Failed to enable crypto Call to openssl_error_string() returns no error. Curl worked both within php and as standalone client. The strange thing is that the connection seemed to be dropped immediately upon contact with the server, i.e., the call to the above functions failed immediately, which I think contradicts the timeout error. Any tips on the cause of this issue or how to debug this is appreciated. Regards, Jerry. assuming you've checked for mod_ssl and tried connecting up to an ssl server you know works fine? then check for bad ssl certificates on the remote server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php ssl connection timeout issue
I tried different combination of ssl clients and servers, it all points to problems on the client side of my new php build. The same code worked on an older php build. On Thu, May 14, 2009 at 4:57 PM, Nathan Rixham nrix...@gmail.com wrote: Jerry Zhao wrote: Hi, I am having trouble connecting to https sites using php's builtin ssl functions. I tried: file_get_contents('https://securesite') fsockopen('ssl://securesite', 443, $errno, $errstr,20) and same errors every time: SSL: connection timeout Failed to enable crypto Call to openssl_error_string() returns no error. Curl worked both within php and as standalone client. The strange thing is that the connection seemed to be dropped immediately upon contact with the server, i.e., the call to the above functions failed immediately, which I think contradicts the timeout error. Any tips on the cause of this issue or how to debug this is appreciated. Regards, Jerry. assuming you've checked for mod_ssl and tried connecting up to an ssl server you know works fine? then check for bad ssl certificates on the remote server.
[PHP] Re: php ssl connection timeout issue
Jerry Zhao wrote: I tried different combination of ssl clients and servers, it all points to problems on the client side of my new php build. The same code worked on an older php build. checked the output of print_r( stream_get_wrappers() );? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: php ssl connection timeout issue
On Thu, May 14, 2009 at 5:05 PM, Nathan Rixham nrix...@gmail.com wrote: Jerry Zhao wrote: I tried different combination of ssl clients and servers, it all points to problems on the client side of my new php build. The same code worked on an older php build. checked the output of print_r( stream_get_wrappers() );? Array ( [0] = php [1] = file [2] = data [3] = http [4] = ftp [5] = compress.bzip2 [6] = https [7] = ftps [8] = compress.zlib )
[PHP] Re: php ssl connection timeout issue
Jerry Zhao wrote: On Thu, May 14, 2009 at 5:05 PM, Nathan Rixham nrix...@gmail.com wrote: Jerry Zhao wrote: I tried different combination of ssl clients and servers, it all points to problems on the client side of my new php build. The same code worked on an older php build. checked the output of print_r( stream_get_wrappers() );? Array ( [0] = php [1] = file [2] = data [3] = http [4] = ftp [5] = compress.bzip2 [6] = https [7] = ftps [8] = compress.zlib ) so you've got ssl support, next up you visited the url in a browser to check the ssl certificate? odds are it's invalid and that an exception has been made on the old php server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Software to read/write Excel to CD?
Ashley Sheridan wrote: Paul M Foster wrote: On Thu, May 14, 2009 at 03:22:12PM -0500, Skip Evans wrote: One of the things the other company said was possible, and I'm not familiar with... if I understand correctly, is to create a CD with not just an Excel spreadsheet, but software on that CD that when placed in another computer will open the spreadsheet, allow it to be modified and rewritten back to the CD. It has to be a CD-RW, the CD-RW has to be in UDF format, and the host machine has to be able to read and rewrite CD-RWs in UDF. This is actually not that tough to arrange--it just has nothing to do with PHP. 'DozeXP should be able to do this, and Linux will do this if the right kernel options are on. Don't know about OS X. Second, include some other program which would do the same thing. Good luck with that. OOO Calc, which should be just fine for basic tasks and is Free. And now the kicker-- write the spreadsheet back to CD. Okay, maybe, if it's a CD-RW. But who's going to pay attention to that little detail? And as far as I know, writing to a CD is far more complicated than writing to a hard drive. You can't overwrite data on a CD-RW. UDF, which has been a standard for quite some time, allows this. The main thing you lose is some space on the CD-RW. I've never heard of anything like that, there are so many unknown variables that I would really feel for the poor team who had to take that project on! It sounds like whoever defined the requirements was trying to solve a problem in the wrong way. Why drag physical media into this when you have the Net available? And if the clients don't have the Net available, *why not*? -- Matt G / Dances With Crows The Crow202 Blog: http://crow202.org/wordpress/ There is no Darkness in Eternity/But only Light too dim for us to see -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php html integration
tedd wrote: h1 ?php echo(Hello World); ? /h1 and Hello World will be show as a H1 headline. Please note, the () seen in my use of echo is not necessary -- it's just another one of those things that I do that no one else does. It's not wrong, but it serves no purpose other than it looks good and makes sense *to me* YMMV. I do it that way as well. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] auto suggest alternate properties in class
Here's a handy little routine I just wrote to suggest properties you're trying to erroneously set that don't exist in a class. For example: Attempted to __get() non-existant property/variable 'operator_id' in class 'User'. checking for operator and suggesting the following: * id_operator * operator_name * operator_code enjoy. /** * Suggests alternative properties should a __get() or __set() fail * * @param string $property * @return string * @author Daevid Vincent [dae...@daevid.com] * @date05/12/09 * @see __get(), __set(), __call() */ public function suggest_alternative($property) { $parts = explode('_',$property); foreach($parts as $i = $p) if ($p == '_' || $p == 'id') unset($parts[$i]); echo 'checking for b'.implode(', ',$parts)./b and suggesting the following:br/\n; echo ul; foreach($this as $key = $value) foreach($parts as $p) if (stripos($key, $p) !== false) print 'li'.$key./li\n; echo /ul; } just put it in your __get() or __set() like so: public function __get($property) { echo pfont color='#ff'Attempted to __get() non-existant property/variable '.$property.' in class '.$this-get_class_name().'./fontp\n; $this-suggest_alternative($property); exit; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php