xampp 1.7.2 mit php5 include Problem

Alles, was PHP betrifft, kann hier besprochen werden.

xampp 1.7.2 mit php5 include Problem

Postby andreas0063 » 16. October 2009 07:41

Hallo zusammen

Seit ich XAMPP 1.7.2 installiert, geht bei mir im PHP der includ nicht mehr.
Code: Select all
include "lang/".$_SESSION[lang].".php";


Im Errorlog, habe ich folgende Meldung gefunden:
(20024)The given path is misformatted or contained invalid characters: Cannot map GET /inc/<?=%20$_SESSION[lang]%20?>_jsfunc.js HTTP/1.1 to file, referer: http://127.0.0.1

Leider habe ich bis jetzt noch nichts gefunden was mir da weitergeholfen hat. Bis XAMPP 1.7.1 hatte ich damit nie ein Problem. Wäre froh um einen kleinen Tipp!

Gruss
andreas0063
 
Posts: 35
Joined: 30. November 2005 15:36

Re: xampp 1.7.2 mit php5 include Problem

Postby andreas0063 » 16. October 2009 08:54

Bin ein wenig weiter gekommen. Hab aber immer noch keine Lösung vom Problem :-(.
Der include funktioniert doch. Hab nach dem include gleich mal ein echo eingebaut und da geht es .... !!!!

Wo es immer noch nicht geht, ist zu unterst im HTML-Code. Sehe aber nicht warum es da nicht gehen sollt, da es früher ja immer funktioniert hat :?:

Code: Select all
include "lang/".$_SESSION[lang].".php";
    echo "$txt_4<br>";
   //-------------------------------------------------------------------------------------------
   
   //Funktionen werden eingebunden
   include "inc/func.php";
   //Die Navigationsarrays werden eingebunden
   include "inc/nav.php";

   //Startseite definieren
   if (!isset($_GET[nav])){
      $_GET[nav] = "1000000000";
   }
   ?>
   <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   <html lang="de">
   <head>
      <title><?= $txt_4 ?></title>
andreas0063
 
Posts: 35
Joined: 30. November 2005 15:36

Re: xampp 1.7.2 mit php5 include Problem

Postby andreas0063 » 16. October 2009 09:54

Hab gerade gesehen, dass schon mal etwas in dieser Richtung geschrieben wurde http://community.apachefriends.org/f/viewtopic.php?f=6&t=37209.

Normal öffne ich PHP immer mit <?php ....
Wie sieht dies jetzt in HTML aus. Da steht ja dann nur <?= $...

Ist da etwa das Problem seit XAMPP 1.7.2????
andreas0063
 
Posts: 35
Joined: 30. November 2005 15:36

Re: xampp 1.7.2 mit php5 include Problem

Postby andreas0063 » 16. October 2009 10:27

So geht es:
Code: Select all
<?php echo "<title> $txt_0 </title>"; ?>
Das kann ja nicht sein, dass ich jetzt den ganzen Code über etliche Seiten ändern muss!
Denke, installiere wieder eine ältere Version von XAMPP wo die schreibweise in HTML-Code so noch funktioniert :!: :evil:
Code: Select all
<?= $txt_4 ?>
andreas0063
 
Posts: 35
Joined: 30. November 2005 15:36

Re: xampp 1.7.2 mit php5 include Problem

Postby Nobbie » 16. October 2009 11:17

andreas0063 wrote:Denke, installiere wieder eine ältere Version von XAMPP wo die schreibweise in HTML-Code so noch funktioniert :!: :evil:
Code: Select all
<?= $txt_4 ?>


Einfacher wäre es, in php.ini den short_open_tag auf 1 zu setzen. Aber das mußt Du wissen, was Du lieber machst.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: xampp 1.7.2 mit php5 include Problem

Postby andreas0063 » 16. October 2009 11:27

puhhh .... zum Glück hatte ich noch keine Zeit zu deinstallieren. Es geht, ich danke Dir für den Typ.
Servereinstellungen kenne ich leider viel zu wenig.
Code: Select all
short_open_tag = Off
auf
Code: Select all
short_open_tag = On
gesetzt.
Nochmals vielen Dank!!!!
andreas0063
 
Posts: 35
Joined: 30. November 2005 15:36


Return to PHP

Who is online

Users browsing this forum: No registered users and 23 guests