php-general Digest 5 Dec 2012 16:19:15 -0000 Issue 8055

2012-12-05 Thread php-general-digest-help

php-general Digest 5 Dec 2012 16:19:15 - Issue 8055

Topics (messages 319781 through 319803):

Re: shared memory on php servers?
319781 by: rene7705
319782 by: Sebastian Krebs
319783 by: Stuart Dallas
319784 by: Sebastian Krebs
319785 by: Alessandro Pellizzari

how to read emails with php
319786 by: Farzan Dalaee
319788 by: Daniel Brown
319789 by: Farzan Dalaee
319790 by: Jonathan Sundquist
319792 by: Farzan Dalaee
319794 by: Jonathan Sundquist
319795 by: Farzan Dalaee
319796 by: Jonathan Sundquist
319797 by: Daniel Brown
319798 by: Farzan Dalaee
319801 by: Jim Lucas

Re: building an improved service log
319787 by: Inigo Medina

Can't use the SNMP class
319791 by: Marc-Andre Bergeron
319793 by: Stuart Dallas

PHP site search broken?
319799 by: Paul M Foster
319800 by: Sebastian Krebs
319802 by: Jim Lucas
319803 by: Daniel Brown

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---
I would also like to hear any thoughts on how to efficiently add,
delete and edit data in this large and deep array structure from
multiple sessions at nearly the same time..

On Tue, Dec 4, 2012 at 11:49 AM, rene7705 rene7...@gmail.com wrote:
 Hi folks..

 I'm wondering, what's the fastest way to put a large and deep array()
 structure in shared memory on a PHP server?
---End Message---
---BeginMessage---
Hi,

Why don't you use a database? Seems more appropiate here. At least SQLite
should fit ;)

Regards,
Sebastian


2012/12/4 rene7705 rene7...@gmail.com

 I would also like to hear any thoughts on how to efficiently add,
 delete and edit data in this large and deep array structure from
 multiple sessions at nearly the same time..

 On Tue, Dec 4, 2012 at 11:49 AM, rene7705 rene7...@gmail.com wrote:
  Hi folks..
 
  I'm wondering, what's the fastest way to put a large and deep array()
  structure in shared memory on a PHP server?

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
github.com/KingCrunch
---End Message---
---BeginMessage---
On 4 Dec 2012, at 10:51, rene7705 rene7...@gmail.com wrote:

 I would also like to hear any thoughts on how to efficiently add,
 delete and edit data in this large and deep array structure from
 multiple sessions at nearly the same time..
 
 On Tue, Dec 4, 2012 at 11:49 AM, rene7705 rene7...@gmail.com wrote:
 Hi folks..
 
 I'm wondering, what's the fastest way to put a large and deep array()
 structure in shared memory on a PHP server?

Split the data up into smaller pieces. There's rarely a valid reason to store a 
huge array of data as a single blob. It's an array, so it breaks up by the 
first level of keys at the very least.

Look at APC, memcached, and redis. These are the most popular ways to store 
data in shared memory. Note that APC is a PHP extension so you can only access 
the shared memory from one machine, whereas memcached and redis are separate 
daemons so you can access them from multiple servers.

Also, as Sebastian says, a database is another option unless you have a good 
reason to want the data in shared memory rather than a DB.

-Stuart

-- 
Stuart Dallas
3ft9 Ltd
http://3ft9.com/---End Message---
---BeginMessage---
2012/12/4 Stuart Dallas stu...@3ft9.com

 On 4 Dec 2012, at 10:51, rene7705 rene7...@gmail.com wrote:

  I would also like to hear any thoughts on how to efficiently add,
  delete and edit data in this large and deep array structure from
  multiple sessions at nearly the same time..
 
  On Tue, Dec 4, 2012 at 11:49 AM, rene7705 rene7...@gmail.com wrote:
  Hi folks..
 
  I'm wondering, what's the fastest way to put a large and deep array()
  structure in shared memory on a PHP server?

 Split the data up into smaller pieces. There's rarely a valid reason to
 store a huge array of data as a single blob. It's an array, so it breaks up
 by the first level of keys at the very least.

 Look at APC, memcached, and redis. These are the most popular ways to
 store data in shared memory. Note that APC is a PHP extension so you can
 only access the shared memory from one machine, whereas memcached and redis
 are separate daemons so you can access them from multiple servers.

 Also, as Sebastian says, a database is another option unless you have a
 good reason to want the data in shared memory rather than a DB.


