[PHP] (Drupal function) getting error : "notice : Undefined index ?"

2003-08-25 Thread fatih olcer
hi,


i have installed drupal 4.2.0 without any problems. but when i try to
connect to
my local webserver i get errors: "notice : Undefined index"
i couldnt  get any reply to my messages from drupal.com.

i think i have a configuration problem. but i couldn't find any
solution. i can run the same code without any problems on win98 (phpdev5
installed)
i have changed some php.ini settings like display_errors = off 
but still getting errors.


- what causes "Undefined index" error?
- what is the problem on "function node_page()" (see below) ?

i'm php newbie.  thanks for help.

op. system  :  RH9 (with apache,php on it)
drupal version :  4.2.0

thanks .
Fatih Olcer.


// here is a sample code to generate the error:
function node_page() {
global $id, $user, $or, $and;

 $op = $_POST["op"]; //error line error line  error line error line  error
line
 $edit = $_POST["edit"];

 if (user_access("access content")) {
   if (empty($op)) {
 $op = arg(1);
   }

   if ($op == "feed") {
 node_feed();
 return;
   }

   if ($op == "view") {
 $node = node_load(array("nid" => arg(2), "status" => 1),
$_GET["revision"]);
   }

   theme("header", $node->title);

   $name = module_invoke(arg(2), "node", "name");

   switch ($op) {
 case "add":
   theme("box", t("Submit $name"), node_add(arg(2)));
   break;
 case "edit":
   theme("box", t("Edit $name"), node_edit(arg(2)));
   break;
 case "view":
   print node_show($node, arg(3));
   break;
 case t("Preview"):
   $edit = node_validate($edit, $error);
   theme("box", t("Preview $name"), node_preview($edit, $error));
   break;
 case t("Submit"):
   theme("box", t("Submit $name"), node_submit($edit));
   break;
 case t("Delete"):
   theme("box", t("Delete $name"), node_delete($edit));
   break;
 default:
   $result = pager_query("SELECT nid, type FROM {node} WHERE
promote = '1' AND status = '1' ORDER BY static DESC, created DESC",
variable_get("default_nodes_main", 10));

   while ($node = db_fetch_object($result)) {
 node_view(node_load(array("nid" => $node->nid, "type" =>
$node->type)), 1);
   }
   print pager_display(NULL, variable_get("default_nodes_main",
10));
   }

   theme("footer");
 }
 else {
   theme("header");
   theme("box", t("Access denied"), message_access());
   theme("footer");
 }

}

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Suggest a portal management system ?

2003-08-26 Thread fatih olcer
can you please suggest a portal management system that is:

- bug free 
- open source
- modular 
and  with a good interface


thx.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] how to block a user downloading a file?

2003-08-28 Thread fatih olcer
hi,
how to block a user downloading a file?
eg : when  a user enter an address like 
  http://localhost/downloads/testfile.cab
i want to forward him to an other address like
 http://localhost

i'm PHP newbie thanks for help.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] disable "notice" errors

2003-08-29 Thread fatih olcer
how to disable "notice error" output 


i have set "error_reporting = 2039" (in PHP.ini);
but it doesnt work.i still get "notice :Undefined index"..

RH9,PHP4
thanks for help.

fatih.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] free php + mysql hosting ?

2003-09-26 Thread Fatih Olcer
hi ,
i 'm looking for a free php + mysql hosting 

thanks .

Fatih Olcer.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] getting image width,height

2003-10-01 Thread Fatih Olcer
how can i get the image width and height ?
thanks.
Fatih.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php