#21907 [Opn->Fbk]: Fatal error: Call to undefined function: get_attribute_node()
| From: | sniper@php.net | Date: | Tue, 04 Feb 2003 23:30:23 +0000 |
| Subject: | #21907 [Opn->Fbk]: Fatal error: Call to undefined function: get_attribute_node() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-32145@lists.php.net to get a copy of this message | ||
ID: 21907
Updated by: sniper@php.net
Reported By: ddepill1@ta.telecom.com.ar
-Status: Open
+Status: Feedback
Bug Type: DOM XML related
Operating System: Solaris 5.7
PHP Version: 4.2.3
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
The compile error should really be fixed now.
If it still persists, let us know what compiler/version
you're using.
Previous Comments:
------------------------------------------------------------------------
[2003-01-29 07:22:33] ddepill1@ta.telecom.com.ar
I try with the snapshot php4-STABLE-200301282030, and when i execute
make, appear this error:
In file included from
/opt/php/php4-STABLE-200301282030/main/php_scandir.c:20:
/opt/php/php4-STABLE-200301282030/main/php_scandir.h:15: warning:
`struct dirent' declared inside pa
rameter list
/opt/php/php4-STABLE-200301282030/main/php_scandir.h:15: warning: its
scope is only this definition
or declaration, which is probably not what you want.
/opt/php/php4-STABLE-200301282030/main/php_scandir.h:19: warning:
`struct dirent' declared inside pa
rameter list
/opt/php/php4-STABLE-200301282030/main/php_scandir.c:46: conflicting
types for `alphasort'
/opt/php/php4-STABLE-200301282030/main/php_scandir.h:15: previous
declaration of `alphasort'
/opt/php/php4-STABLE-200301282030/main/php_scandir.c:53: conflicting
types for `scandir'
/opt/php/php4-STABLE-200301282030/main/php_scandir.h:19: previous
declaration of `scandir'
/opt/php/php4-STABLE-200301282030/main/php_scandir.c: In function
`scandir':
/opt/php/php4-STABLE-200301282030/main/php_scandir.c:106: warning:
passing arg 4 of `qsort' from inc
ompatible pointer type
make: *** [main/php_scandir.lo] Error 1
------------------------------------------------------------------------
[2003-01-28 12:14:57] sniper@php.net
Please try newer snapshot, this compiler error should
be fixed now.
------------------------------------------------------------------------
[2003-01-28 12:01:24] ddepill1@ta.telecom.com.ar
U send me an email with u feedback:
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
I try to install this version of PHP, with the next configuration:
./configure --with-apache=./../../Apache/apache_1.3.27 \
--with-dom\
--with-oci8=/Persa/Oracle \
--with-gd \
--with-freetype-dir \
--enable-gd-native-ttf \
--enable-gd-imgstrttf \
--with-png-dir \
--with-zlib \
--enable-track-vars
And when i ejecute make... i retrive this error:
In file included from
/opt/php/php4-STABLE-200301281230/main/php_scandir.c:20:
/opt/php/php4-STABLE-200301281230/main/php_scandir.h:15: warning:
`struct dirent' declared inside parameter list
/opt/php/php4-STABLE-200301281230/main/php_scandir.h:15: warning: its
scope is only this definitionor declaration, which is probably not what
you want.
/opt/php/php4-STABLE-200301281230/main/php_scandir.h:19: warning:
`struct dirent' declared inside parameter list
/opt/php/php4-STABLE-200301281230/main/php_scandir.c:44: conflicting
types for `alphasort'
/opt/php/php4-STABLE-200301281230/main/php_scandir.h:15: previous
declaration of `alphasort'
/opt/php/php4-STABLE-200301281230/main/php_scandir.c:51: conflicting
types for `scandir'
/opt/php/php4-STABLE-200301281230/main/php_scandir.h:19: previous
declaration of `scandir'
/opt/php/php4-STABLE-200301281230/main/php_scandir.c: In function
`scandir':
/opt/php/php4-STABLE-200301281230/main/php_scandir.c:104: warning:
passing arg 4 of `qsort' from incompatible pointer type
make: *** [main/php_scandir.lo] Error 1
What can i do to resolve my problem ???
Thanks,
Damian.-
------------------------------------------------------------------------
[2003-01-27 17:05:37] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-01-27 12:17:29] ddepill1@ta.telecom.com.ar
Hi, my name is Damian.
I'm programming in php and i'm using DOMXML in SOLARIS 5.7 (Apache
1.3.27).
I have the next problem:
I build a XML document with a function, and then i try to parse this
document with DOM XML, but sometimes i have a problem. In the web
appear this error:
Fatal error: Call to undefined function: get_attribute_node()
This error is random, sometimes is work ok, and somtimes i have this
error.
Have u got any information about that ???
This is my code:
<?
session_start(); /* Inicio la sesion */
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Pagina nueva 1</title>
<base target="principal">
<link rel="stylesheet" href="/style.css" type="text/css">
</head>
<body bgcolor="#00005B">
<?
$start=10;
$delta=20;
$nivel=0;
/* Abre el documento */
$doc = domxml_open_mem($documento_domxml);
if(isset($variable_metodo_get)){
$elemento_metodo_get=$doc->get_elements_by_tagname
($variable_metodo_get);
$atributo_desplegado_elemento_metodo_get=$elemento_metodo_get[0]->get_attribute_node("DESPLEGADO");
if($atributo_desplegado_elemento_metodo_get->value() == "FALSE"){
$elemento_metodo_get[0]->set_attribute("DESPLEGADO", "TRUE");
} else{
$elemento_metodo_get[0]->set_attribute("DESPLEGADO",
"FALSE");
}
$documento_domxml=$doc->dump_mem(true);
}
/* Obtengo el elemento root */
$root=$doc->document_element();
/* Obtengo los hijos de root */
$child_root=$root->child_nodes();
imprime_menu($root,count($child_root),$PHP_SELF,$start,$delta,$nivel);
/* Imprimo el menu */
/* Funcion recursiva */
function
imprime_menu($elemento_padre,$cant_hijos,$pagina_actual,$layer_start,$layer_delta,$nivel_func)
{
/* Obtengo los hijos del padre */
$hijos=$elemento_padre->child_nodes();
// echo "Tiene ".$cant_hijos." hijos<BR>";
for( $i = 0 ; $i < $cant_hijos ; $i++){
// echo "i=".$i."<BR>";
$atributo_desplegado=$hijos[$i]->get_attribute_node("DESPLEGADO");
$atributo_nombre_menu=$hijos[$i]->get_attribute_node("NOMBRE_MENU");
$atributo_tipo=$hijos[$i]->get_attribute_node("TIPO");
if( $atributo_tipo->value() == "LINK")
$atributo_path=$hijos[$i]->get_attribute_node("PATH");
// echo "Menu : ".$atributo_nombre_menu->value()." (TIPO ->
".$atributo_tipo->value().")<BR> Valor:
".$atributo_desplegado->value()."<BR>";
?>
<div id="Layer<? echo $layer_start; ?>" style="position:absolute;
width:<?
if($atributo_tipo->value() == "MENU") echo 140 - 6 * $nivel_func;
else echo 140 - 6 * ($nivel_func + 1); ?>px; height:<? echo
$layer_delta; ?>px; z-index:1; left: <?
if($atributo_tipo->value() == "MENU") echo 6 * $nivel_func + 6;
else echo 6 * ($nivel_func + 1) + 6; ?>px; top: <? echo
$layer_start; $layer_start=$layer_start + $layer_delta; ?>px"><b><a
href="
<?
if($atributo_tipo->value() == "MENU"){
echo
$pagina_actual."?variable_metodo_get=".$hijos[$i]->node_name();
}else{
/* Es un Link */
echo $atributo_path->value();
}
?>
"onMouseOver="self.status='<? echo $atributo_nombre_menu->value();
?>'; return true" onMouseOut="self.status=''; return true"
class="<?
if($atributo_tipo->value() == "MENU") echo "carpeta";
else echo "link"; ?>" target="<? if($atributo_tipo->value() ==
"MENU")
echo "_self";
else echo "principal"; ?>">
<? if($atributo_tipo->value() == "MENU" &&
$atributo_desplegado->value() == "TRUE") echo " - ";
if($atributo_tipo->value() == "MENU" && $atributo_desplegado->value()
== "FALSE") echo " + ";
echo $atributo_nombre_menu->value(); ?> </a></b></div>
<?
if($atributo_desplegado->value() == "TRUE"){
$layer_start=imprime_menu($hijos[$i],count($hijos[$i]->child_nodes()),$pagina_actual,$layer_start,$layer_delta,$nivel_func+1);
/* Imprimo los hijos */
}
}
return $layer_start;
}
?>
</body>
</html>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=21907&edit=1