Beside that you can have Databases in memory too, like SQLite on a
tmpfs-mount, or a specialized memory-persistent database engine :)



 -Stuart

 --
 Stuart Dallas
 3ft9 Ltd
 http://3ft9.com/
 --
 PHP General Mailing List 

Re: [PHP] PHP site search broken?

2012-12-05 Thread Daniel Brown
On Tue, Dec 4, 2012 at 3:56 PM, Paul M Foster pa...@quillandmouse.com wrote:
 Is it just me, or is the search feature on php.net broken?

 When I enter a full search term (known good function name) and then hit
 the arrow, it brings me back to the generic search page. If I enter a
 partial search term and then click on one of the suggested
 completions, it usually (not always) does the same thing. Etc.

It's probably a legitimate issue.  I made some changes last week
to the DNS and fundamental server functionality to speed things up.
We're now using a service named myracloud[1] to help with traffic and
server load for the primary web box (the main php.net / www.php.net
system), as well as static.php.net, which handles graphics and other
media.  Unfortunately, as with any major changes, there are a few
hiccups here and there for some users.  Primarily, these are in the
form of HTTP 301's; when the server issues a redirect order, sometimes
the data isn't being sent along with it.  We're working to resolve the
issues; I just made one moderately-sized commit to hopefully repair a
lot of the issues, and will be making at least one more shortly.

If you or anyone else reading this continue to experience issues,
please submit them as bugs at https://bugs.php.net/ and zip me a quick
email to bring it to my attention.

^1: https://myracloud.com/en/?_locale=en

-- 
/Daniel P. Brown
Network Infrastructure Manager
http://www.php.net/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: shared memory on php servers?

2012-12-05 Thread tamouse mailing lists
On Tue, Dec 4, 2012 at 7:02 AM, Alessandro Pellizzari a...@amiran.it wrote:
 Il Tue, 04 Dec 2012 11:49:22 +0100, rene7705 ha scritto:

 I'm wondering, what's the fastest way to put a large and deep array()
 structure in shared memory on a PHP server?

 Using MongoDB. :)

+++

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] how to read emails with php

2012-12-05 Thread tamouse mailing lists
On Tue, Dec 4, 2012 at 12:24 PM, Farzan Dalaee farzan.dal...@gmail.com wrote:
 Warning: imap_open() [function.imap-open]: Couldn't open stream
 mail.mydomain.net:143/pop3INBOX in C:\xampp\htdocs\mail.php on line 6

 Warning: imap_check() expects parameter 1 to be resource, boolean
 given in C:\xampp\htdocs\mail.php on line 10

 Notice: Unknown: Can't open mailbox mail.mydomain.net:143/pop3INBOX:
 no such mailbox (errflg=2) in Unknown on line 0


 this is my code

 $host = 'mail.mydomain.net:143/pop3';



I'm not hugely familiar with PHP's imap -- but are you trying to
connect using the IMAP port (143) but with the POP3 protocol? POP3 is
port 110...


 $user = 'x...@mydomain.net';
 $password = 'myPassword';
 $mailbox = {$host}INBOX;
 $mbx = imap_open($mailbox , $user , $password);

You might consider checking if $mbx === false here, since if
imap_open, it will return false. Then check
imap_last_errors/imap_errors to see what the error(s) is(are).

  if (false === $mbx) exit (can't connect to $mailbox: .
imap_last_error() . PHP_EOL);




 $check = imap_check($mbx);


 On 12/4/12, Jonathan Sundquist jsundqu...@gmail.com wrote:
 What does it say when you call imap_errors or imap_last_error?


 On Tue, Dec 4, 2012 at 10:02 AM, Farzan Dalaee
 farzan.dal...@gmail.comwrote:

 i dont have access to log files on server

 On Azar 14, 1391, at 5:51 PM, Daniel Brown wrote:

  On Tue, Dec 4, 2012 at 8:10 AM, Farzan Dalaee farzan.dal...@gmail.com
 wrote:
  hi guys
  i want to open an email content ( subject ,body , attachment ) with
  php
  i use imap_php but its wont connect to host
  what should i do?
  thanx

 
 Start by finding out why it won't connect.  Check the logs on the
  server if you can, that's always the best place to look first.
 
  --
  /Daniel P. Brown
  Network Infrastructure Manager
  http://www.php.net/


 --
 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