| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | register_globals and display_errors Hello, quick question regarding the php configuration. Is there a way to change these options using the ini_set() ? I know its possible to do error_reporting(VALUE) but some times display_errors are off. Thanks.
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |
| | THREAD STARTER #2 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Anyone?
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |
| | #3 (permalink) |
| Account Closed Join Date: May 2004 Location: /etc/passwd
Posts: 2,178
![]() ![]() ![]() ![]() ![]() ![]() | why not look at http://php.net/ini_set But the answer the question, you can. But only temp. When i say "temp" it will only happen when the script is running... and after that, it goes back to the normal setting in php.ini |
| |
| | #4 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | do not bother setting register_globals in a script by the time the script is executed the work has been done. You should be able to set that in a htaccess file instead, doing it there will make that setting active to any script within that folder BEFORE the script runs so will have an effect.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | THREAD STARTER #5 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Yes, i needed to do it within the script itself for some reason during execution. How would a proper example look like? ini_set("display_errors",1); ini_set("register_globals",1); Would this produce what I need? Just tested..it didn't affect the script, still doesn't show errors because display errors are off in the .ini file.
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |
| | #6 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | setting register globals to on inside a script will not affect the script at all and is useless. Register Globals affects variables etc BEFORE a script is started. regarding the errors 1 look at http://uk2.php.net/error-reporting
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | THREAD STARTER #7 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Yes, I've looked there. I just tried to set it in the script since axilant has said I am able to change this at runtime. Forget register_globals, can I do this [ ini_set('display_errors', 1); but It didn't affect my script also? ]
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |
| | #8 (permalink) |
| NamePros Expert Join Date: Nov 2003 Location: Scotland
Posts: 5,069
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | I presume if your error_reporting level is too low then it wont matter what display_errors is set too. Also it is possible that your host has blocked users from chaning settings in this way.
__________________ Manage your portfolio using my new Domain Portfolio Management script. Securing Your Domain Name From Theft |
| |
| | THREAD STARTER #9 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | So this function ini_set() in other words, is useless?
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |
| | THREAD STARTER #11 (permalink) |
| Senior Member Join Date: May 2005 Location: I'm right here
Posts: 3,526
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | The point here is that I am writing a script which should be used by some people, so I want to take in consideration that every user will have different php configuration that's why I have asked about these 2 important settings. but then I found that using error_reporting(0) would be the best as of now.
__________________ WP Theme Developer Your One-stop for Premium Magazine/CMS WordPress Themes Deluxe Themes |
| |