[PHP] [php] socket connection problem

2009-05-27 Thread help
Hi, I am trying to connect to specific server using but I have the below error messagr. Whta could be the problem? $fp = fsockopen($ip,$port, $errno, $errstr, $timeout); fwrite($fp,$LRG); //return $errstr ($errno); if (!$fp) { echo $errstr ($errno); //$errstr ($errno)br /\n; } *A

Re: [PHP] Re: PHP list posting confirmation for izod...@gmail.com

2009-05-27 Thread BeMyCandy.com
I need to establish connection to the server first, send in my login packet and before reading the server response. The same error when I also use the below function: $fp = stream_socket_client($con:$ip:$port, $errno, $errstr, $timeout); if (!$fp) { echo $errstr ($errno); //$errstr

[PHP] PHP ping and exec() hangs apache

2009-05-27 Thread Kamil Walas
Hi, I stuck with strange error. I have following code: ? echo 'BEFORE'; echo exec(ping -c1 -w1 1.1.25.38); echo 'AFTER'; ? Address doesn't exist. When execute script from command line everything works fine. But when I go to the file by Firefox it hangs out and apache need to be

Re: [PHP] PHP scalability problem

2009-05-27 Thread Marc Steinert
Have a look at APC. APC is a bytecode cache, that stores bytecode generated of your PHP scripts, so that your PHP code don't need be parsed every time the script is invoked. http://pecl.php.net/package/apc I was able to increase the performance of my PHP scripts dramatically. Greetings from

[PHP] getting file location

2009-05-27 Thread Grega Leskovsek
I have made a CMS with editing files. When I display the file name it shows something like ../subdir/filename.php How can I display the actual filename that's on the web: like http://localhost/subdir/filename.php or even better if it is possible: http://domainname/subdir/filename.php ? Thanks in

[PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread HELP!
Hi, error: php_network_getaddresses: getaddrinfo failed: No such host is known $fstream = stream_socket_client($con:$ip:$port, $errno, $errstr, $timeout); if($fstream){ $br = fwrite($fstream,$login_request_block); $str = stream_get_contents($fstream); print( Connection successful: $str

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Stuart
2009/5/27 HELP! izod...@gmail.com: Hi,  error: php_network_getaddresses: getaddrinfo failed: No such host is known  $fstream = stream_socket_client($con:$ip:$port, $errno, $errstr, $timeout);  if($fstream){  $br = fwrite($fstream,$login_request_block);  $str =

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread HELP!
$port =xx; $ip =xx; $con =$transport = tcp; On Wed, May 27, 2009 at 1:24 PM, Stuart stut...@gmail.com wrote: 2009/5/27 HELP! izod...@gmail.com: Hi, error: php_network_getaddresses: getaddrinfo failed: No such host is known $fstream = stream_socket_client($con:$ip:$port, $errno,

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Stuart
2009/5/27 HELP! izod...@gmail.com: $port =xx;  $ip =xx;  $con =$transport = tcp; Which part of See the manual for details confused you? You're passing ... $con:$ip:$port ... which based on the above will translate to ... tcp:xx:xx ... which is invalid. It should be ...

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread HELP!
I have made the correction but the error remiins: $port =xx; $ip =xx $con =tcp; $timeout = 30; $fstream = stream_socket_client($con://$ip:$port, $errno, $errstr, $timeout); if($fstream){ $str = stream_get_contents($fstream); print( Connection successful: $str ); } else{ echo

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Stuart
2009/5/27 HELP! izod...@gmail.com: I have made the correction but the error remiins: $port =xx;  $ip =xx  $con =tcp;  $timeout = 30;  $fstream = stream_socket_client($con://$ip:$port, $errno, $errstr, $timeout);  if($fstream){   $str = stream_get_contents($fstream);   print(

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Stuart
2009/5/27 HELP! izod...@gmail.com: start run cmd telnet ip port could not connect In that case your problem is not with PHP. I suggest you talk to your network administrator. -Stuart -- http://stut.net/ On Wed, May 27, 2009 at 1:44 PM, Stuart stut...@gmail.com wrote: 2009/5/27 HELP!

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread HELP!
I am using a single pc and i have enable firewall access. Could it be that the remote server is having trouble On Wed, May 27, 2009 at 2:02 PM, Stuart stut...@gmail.com wrote: 2009/5/27 HELP! izod...@gmail.com: start run cmd telnet ip port could not connect In that case your problem

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Stuart
2009/5/27 HELP! izod...@gmail.com: I am using a single pc and i have enable firewall access. Could it be that the remote server is having trouble There's like 37 different things it could be, none of which have anything to do with PHP. You may find someone on this list willing to help you out,

[PHP] continue working after finishing up with the http client

2009-05-27 Thread Tom Worster
what options are there to do the following: 1. receive request from client (including post data) 2. do some work, update the db, prepare output for client 3. send output and finish up with the client 4. do some more work that might take considerable time, updating the db some more it would be

Re: [PHP] [php] php_network_getaddresses: getaddrinfo failed: No such host is known

2009-05-27 Thread Daniel Brown
On Wed, May 27, 2009 at 09:08, Stuart stut...@gmail.com wrote: There's like 37 different things it could be, none of which have anything to do with PHP. You may find someone on this list willing to help you out, but your better bet would be to find a list more suited to the problem. I

RE: [PHP] continue working after finishing up with the http client

2009-05-27 Thread bruce
hi tom... exacly what are you trying to accomplish? is this in a web app? has the user hit the site, logged in, etc? can you provide an example of what the sequence of events are that you're trying to deal with.. thanks -Original Message- From: Tom Worster [mailto:f...@thefsb.org]

Re: [PHP] PHP scalability problem

2009-05-27 Thread Daniel Brown
On Tue, May 26, 2009 at 23:26, tRace DOliveira married...@yahoo.com wrote: What I am trying to achieve is to have the server do less processing. Like I said PHP is a server side scripting language and each time a request is made a process is spawned and processes are heavy weight as compared

Re: [PHP] continue working after finishing up with the http client

2009-05-27 Thread Tom Worster
On 5/27/09 9:50 AM, bruce bedoug...@earthlink.net wrote: exacly what are you trying to accomplish? is this in a web app? has the user hit the site, logged in, etc? can you provide an example of what the sequence of events are that you're trying to deal with.. it is a web app. let's say

[PHP] Facelets for PHP

2009-05-27 Thread David Greenberg
Hi all, It is very likely that there is already a framework out there somewhere that does this, and that my searches are just too primitive to find it. Please bear with me. I would like to structure a site where every page is written in pure XHTML. In addition to the standard XHTML tag

Re: [PHP] continue working after finishing up with the http client

2009-05-27 Thread David Otton
2009/5/27 Tom Worster f...@thefsb.org: without getting into whether or not this cache design makes sense, my question in this example is: what options are there for ending the http transition and then continuing on to do the cache update work? You either continue processing then-and-there

Re: [PHP] Facelets for PHP

2009-05-27 Thread David Négrier
Hi David, I know at least one framework that can do it. It's called Xaja: http://www.thecodingmachine.com/ext/xaja/doc/ In fact, it is doing much more than just providing facelets since its main purpose is to provide reverse ajax features. It already supports a number of custom tags, and

[PHP] not a shopping cart

2009-05-27 Thread PJ
I am setting up a b2b product site where food professionals can order unique regional products. For this I have to implement a simple series of pages that display the products and prices. Using php/mysql/css I load the products, prices etc. with ease. I have no use for any shopping carts as that

Re: [PHP] not a shopping cart

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 11:52 AM, PJ af.gour...@videotron.ca wrote: I am setting up a b2b product site where food professionals can order unique regional products. For this I have to implement a simple series of pages that display the products and prices. Using php/mysql/css I load the

RE: [PHP] templating engine options

2009-05-27 Thread Andrea Giammarchi
Moreover, you can transform XML into JSON via specific XSLT True, I forgot to mention it in my post, XSL just transform, and similar structures can use the same XSL so another reason to prefer it over php in the html. Regards Date: Wed, 27 May 2009 11:47:56 -0400 From: aball...@gmail.com

[PHP] Confirmation email caught by spam filter

2009-05-27 Thread LAMP
hi, I use the following code (from php.net) to send confirmation email to the person that just created an account: $headers =MIME-Versin: 1.0\n . Content-type: text/plain; charset=ISO-8859-1; format=flowed\n . Content-Transfer-Encoding: 8bit\n .

RE: [PHP] continue working after finishing up with the http client

2009-05-27 Thread bruce
hi tom... if i understand your state diagram/workflow process. your server repsonds to the client request, with two actions... action 1) return data to client relatively fast action 2) insert the data into your cache (or whereever) which takes time... is this correct? do you have to somehow

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread Andrew Ballard
On Wed, May 27, 2009 at 12:07 PM, LAMP l...@afan.net wrote: hi, I use the following code (from php.net) to send confirmation email to the person that just created an account:  $headers =    MIME-Versin: 1.0\n .                Content-type: text/plain; charset=ISO-8859-1; format=flowed\n .  

[PHP] Displaying images

2009-05-27 Thread Miller, Terion
I am trying to get an image to display but I get nothing if done like this: tr tdScout Photo:/td tdimg src=?php echo $row['ePhoto'];?/td /tr If I just echo the field I do get the file name -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread LAMP
Andrew Ballard wrote: On Wed, May 27, 2009 at 12:07 PM, LAMP l...@afan.net wrote: hi, I use the following code (from php.net) to send confirmation email to the person that just created an account: $headers =MIME-Versin: 1.0\n . Content-type: text/plain;

Re: [PHP] not a shopping cart

2009-05-27 Thread PJ
I was afraid I would get this kind of reaction, but it is not what I want or need. As I mentioned, all these shopping carts are overbloated for the kind of application I am creating. I do not need all the heavy baggage that come with them. I have looked at them, played with them some years back

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 1:44 PM, Per Jessen p...@computer.org wrote: LAMP wrote: The problem is the confirmation emails and reset password emails are very often caught by email filter and finish in Spam/Junk folder, or even stopped by ISP. What am I doing wrong, or what to do to improve

Re: [PHP] Re: Displaying images

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 1:46 PM, Shawn McKenzie nos...@mckenzies.netwrote: Miller, Terion wrote: I am trying to get an image to display but I get nothing if done like this: tr tdScout Photo:/td tdimg src=?php echo $row['ePhoto'];?/td /tr If I just echo

Re: [PHP] Re: Displaying images

2009-05-27 Thread Miller, Terion
On 5/27/09 12:49 PM, Bastien Koert phps...@gmail.com wrote: On Wed, May 27, 2009 at 1:46 PM, Shawn McKenzie nos...@mckenzies.netwrote: Miller, Terion wrote: I am trying to get an image to display but I get nothing if done like this: tr tdScout Photo:/td tdimg

Re: [PHP] not a shopping cart

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 1:39 PM, PJ af.gour...@videotron.ca wrote: I was afraid I would get this kind of reaction, but it is not what I want or need. As I mentioned, all these shopping carts are overbloated for the kind of application I am creating. I do not need all the heavy baggage that

Re: [PHP] Re: Displaying images

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 1:51 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 5/27/09 12:49 PM, Bastien Koert phps...@gmail.com wrote: On Wed, May 27, 2009 at 1:46 PM, Shawn McKenzie nos...@mckenzies.net wrote: Miller, Terion wrote: I am trying to get an image to display

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
Miller, Terion wrote: Does the filename include the path? Does the image with said filename actually exist in that path? -- Thanks! -Shawn http://www.spidean.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Hmm guess I

Re: [PHP] continue working after finishing up with the http client

2009-05-27 Thread Tom Worster
On 5/27/09 12:35 PM, bruce bedoug...@earthlink.net wrote: hi tom... if i understand your state diagram/workflow process. your server repsonds to the client request, with two actions... action 1) return data to client relatively fast action 2) insert the data into your cache (or

Re: [PHP] continue working after finishing up with the http client

2009-05-27 Thread Tom Worster
On 5/27/09 10:33 AM, David Otton phpm...@jawbone.freeserve.co.uk wrote: 2009/5/27 Tom Worster f...@thefsb.org: without getting into whether or not this cache design makes sense, my question in this example is: what options are there for ending the http transition and then continuing on to

Re: [PHP] PHP ping and exec() hangs apache

2009-05-27 Thread Ashley Sheridan
On Wed, 2009-05-27 at 10:25 +0200, Kamil Walas wrote: Hi, I stuck with strange error. I have following code: ? echo 'BEFORE'; echo exec(ping -c1 -w1 1.1.25.38); echo 'AFTER'; ? Address doesn't exist. When execute script from command line everything works fine. But when

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread Tom Worster
On 5/27/09 12:07 PM, LAMP l...@afan.net wrote: The problem is the confirmation emails and reset password emails are very often caught by email filter and finish in Spam/Junk folder, or even stopped by ISP. What am I doing wrong, or what to do to improve the code? i've run into this. among

Re: [PHP] getting file location

2009-05-27 Thread Ashley Sheridan
On Wed, 2009-05-27 at 13:03 +0200, Grega Leskovsek wrote: I have made a CMS with editing files. When I display the file name it shows something like ../subdir/filename.php How can I display the actual filename that's on the web: like http://localhost/subdir/filename.php or even better if it is

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread Ashley Sheridan
On Wed, 2009-05-27 at 14:41 -0400, Tom Worster wrote: On 5/27/09 12:07 PM, LAMP l...@afan.net wrote: The problem is the confirmation emails and reset password emails are very often caught by email filter and finish in Spam/Junk folder, or even stopped by ISP. What am I doing wrong, or

Re: [PHP] Re: Displaying images

2009-05-27 Thread Ashley Sheridan
On Wed, 2009-05-27 at 14:03 -0400, Bastien Koert wrote: On Wed, May 27, 2009 at 1:51 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 5/27/09 12:49 PM, Bastien Koert phps...@gmail.com wrote: On Wed, May 27, 2009 at 1:46 PM, Shawn McKenzie nos...@mckenzies.net wrote:

Re: [PHP] not a shopping cart

2009-05-27 Thread Shawn McKenzie
PJ wrote: I was afraid I would get this kind of reaction, but it is not what I want or need. As I mentioned, all these shopping carts are overbloated for the kind of application I am creating. I do not need all the heavy baggage that come with them. I have looked at them, played with them

[PHP] Re: continue working after finishing up with the http client

2009-05-27 Thread Carsten Wiedmann
Tom Worster schrieb: what options are there to do the following: 1. receive request from client (including post data) 2. do some work, update the db, prepare output for client 3. send output and finish up with the client 4. do some more work that might take considerable time, updating

Re: [PHP] Re: Displaying images

2009-05-27 Thread Bastien Koert
On Wed, May 27, 2009 at 3:05 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2009-05-27 at 14:03 -0400, Bastien Koert wrote: On Wed, May 27, 2009 at 1:51 PM, Miller, Terion tmil...@springfi.gannett.com wrote: On 5/27/09 12:49 PM, Bastien Koert phps...@gmail.com

Re: [PHP] Re: Displaying images

2009-05-27 Thread Ashley Sheridan
On Wed, 2009-05-27 at 15:14 -0400, Bastien Koert wrote: On Wed, May 27, 2009 at 3:05 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: On Wed, 2009-05-27 at 14:03 -0400, Bastien Koert wrote: On Wed, May 27, 2009 at 1:51 PM, Miller, Terion tmil...@springfi.gannett.com wrote:

Re: [PHP] Displaying images

2009-05-27 Thread Michael A. Peters
Miller, Terion wrote: I am trying to get an image to display but I get nothing if done like this: tr tdScout Photo:/td tdimg src=?php echo $row['ePhoto'];?/td /tr If I just echo the field I do get the file name Do you get the just the file name or the

Re: [PHP] not a shopping cart

2009-05-27 Thread PJ
Bastien Koert wrote: On Wed, May 27, 2009 at 1:39 PM, PJ af.gour...@videotron.ca mailto:af.gour...@videotron.ca wrote: I was afraid I would get this kind of reaction, but it is not what I want or need. As I mentioned, all these shopping carts are overbloated for the kind

Re: [PHP] not a shopping cart

2009-05-27 Thread PJ
Shawn McKenzie wrote: PJ wrote: I was afraid I would get this kind of reaction, but it is not what I want or need. As I mentioned, all these shopping carts are overbloated for the kind of application I am creating. I do not need all the heavy baggage that come with them. I have looked

Re: [PHP] Re: Displaying images

2009-05-27 Thread Miller, Terion
Thanks for the suggestions everyone, I have this now, but still no image showing up It is stored as a blob in the database. on the output page I am calling it like this: img src=image.php?filename=?php echo $row['ePhoto']; ? Then on the image.php page I have this: ?php

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
Miller, Terion wrote: Thanks for the suggestions everyone, I have this now, but still no image showing up It is stored as a blob in the database. on the output page I am calling it like this: img src=image.php?filename=?php echo $row['ePhoto']; ? I was assuming that ePhoto was

Re: [PHP] Re: Displaying images

2009-05-27 Thread Shawn McKenzie
Shawn McKenzie wrote: Miller, Terion wrote: Thanks for the suggestions everyone, I have this now, but still no image showing up It is stored as a blob in the database. on the output page I am calling it like this: img src=image.php?filename=?php echo $row['ePhoto']; ? I was

Re: [PHP] Why does PHP have such a pain in the a$$ configuration file?

2009-05-27 Thread b
hessi...@hessiess.com wrote: Something that seriously annoys me about PHP is the fact that it has a configuration file which can *completely* change the behaviour of the language. Perhaps you're not at all clear on the purpose of a configuration file. I am seriously considering moving to a

Re: [PHP] Comparing strings (revisited)

2009-05-27 Thread Clancy
On Mon, 25 May 2009 02:11:24 -0400, pa...@quillandmouse.com (Paul M Foster) wrote: . This is why I originated a thread along these lines some time ago. I sympathize with your pain, being a C programmer as well. Apparently, PHP plays fast and loose with types when doing == comparisons.

[PHP] PDO - Nested selects allowed?

2009-05-27 Thread Stephen
For my photography website, I have a photo gallery, and the user first sees a list of categories. They can click down to see thumbnails, and again to see individual photographs. I want to enhance this to, with the category listing, show the first thumbnail. I have a category table, a photo

Re: [PHP] Why does PHP have such a pain in the a$$ configuration file?

2009-05-27 Thread Michael A. Peters
b wrote: b) setting up your own server so you can ~shudder~ *configure* it however you like. linode offers xen virtual machines at a very affordable rate that give you complete control. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Confirmation email caught by spam filter

2009-05-27 Thread Per Jessen
Ashley Sheridan wrote: I've also seen this happen where the address that the mail was sent from is different from the MX record for the domain the email says it is sent from. The only way round this is to have the MX and A records point to the same server. It's not a real problem - lots of