[PHP] Premature end of script

2013-07-17 Thread R B
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.


Re: [PHP] Premature end of script

2013-07-17 Thread Daniel Brown
On Wed, Jul 17, 2013 at 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?

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?


--

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] Re: Premature end of script

2013-07-17 Thread Jim Giner

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.


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



[PHP] Error checking ON

2013-07-17 Thread Tedd Sperling
Hi gang:

Considering:

On Jul 17, 2013, at 11:41 AM, Jim Giner  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


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



[PHP] Re: Error checking ON

2013-07-17 Thread Jim Giner

On 7/17/2013 11:49 AM, Tedd Sperling wrote:

Hi gang:

Considering:

On Jul 17, 2013, at 11:41 AM, Jim Giner  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.


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



Re: [PHP] Error checking ON

2013-07-17 Thread Daniel Brown
On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling  wrote:
> Hi gang:
>
> Considering:
>
> On Jul 17, 2013, at 11:41 AM, Jim Giner  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).

--

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] Error checking ON

2013-07-17 Thread Tedd Sperling
On Jul 17, 2013, at 11:55 AM, Daniel Brown  wrote:
> On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling  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

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



Re: [PHP] Error checking ON

2013-07-17 Thread Jim Lucas

On 07/17/2013 09:28 AM, Tedd Sperling wrote:

On Jul 17, 2013, at 11:55 AM, Daniel Brown  wrote:

On Wed, Jul 17, 2013 at 11:49 AM, Tedd Sperling  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/

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



[PHP] zend framework & getIdentity

2013-07-17 Thread Dan Joseph
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