new installation of cake: open_basedir restriction error

Problem: new installation of cake to a subfolder only. I get this error

Warning: file_exists(): open_basedir restriction in effect. File(/usr/share/pear/cake/libs/controller/components/session.php) is not within the allowed path(s): …path… in /path/to/core/folder/cake/basics.php on line 854

Error occurs within the function fileExistsInPath in basics.php

Solution: change the fileExistsInPath function to:

function fileExistsInPath($file) {
$paths = explode(PATH_SEPARATOR, ini_get(‘include_path’));
// removing /usr/share/pear from the list of includes_path
array_shift($paths); //added
array_shift($paths); //added
// the rest goes here
}Explanantion: In my conversation with one cake bakers, some server cannot find cake libs which we had included already bec it only sees the /usr/share/pear folder. So he (simreg in particular) removed the first 2paths in the include path to give way to our own cake lib paths.

This is not really the best solution, but this works for me now. I still have no idea why that happens. For now, I’l stick with that.

If you give more detailed information regarding your problem, maybe I could give you some more info. I tried to install cakephp on IIS server before but I wasn’t really that successful because I was having problem with the rewrite rules.

[…] problem I experienced before when installing this in a server is the “new installation of cake: open_basedir restriction error“. Basically, here are the solutions: 1. Hack the core. Change the fileExistsInPath (located […]

Plug into your computer and you got a remote controlled office missile launcher with 360 degrees horizontal and 45 degree vertival rotation with a range of more than 6 meters – which gives you a coverage of 113 square meters round your workplace.
You can get the gadget here: http://tinyurl.com/2qul3c

[…] problem I experienced before when installing this in a server is the “new installation of cake: open_basedir restriction error”. Basically, here are the solutions: 1. Hack the core. Change the fileExistsInPath (located in […]

Levitra the prescription erectile dysfunction (ED) tablet clinically proven to both work fast (in as little as 30 minutes for some men) and work up to 36 hours vigara tadalafil … For cialis generic very fast delivery Canada… No prescription required-buy tadalafil pill now… Easy to get sexual health pills online! Find out more about ed treatment at the great cialias blue pill site

Levitra is taken orally and helps men suffering from erectile dysfunction achieve and maintain an erection vaiagra medication ! For levitra pill very fast delivery worldwide.. No prescription required-buy cialis pills online.. Fast to get cheap viagra pills online. Find out more about cheap viagra at the online cealis order online site!

Viagra the prescription erectile dysfunction (ED) tablet clinically proven to both work fast (in as little as 30 minutes for some men) and work up to 36 hours vigara discount canada .. For cialis alternatives very fast delivery Europe.. Save your money buy cheap viagra pill online… Easy to get cheap viagra pills online. Find out more about tadalafil at the great cealis order online site…

sgarealestates provide you a comprehensive range of good quality real estate projects by all the reputed builders be it residential, commercial and retail . Besides we also serve you in leasing,selling, reselling of your properties and enjoying the returns there on. We offers you best deal of property in chandigarh, property in panchkula, property in zirakpur and property in mohali on reasonable rates.property in panchkula