Physical Paths



I’m attempting to install phpMySpace. In the script it asks to identify the physical path to the files. I’ve tried almost everything but still keep coming up with errors such as:

Warning: main(/root/ failed to open stream: No such file or directory in /home/.jorge/bitterlogic/ on line 52

If someone could tell me how to identify the physical path to my directory, it would be appreciated. Thanks!


The full path to a particular file will be /home/username/directory/filename

For example; If your username is fred and you have a file called file.txt in the directory, the full path will be /home/fred/


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


I’ve changed the physical path to everything i can think of now…

what is this section of the error i keep getting?

No such file or directory in /home/.jorge/bitterlogic/ on line 52

more specifically the /.jorge part… i never specified /.jorge in any of the files.



Mark was correct in his answer to your question (he described the “path” which was what you asked for), but from visiting your site and looking at all the error messages that were displayed, it is pretty clear that the “base” path is not the problem.

Even with a properly set path (as Mark described), the error messages are telling you that the php include_path is the source of the problem. This is relatively common when running php as cgi on Dreamhost, especially when running scripts where the programmer has assumed a certain path wil contain your “common.php” code. Your errors are the result of the script not being able to find “common.php” in the “include_path”.

You will have to make some allowances for this, and you have a few ways to approach it:

  1. You could include a small snippet of php code at the beginning of each script to properly define the include_path, using ini_set (), to include the directory where you have “common.php” situated.

  2. You could follow the procedure in the Dreamhost Wiki for modifying a local instance of php.ini and using it and a copy of php.cgi in your own space, and modify that php.ini to set the include_path to include the directory where you have “common.php” situated

  3. You could place a copy of “common.php” in *each directory from which the code in your application calls it - not recommended, as it is very inelegant and would necessitate you changing every such copy whenever you change anything in “common.php”

  4. You could compile you own version of PHP (also described in the wiki) and set include_path to whatever it needs to be, as described above.

  5. You could modify the script wherever needed to include “common.php” by calling it with a full path.

As for the “.jorge”, that is a “dataglob” which DH uses to “group” stuff, and is transparent to your script (and optional whenever a path is called for) If a program “reads” a path, it will be included, but if you refer to a path without it, no harm is done and everything will still work. DH advises you should omit the “dataglob” when entering a path in a program, as it is not needed and, should DH change it (which could happen as they move stuff around) your script would break.