sys Posted June 10, 2010 Report Share Posted June 10, 2010 hochyferrariМожет ты все таки переустановишь просто все это дело? Quote Link to comment Share on other sites More sharing options...
hochyferrari Posted June 11, 2010 Report Share Posted June 11, 2010 щас на винде 7 попробую... Quote Link to comment Share on other sites More sharing options...
SenTa Posted August 1, 2010 Report Share Posted August 1, 2010 Не давно тока стал увлекаться PHP и сразу столкнулся с проблемой:)Установил appserv,сделал нужные изминения в файлах, но все равно не работает php не кампилирует простые два оператора <? print "hello" phpinfo() ?> , denwer тоже устанавливал так же не кампилирует php строки Quote Link to comment Share on other sites More sharing options...
kmb Posted August 1, 2010 Report Share Posted August 1, 2010 SenTa, тег коде используй. А если хочешь помощи, то пиши конкретно и подробно... Quote Link to comment Share on other sites More sharing options...
SenTa Posted August 1, 2010 Report Share Posted August 1, 2010 (edited) <html> <head> <title>Hello in PHP</title> </head> <body> <h1> Hello in PHP</h1> <?php print "hello world"; phpinfo() ?> </body> </html> Чтобы это заработало надо расширение файла htm делать или php ? Edited August 1, 2010 by SenTa Quote Link to comment Share on other sites More sharing options...
RNZ Posted August 1, 2010 Report Share Posted August 1, 2010 Чтобы это заработало надо расширение файла htm делать или php ?Проверь. Quote Link to comment Share on other sites More sharing options...
kmb Posted August 1, 2010 Report Share Posted August 1, 2010 SenTa, Сюда тоже стоит взглянуть Example #1 phpinfo() Example Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 (edited) <?php header ("Content-type: image/png"); $img = imagecreatetruecolor(320, 240); $ink = imagecolorallocate($img, 255, 255, 255); imageline($img,0,0,320-1,240-1,$ink); imagepng($img); imagedestroy($img); ?>ничего не выводит на пхп пишу 1й разтупое<? echo "text"; ?>работает Edited September 7, 2010 by ra Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 или тот пхп-файл надо как-то связывать с хтмл-страницей?у меня просто пхп-файл содержимое, которого привел вышетупо открываю его в браузереустанволены apach+mysql+php5 Quote Link to comment Share on other sites More sharing options...
kmb Posted September 7, 2010 Report Share Posted September 7, 2010 ra, в апаче модуль пхп подключи, и установи чтобы пхп обрабатывался модулем пхп. Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 kmb, а разве то, что команды типа<? echo "text";?><?php phpinfo(); ?>работают не значит, что модуль пхп подключен? Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 я под убунту все это замутил и тут хрен найдешь инфу как подключить модуль пхп и установить чтоб пхп обрабатывался модулем пхп) Quote Link to comment Share on other sites More sharing options...
kmb Posted September 7, 2010 Report Share Posted September 7, 2010 ra, Нет, не значит. Все это делается в конфиге апача. httpd.confГде в он в убунте располагается не знаю. Поищи поиском. Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 оказывается не была установлена графическая библиотека gd sudo apt-get install php5-gd Quote Link to comment Share on other sites More sharing options...
kmb Posted September 7, 2010 Report Share Posted September 7, 2010 ra, графическая библиотека никак не может быть связана с выводом кода<?php echo "test"; ?> на экран Quote Link to comment Share on other sites More sharing options...
ra Posted September 7, 2010 Report Share Posted September 7, 2010 kmb, в этом случае выводится слово test кажется ты не так понялбиблиотека GD для php необходима для работы с графическими файлами установил ее. теперь получается работать с картинками Quote Link to comment Share on other sites More sharing options...
kmb Posted September 7, 2010 Report Share Posted September 7, 2010 работают не значит, что модуль пхп подключен?Ясно, точнее выражаться надо))) Я подумал речь о <??> и <?php?> :D Quote Link to comment Share on other sites More sharing options...
Neponal Posted December 7, 2010 Report Share Posted December 7, 2010 Takeshi Kitano братишка, дай да скачаю у тебя эти книги и видео уроки! Quote Link to comment Share on other sites More sharing options...
The_GOD Posted December 7, 2010 Report Share Posted December 7, 2010 Neponal, http://www.dagtk.net/forum/extensions/hcs_image_uploader/uploads/290000/3500/293533/thumb/p15j02skci1oec35g1l1g1utsqd51.JPG Quote Link to comment Share on other sites More sharing options...
GreshNik_05 Posted December 11, 2010 Report Share Posted December 11, 2010 kmb, в конфиге апачи у меня подключен модуль LoadModule php5_module "/usr/local/php5/php5apache2_2.dll" но всё равно выводит пхп код в браузере. может дело не в модуле???? Quote Link to comment Share on other sites More sharing options...
kmb Posted December 11, 2010 Report Share Posted December 11, 2010 GreshNik_05, нужно еще указать, что пхп скрипты обрабатывать этим компилятором, дальше по конфигу поиск по php сделай, разберешься... Quote Link to comment Share on other sites More sharing options...
GreshNik_05 Posted December 14, 2010 Report Share Posted December 14, 2010 kmb, если не ошибаюсь это тут надо указывать что именно этим компилятором пхп скрипты обрабатывались## DirectoryIndex: sets the file that Apache will serve if a directory# is requested.#<IfModule dir_module> DirectoryIndex index.php index.htm index.html index.shtm index.shtml</IfModule> И вместо dir_module нужно указать путь к этому модулю, вот и написал туду /usr/local/php5/php5apache2_2.dll. Писал путь и с кавычками(одинарными) и без них. Всё равно текст программы выводит. *WALL* *DONT_KNOW* Или я не то сделал???? Quote Link to comment Share on other sites More sharing options...
kmb Posted December 14, 2010 Report Share Posted December 14, 2010 GreshNik_05, нет. Если как пхп как cgi: <Directory "f:/usr/local/php"> Options ExecCGI </Directory> ScriptAlias "/__php_dir__/" "f:/usr/local/php/" Action application/x-httpd-php "/__php_dir__/php.exe" если как модуль: LoadModule php4_module "путь-к-директории-php/php4apache.dll" AddType application/x-httpd-php .phtml .php .php3 .php4 как-то так... Quote Link to comment Share on other sites More sharing options...
GreshNik_05 Posted December 14, 2010 Report Share Posted December 14, 2010 kmb, всё равно ни че не получается. я взял после LoadModule php5_module "/usr/local/php5/php5apache2_2.dll" написал AddType application/x-httpd-php .phtml .php .php3 .php4 как ты показал. Тоже не получается. может настроишь всё и скинешь этот файл мне. Кстати я денвер использую. Quote Link to comment Share on other sites More sharing options...
kmb Posted December 15, 2010 Report Share Posted December 15, 2010 GreshNik_05, прилепи конфиги апача сюда, у меня их нет, как и денвера. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.