

  PHP HOME EDITION 2 FAQ



  1. What is PHP Home?
  ---------------------

  A complete package of webserver, database and PHP. It uses Apache, a very 
  popular webserver, PHP, a server-side scripting language, and MySQL, a database 
  and manager.

  The PHP Home Edition 2 binaries are primarily distributed as a Vise Installer package,
  and may be available as a .zip file as well. These packages are named phphome2.exe and
  phphome2.0.xx.zip. Please choose VISE package if at all possible.


  2. What OS does it support?
  -----------------------------

  PHP Home Edition can be run under Windows XP,Windows NT and NT2000. It is
  compatible also with Windows with upgraded Winsock to level 2.1

  NOTE! PHP Home 2.2.8 is now not compatible with Windows 9x due internal problem of
  Apache crashing with library libhttpd.lib. If this problem will be fixed, we will
  also release service patch.

  Version 2.2.9 and higher was not tested on WIn98, because i have no installed. Please report all
  working versions on  my email!

  WARNING!!! Before installing PHP HOME on Windows 98/95, please install also this packages:

  WINSOCK 2 (or Winsock 2.1)
  DCOM 98
  MDAC4

  both are available from www.microsoft.com, because I dont want to cover them in this program :)


  You can download this upgrade from

  http://www.microsoft.com

  3. I have service trouble in Windows 95,98,Me
  ---------------------------------------------

  Due above mentioned problems now Windows 95,98,Me are NOT SUPPORTED. This can be changed anytime :)
--------------------------------------------------------------------------------------------------------

  The Windows 9x clones do not use "real" NT service support.
  Apache is running only in "compatible mode" but there is lot of work to do.
  Sometimes after installing or removing service you MUST RESTART your Windows
  for changes take effect.

  If MYSQL is not started automatically first time, click onto winmysqladmin.exe.
  Start will be indicated with a green icon in system tray.
  If MYSQL is started for the first time, it will promt for user/password. Give
  the same password or you will be not able to access database.

  To remove access info (passwords) just remove file my.ini in your windows directory.
  Installator will remove this file automatically, if it exists!

  If you have problem with Apache shutdown under Win 9x/Me, always stop this server manually
  before shutdown of your OS! Brutal force mode is not recommended!!!
  If you know how to disable Apache service under Win 9x let me know! I cannot support
  these systems, because primarily I am operating on Windows 2000/XP, Debian Linux &
  Solaris 8/9.

  WARNING! Upgrade to Windows 2000/XP as soon as possible.

  4. I want to change my Web document folder
  ----------------------------------------------

  When you are installing PHP Home, just enter proper value in Web Folder box.

  When you have PHP Home already installed, then reinstall or change manually:

  You must edit httpd.conf file and change DocRoot directive and Docroot Directory
  directive. Then you  MUST RESTART your WWW server (or Windows) so changes
  can take effect.

  Save httpd.conf as httpd.conf, not as httpd.conf.txt, this is common using M$
  Notepad editor which can automagically add filename extensions. Inspect changes
  after saving!

  For infomation about changes check http://phphome.sourceforge.net forum.

  5. I have problems with the download, where can I find the whole package?
  --------------------------------------------------------------------

  Try to examine http://www.skfree.sk
                 http://phphome.sourceforge.net


  6. I have some problems with authentification in my php scripts
  -----------------------------------------------------------------

  This work only if PHP is running in MODULAR mode. You can check it by
  using phpinfo(); function in your script.

  7. I have stability problems with my PHP scripts
  ---------------------------------------------------

  CGI mode is pretty stable, modular not at all, but we are working on improvements.
  Under WIndows XP I have no crash in the last 12 months in modular mode :). Primarily
  I only use self-compiled PHP, which is "common" stable.

  8. Will be there also SSL enabled Apache?
  -------------------------------------------

  Yes, we have SSL enabled Apache. But for "real guru-s" only ;)

  9. I need more extensions for PHP and APACHE
  ----------------------------------------------

  Try to enable extensions in php.ini file. If a dll library of an extension is not in
  package, it probably does not exist! If you have some new extension libraries compiled,
  send them to us! (or drop a link). You can download special dll's from the download
  section at www.php.sk (php dev package).

  10. I cannot start phpMyAdmin
  -------------------------------

  It's probably because MYSQL DBS server is not started. Running mode is indicated with
  a green indicator in system tray. If not, run a MYSQL server daemon. If an error
  with access denied has occured, check your config file (config.inc.php)in phpMyAdmin
  directory and set correct login/password to access your database, because you made
  a mistake during install (maybe not same login/password), but I don't care,
  it's now your problem.

  Some versions of PHPMyAdmin talk about $cfgPmaAbsoluteUri settings, please enter correct
  directory where yout phpMyAdmin is located.

  example:

  $cfgPmaAbsoluteUri = 'http://'.$_SERVER["SERVER_NAME"].'/phpMyAdmin';

  and run PhpMyAdmin by browser:

  http://your_server_name/phpMyAdmin

  or

  http://127.0.0.1/phpMyAdmin


  11. Setup freeze
  -------------------------------

  If the system is not responding during "Searching for installed components" just relax and
  wait. This phase can be really time consuming, while contacting all www servers and
  checking the system installation package. Maximal response time is about 10 minutes. Maybe
  you haven't installed your network devices properly.

  If you have problems with this, attach setuplog.txt file and send to support email.
  Also add your operating system identification.

  This time is because InVise control all files' dependencies, I cannot cut this time down.

  In near future we will migrate on another install package system (probably from version 3.x)

  12. Problem with firewall or PROXY
  ----------------------------------------

  Some users are behind proxy or firewall because of security. Our installer support
  HTTP based proxy.
  If you are behind a firewall or proxy, just enable proxy dialog in installation update
  phase and enter your firewall or proxy settings.
  Enter name without leading protocol name (http://)

  e.g.

  proxy.army.com
  emeacache.lego.dk

  For ports you should use numbers like 80,1080,3128,8080 and other. If unsure, gather
  information from your browser settings or ask your Administrator.
  Do not mail us, we will ignore ANY PROXY settings mail ;)


  13. Problems upgrading from PHP Home 1 to 2
  ---------------------------------------------

  Vertical update isn't and will not be supported! You should uninstall previous version
  of PHP Home and delete all files (php.ini,my.ini) and all library files.
  Then install PHP Home 2.

  14. Manual install of SERVICE
  ----------------------------------

  In new verions of PHP you must install service support manually to avoid automatic server installation :)

  Please run install_serv.bat in apache\bin directory

  Use the command line and navigate into the Apache directory (using NC,WC,or cd command).
  From here enter the command

  apache.exe -k install

  This command install service manually, OK message should appear.

  or run file install_serv.bat in Apache\bin direcory.

  15. My Apache service appear in ApacheMonitor, but I cannot start using this program.
  
