Files Not Found

Help with installation and general calendar setttings

Files Not Found

Postby kluska » Mon Mar 29, 2010 11:42 am

Hi,
I install AAC and when I open admin site or example site I have this error's:
Image

Image

In package this files not exist;/ So what happend?
Please help me :)

Btw: Sorry for my English;)
kluska
 
Posts: 1
Joined: Mon Mar 29, 2010 11:18 am

Re: Files Not Found

Postby chris » Mon Mar 29, 2010 3:53 pm

Hello,
This is a problem that occurs on windows servers.
Unfortunately this version doesn't have the correct code for detecting
the server paths which, as you probably know, on a windows server use
backslashes as oposed to forward slashes.

So for example this path error that you are getting:
ac-includes\ajaxac-config.inc.php

should be like this:
ac-includes\ajax\ac-config.inc.php

To fix this you need to open these files:
"ac-includes" > cal.inc.php
"ac-includes" > "ajax" > ajax-common.inc.php
"ac-admin" > index.php

You should see that each file has s section of code towards the
beginning that defines teh php constant AC_ROOT
You need to adjust these lines to get it to work on your server.

Chances are you could simply replace them with this line:
Code: Select all
define("AC_ROOT",   $_SERVER["DOCUMENT_ROOT"]."\calendar\");


I intend to add support for this in the next version.

Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Re: Files Not Found

Postby titanium » Tue Jun 01, 2010 3:40 am

Hi,
If you are running a windows server

file ac-admin\index.php works when code at top of page changed to this

if(phpversion()<"5.3.0"){
// old php version
$file = __FILE__;
$break = explode('/', $file);
$pfile = $break[count($break) - 1];
$root = str_replace($pfile,"",__FILE__);
$root = str_replace("ac-admin\\","",$root);
define("AC_ROOT", $root);
}else{
define("AC_ROOT", str_replace("\\ac-admin","\\",__DIR__));
}

Note: the escaped backslashes .... it will not work without this.

calc.inc and ajax.common.inc need

define("AC_ROOT", $_SERVER["DOCUMENT_ROOT"]."\\shr\\admin\\calendar\\");

\\shr\\ being my full path from document root ...... adjust to your needs as necessary.

Hope this helps others with same problem :)
titanium
 
Posts: 2
Joined: Tue Jun 01, 2010 2:53 am

Re: Files Not Found

Postby titanium » Tue Jun 01, 2010 4:00 am

1 more problem, when logging out if you have a deprecated function error (session_is_registered), change ac-admin\admin-logout.php to:

function session_clear() {
// if session exists, unregister all variables that exist and destroy session
$exists = "no";
$session_array = explode(";",session_encode());
for ($x = 0; $x < count($session_array); $x++) {
$name = substr($session_array[$x], 0, strpos($session_array[$x],"|"));
if (@session_is_registered($name)) {
session_unregister('$name');
$exists = "yes";
}
}
if ($exists != "no") {
session_destroy();
}
}
session_clear();
if(!@session_is_registered(session_name())) {
header("Location: index.php");
}else{
echo"<h1 style=\"color:red;\">NOT Logged Out</h1>";
echo"Please contact the system administrator.";
}

Hopefully all should work now ..... good luck :)
titanium
 
Posts: 2
Joined: Tue Jun 01, 2010 2:53 am

Re: Files Not Found

Postby coey » Tue Jun 15, 2010 8:57 pm

i have the same problem

i cannot work out how to change the cal.inc and the ajax.inc

my url is casagaloalgarve.com/calendar

casagaloalgarve.com/calendar/ac-admin

cheers

coey
coey
 
Posts: 1
Joined: Tue Jun 15, 2010 8:54 pm

Re: Files Not Found

Postby GGG » Tue Nov 16, 2010 9:40 pm

Thought I would also add to this page, if you are running a old version of PHP like myself then change.

$break = explode('/', $file);

to

$break = explode('\\', $file);

at the top of ac-admin/index.php
GGG
 
Posts: 5
Joined: Mon Mar 15, 2010 10:25 pm

Re: Files Not Found

Postby misuzy » Thu Jan 05, 2012 7:01 am

titanium wrote:Hi,
If you are running a windows server

file ac-admin\index.php works when code at top of page changed to this

if(phpversion()<"5.3.0"){
// old php version
$file = __FILE__;
$break = explode('/', $file);
$pfile = $break[count($break) - 1];
$root = str_replace($pfile,"",__FILE__);
$root = str_replace("ac-admin\\","",$root);
define("AC_ROOT", $root);
}else{
define("AC_ROOT", str_replace("\\ac-admin","\\",__DIR__));
}

Note: the escaped backslashes .... it will not work without this.

calc.inc and ajax.common.inc need

define("AC_ROOT", $_SERVER["DOCUMENT_ROOT"]."\\shr\\admin\\calendar\\");

\\shr\\ being my full path from document root ...... adjust to your needs as necessary.

Hope this helps others with same problem :)


i already follow the instruction but still error..
misuzy
 
Posts: 2
Joined: Thu Jan 05, 2012 6:57 am

Re: Files Not Found

Postby jmd87 » Tue Feb 07, 2012 5:25 pm

Hi,

Im having same error aswell. Even after trying both the suggested solutions

Hope you can help :)
Joe
jmd87
 
Posts: 6
Joined: Tue Feb 07, 2012 3:59 pm

Re: Files Not Found

Postby jmd87 » Tue Feb 07, 2012 5:49 pm

Hi,

I have got the Index working ok now but the admin area displays this when i go to ac-admin/index.php

ac-config.inc.php not found

I have tried adding the: define("AC_ROOT", $_SERVER["DOCUMENT_ROOT"]."\\scripts\\calendar\\");

but doesn't do anything.

Any ideas please?

Many thanks
Joe
jmd87
 
Posts: 6
Joined: Tue Feb 07, 2012 3:59 pm

Re: Files Not Found

Postby chris » Tue Feb 07, 2012 8:37 pm

You could try hardcoding the path directly (I'm not very good with Windows servers :( )

Code: Select all
define("AC_ROOT", "/path/from/root/to/calendar/directory/");


Chris
User avatar
chris
Site Admin
 
Posts: 1088
Joined: Mon Dec 17, 2007 7:42 pm
Location: Málaga, Spain

Next

Return to Support

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron