Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    I've just recently switched my development environment to a mac and have used MAMP to deploy my localhost server. I'm using simpletests to develop my applications but there seems to be a vast difference in the error reporting levels of php on my MAMP server as opposed to my windows apache deployment. Now whenever a test passes or fails it prints out a url and line number. I don't have a scooby as to where to turn this off. The line numbers I can handle but the urls all over the place is just a shambles with 200 tests.

    They look a bit like this:
    Log class test->testCreatingNewFile->No file created before first message at [/Applications/MAMP/htdocs/phpApp/testarea/simpletests/TestOfLogging.php line 20]

    Does anyone here know how to cater the specifics of the error reporting? Thanks.
    www.appletv.co.uk

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    See [phpfunction]error_reporting[/phpfunction]

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    FWIW, instead of simply hiding the errors, it's a good idea to fix them instead. I have yet to encounter a PHP error that is annoying but doesn't provide a useful message.
    PHP Code:
    error_reporting(E_ALL); 
    ...is very useful for debugging.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    Hi there, I'm at work just now but I'll try that out when I get back. The output URL is actually output both when the test passes and fails. the example I gave at the top:

    [/Applications/MAMP/htdocs/phpApp/testarea/simpletests/TestOfLogging.php line 20]

    is from a passing test, thats why its such a bother. The more information the better on the fails though.
    www.appletv.co.uk

  6. #5
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    Nope, tried all different levels or error reporting and none of them made the address go away so it must be something to do with the simpleTest reporting class. The E_STRICT though did give me some rather verbose output. I'll update with the solution when I find it, meanwhile if anyone has any experience with writing thier own test reporters in simpleTest for php testing then please do tell me how to get rid of the url from passing tests.
    www.appletv.co.uk

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Might want to see if you can direct simpleTest to do something differently.

    But tests shouldn't be running a production system anyway, so why the bother?

  8. #7
    Senior Member tha_Gsheep's Avatar
    Join Date
    Feb 2003
    Location
    Scotland
    Posts
    188
    Member #
    780
    The tests have to show their current status as they are hosted on a central system for development. There is a page that shows the status of each of the code's tests when compiled dynamically using the newest files on the dev system. This is advantageous because many individuals can contribute to the code repoistory but we'll know when someones newly contributed tests and source broke it. These tests will probably not be available on the production server at least not to the commercial users.
    www.appletv.co.uk


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com