Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Tracing fatal error in php

  1. #11
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Thanks i don't think i can upload that contents and trace out the error by you, because it have 35 more files with 1000 of lines it's time wasting for you.
    Any software avail to get detailed information about it

  2. #12
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,004
    Thanks
    44
    Thanked 3,203 Times in 3,165 Posts
    Blog Entries
    12

    Default

    I haven't used any but Google:

    https://www.google.com/search?client...gging+php+code

    lists several.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    letom (04-07-2013)

  4. #13
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Thanks dear..
    I haven't used any but Google:
    That means you cannot give assurance over that ?

  5. #14
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,004
    Thanks
    44
    Thanked 3,203 Times in 3,165 Posts
    Blog Entries
    12

    Default

    That's right. You can click on some of the links. The one for Stack Overflow is a discussion. Folks in there seemed to prefer NetBeans. But I downloaded it once and didn't find it all that useful, or maybe it required something I didn't want to install, I'm not sure. But I never used it. There was another one in that discussion that was seen as favorable, I think it was PHPed or something like that. I'd never heard of it before.

    There's also an add on for Chrome which looks promising. I may try that at some point as I like Chrome.

    I rarely have an error in PHP that I can't figure out from the on screen error in the browser. If I do, I will use some of the more basic techniques mentioned in the Stack Overflow thread, like temporarily adding an echo or print_r to get the value of something at that point in the code that might be the problem. I might even have the PHP script write to a file at key points for diagnostics, so as to not disturb the script too much.

    But usually just the error itself and its location in the code, perhaps with a little research on the error description, is enough for me to figure it out. Most often I see deprecated functions that are relatively easy to update (or in some cases just drop), that and syntax/spelling errors.

    I think that using a PHP debug program requires that it be integrated into the server, and for most things seems to require an understanding of break points. Something I haven't gotten around to yet. I'm sure once I do I will find them useful. They're available for javascript debugging as well in some browser's developer tools. Generally I find that my knowledge of javascript allows me to spot things, often without even using the error/web console(s). It's like a sixth sense.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #15
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Yes Jon
    I know it is a spelling error or may be a syntax.
    There's also an add on for Chrome which looks promising. I may try that at some point as I like Chrome.
    Can u tell me the name of that plugin?

  7. #16
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    letom,

    I think we're at the point where no one will be able to help you further if you don't share the error message.

  8. #17
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,004
    Thanks
    44
    Thanked 3,203 Times in 3,165 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by letom View Post
    Yes Jon
    I know it is a spelling error or may be a syntax.

    Can u tell me the name of that plugin?
    I was just saying what I usually find, and that (spelling/syntax) as well as the other things I mentioned, of course require no elaborate debugging program.

    The Chrome plugin is called, PHP Console, and is located:

    https://chrome.google.com/webstore/d...nnkolmclajemef

    It's like others though in that it needs to be configured to the server, and involves the use and understanding of break points for at least a part of its functionality.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #18
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Jon & Adrian
    this is the error iam getting. can u explain these non-object / error?
    Call to a member function makeAdmin() on a non-object
    if u go to goog with this error you will only get a drupal result

  10. #19
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 517 Times in 503 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by letom View Post
    Jon & Adrian
    this is the error iam getting. can u explain these non-object / error?
    Call to a member function makeAdmin() on a non-object
    if u go to goog with this error you will only get a drupal result
    That means that makeAdmin() is a method of a class, but the class isn't instantiated. For example:
    PHP Code:
    <?php
    # create a new object from myClass
    $myObject = new myClass();

    # use the myClass::someMethod()
    $myObject->someMethod();
    ...but what if there was a problem creating the object? or you accidentally overwrite the variable? If something lie that goes wrong, then you're trying to use a method on an object (or not-an-object) that doesn't have that method:
    PHP Code:
    <?php

    # say you had a typo
    $meObject->someMethod();
    # Fatal error: call to member function someMethod() on a non-object

    # or assigned the variable to something else
    $myObject "hello, world!";
    $myObject->someMethod();
    # Fatal error: call to member function someMethod() on a non-object
    that's the kind of thing you need to be looking for.

  11. The Following User Says Thank You to traq For This Useful Post:

    letom (04-08-2013)

  12. #20
    Join Date
    Jul 2012
    Posts
    197
    Thanks
    55
    Thanked 3 Times in 3 Posts

    Default

    Absolutely Mr Adrain ... You gave a right support.
    The fact is i overwrite a variable in all parts of my program ($entity) to ($myprojectname).. i missed one $entity in some where else in code.
    Is changing the name of variable to a complicated name will provide any additional security to the application directly/indirectly ?
    suppose $event is a common name , changing it to $eventyutr or something else...
    Last edited by letom; 04-08-2013 at 07:33 PM.

Similar Threads

  1. Again an fatal error
    By ajfmrf in forum PHP
    Replies: 7
    Last Post: 09-05-2012, 03:01 AM
  2. Resolved Fatal error: Function name must be a string
    By Priyo in forum PHP
    Replies: 2
    Last Post: 02-07-2012, 06:12 PM
  3. Replies: 13
    Last Post: 01-03-2012, 04:51 AM
  4. Resolved Fatal Error?
    By sparklingsky in forum PHP
    Replies: 2
    Last Post: 04-17-2009, 02:43 AM
  5. Fatal error: MySQL and PHP
    By adriana_l_2000 in forum PHP
    Replies: 1
    Last Post: 03-12-2006, 06:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •