Page 1 of 1

Problem after installing XAMPP 1.6.8

PostPosted: 11. October 2008 12:08
by Multiplex
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 !

PostPosted: 11. October 2008 14:16
by Wiedmann
First step for your own debugging:

Change:
Code: Select all
<?

To:
Code: Select all
<?php
error_reporting(E_ALL);

PostPosted: 11. October 2008 15:01
by Multiplex
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

PostPosted: 11. October 2008 15:19
by Nobbie
Google for "register_globals" ...

PostPosted: 11. October 2008 16:33
by Multiplex
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

PostPosted: 11. October 2008 20:46
by Wiedmann
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".