PHP-Umgebung richtig setzen

Gesperrt
timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

PHP-Umgebung richtig setzen

Beitrag von timo » Fr 27. Jun 2003, 09:41

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.
Zuletzt geändert von timo am Di 8. Jul 2003, 13:25, insgesamt 1-mal geändert.

Scorez
Beiträge: 40
Registriert: Sa 28. Jun 2003, 19:19
Wohnort: Mönchengladbach
Kontaktdaten:

Beitrag von Scorez » Di 8. Jul 2003, 10:48

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.
mein erster Kontakt mit einem CMS

Bild

Gast

Beitrag von Gast » Di 8. Jul 2003, 10:56

php.ini liegt bei deinem hoster ein paar ebenen höher. nix zu machen, glaub ich. :?

Scorez
Beiträge: 40
Registriert: Sa 28. Jun 2003, 19:19
Wohnort: Mönchengladbach
Kontaktdaten:

Beitrag von Scorez » Di 8. Jul 2003, 10:58

So sehe ich das auch :cry:
mein erster Kontakt mit einem CMS

Bild

Gast

Beitrag von Gast » Di 8. Jul 2003, 11:00

welchen host hast du denn? mit hosteurope soll ja alles einwandfrei funzen.

Scorez
Beiträge: 40
Registriert: Sa 28. Jun 2003, 19:19
Wohnort: Mönchengladbach
Kontaktdaten:

Beitrag von Scorez » Di 8. Jul 2003, 11:35

nee, ich hab http://www.maxhost.de und da scheint es nicht zu funktionieren.
mein erster Kontakt mit einem CMS

Bild

mikamedia
Beiträge: 26
Registriert: Mo 30. Jun 2003, 11:07
Kontaktdaten:

Beitrag von mikamedia » Do 10. Jul 2003, 12:41

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.

Gast

Beitrag von Gast » Fr 11. Jul 2003, 09:48

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

mikamedia
Beiträge: 26
Registriert: Mo 30. Jun 2003, 11:07
Kontaktdaten:

Beitrag von mikamedia » Fr 11. Jul 2003, 14:43

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.

mikamedia
Beiträge: 26
Registriert: Mo 30. Jun 2003, 11:07
Kontaktdaten:

Beitrag von mikamedia » Fr 11. Jul 2003, 15:38

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.

Gesperrt