php-general Digest 18 Jul 2013 13:43:07 -0000 Issue 8300

Topics (messages 321624 through 321632):

Re: Premature end of script
        321624 by: Daniel Brown
        321625 by: Jim Giner

Error checking ON
        321626 by: Tedd Sperling
        321627 by: Jim Giner
        321628 by: Daniel Brown
        321629 by: Tedd Sperling
        321630 by: Jim Lucas

zend framework & getIdentity
        321631 by: Dan Joseph

Split/Group date together.
        321632 by: Karl-Arne Gjersøyen

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


----------------------------------------------------------------------
--- Begin Message ---
On Wed, Jul 17, 2013 at 11:22 AM, R B <rbp...@gmail.com> wrote:
> Hello,
>
> 5 years ago, y developed a php system and was working fine. But 20 days
> ago, when y try to access to some pages (not all the pages), in the log
> appears this message and the page is not displayed:
>
> ==> /usr/local/apache/logs/error_log <==
> [Wed Jul 3 02:36:58 2013] [error] [client 10.30.6.161] Premature end of
> script
> headers: /home/capitale/public_html/miembros/myscript.php
>
> Can you help me please with this error?

    It's the vaguest of all errors and the bane of the existence of
any developer who comes across it (at least it's rarer in PHP than it
was in Perl years ago).  Essentially, it would require a lot more
information that what's been provided for us to help you debug.

    What things have changed in the last month?  Have you upgraded
PHP?  Made any changes to the code or any of the dependencies?  Is the
server out of available disk space?  Is something causing it to run
out of memory?  What happens when you run the same script from the
CLI?  What do you see when you enable all errors and error reporting?


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

--- End Message ---
--- Begin Message ---
On 7/17/2013 11:22 AM, R B wrote:
Hello,

5 years ago, y developed a php system and was working fine. But 20 days
ago, when y try to access to some pages (not all the pages), in the log
appears this message and the page is not displayed:

==> /usr/local/apache/logs/error_log <==
[Wed Jul 3 02:36:58 2013] [error] [client 10.30.6.161] Premature end of
script
headers: /home/capitale/public_html/miembros/myscript.php

Can you help me please with this error?

Thank you.

Since you state that you haven't made any changes to the system (in general), I'm going to guess that you modified an 'included' file and it has an error in it, such as an unmatched curly brace. As Dan said, turn on all error checking and reporting and see what message you get.
--- End Message ---
--- Begin Message ---
Hi gang:

Considering:

On Jul 17, 2013, at 11:41 AM, Jim Giner <jim.gi...@albanyhandball.com> wrote:

> Since you state that you haven't made any changes to the system (in general), 
> I'm going to guess that you modified an 'included' file and it has an error 
> in it, such as an unmatched curly brace.  As Dan said, turn on all error 
> checking and reporting and see what message you get.

This is what I do for error checking:

        ini_set('error_reporting', E_ALL | E_STRICT);
        ini_set('display_errors', 'On');
        ini_set('log_errors', 'On');
        ini_set('error_log', 'error_log');      

Is this:

1. Sufficient?

2. An overkill?

3. OK?

4. OR, better served with this (and provide an example).

Cheers,

tedd

_____________________
t...@sperling.com
http://sperling.com


--- End Message ---
--- Begin Message ---
On 7/17/2013 11:49 AM, Tedd Sperling wrote:
Hi gang:

Considering:

On Jul 17, 2013, at 11:41 AM, Jim Giner <jim.gi...@albanyhandball.com> wrote:

Since you state that you haven't made any changes to the system (in general), 
I'm going to guess that you modified an 'included' file and it has an error in 
it, such as an unmatched curly brace.  As Dan said, turn on all error checking 
and reporting and see what message you get.

This is what I do for error checking:

        ini_set('error_reporting', E_ALL | E_STRICT);
        ini_set('display_errors', 'On');
        ini_set('log_errors', 'On');
        ini_set('error_log', 'error_log');      

Is this:

1. Sufficient?

2. An overkill?

3. OK?

4. OR, better served with this (and provide an example).

Cheers,

tedd

_____________________
t...@sperling.com
http://sperling.com

When I'm in development mode, I leave out the last two settings and take my error messages from the screen. Simpler, quicker. I use an include file that is based upon a switch. When it's on, I set my devl settings, when not, I set my prod settings.
--- End Message ---
--- Begin Message ---
On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling <t...@sperling.com> wrote:
> Hi gang:
>
> Considering:
>
> On Jul 17, 2013, at 11:41 AM, Jim Giner <jim.gi...@albanyhandball.com> wrote:
>
>> Since you state that you haven't made any changes to the system (in 
>> general), I'm going to guess that you modified an 'included' file and it has 
>> an error in it, such as an unmatched curly brace.  As Dan said, turn on all 
>> error checking and reporting and see what message you get.
>
> This is what I do for error checking:
>
>         ini_set('error_reporting', E_ALL | E_STRICT);
>         ini_set('display_errors', 'On');
>         ini_set('log_errors', 'On');
>         ini_set('error_log', 'error_log');
>
> Is this:
>
> 1. Sufficient?
>
> 2. An overkill?
>
> 3. OK?
>
> 4. OR, better served with this (and provide an example).

    That's standard practice.  Sometimes, though, it isn't enough, and
