يركّب [وب سرفر] في [فريبسد] 6.0 مع [أبش] 2.2, [مسقل] 5.0 و [فب] 5 - جزء 5

يركّب [أبش] 2.2, [مسقل] 5 و [فب] 5 في [فريبسد] 6.0 ل [وب سرفر] موثوقة

جزء 5 - يركّب [فب] [هبرتإكست] [بربروسسّور] [سكريبتينغ] لغة 5 و [فب] 5 إمتدادات

  1. ركّبت جانبا يدخل الأوامر تالي على [فريبسد] [أس] [كمّند لين], إنتظار لأمر سابقة أن ينهي قبل يركض الأمر تالية:

    قرص كنيز /usr/ports/lang/php5
    جعلت ركّبت نظيفة

  2. إن أنت يكون حضضت, مختارة "إستعمال [أبش] [2.إكس] بدلا من ذلك".
  3. استمرّت مع الأوامر تالي أن يركّب [فب5] إمتدادات ووحدة نمطيّة أن يمكّن الدعم من الوحدة نمطيّة في [أبش]:

    قرص كنيز /usr/ports/lang/php5-extensions
    جعلت [كنفيغ]

  4. انتقيت في خيارات ل [فب5-إكستنسون] 1.0 قائمة الطعام, كلّ [فب] إمتدادات ووحدة نمطيّة أنّ أنت يمكن استعملت مع [أبش] [وبسرفر]. هذا جزء من التشكيل ل [فب], حيث أنت تحتاج أن يمكّن سمات ال [فب] أنّ يأتي في وحدة نمطيّة, مثل قدرة أن يدير مستعملة جلسات, يواجه مع قاعدة معطيات وكثير أخرى. تقصير انتقيت إمتدادات مثل [كتب] أعمال دعم, مزيج رسالة ملخص هيكل دعم, جلسة دعم و [إتك] يتلقّى يكون. أخرى إمتدادات شعبيّة أنّ أنت [موست ليكلي] أن يكون في يستعمل [مسقل] قاعدة معطيات دعم و [غد] مكتبة دعم. إستعمال يدخل [سبس بر] أن ينتقي أو [أونسلكت] الإمتدادات وصحافة عندما يتمّ.
  5. استمرّت التجهيز ال [فب5-إكستنسونس] مع الأوامر تالي:

    جعلت ركّبت نظيفة

  6. إن هناك يكون أيّ رسالة ال [بوبس] مرتفعة ورسالة حثّ أنت أن ينتقي بعض خيارات أو تشكيلات, أنت يستطيع فقط قبلت ال [دفولت ستّينغ] ب يضغط يدخل. يتضمّن بعض وحدة نمطيّة أنّ يمكن حضضت أنت لعمل [فب5-غد], [فب5-مبسترينغ] و [فب5-سقليت].
  7. حرّرت [أبش] تشكيل مبرد [إين وردر تو] مكّنت [أبش] [وب سرفر] أن يحمّل ال [فب] وحدة نمطيّة عندما وضع حرف أوّليّ:
    1. ذهبت إلى [أبش] تشكيل مبرد موقعة بقرص كنيز /usr/local/etc/apache2/
    2. حرّرت [أبش] تشكيل مبرد ب [في] [هتّبد.كنف]
    3. بحثت ل [لوأدمودول] خطوط, بعد المتأخّرة [لوأدمودول] خطّ, غير أنّ ضمن ال نفسه قسم, يضيف التالي 2 خطوط:

      [أدّتب] [أبّليكأيشن/إكس-هتّبد-فب] [.فب]
      [أدّتب] [أبّليكأيشن/إكس-هتّبد-فب-سورس] [.فبس]

  8. إختياريّا, نسخة /usr/local/etc/php.ini-recommended أو /usr/local/etc/php.ini-dist إلى /usr/local/etc/php.ini (في نفسه دليل), أيّ سيمكّن أنت أن يوفّق وغيّرت ال [دفولت ستّينغ] التصرفات ال [فب].
  9. استأنفت بدأت [أبش] [هتّب] [وب سرفر] ب يستعمل [أبشكتل] بداية (أو [أبش] [هتّب] [وب سرفر] ب يستعمل [أبشكتل] إستئناف). [أبشكتل] حدّدت في /usr/local/sbin, إن أنت تواجه أمر لا يؤسّس مشكلة, محاولة أن يغيّر دليل إلى موقعته.
  10. [فب5] تجهيز يتمّ.

