Jump to content

server and php


vikela

Recommended Posts

I developed a small php application and is running perfect on my local xampp server.The problem is that when i uploaded to the online(internet) server everything is not alright.I have been trying to configure the online (internet)server but no success yet.For example the following simple code..

<?php  

//session_start();

//error handler function
function customError($errno, $errstr)
  {
  echo "<b>Error:</b> [$errno] $errstr<br />";
  echo "Ending Script";
  die();
  }

//set error handler
set_error_handler("customError",E_ALL);

//trigger error
$prove=5;
if ($prove>1)
  {
  trigger_error("Value must be 1 or below",E_ALL);
  }

?>

 

 

is producing something like this...

 

Error: [$errno] $errstr

"; echo "Ending Script"; die(); }//set error handlerset_error_handler("customError",E_ALL);//trigger error$prove=5;if ($prove>1) { trigger_error("Value must be 1 or below",E_ALL); }

 

>:

Link to comment
https://forums.phpfreaks.com/topic/181832-server-and-php/
Share on other sites

try this:

 

<?php  

//session_start();

//error handler function
function customError($errno, $errstr)
  {
  echo "<b>Error:</b> [".$errno."] ".$errstr."<br />";
  echo "Ending Script";
  die();
  }

//set error handler
set_error_handler("customError",E_ALL);

//trigger error
$prove=5;
if ($prove>1)
  {
  trigger_error("Value must be 1 or below",E_ALL);
  }

?>


Link to comment
https://forums.phpfreaks.com/topic/181832-server-and-php/#findComment-958954
Share on other sites

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.