Seite 1 von 1

PHP-Umgebung richtig setzen

Verfasst: Fr 27. Jun 2003, 09:41
von timo
Hallo,

nachdem einige von euch Probleme mit seltsamen Pfaden haben (z.b. werden Contenido-Files in Systemverzeichnissen gesucht), sollte folgende Einstellung in der php.ini weiterhelfen:

Code: Alles auswählen

include_path=<irgendwas>
durch

Code: Alles auswählen

include_path=.:<irgendwas>
ersetzen. Das sollte die Phänomäne bereinigen. Wenn ihr kein Zugriff auf die php.ini habt, müßt ihr leider auf Contenido 4.4 warten.

Verfasst: Di 8. Jul 2003, 10:48
von Scorez
Welche php.ini meinst Du denn ?? Die vom Server ? Was ist wenn ich keinen Server habe, sondern nur "normalen" Webspace ?? Ich finde die .ini nämlich nicht.

Verfasst: Di 8. Jul 2003, 10:56
von Gast
php.ini liegt bei deinem hoster ein paar ebenen höher. nix zu machen, glaub ich. :?

Verfasst: Di 8. Jul 2003, 10:58
von Scorez
So sehe ich das auch :cry:

Verfasst: Di 8. Jul 2003, 11:00
von Gast
welchen host hast du denn? mit hosteurope soll ja alles einwandfrei funzen.

Verfasst: Di 8. Jul 2003, 11:35
von Scorez
nee, ich hab http://www.maxhost.de und da scheint es nicht zu funktionieren.

Verfasst: Do 10. Jul 2003, 12:41
von mikamedia
Hi,

For all people who don't have access to php.ini
you can do this:

- create a .htaccess in your webfolder
- add this line:
php_value include_path ".:<irgendwas>"

This will overrule the php.ini value.

Hope it helps!
~john.

Verfasst: Fr 11. Jul 2003, 09:48
von Gast
Hi John,

thx a lot for your support in this community.
But please explain your php-hint more exactly.

Do you mean to create a folder, like

1. /mywebspace/.htaccess/

or a file like this?

2. i.e. /mywebspace/php.htaccess

In the second case i have only to add the line

php_value include_path ".:<irgendwas>" ?

Which path <irngedwas> I have to insert?

cu

Verfasst: Fr 11. Jul 2003, 14:43
von mikamedia
Verfasst am: Fr Jul 11, 2003 8:48 am
--------------------------------------------------------------------------------

:: Do you mean to create a folder, like
:: 1. /mywebspace/.htaccess/

Yes, you have to create a file exactly called .htaccess
within the folder of your project

Most webservers will read this file.
Some PHP values can be added to this .htaccess
This way you can add some settings for PHP, eventhough the settings in php.ini (the core settings file for PHP on the webserver) are different.

:: php_value include_path ".:<irgendwas>" ?
:: Which path <irngedwas> I have to insert?

For example, you could add this line (unix):

php_value include_path ".:/home/httpd/vhosts/domainname.nl/httpdocs/project01"

with other words: you have to fill in the full system path to your project folder.

For Windows users, add this line:
php_value include_path "c:/serverpath/project01"

NOTE: this line does *not* solve the CHOWN problem, it just makes sure that the contenido scripts will follow the exact path.

Hope it helps.

John.

Verfasst: Fr 11. Jul 2003, 15:38
von mikamedia
something I forgot for programmers only:

Within your PHP you can set the include_path so customers don't have to deal with this by themselves.

<?php
// Works as of PHP 4.3.0
set_include_path('.:/usr/local/lib/php');

// or

set_include_path('.:/usr/local/psa/home/vhosts/domainname.nl/httpdocs/contenido');

// Works in all PHP versions
ini_set('include_path', '.:/usr/local/lib/php');
?>

Might be helpful.

Also check php.net for get_include_path and restore_include_path !

Have a nice weekend!

John.