[Форум] [Помощь] [Поиск] [Выйти] |
Добро пожаловать, User |
|
|
| ||
люди, выручайте... элементарная проблема... собственно стоит Apache 1.3.6 и собсно ПХП... дык вот етот пхп не работает, хотя вроде в httpd.conf всё, что нужно, прописываю... будте так добры - скиньте на мыло етот самый хттпд.конф с вашими настройками и комментариями где апач стоит и пхп... плииииз... ;)) |
| ||
если *nix ситему LoadModule php5_module modules/php5.so под win LoadFile "/apache2/bin/php4ts.dll" LoadModule php4_module "/apache2/bin/php4apache2.dll" а как определил, что php не работает? может нету строки?: AddType application/x-httpd-php .php |
| ||
нет, AddType application/x-httpd-php .php прописан не работает, да элементарно по моему пишу файл any.html, в нем ... <body> <?php echo "Hello world!"; ?> </body> ... его в /htdocs/ храню... потом в експлорере http://localhost/any.html дык вот никакого эха нет... |
| ||
ну дак не будет работать, надо добавить еще .html AddType application/x-httpd-php .php .html |
| ||
читайте intall.txt в папке php If you unziped the PHP package to C:php as described in the Manual Installation Steps section, you need to insert these lines to your Apache configuration file to set up the CGI binary: Example 2-3. PHP and Apache 1.3.x as CGI ScriptAlias /php/ "c:/php/" AddType application/x-httpd-php .php # For PHP 4 Action application/x-httpd-php "/php/php.exe" # For PHP 5 Action application/x-httpd-php "/php/php-cgi.exe" # specify the directory where php.ini is SetEnv PHPRC C:/php Note that the second line in the list above can be found in the actual versions of httpd.conf, but it is commented out. Remember also to substitute the c:/php/ for your actual path to PHP. Warning By using the CGI setup, your server is open to several possible attacks. Please read our CGI security section to learn how to defend yourself from those attacks. If you would like to present PHP source files syntax highlighted, there is no such convinient option as with the module version of PHP. If you chose to configure Apache to use PHP as a CGI binary, you will need to use the show_source() function. To do this simply create a PHP script file and add this code: <?php show_source("original_php_script.php"); ?>. Substitute original_php_script.php with the name of the file you wish to show the source of. Installing as an Apache module You should add the following lines to your Apache httpd.conf file: Example 2-4. PHP as an Apache 1.3.x module AddType application/x-httpd-php .php # For PHP 4 LoadModule php4_module "c:/php/sapi/php4apache.dll" # For PHP 5 LoadModule php5_module "c:/php/php5apache.dll" # specify the directory where php.ini is SetEnv PHPRC C:/php You may find after using the Windows installer for Apache that you need to define the AddModule directive for mod_php4.c. This is especially important if the ClearModuleList directive is defined, which you will find by scrolling down a few lines. You will see a list of AddModule entries, add the following line at the end of the list: AddModule mod_php4.c. For PHP 5, instead use AddModule mod_php5.c If you would like to use the source code highlighting feature, you need to add the following line to your httpd.conf: AddType application/x-httpd-php-source .phps. This should be inserted at the same place where you inserted AddType application/x-httpd-php .php above). With this setup, all files served with the .phps extension will be syntax highlighted for the browser. |
| ||
паша, ты смсу мою получил? будешь продолжать играть в слепо-глухо-немого - я будут просит каждого, кто тебя знает, передвать тебе мои сообщения. |
| ||
ответ: завтра |