Seite 1 von 1

Variablen

Verfasst: Sa 1. Apr 2006, 10:13
von malsdgtac
In einem Modul das in der Version 4.4 einwandfrei funktionierte, kann ich in der Verision 4.6 nun in der Konfiguration keine Ordner mehr auswählen.

Ich habe das Forum schon stundenlang durchforstet und komme nicht drauf. Kann es sein, das foglende Variable:

$cfgClient[$client]['path']['frontend'].$cfgClient[$client]['upload']

so in der Version 4.6 nicht mehr aufrufbar ist?

Verfasst: Sa 1. Apr 2006, 11:00
von phpchris
Doch, ist sie...
Das kannst du in der Datei /contenido/includes/config.php prüfen.

Verfasst: Sa 1. Apr 2006, 11:12
von malsdgtac
Danke für deinen Hinweis, da steht doch tatsächlich etwas anders drinnen:

$cfg['path']['frontend'] =

Es kommt wohl daher, dass ich das Mod_Rewrite Bundle von stese installiert habe.

Verfasst: Sa 1. Apr 2006, 11:22
von phpchris
Nein, das liegt nicht daran.

Mach mal in deinem Modul folgendes:

Code: Alles auswählen

echo "<pre>";
print_r($cfgClient);
echo "</pre>";
Und schau mal, was da steht...

Verfasst: So 2. Apr 2006, 15:11
von malsdgtac
Da bekomme ich folgende Ausgabe:

Code: Alles auswählen

Array
(
    [set] => set
    [1] => Array
        (
            [path] => Array
                (
                    [frontend] => /srv/www/vhosts/schilcherland.com/www/schilcher/
                    [htmlpath] => http://www.schilcherland.com/schilcher/
                )

            [images] => http://www.schilcherland.com/schilcher/images/
            [upload] => upload/
            [htmlpath] => Array
                (
                    [frontend] => http://www.schilcherland.com/schilcher/
                )

            [upl] => Array
                (
                    [path] => /srv/www/vhosts/schilcherland.com/www/schilcher/upload/
                    [htmlpath] => http://www.schilcherland.com/schilcher/upload/
                    [frontendpath] => upload/
                )

            [css] => Array
                (
                    [path] => /srv/www/vhosts/schilcherland.com/www/schilcher/css/
                )

            [js] => Array
                (
                    [path] => /srv/www/vhosts/schilcherland.com/www/schilcher/js/
                )

            [tpl] => Array
                (
                    [path] => /srv/www/vhosts/schilcherland.com/www/schilcher/templates/
                )

        )

)

Verfasst: So 2. Apr 2006, 17:21
von stese
ist korrekt und nun überprüfe noch ob die variable $client gefüllt ist. wenn du es in einem modul oder einer funktion aufrufst, solltest du mit

Code: Alles auswählen

global $client;


sicherstellen dass sie auch globalisiert worden ist.
wenn die danach immer noch leer ist, suche mal in der config.php im mandantenverzeichnis (standardmäßig "cms") ob in der variable $load_client ein korrekter wert (1) gesetzt ist.

schaut alles normal aus.

Verfasst: So 2. Apr 2006, 20:23
von malsdgtac
Also diese Variablen habe ich jetzt alle gecheckt.

Ich hatte heute auch nochmals im Forum gesucht ob ich zu dem Modul noch näheres finde, ich habe nur gefunden, dass es auch unter 4.6 funktionieren sollte.

Ich zeige euch einfach mal den Code um den es geht, vielleicht könnt ihr mir dann noch weiter helfen.

Auf jeden Fall Danke für eure Hilfe

Code: Alles auswählen

/*********************************************** 
* CONTENIDO MODUL - INPUT 
* 
* Modulname   :       w3concepts.gallery.v1 
* Author      :     Andreas Kummer 
* Copyright   :     mumprecht & kummer w3concepts 
* Created     :     30-08-2004 
* Modified    :     30-08-2004 
************************************************/ 

class pfad { 

   function pfad($pfad) { 
      $this->pfad = $pfad; 
      $this->pathlen = strlen($this->pfad); 
   } 

   function getPath($root,$level = 0) { 
      $content = $this->readDir($root); 

      foreach ($content as $file) { 
         if (is_dir($root.$file)) { 
            $verzeichnis = substr($root,$this->pathlen); 
            $returnvalue["{$verzeichnis}{$file}/"] = str_repeat("&nbsp;",$level * 5).$file; 
            $returnvalue = array_merge($returnvalue,$this->getPath($root.$file."/",$level+1)); 
         } 
      } 

      return $returnvalue; 
   } 