---------------------------------------------------------------------------------------

  This is common in Win95/98, because of lack real service support.
  Just double click onto Start Apache icon, it will go green and will start Apache.

  Try to run apache manually from apache bin directory (bin) and fix problem. If you have installed
  Microsoft IIS, please shut it down before installation!

  16. I want to switch between CGI/MODULAR mode
  -------------------------------------------------

  Check the file httpd.conf and select one option (MODE 1,MODE2) and disable other. Then
  restart Apache. Control with phpinfo() function.

  If you have some other problems, try to look into apache log file in log directory.

  17. I have problems with caching under PHP Home 2
  -----------------------------------------------------

  This is common with Internet Explorer. I have removed this software, because each version
  uses different caching settings and does not apply to W3C caching recommendations. Use Opera or
  Mozilla instead (www.opera.com & www.mozilla.org).

  A good point is to install thirty party software that manage MS IE cache. Try CacheSentry at
  http://www.ticon.net/~dpoch/enigmatic.

  To check the caching, try at the first line of your script following code.

  <?php
  Header("Expires: ".GMDate("D, d M Y H:i:s")." GMT");
  header ("Cache-Control: no-cache, must-revalidate");
  header ("Pragma: no-cache");
  //....your code
  ?>

  Remember, according to Header (if output Buffering is not enabled in php.ini), there MUST NOT BE
  ANY TRAILING BLANKS OR ANY CHARACTERS BEFORE HEADER FUNCTIONS!!!!

  18. I have problems with charset settings under PHP Home 2
  -----------------------------------------------------------

   check php.ini and httpd.conf and set correct charset! Remember to restart Apache.

  19. I want to create a multiple virtual server site system.
  ------------------------------------------------------------

   Enter all info into files hosts located in c:\windows or c:windows\system32\drivers\etc (XP)
   and restart Windows.

   In httpd.conf enter informations about servers:

  NameVirtualHost *

  <VirtualHost *>
    ServerAdmin webmaster@server1.com
    DocumentRoot /www/server1
    ServerName server1
    ErrorLog logs/www.s1-error_log
    CustomLog logs/www.s1-access_log common
  </VirtualHost>

  <VirtualHost *>
    ServerAdmin webmaster@server2.com
    DocumentRoot /www/server2
    ServerName server2
    ErrorLog logs/www.s2-error_log
    CustomLog logs/www.s2-access_log common
  </VirtualHost>

   20. I need also another language installation
   -----------------------------------------------

   Currently, only few installations are available, because I can fluently speak and
   write only Slovak, Czech and English. If somebody wants to help with translation (takes about 2hours)
   feel free to email me.

   Seeking translation as a priority in these languages:

   + Polish
   + Danish
   + Swedish

   and all others.

   Your name will be acknowledged!

   21. I have a problem generating GIF images using GD library
   -------------------------------------------------------------

   The Unisys company holds patent used in GIF images. Because using GIFs without paying
   fees to Unisys is prohibited, GD discontinued support GIF in version 1.6.
   We also use PNG images instead of GIF images. If you need an "old" GD library,
   try to find it yourself and include it into phphome.


   22. How to learn  basics of PHP ?
   --------------------------------------

   Try to download manual of PHP from www.php.net or www.php.sk or learn basics from
   tutorial for beginners. I recommend Slovak tutorial available free on 

   http://www.php.sk/files_clanky/php_prve_kroky.zip [Slovak language]
   or tutorials from www.zend.com or www.php.net [in English].

   23. After installation I enter http://localhost/~scott  and get a page not 
       found error. Why?

   In httpd.conf change:
   
   UserDir "My Documents/My Website" to: UserDir "My Documents/My Webs"

   (Maybe "My Website" for Win98 and "My Webs" for Win2K ???)


    24. Using path info
   ----------------------------

   I've written a PHP script to use the path info. Why doesn't PHP path 
   info get passed to my php script? I want to use urls like this: 
   http://www.mysite.com/news/2002/10/22

   using the following statements in a file called news.php:

   $path = $_SERVER['PATH_INFO'];
   $dirs = split("/", $path);

   A: in httpd.conf add:

   AcceptPathInfo on

   25. Apache does not recognize URL
   -------------------------------------------
 
   I name a php script news.php but Apache doesn't recognize the url:    

   http://www.mysite.com/news/2002/10/22 Why?

   A: Create .htaccess file in the document root directory with the following 
   lines:

   <Files news>
      ForceType application/x-httpd-php
   </Files>

   26. Multiple domain web-development
   --------------------------------------
   
   I want to manage/create multiple websites and upload to a host/server. 
   How can I use PHP Home Edition 2 to develop a site before uploading the pages?

   A: One way is to use virtual domains.
   
   - Create a directory somewhere called www or use the current one. For  
     example install another hard disk or partition E:\www
   - Create subdirectories such as domain1, domain2, domain3 in the www directory. 
     E:\www\domain1      E:\www\domain2 E:\www\domain3
   - Follow the PHP Home Edition FAQ for setting up virtual domains.
   - In httpd.conf set the docroot to point to the domain1, domain2, domain3 
     directories.
   - Edit C:\WINNT\system32\drivers\etc\hosts and add:
     127.0.0.1   domain1.home
     127.0.0.1   domain2.home
     127.0.0.1   domain3.home
   - Restart the Apache service
   - enter url:
     http://domain1.home
     http://domain2.home
     http://domain3.home

