alanl1 Posted August 7, 2013 Share Posted August 7, 2013 Hi Profesionals hope i can make sense on this one. I am calling a sp_rename procedure in sqlserver with my php page and it is showing the error on the screen Array ( [0] => Array ( [0] => 01000 [SQLSTATE] => 01000 [1] => 15477 [code] => 15477 [2] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Caution: Changing any part of an object name could break scripts and stored procedures. [message] => [Microsoft][SQL Server Native Client 11.0][SQL Server]Caution: Changing any part of an object name could break scripts and stored procedures. ) ) is there a way to surpress this in php or refresh the screen or jump to another page or something as it is very annoying. apparently it is a compilation error in sqlserver during the renaming of columns which cannot be removed from a database end. thanks Link to comment https://forums.phpfreaks.com/topic/280939-surpress-output-to-screen/ Share on other sites More sharing options...
requinix Posted August 8, 2013 Share Posted August 8, 2013 PHP will not output it for you - there is code somewhere that is doing this. It's specifically using print_r(), if you want something to search for. So... make it not do that. Link to comment https://forums.phpfreaks.com/topic/280939-surpress-output-to-screen/#findComment-1443932 Share on other sites More sharing options...
mac_gyver Posted August 8, 2013 Share Posted August 8, 2013 slightly different slant on the problem - the error reporting logic in your code should log that information when on a live server, rather than outputting it to the visitor. an easy way of controlling what is logged or displayed is to use trigger_error() as that will let you use php's display_errors/log_errors settings to control where your error reporting logic sends the output. Link to comment https://forums.phpfreaks.com/topic/280939-surpress-output-to-screen/#findComment-1443962 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.