we find ourselves using Derick's Xdebug, mod_top, or performing an
strace on either the execution or attached to a process.  For nearly
all cases, though, that's sufficient without being overkill (except
for production cases).

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

--- End Message ---
--- Begin Message ---
On Jul 17, 2013, at 11:55 AM, Daniel Brown <danbr...@php.net> wrote:
> On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling <t...@sperling.com> wrote:
>> This is what I do for error checking:
>> 
>>        ini_set('error_reporting', E_ALL | E_STRICT);
>>        ini_set('display_errors', 'On');
>>        ini_set('log_errors', 'On');
>>        ini_set('error_log', 'error_log');
>> 
>> Is this:
>> 
>> 1. Sufficient?
>> 
>> 2. An overkill?
>> 
>> 3. OK?
>> 
>> 4. OR, better served with this (and provide an example).
> 
>    That's standard practice.  Sometimes, though, it isn't enough, and
> we find ourselves using Derick's Xdebug, mod_top, or performing an
> strace on either the execution or attached to a process.  For nearly
> all cases, though, that's sufficient without being overkill (except
> for production cases).
> 

Daniel:

Thanks -- I always wondered about that.

Cheers,

tedd

PS: Of course, turned OFF for production. :-)

_____________________
t...@sperling.com
http://sperling.com

--- End Message ---
--- Begin Message ---
On 07/17/2013 09:28 AM, Tedd Sperling wrote:
On Jul 17, 2013, at 11:55 AM, Daniel Brown <danbr...@php.net> wrote:
On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling <t...@sperling.com> wrote:
This is what I do for error checking:

        ini_set('error_reporting', E_ALL | E_STRICT);
        ini_set('display_errors', 'On');
        ini_set('log_errors', 'On');
        ini_set('error_log', 'error_log');

Is this:

1. Sufficient?

2. An overkill?

3. OK?

4. OR, better served with this (and provide an example).

    That's standard practice.  Sometimes, though, it isn't enough, and
we find ourselves using Derick's Xdebug, mod_top, or performing an
strace on either the execution or attached to a process.  For nearly
all cases, though, that's sufficient without being overkill (except
for production cases).


Daniel:

Thanks -- I always wondered about that.

Cheers,

tedd

PS: Of course, turned OFF for production. :-)

_____________________
t...@sperling.com
http://sperling.com


But... It won't work in all cases. I find it best to set these settings in the server itself. Not in code. Sometimes, if you have broken code that cannot be parsed, your commands listed above will never be executed. Therefor they will never do any good.

--
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/

--- End Message ---
--- Begin Message ---
Hey Folks,

Getting a weird error...

Fatal error: Uncaught exception 'Zend_Session_Exception' with message
'Zend_Session::start() -
/product/Messenger-dev/Messenger/library/Zend/Session.php(Line:480): Error
#2 Class __PHP_Incomplete_Class has no unserializer Array' in
/product/Messenger-dev/Messenger/library/Zend/Session.php:493
Stack trace:
#0
/product/Messenger-dev/Messenger/library/Zend/Session/Namespace.php(143):
Zend_Session::start(true)
#1
/product/Messenger-dev/Messenger/library/Zend/Auth/Storage/Session.php(87):
Zend_Session_Namespace->__construct('Zend_Auth')
#2 /product/Messenger-dev/Messenger/library/Zend/Auth.php(91):
Zend_Auth_Storage_Session->__construct()
#3 /product/Messenger-dev/Messenger/library/Zend/Auth.php(151):
Zend_Auth->getStorage()
#4
/product/Messenger-dev/Messenger/library/Messenger/Core/Db/Profiler/Log.php(53):
Zend_Auth->getIdentity()
#5
/product/Messenger-dev/Messenger/library/Lm/Application/Resource/Config.php(18):
Messenger_Core_Db_Profiler_Log->__construct()
#6 /product/Messenger-dev/Messenger/library/Zend/Application/Bootstr in
/product/Messenger-dev/Messenger/library/Zend/Session.php on line 493

This seems to be triggered by:

 $this->_identity = Zend_Auth::getInstance()->getIdentity();


Has anyone seen this error before?  Its throwing me for a loop....

-- 
-Dan Joseph

http://www.danjoseph.me
http://www.dansrollingbbq.com
http://www.youtube.com/DansRollingBBQ

--- End Message ---
--- Begin Message ---
Hello again.
In my program I have this:

mysql> SELECT * FROM transportdokument WHERE dato >= '16/7/2013' AND dato
<= '18/7/2013';

This list all reccrds for 3 days. I need a way to split it up for every day
even when the requst is as above and don't know in what way I can do it.

I like to have all records for day 16 in one table in PHP/HTML and all
records for day 17 in another table.
i.e, Day 16 have 5 rows and day 17th and 18th have 7 and 8 rows.

I hope for your help and advice to do also this correct.

Thank you for your time and effort!

Karl

--- End Message ---

Reply via email to