Jump to content

Error message service stopped my application


brosjr

Recommended Posts

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]

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... 
}

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.