[ستثب] [وب سرفر] يتلقّى يكون مع [فريبسد] مع [أبش], [مسقل] و [فب]. The document root of the web server (where you should put your HTML and PHP files is at /usr/local/www/apache22/data/ and you will need a SecureFTP (SFTP) client such as WinSCP to upload your files to web server securely.

IMPORTANT: This is a machine translated page which is provided "as is" without warranty. Machine translation may be difficult to understand. Please refer to original English article whenever possible.

Share and contribute or get technical support and help at My Digital Life Forums.



24 Responses to “Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 5”

  1. Bruce
    May 24th, 2006 10:23
    1

    Hi, I am trying to install, php5 with apache2.2 on freebsd 6.1. I have followed the instructions on this page. I can get apache running well, but php will not interpret any pages. I have a file; info.php with in it, but when I load it from a browser it tries to *download* the php file not display it. Furthermore, the httpd.conf does not have a entry to load the php module as a shared object. should it? its as if apache has not idea how to process php’s. Any guideance would be appreciated!

    kind regards

  2. Administrator
    May 24th, 2006 10:30
    2

    Did you add the followng lines to your httpd.conf?

    AddType application/x- httpd-php . php
    AddType application/x- httpd-php-source . phps

    Normally, ports installation will auto update the httpd.conf with php5 load module. Check if your httpd.conf has the following line, if not try to add:

    LoadModule php5_module libexec/apache22/libphp5.so

  3. Bruce
    May 24th, 2006 11:54
    3

    Yes, I certainly did add the AddType’s

    the php5 port installation did not auto update httpd.conf with ‘LoadModule php5_module libexec/apache22/libphp5.so’. I would manually add it but the libphp5.so does not exist in the mentioned directory. Any idea’s? I installed from the /usr/ports/lang/php5 port. I heard using /usr/ports/www/mod_php5 port may work. Would/should it make any difference?

  4. Administrator
    May 24th, 2006 16:01
    4

    Hi Bruce, you may give mod_php5 a try, but I think you will lose some functionalities such as command line CLI. Or else try to make clean in php5 first. Reinstalling from Apache again worth a try too. Note that you should install Apache first, and php5 will detect which version of Apache you’re running.

  5. Administrator
    May 24th, 2006 16:11
    5

    Beside, make sure you updated to latest ports tree with portsnap or cvsup.

  6. Klaus
    May 29th, 2006 20:59
    6

    You might missed to install the php for apache, only cgi and cli.

    CD /usr/ports/php5
    make config

    then
    make install clean

    mayby you have to do
    make deinstall && make reinstall

  7. Ahmet
    June 4th, 2006 10:48
    7

    When you add the following lines to httpd.conf file, make sure you removed the extra spaces (there are 2 extra spaces in the original article, following doesnt’t have).

    AddType application/x-httpd-php .php
    AddType application/x-httpd-php-source .phps

  8. Ryan
    June 7th, 2006 05:21
    8

    I’m having the same problem as Bruce above. I’m using FreeBSD 6.1, Apache 2.2, and PHP 5.1.4. My ports tree is fresh and synched.

    I installed the PHP5 port with Apache module support. The installation completes without complaining, but there is no Apache module built. The file /usr/local/libexec/apache22/libphp5.so does not exist. It doesn’t exist anywhere else in the filesystem either. Something is broken with this port. I see source files in the work directories , like /usr/ports/lang/php5/work/php-5.1.4/sapi/apache that look appropriate to this module… but are not getting compiled. Any insights?

  9. Guilt
    June 9th, 2006 20:41
    9

    Ahmet gave a working answer. I was having the same problems, until I noticed the extra space before the file extention, now everything works like a charm!

  10. Administrator
    June 9th, 2006 20:59
    10

    Thanks for point out, has since corrected the error.

  11. Anonymous
    August 28th, 2006 10:55
    11

    Recompile php5 with ‘Apache Module’ included.
    ‘cd /usr/ports/lang/php5′
    ‘make deinstall’ ignore warnings
    ‘make config’ make sure to select apache module
    ‘make install’

  12. GHOSt
    September 26th, 2006 16:37
    12

    I’ve Done it successfully. It doesnt work..

    How do i access it?

    ive typed http://192.168.1.9

  13. Ben
    November 29th, 2006 10:32
    13

    Had run into the same problem as those above with the extra spaces in the AddType declaration but solved it before looking at the comments. Would recommend updating the article as, all in all, this is a great tutorial. Thanks.

    Ben

  14. Administrator
    November 29th, 2006 12:35
    14

    Thanks Ben, have since corrected the error.

  15. Wadeski
    January 6th, 2007 16:50
    15

    I’m running into the same issue. My php files are trying to download instead.

    I’ve gone over everything three and four times yet nothing.

    I’ve checked the additional spaces as well and no luck.

    Any assistance is appreciated!!

  16. Cedric
    January 9th, 2007 22:05
    16

    I had same issue.

    Try make config and unselect CGI and be sure to select APACHE.

    Check at end of install that you have a line like:chmod 755 /usr/local/libexec/apache22/libphp5.so

    I config without CLI ang CGI.

  17. iKriz
    March 16th, 2007 08:28
    17

    Trying to install the package php5 without port sources via
    pkg_add -r php5
    only this doesnt install the apache module by the looks of it..
    nor does it build it..
    I dont want the sources on the server because it is to be a production server.. i’m gunna try a reinstall…

  18. iKriz
    March 16th, 2007 08:36
    18

    reinstall was unsuccessful

  19. Ryan
    April 18th, 2007 05:40
    19

    I uninstalled, reinstalled making double sure to include the Apache model, still no dice. So I uninstalled again and reinstalled without CLI and CGI and it still would startup no errors, but it would list the directories in document source and would treat cgi files as text files. All my configs were in order, so I thought maybe it needed a reboot… and walah. Working like a charm.

    I think Unix is for massochists =)

  20. Ryan
    April 18th, 2007 05:42
    20

    edit.. I meant ” .. would treat PHP files as text files ..” and not CGI.

    Long day =0

  21. Bob Davis
    September 14th, 2007 17:03
    21

    I’ve been trying to install Timetrex and it requires Apache, php and postgresql. Postgresql is not a problem because I install it from source. But as you can see from above, the FreeBSD ports system is so often in a state of flux that you’re not guaranteed anything that will work.

    On this issue, the bosses, and I myself got so fed up with the results from FreeBSD that we installed Fedora and then took the vendors installation file, which only works on Linux and got on with the task.

    With so many dependencies and librairies to update, the FreeBSD ports system as left me feeling very cautious about using it and it harkens me back to the old M$ “dll - hell” days when Windows 3x and Win9x were such a pain to deal with.

  22. nmow
    November 30th, 2007 09:57
    22

    This series of articles has been very, very helpful. Many thanks for your contribution!

  23. Stefan Nolde
    December 11th, 2007 20:53
    23

    Should the problem with downloadable sourcecodes exist for anyone else, if it was just a problem occurring from localhost, changing the listening port from the default 80 to *:80 might help. It is highly likely that in the above mentioned cases Apache had not much to do with serving the files on localhost.
    Fedora does not have less dependancies, they are just handeld elswehere out of user eyes.
    Understanding the package & port system and when and why to update is part of the game.
    For those who go for Fedora on servers, you might opt for ubuntu instead. it’s easy and fast as well as free.

  24. Ferco
    May 10th, 2008 01:44
    24

    Lol, you should put this somewhere…

    Befor testing… REBOOT! XD

    30 minutes lost trying to fix apache + php and all that was required was reboot ¬¬

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

