[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] [Qube3] Editing php.ini Qube3



"Jansen Editorial Services" <jes@xxxxxxxxxxxx> wrote:
> We have a new Qube3 with PHP, MySQL, etc. I would like php to find files
> that need to be included or required -- to do that, I would like to edit
> the part of php.ini that says
> include_path="/usr/sausalito/ui/libPhp" to say
> include_path=".:/usr/sausalito/ui/libPhp"
> Logged in as admin, it will not let me edit this file. I know next to
> nothing about unix so I do not know how to make it let me do my edit.

You need to login as "root".  After logging in as admin, type "su -", then
at the prompt supply the admin password.

> I could get around this by putting the files that need to be included or
> required into the include_path directory, but it will not let me do that
> either.

Probably b/c admin doesn't have access.

> Since the Qube3 depends quite a bit on php, I understand that precautions
> may have been taken to keep people from screwing it up, but I want php to
> find files that are in include() or require() statements.

You have several options in addition to what you tried (which will affect
all PHP scripts on the server).  The following solutions will affect only
specific PHP files or files within a specific directory.

You can also specify the full path in those statements.  Or create a
variable or constant with the path and write your statements like:

include( INC_PATH . $file ) or include ( $inc_path . $file ).

Or at the top of your script you can add:

ini_set( 'include_path', '/path_here' );

Or you could add the following to a .htaccess file.

php_value include_path .:/usr/sausalito/ui/libPhp

You can also add it to the VirtualHost container for a specific site.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/