[cvs] [Wiki] changed: FAQ/Admin/Troubleshoot

Jan Schneider jan at horde.org
Sun May 22 17:38:39 PDT 2005


jan  Sun, 22 May 2005 17:38:39 -0700

Modified page: http://wiki.horde.org/display.php?page=FAQ%2FAdmin%2FTroubleshoot
New Revision:  1.2

@@ -120,5 +120,141 @@
 
 ++++ "Fatal error: Call to undefined function: quote()"
 **[Horde 2.x]:** You are using too old a version of PHP which doesn't support some needed functions such as the quote() function. Upgrade to a supported version of PHP.
 
-++++ 
+++++ "Fatal error: Undefined class name 'log' in ..."
+**[Horde 2.x]:** Your PHP PEAR implementation is missing the PEAR Log package. This is a common problem with the PHP 4.2.1 PEAR for example. You can install it via the network if you have a standalone php/pear command. See the file {{[http://www.horde.org/horde/docs/?f=INSTALL.html horde/docs/INSTALL]}} for more information on how to install the required PEAR packages this way. Otherwise you can download the Log package (e.g. from http://pear.php.net/get/Log) and manually install them inside your PEAR directory. You may also need to install the modules Mail_Mime and Net_Socket as well.
+
+For more detailed instructions on installing PEAR modules, see the PEAR documentation at http://pear.php.net/manual/.
+
+++++ "Fatal error: Call to undefined function: iswarning() in ..."
+**[Horde 2.x]:** After the release of Horde 2.1, the isWarning() function was removed from PEAR, resulting in this error when using a PHP/PEAR released after Horde 2.1 was released. Possible solutions are:
+
+* Upgrade to a newer Horde (e.g. 2.2 or newer)
+* Remove all references to PEAR::isWarning() from the code manually.
+* Downgrade to an older PHP/PEAR version.
+
+The same problem exists in some other Horde applications also (e.g. in Kronolith 1.0). The solution is the same (e.g. upgrade to a newer Kronolith version, remove the isWarning() calls, downgrade PEAR). 
+
+++++ "output handler 'ob_gzhandler' cannot be used twice in..."
+**[Horde 2.x]:** You enabled output compression in both your php.ini configuration file and in your horde configuration file (either horde/config/horde.php or horde/config/conf.php). Disable it in one of these two locations.
+
+++++ "Warning: Undefined property: _iv in..."
+**[Horde 2.2]:** This is a bug in Horde 2.2 when used without php mcrypt support. Either upgrade to Horde 2.2.1, or install the mcrypt php extension.
+
+++++ "Fatal error: Allowed memory size of ### bytes exhausted..."
+Either recompile PHP //without// the {{--enable-memory-limit}} option, or increase the value of {{memory_limit}} in your {{php.ini}} file.
+
++++ Verifying Components
+
+++++ How can I tell if my Web server works?
+Testing your webserver is straightforward: place a file containing some HTML (or even just some text) in the directory in which it expects to find its data (in Apache, {{!DocumentRoot}}), and make the file world-readable. Start up the webserver if it is not already running, and in your browser, load
+
+<code>
+http://hostname.example.com/filename
+</code>
+
+(substituting the name of the server and the filename as appropriate). If you see the contents of the file, your web server is running. If you receive an error, check your web server's error log to see what went wrong.
+
+++++ How can I tell if PHP works?
+The simplest way to test PHP is to create a file, {{phpinfo.php3}}, somewhere under your web server's document root, with the following contents:
+
+<code type="php">
+<?php phpinfo() ?>
+</code>
+
+Upon accessing it with a browser, you should be presented with a summary of your PHP configuration. If you see the program text itself, your web server does not know to interpret the file with PHP.
+
+++++ How can I tell if Horde and PHPlib work?
+**[Horde 1.2]:** Horde includes a PHP program which will test both your Horde and PHPlib installations. If you have horde installed in the usual location, point your browser at
+
+<code>
+http://hostname.example.com/horde/test.php3
+</code>
+
+Verify the following from the information {{test.php3}} offers:
+
+* You are running a stable release of PHP.
+* IMAP support reads "Yes"
+* If you plan on using !MySQL, !PostgreSQL, or LDAP, their "Support" lines read "Yes".
+* {{track_vars}} reads "Yes".
+* PHPLIB reads "Yes".
+* A !HordeSession instance was successfully created.
+* The link reading "Click here to test PHPLIB for Horde" functions as described.
+* Both magic_quotes settings read "Yes".
+
+**[Horde 2.0]:** Horde includes a PHP program which will test both your Horde and PHP installations. If you have horde installed in the usual location, point your browser at
+
+<code>
+http://hostname.example.com/horde/test.php
+</code>
+
+Verify the following from the information {{test.php}} offers:
+
+* You are running a supported version of PHP.
+* Gettext support reads "Yes"
+* IMAP support reads "Yes"
+* If you plan on using !MySQL, !PostgreSQL, or LDAP, their "Support" lines read "Yes".
+* {{magic_quotes_runtime}} set to Off reads "Yes".
+* The session counter increments when the page is reloaded.
+* All the PEAR options return "Yes".
+
+This page also may have links to test pages for other installed modules, and/or links to other PHP information pages available.
+
+++++ How can I tell if my IMAP server works?
+The simplest way to test an IMAP server is to send mail to an account on the IMAP server, and then use a standard IMAP client like Netscape Mail, Outlook Express, PINE, mutt, or Eudora Pro to read the mail.
+
+If you don't have a standard IMAP client handy, or if a standard client fails, you can telnet to port 143 of your IMAP server and try the following exchange (where "normal" server responses are //emphasized//):
+
+   //* OK imap.example.com IMAP4rev1 v12.264 server ready//
+   {{0 login yourusername yourpassword}}
+   //0 OK LOGIN completed//
+   {{0 logout}}
+
+If you don't get {{OK LOGIN}}, then your server is probably misconfigured (unless you are using a specific authentication module such as Kerberos, in which case you will probably have to test it with a real IMAP client or the mtest program included with the UW-IMAP c-client distribution).
+
+++++ How can I tell if my database works?
+The most straightforward way of testing your database is to create the Horde databases themselves; if the creation proceeds without error, then the database is probably functioning normally.
+
+You can also use the following code, contributed by <chowes at ics.bc.ca>:
+
+<code type="php">
+   <HTML>
+   <BODY>
+
+   This is a test:
+   <?php
+
+      function test() {
+         if (!($db = mysql_pconnect(localhost,root,yourpassword))){ return 1; }
+	 if (!($imp = mysql_create_db(testdb, $db))) { return 2; }
+	 if (!($imp = mysql_select_db(testdb, $db))) { return 3; }
+	 if (!($result = mysql_db_query(testdb, "create table testtest ( test char(60))", $db))) 
+             { return 4; }
+	 if (!($result = mysql_db_query(testdb, "insert into testtest values ('hello world!')", $db))) 
+             { return 5; }
+	 if (!($result = mysql_db_query(testdb, "select * from testtest", $db)))
+            { echo "$result";return 6; }
+	 if (mysql_num_rows($result)>0)
+            echo (mysql_result($result, 0, 0));
+	 if (!($result = mysql_db_query(testdb, "delete from testtest", $db))) { return 7; }
+	 if (!($imp = mysql_drop_db(testdb, $db))) { return 8; }
+	 return 9;
+      }
+
+      $r = test();
+      echo "<BR>result code = $r";
+   ?>
+   </BODY>
+   </HTML>
+</code>
+
+Then, load the file with your browser. It will create a database, a table, and a row; put data into the row; then delete the row, the table, and the database. If successful, the output will read
+
+<code>
+This is a test: hello world!
+result code=9
+</code>
+
+If it does not, at least you can see where it breaks, by matching the result code with the {{return}} statement in the program; the line on which the matching return statement lies is the one which failed. For instance, if result code=1, then mysql isn't running, or a bad host/username/password has been entered.
+
++++ 


More information about the cvs mailing list