freeBSD php - php freebsd - freebsd apache mysql php - freebsd apache - apache2 freebsd - freebsd apache php mysql - freebsd apache2 - freebsd apache php - freebsd php5 - freebsd apache mysql - apache freebsd - apache php mysql freebsd - freebsd apache2 php5 - php apache freebsd - php5 freebsd - apache php freebsd - freebsd apache php5 - freebsd apache22 php5 - apache php5 freebsd - apache2 php5 freebsd - freebsd apache22 php - freebsd php mysql - apache mysql php freebsd - install php freebsd - freebsd apache2 php - installing apache on freebsd - freebsd php apache - php5 apache2 freebsd - libphp5.so freebsd - apache2 php freebsd - apache22 php - php5 apache freebsd - installing apache freebsd - freeBSD php5-extensions - install php5 freebsd - freebsd mysql php apache - install php on freebsd - freebsd apache install - freebsd install apache - apache22 php5 - download apache for freebsd - freebsd install apache2 - apache 2.2 php5 freebsd - apache22 php5 freebsd - freebsd install apache php - freebsd php5 apache2 - php mysql freebsd - freebsd php extensions - php on freebsd - Apache2 on FreeBSD - freebsd install apache php mysql - freebsd php5 apache22 - php for freebsd - install apache freebsd - apache mysql freebsd - freebsd libphp5.so - apache22 php freebsd - freebsd php install - apache 2.2 php freebsd - installing php on freebsd - all - freebsd install php5 - freebsd mysql apache php - FreeBSD apache 2.2 PHP5 - freebsd php port - install apache PHP mysql freebsd - freebsd php5 apache - download apache freebsd - Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - FreeBSD libphp5 - how to install php on freebsd - freebsd php mysql apache - install php apache freebsd - FreeBSD + Apache - freebsd php5 port -