   function readDir($path) { 
      $handle = opendir($path); 

      while ($file = readdir ($handle)) { 
         if ($file != "." && $file != "..") $returnvalue[] = $file; 
      } 
      closedir($handle); 

      return $returnvalue; 
   } 

   function makeSelect($preselection) { 
      $pfad = $this->getPath($this->pfad); 

      foreach ($pfad as $key => $value) { 
         if ($preselection == $key) { 
            echo "<option value=\"$key\" selected=\"selected\">$value</option>"; 
         } else { 
            echo "<option value=\"$key\">$value</option>"; 
         } 
      } 
   } 
} 

$pfad = new pfad($cfgClient[$client]['path']['frontend'].$cfgClient[$client]['upload']); 


echo "<table cellspacing=\"0\" cellpadding=\"10\" border=\"0\">"; 

echo "<tr><td>Bilderpfad:</td>"; 
echo "<td><select size=\"1\" name=\"CMS_VAR[0]\" />"; 
$pfad->makeSelect("CMS_VALUE[0]"); 
echo "</td>"; 

echo "<tr><td>Thumbnailpfad (auch für angepasste Großbilder):</td>"; 
echo "<td><select size=\"1\" name=\"CMS_VAR[1]\" />"; 
$pfad->makeSelect("CMS_VALUE[1]"); 
echo "</td>"; 

echo "<tr><td>Thumbnailbreite (Max.):</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[2]\" value=\"CMS_VALUE[2]\" size=\"5\" /></td>"; 

echo "<tr><td>Thumbnailhöhe (Max.):</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[3]\" value=\"CMS_VALUE[3]\" size=\"5\" /></td>"; 

echo "<tr><td>Anzahl Spalten:</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[4]\" value=\"CMS_VALUE[4]\" size=\"5\" /></td>"; 

echo "<tr><td>Anzahl Zeilen:</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[5]\" value=\"CMS_VALUE[5]\" size=\"5\" /></td>"; 

// echo "<tr><td>Text für Previous-Link:</td>"; 
// echo "<td><input type=\"text\" name=\"CMS_VAR[6]\" value=\"CMS_VALUE[6]\" size=\"15\" /></td>"; 

// echo "<tr><td>Text für Next-Link:</td>"; 
// echo "<td><input type=\"text\" name=\"CMS_VAR[7]\" value=\"CMS_VALUE[7]\" size=\"15\" /></td>"; 

echo "<tr><td>Großbildbreite (Max.):</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[8]\" value=\"CMS_VALUE[8]\" size=\"5\" /></td>"; 

echo "<tr><td>Großbildhöhe (Max.):</td>"; 
echo "<td><input type=\"text\" name=\"CMS_VAR[9]\" value=\"CMS_VALUE[9]\" size=\"5\" /></td>"; 

echo "</table>"; 
Das Problem dabei ist, dass die Felder zum Aussuchen der Bilderpfade leer bleiben, das heißt ich kann keine Ordner auswählen.

Verfasst: Mo 3. Apr 2006, 14:00
von HerrB
Gibt es Fehlermeldungen im errorlog?

Gruß
HerrB

Verfasst: Di 4. Apr 2006, 09:15
von malsdgtac
Da steht sogar einiges:

Code: Alles auswählen

[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 47
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 22
[04-Apr-2006 10:14:50] PHP Warning:  %v%v() [<a href='function.%v'>function.%v</a>]: Argument #2 is not an array in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 26
[04-Apr-2006 10:14:50] PHP Warning:  Invalid argument supplied for foreach() in /srv/www/vhosts/schilcherland.com/www/contenido/includes/include.pretplcfg_edit_form.php(122) : eval()'d code on line 47
Danke für deine Hilfe

Verfasst: Di 4. Apr 2006, 12:24
von HerrB
Hast Du schon die Tips6Tricks zu V4.6.x beachtet, insbesondere zu magic_quotes und/oder setzt Du die V4.6.8.3 ein?

Gruß
HerrB

Verfasst: Di 4. Apr 2006, 12:47
von malsdgtac
Ich hatte ursprünglich die 4.6.8 installiert, habe dann aber das Mod_Rewrite Bundle von stese darüber installiert. Das setzt soviel ich weiß auf der 4.6 auf hat aber alle notwendigen Änderungen aus Tipps und Trick inkludiert.

Ich habe mir jetzt nochmals die Änderungen bezüglich der magic_quotes angesehen, und die zweite Variante des Threads ausprobiert, ändert aber nichts.