Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2003
    Posts
    70
    Thanks
    1
    Thanked 0 Times in 0 Posts

    PHP Error Messages

    I am receiving a number of PHP error messages showing at the top of a new site I am working on for a client.

    http://www.motherzzbuzz.com.au/index.php

    I am aware that you should be able to turn off the display of these error messages via the "display_errors" variable in the "php.ini" file.

    That being said, the "php.ini" file I have placed in my root directory is as follows:

    Code:
    allow_url_fopen = off
    register_globals = off
    display_errors = off
    display_startup_errors = off
    Firstly, is my "php.ini" file right? And secondly, why isn't it working if it is correct?

    Thanks in advance.

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    You need to use the .htaccess file, or ini_set() to change those values. You might also want to look into why your copy protection code is causing errors to begin with.

  • #3
    Senior Coder
    Join Date
    Mar 2003
    Location
    Atlanta
    Posts
    1,037
    Thanks
    14
    Thanked 30 Times in 28 Posts
    Quote Originally Posted by masey View Post
    I am receiving a number of PHP error messages showing at the top of a new site I am working on for a client.

    http://www.motherzzbuzz.com.au/index.php

    I am aware that you should be able to turn off the display of these error messages via the "display_errors" variable in the "php.ini" file.

    That being said, the "php.ini" file I have placed in my root directory is as follows:

    Code:
    allow_url_fopen = off
    register_globals = off
    display_errors = off
    display_startup_errors = off
    Firstly, is my "php.ini" file right? And secondly, why isn't it working if it is correct?

    Thanks in advance.
    Hi Pal, long time no see. I hope you don't have any more weather scripts to debug.

    I'd also change those settings via an .htaccess file. I'm not sure of your setup, but with one of my hosting solutions, if you were to put your own php.ini file it would take precedence over the default thats already loaded. So all the values that are not included in your new php.ini reset to their default values and not whats in the other .ini file.
    Most of my questions/posts are fairly straightforward and simple. I post long verbose messages in an attempt to be thorough.

  • #4
    Senior Coder
    Join Date
    Jan 2007
    Posts
    1,648
    Thanks
    1
    Thanked 58 Times in 54 Posts
    More importantly, I'd figure out the errors as Inigoesdr said.

    If that is not your script, I don't know if I'd use it. Especially not since PHP code protection schemes are easily avoided. And any company that invested time/money into something like that probably realizes it has little value in its product (i.e. there should be free alternatives).

  • #5
    New Coder
    Join Date
    Feb 2008
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hi masey

    The best way to see if your settings in the php.ini file "took" is to put a file in the root directory of your site and place the following code in it:

    Code:
    <?
    php_info();
    ?>
    Load that in your browser and search for "php.ini". It will tell you where php.ini got loaded from.

    Using this method is also very helpful if you start fiddling around with php setting in an .htaccess file - as you can double check that those changes you made is indeed "seen" by php

    Hope this helps

    D


  •  

    Posting Permissions

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