new installation of cake: open_basedir restriction error

June 22, 2006 at 2:55 pm 19 comments

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.

Any idea?

About these ads

Entry filed under: baking tips, cakephp. Tags: .

saving in a loop multiple select error

19 Comments Add your own

  • 1. vericgar  |  January 17, 2007 at 5:01 am

    Another solution is to modify the .htaccess so that the php include_path doesn’t have all the extra stuff you don’t need:

    php_value include_path .

    Reply
  • 2. Jenn  |  March 29, 2007 at 5:37 am

    Thanks vericgar. That worked perfectly. Unfortunately the fix in the post no longer works it seems, and I try to avoid modifying library code anyway.

    Reply
  • 3. sasi  |  June 12, 2007 at 7:13 am

    hi. i am sasi. i want to have help from yours.

    pls give the information to install the php cake. i downloaded

    php cake latest version cake_1.2.0.5146alpha version but i cannot able to install and run the php cake.

    i have php 5.2 version. and i have IIS server in my system. pls

    help me . give the detailed instruction for phpcake installation

    Reply
  • 4. cakensoda  |  June 12, 2007 at 7:23 am

    @sasi:
    Have you tried the directions written in http://manual.cakephp.org/chapter/installing ?

    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.

    Reply
  • [...] 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 [...]

    Reply
  • 6. markofando  |  October 2, 2007 at 6:37 pm

    Want to start your private office arms race right now?

    I just got my own USB rocket launcher :-) Awsome thing.

    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

    Check out the video they have on the page.

    Cheers

    Marko Fando

    Reply
  • 7. Petixe » Troubleshooting your cakePhp installation  |  October 14, 2007 at 10:18 am

    [...] 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 [...]

    Reply
  • 8. scarlet  |  October 24, 2007 at 1:33 am

    Umm any suggestion for this error?

    Warning: main(cake/bootstrap.php) [function.main]: failed to open stream: No such file or directory in /home/1234/domains/mysite.cake.com/html/index.php on line 78

    I’ve read through the cakePHP installation guide and still couldn’t get it to work.

    This issue raise when I moved the /cake and /app to a (couple of) folder above the /public_html (which in my case is the /html)

    Some help would be appreciated

    Reply
  • 9. SamaraRegion  |  February 29, 2008 at 7:03 pm

    its the best post from you, thanks a lot

    Reply
  • 10. Amablililus  |  October 6, 2008 at 10:36 am

    hel;o! help me somebody please) I trying to find a text about news in Iraq! cilais dose I realy need it, help me please! I will be grateful

    Reply
  • 11. agonestitte  |  October 7, 2008 at 6:02 am

    hel;o! If somebody knows, tell me! I can’t find some information about dictionaries. I need spain dictionary. if you knows something about this, tell me. I will be grateful
    _________________
    | viagera buying online |

    Reply
  • 12. Prioriteta  |  November 3, 2008 at 2:48 pm

    Thanks!

    http://gosho.ru/

    Reply
  • 13. bbizbor  |  February 17, 2009 at 7:17 pm

    Поставьте Akismet

    Reply
  • 14. thelmamit  |  March 23, 2009 at 1:09 pm

    Tadalafil is taken orally and helps men suffering from erectile dysfunction achieve and maintain an erection vigara dose ! For levitra low cost fast delivery Usa. Save your money – buy cheap viagra pill now! Easy to get cheap cialis pills online! Find out more about sexual activity at the official viagara erection site.

    Reply
  • 15. brunildadic  |  March 24, 2009 at 2:31 pm

    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

    Reply
  • 16. marthavos  |  March 26, 2009 at 10:57 am

    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!

    Reply
  • 17. lanamep  |  March 26, 2009 at 3:57 pm

    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…

    Reply
  • 18. Ezoteraa  |  April 2, 2009 at 4:17 pm

    Сейчас кроме нашей основной деятельности не стоит забывать о регулярной антикризисной медитации

    Reply
  • 19. marwin2409  |  February 26, 2011 at 9:37 am

    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

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

June 2006
M T W T F S S
    Jul »
 1234
567891011
12131415161718
19202122232425
2627282930  

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: