brosjr Posted January 13, 2011 Share Posted January 13, 2011 Hi all, I'm having a really strange problem. The application I've been developing isn't running ok on the server I got it hosted. Many select queries just didn't return any values, but on my computer everthing runs perfectly. I developed it using ZendStudio for Eclipse using Wampserver with PHP version 5.2.6., while the server runs the 5.1.6 version. I asked them many times to upgrade but they said it is not the problem. Before the last contact with the support, when I run the application with a PDO::FETCH_OBJ query, the page didn't returned any error message, just got blank. Now they activated some kind of error message service that reports all errors, but now it also reports errors that wasn't. For example, sometimes a page will pass a value like this: "page.php?v=true" and sometimes just not: "page.php". The code has a simple if: if(isset($_GET['v'])){ echo 'imagens/top_arearestrita.jpg'; } else ... Before this message service or on my computer it works fine, but on the server it gives this error: Notice: Undefined index: v in /var/www/html/www/intra/restrito.php on line 72 And it gives this errors for many a many lines, that before was working fine. What is that? Is there a way to activate a king of same service on my computer? And how do I can force a error message to be shown? Actually I use the code below, but it returns a black page: try{ ... }catch (Exception $ex){ echo "Erro: " .$ex->getMessage(); } Thankx Danilo Jr. [attachment deleted by admin] Quote Link to comment Share on other sites More sharing options...
joel24 Posted January 13, 2011 Share Posted January 13, 2011 to show all errors, set error_reporting to E_ALL error_reporting(E_ALL); for the lines that are returning the error, what is your code? for using $_GET and $_POST variables you should have an if (isset($_GET['variable'])) { //do whatever... } Quote Link to comment Share on other sites More sharing options...
brosjr Posted January 13, 2011 Author Share Posted January 13, 2011 Thankx joel24, I'll try to rewrite all the notice errors. Quote Link to comment 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.