Problem after installing XAMPP 1.6.8

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem after installing XAMPP 1.6.8

Postby Multiplex » 11. October 2008 12:08

Hi !

I have build web site under XAMPP 1.4.16 who work well, but since the installation of XAMPP 1.6.8 i meet some problems like this one :

Warning: include(new-visitor.inc.php) [function.include]: failed to open stream: No such file or directory in C:\Serveur\www\test\index.php on line 63

Warning: include() [function.include]: Failed opening 'new-visitor.inc.php' for inclusion (include_path='.;C:\Serveur\xampp\php\pear\') in C:\Serveur\www\test\index.php on line 63

The code is the following one :
Code: Select all
<?
   // DETECTION LANGUE ET REDIRECTION

if ($langue=="")
{
$lang = explode(",",$HTTP_ACCEPT_LANGUAGE);
$lang = StrToLower(substr(chop($lang[0]),0,2));
if ($lang == "") {}
elseif (eregi("fr", $lang))
{
$langue="FR";
}
else $langue="ENG";
}

if ($langue=="ENG")   {$lvc_include_dir = 'admin/stats_en/include/';}

if ($langue=="FR") {$lvc_include_dir = 'admin/stats_fr/include/';}

   include($lvc_include_dir.'new-visitor.inc.php');

?>


what's wrong with this code under XAMPP 1.6.8 as work well with XAMPP 1.4.16 !!!

Thanks to help me !
Multiplex
 
Posts: 19
Joined: 13. October 2004 02:43
Location: France

Postby Wiedmann » 11. October 2008 14:16

First step for your own debugging:

Change:
Code: Select all
<?

To:
Code: Select all
<?php
error_reporting(E_ALL);
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Multiplex » 11. October 2008 15:01

Hello !

After your advice i obtain the following results :

Notice: Undefined variable: langue in C:\Serveur\www\test\index.php on line 3

Notice: Undefined variable: HTTP_ACCEPT_LANGUAGE in C:\Serveur\www\test\index.php on line 5

Notice: Undefined variable: langue in C:\Serveur\www\test\index.php on line 15

Notice: Undefined variable: langue in C:\Serveur\www\test\index.php on line 16

Notice: Undefined variable: lvc_include_dir in C:\Serveur\www\test\index.php on line 17

Warning: include(new-visitor.inc.php) [function.include]: failed to open stream: No such file or directory in C:\Serveur\www\test\index.php on line 17

Warning: include() [function.include]: Failed opening 'new-visitor.inc.php' for inclusion (include_path='.;C:\Serveur\xampp\php\pear\') in C:\Serveur\www\test\index.php on line 17


I do not understand why this code run with XAMPP 1.4.16 and didn't with XAMPP 1.6.8 !
My knowledge in php is limited please help me to resolve this problem !

Thanks a lot
Multiplex
 
Posts: 19
Joined: 13. October 2004 02:43
Location: France

Postby Nobbie » 11. October 2008 15:19

Google for "register_globals" ...
Nobbie
 
Posts: 13183
Joined: 09. March 2008 13:04

Postby Multiplex » 11. October 2008 16:33

I have no more these messages when change "off" for "on" on register_globals in the php.ini file !

There is a another solution in the case or host has this function on off?

Thanks for your helps
Multiplex
 
Posts: 19
Joined: 13. October 2004 02:43
Location: France

Postby Wiedmann » 11. October 2008 20:46

I have no more these messages when change "off" for "on" on register_globals in the php.ini file !

That's the bad solution. "register_globals = on" is depreciated since 7 years... (and removed in the next PHP version)

There is a another solution in the case or host has this function on off?

Read the official(!) PHP manual, chapter "external variables".
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 165 guests