-------------------------------------------------------------------------------------
Q: I wrote a php script that uses mail(), but nothing happens. Where does 
the mail go? How can I get it to send mail from my W2K box to the world?

A: Edit C:\WINNT\php.ini
Change the following lines:

SMTP= localhost 
; for Win32 only sendmail_from= me@localhost.com 
; for Win32 only 
;sendmail_path=
;for unix only, may supply arguments as well (default is 'sendmail -t -i') to:
;SMTP=mail.attbi.com;  (This is an example, use your own ISP SMTP mail 
;server not necessarily attbi)
;sendmail_from=myaccount@attbi.com

When you use the php mail() function it takes the "from" email address as a 
parameter so setting sendmail_from probably doesn't matter except as a 
default. Use the same SMTP server that you use for your ISP broadband or 
dailup account.

-------------------------------------------------------------------------------------
Q: Why don't sessions work? I've installed phpWebSite 
(http://phpwebsite.appstate.edu/) but I can't enter the admin page to set 
up my website. I notice that the session ID's aren't being sent in the 
URL's. Why?

A: You need to create a directory for the sessions id's. PHP Home Edtion 2 
sets up php.ini to point to the directory:
session.save_path = "C:\Program Files\PHP Home Edition 
2\Apache2\php\sessiondata"
but the sessiondata directory is missing and Apache can't create it.

cd C:\Program Files\PHP Home Edition 2\Apache2\php directory and create a 
folder/directory called sessiondata.

-------------------------------------------------------------------------------------
Q: When configuring MySql, the app winMySQLAdmin has a "green" light when 
I'm administrator, but if I start it when logged in as a user I get a red 
light. Does that matter?

A: It doesn't seem to matter. If you start the task manager you should see 
the mysql process running. Or looking at control panels/administration 
tools/services you should see mysql as started. If you can run phpMyAdmin 
and interact with the database then the mysql server is ok.

-------------------------------------------------------------------------------------
Q: What about using phpMyAdmin? Any other ways to configure it or use it?

A: There are lots of ways. One way is to use virtual hosts. If using them, 
one could be configured for phpMyAdmin.
- In the hosts file add:
127.0.0.1   phpmyadmin.home

- In httpd.conf add a virtual host such as:

<VirtualHost *>
     ServerAdmin webmaster@nothing.com
     DocumentRoot "C:\Program Files\PHP Home Edition 2/www/phpMyAdmin"
     ServerName phpmyadmin.home
     ErrorLog logs/sql-error_log
     CustomLog logs/sql-access_log common
</VirtualHost>

After restarting Apache, entering http://phpmyadmin.home starts up the 
login window for phpMyAdmin.

-------------------------------------------------------------------------------------
Q: When I run phpMyAdmin I get a red message on the page complaining about 
cfgPmaAbsoluteUri needing to be configured. What's up with that?

A: In the PHP Home Edition 2/www/phpMyAdmin folder, edit config.inc.php. If 
using a virtual host as mentioned above the change needed is: $cfg['PmaAbsoluteUri'] = ''; to $cfg['PmaAbsoluteUri'] = 'http://phpmyadmin.home';

Or something like "http://localhost/myPhpAdmin" may work if using the 
default setup (But it didn't try this!)
-------------------------------------------------------------------------------------

Q: I want to install phpWebSite but I first need to first create a 
database. How do I do that?
A: On W2K, login as administrator. From winMySQLAdmin click on the database 
tab and right click in the databases pane and select the create new 
database menu item.

- as any user you can run phpMyAdmin. If you have messed with virtual 
domains or set the docroot to be somewhere other than the default in PHP 
Home Edition 2, then you may have to put the phpMyAdmin folder somewhere 
else to run it. Otherwise, when you enter it's url it (Apache) will present 
you with a login window. Use "administrator" and the password for your 
win2k administrator login. Add a user to mysql and password if one wasn't 
already set up. Follow the install instructions for phpWebSite and edit 
it's config.php file. Set the database variables to your new database. Then 
click the install link to install phpWebSite.

 ATTENTION! ATTENTION! ATTENTION!
   Some extra DLLs are required for some PHP extensions. Please copy the
   bundled dlls from the 'dlls/' directory in distribution package to your
   windows/system (Win9.x) or winnt/system32 (WinNT, Win2000, XP) directory.
   If you already have these DLLs installed on your system,
   overwrite them only if something is not working correctly.
   Before overwriting them, it is a good idea to backup them or move them to
   another folder - just in case something goes wrong.

   Download the latest version of the Microsoft Data Access Components (MDAC)
   for your platform, especially Microsoft Windows 9x/NT4 users.
   MDAC is available at http://www.microsoft.com/data/ .

   Also note that some extensions need 3rd party libraries, 
   e.g. php_oci8.dll needs the Oracle 8 client libraries to be installed
   on your system. These are not bundled with PHP distribution.
 ATTENTION! ATTENTION! ATTENTION! 

  (C) Milan Gacik, mgx at frcatel.fri.utc.sk, 2002
      Scott Tillman, st181 at kernelworks.com, 2002

  Review: Duncan Campbell, doncuan at hotmail.com 2002 