| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Senior Member | 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.
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
| | #2 (permalink) |
| Senior Member | Anyone?
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
| | #3 (permalink) |
| Account Closed | 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) |
| Senior Member | 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 |
| |
| | #5 (permalink) |
| Senior Member | 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.
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
| | #6 (permalink) |
| Senior Member | 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 |
| |
| | #7 (permalink) |
| Senior Member | 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? ]
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
| | #8 (permalink) |
| Senior Member | 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 |
| |
| | #9 (permalink) |
| Senior Member | So this function ini_set() in other words, is useless?
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
| | #10 (permalink) |
| DNOA Member | Contact your host, and if they have blocked you from altering the INI settings (which they probably did), then yes, it's useless.
__________________ codeboards A high-quality community of programmers -- Join today and post! We want new members! |
| |
| | #11 (permalink) |
| Senior Member | 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.
__________________ Custom WordPress theme design. Top notch free WordPress themes Custom Theme Design |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |