PFMaBiSmAd Posted March 6, 2012 Share Posted March 6, 2012 You are likely getting a fatal runtime error (undefined sqlsrv_connect function call.) PLEASE check and show us what the phpinfo() output shows for the error_reporting and display_errors settings. By making the first <? opening tag a short one, your connection logic is not seen as being php code (if you do a 'view source' of the partially working page, you should see the short opening tag, the two lines of raw php code, and the first closing ?> tag. When you use a full <?php tag, those two lines of code are being executed and execution probably halts at that point, which is why you need to have and confirm (through testing if needed) that php's error_reporting is set to E_ALL and display_errors is set to ON. Another thought just occurred. You likely have output_buffering turned ON in your master php.ini and your header() redirects on the page are discarding any php output error messages. If output_buffering is turned on, you should turn it OFF ASAP (stop and restart your server to get any changes made to your master php.ini to take effect and confirm that the setting actually changed by using a phpinfo() statement.) Quote Link to comment https://forums.phpfreaks.com/topic/258111-php-on-new-server-no-longer-connects-mssql/page/2/#findComment-1324612 Share on other sites More sharing options...
Moron Posted March 9, 2012 Author Share Posted March 9, 2012 You are likely getting a fatal runtime error (undefined sqlsrv_connect function call.) PLEASE check and show us what the phpinfo() output shows for the error_reporting and display_errors settings. By making the first <? opening tag a short one, your connection logic is not seen as being php code (if you do a 'view source' of the partially working page, you should see the short opening tag, the two lines of raw php code, and the first closing ?> tag. When you use a full <?php tag, those two lines of code are being executed and execution probably halts at that point, which is why you need to have and confirm (through testing if needed) that php's error_reporting is set to E_ALL and display_errors is set to ON. Another thought just occurred. You likely have output_buffering turned ON in your master php.ini and your header() redirects on the page are discarding any php output error messages. If output_buffering is turned on, you should turn it OFF ASAP (stop and restart your server to get any changes made to your master php.ini to take effect and confirm that the setting actually changed by using a phpinfo() statement.) Just wanted to let you know that I'm still here. I had a family emergency earlier in the week and finally got to revisit this yesterday. There are two php.ini files on this server (2008 R2, IIS 7.0); one in C:\Windows and one in C:\Program Files (x86)\PHP\v5.3\php.ini. I made your recommended changes to BOTH because I'm still confused between "Configuration File (php.ini) Path," which points to C:\Windows, and "Loaded Configuration File," which points to C:\Program Files (x86)\PHP\v5.3\php.ini. As in, which is the "real" one? Anyway, after making your recommended changes to BOTH php.ini files, I not only stopped and restarted the website through Internet Services Manager, I also stopped and restarted the World Wide Web Publishing Service. Still, phpinfo() shows exactly ZERO changes; error_reporting is still set to "22527" and display_errors is still set to "Off," pretty as you please. So until I can figure out what this boneheaded crap is, I can't implement your suggestions. And quite frankly, this is making me feel like a total idiot. Quote Link to comment https://forums.phpfreaks.com/topic/258111-php-on-new-server-no-longer-connects-mssql/page/2/#findComment-1325491 Share on other sites More sharing options...
Muddy_Funster Posted March 12, 2012 Share Posted March 12, 2012 I thoght it would be IIS, that things a ball ache every way you look at it. Here, this may help get you going again: http://php.net/manual/en/errorfunc.configuration.php Quote Link to comment https://forums.phpfreaks.com/topic/258111-php-on-new-server-no-longer-connects-mssql/page/2/#findComment-1326302 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.