From: Mika <ar...@gm...> - 2006-03-06 10:25:18
|
I have a problem with phpesp 1.8 which is possibly related to sessions. The error message I get is printed at the top of the page. This error comes usually atleast when I'm creating a survey with alot of questions, or even a fairly simple one with section test followed by a few Rate (scale 1...5)'s. It will print the error upon trying to add a question, and not proceed at all. Error message: ---------------------------------------------------------------------------= --------------------- *Warning*: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of intval(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in */home/apache/sites/php/phpesp/admin/include/where/tab.inc* on line *37* ---------------------------------------------------------------------------= ----------------------- I can hide the error message by modifying the tab.inc file mentioned in the error: ---------------------------------------------------------------------------= ----------------------- $ diff tab.inc tab.inc.modified 37c37 < $_SESSION['survey_id'] =3D intval(&$survey_id); --- > $_SESSION['survey_id'] =3D intval($survey_id); ---------------------------------------------------------------------------= ----------------------- I have also changed the phpESP.ini.php file (and another file with HTTP_HOST) to work with our apache, but I don't think this will cause problems: ---------------------------------------------------------------------------= ----------------------- $ diff phpESP.ini.php phpESP.ini.php.ORIGINAL 23c23 < $ESPCONFIG['base_url'] =3D $ESPCONFIG['proto'] . $server['HTTP_X_FORWARDED_HOST'] . '/phpesp/'; --- > $ESPCONFIG['base_url'] =3D $ESPCONFIG['proto'] . $server['HTTP_HOST'] . '= /phpesp/'; ---------------------------------------------------------------------------= ----------------------- But it will only hide the message, not let me go forward in creating the questionare. Problem is, the server which would be running this is running some other apps (intranet, work ticket system ect) using php, and I would prefere not to change the allow_call_time_pass_reference value in the global php settings. Php version on the host is PHP 4.3.9 (cgi). Output of test.php: ---------------------------------------------------------------------------= ----------------------- PHP Information * Version: 4.3.9 * OS: Linux * SAPI: apache2handler * register_globals: Yes * magic_quotes_gpc: Yes * magic_quotes_runtime: No * safe_mode: No * open_basedir: PHP Extensions * dBase: No * GD: No * GNU Gettext: Yes * LDAP: Yes * MySQL: Yes * PHP Extension Dir (compiled): /usr/lib/php4 * PHP Extension Dir (run time): /usr/lib/php4 phpESP Settings * Expected ESP_BASE: /home/apache/sites/php/phpesp/ * Expected base_url: localhost/phpesp/ * Loading phpESP.ini.php ... * ESP_BASE: /home/apache/sites/php/phpesp/ * base_url: https://intra-temp.sulake.com/phpesp/ * Version: 1.8 * Debug: No phpESP Language Settings * GNU Gettext: Real * default_lang: en_US * current lang: en_US * available langs: fi_FI, da_DK, hu_HU, de_DE, pt_BR, pt_PT, nl_NL, ja_JP, el_GR, fi, it_IT, fr_FR, es_ES, en_US, sv_SE (da, de, el, en, es, fi, fr, it, ja, nl, pt, sv) * GNU Gettext test: Passed * Catalog Open Test: Yes PHP Session Test * session.save_path: /var/lib/php/session * Counter: 1 ---------------------------------------------------------------------------= ----------------------- phpESP.ini.php file: ---------------------------------------------------------------------------= ----------------------- # cat phpESP.ini.php <?php /* $Id: phpESP.ini.php,v 1.37 2005/11/18 15:25:39 greggmc Exp $ */ /* vim: set tabstop=3D4 shiftwidth=3D4 expandtab: */ // Written by James Flemer // For eGrad2000.com // <jf...@al...> if (!defined('ESP_BASE')) define('ESP_BASE', dirname(dirname(__FILE__)) .'/= '); if (isset($_SERVER)) $server =3D& $_SERVER; else $server =3D& $HTTP_SERVER_VARS; /** * Here are all the configuration options. */ // use http or https? $ESPCONFIG['proto'] =3D 'https://'; // Base URL for phpESP $ESPCONFIG['base_url'] =3D $ESPCONFIG['proto'] . $server['HTTP_X_FORWARDED_HOST'] . '/phpesp/'; // URL of the images directory (for <img src=3D'...'> tags) $ESPCONFIG['image_url'] =3D $ESPCONFIG['base_url'] . 'images/'; // URL of the automatic survey publisher $ESPCONFIG['autopub_url'] =3D $ESPCONFIG['base_url'] . 'public/survey.php'; // URL of the CSS directory (for themes) $ESPCONFIG['css_url'] =3D $ESPCONFIG['base_url'] . 'public/css/'; //URL for management javascript $ESPCONFIG['js_url'] =3D $ESPCONFIG['base_url'] . 'js/'; // Database connection information $ESPCONFIG['db_host'] =3D 'localhost'; $ESPCONFIG['db_user'] =3D 'xxxxxxxxx'; $ESPCONFIG['db_pass'] =3D 'xxxxxxxxxx; $ESPCONFIG['db_name'] =3D 'xxxxxxxxx'; // ADODB $ESPCONFIG['adodb_path'] =3D ESP_BASE . 'admin/include/lib/adodb/'; $ESPCONFIG['adodb_database_type'] =3D 'mysql'; $ESPCONFIG['adodb_dbpersist'] =3D 'true'; $ESPCONFIG['adodb_pathto_db'] =3D "/var/www/phpESP/scripts/db/esp.dbm"; // Allow phpESP to send email (BOOLEAN) $ESPCONFIG['allow_email'] =3D true; // Send human readable email, rather than machine readable (BOOLEAN) $ESPCONFIG['human_email'] =3D true; // Use authentication for designer interface (BOOLEAN) $ESPCONFIG['auth_design'] =3D true; // Use authentication for survey responders (BOOLEAN) $ESPCONFIG['auth_response'] =3D true; // Choose authentication type: { 'default', 'ldap' } $ESPCONFIG['auth_type'] =3D 'default'; // LDAP connection information // (Set these values if you choose 'ldap' as the authentication type.) $ESPCONFIG['ldap_server'] =3D 'ldap://example.com'; $ESPCONFIG['ldap_port'] =3D '389 '; $ESPCONFIG['ldap_dn'] =3D 'dc=3Dexample,dc=3Dcom'; $ESPCONFIG['ldap_filter'] =3D 'uid=3D'; // Group to add responders to via the sign-up page // (Set to "null", without quotes, to disable the sign-up page.) $ESPCONFIG['signup_realm'] =3D 'auto'; // Default language for designer interface // (Must have gettext support avaiable.) $ESPCONFIG['default_lang'] =3D 'en_US'; // HTML character set used by phpESP // (Try 'Windows-1251' for Cryillic, etc.) $ESPCONFIG['charset'] =3D 'ISO-8859-1'; // Default number of option lines for new questions $ESPCONFIG['default_num_choices'] =3D 10; // Colors used by phpESP $ESPCONFIG['main_bgcolor'] =3D '#FFFFFF'; $ESPCONFIG['link_color'] =3D '#0000CC'; $ESPCONFIG['vlink_color'] =3D '#0000CC'; $ESPCONFIG['alink_color'] =3D '#0000CC'; $ESPCONFIG['dim_bgcolor'] =3D '#3399CC'; $ESPCONFIG['error_color'] =3D '#FF0000'; $ESPCONFIG['warn_color'] =3D '#FF0000'; $ESPCONFIG['reqd_color'] =3D '#FF0000'; $ESPCONFIG['bgalt_color1'] =3D '#FFFFFF'; $ESPCONFIG['bgalt_color2'] =3D '#EEEEEE'; /******************************************************************* * Most users will not need to change anything below this line. * *******************************************************************/ // Enable debugging code (BOOLEAN) $ESPCONFIG['DEBUG'] =3D false; // Name of application $ESPCONFIG['name'] =3D 'phpESP'; // Application version $ESPCONFIG['version'] =3D '1.8'; // Extension of support files $ESPCONFIG['extension'] =3D '.inc'; // Choose authentication mode: { 'basic', 'form' } $ESPCONFIG['auth_mode'] =3D 'form'; // Survey handler to use $ESPCONFIG['handler'] =3D ESP_BASE . '/public/handler.php'; $ESPCONFIG['handler_prefix'] =3D ESP_BASE . '/public/handler-prefix.php'; // Valid tabs when editing surveys $ESPCONFIG['tabs'] =3D array('general', 'questions', 'preview', 'order', 'finish'); // Copy of PHP_SELF for later use $ESPCONFIG['ME'] =3D $server['PHP_SELF']; // CSS stylesheet to use for designer interface $ESPCONFIG['style_sheet'] =3D $ESPCONFIG['base_url'] . 'admin/style.css'; // Status of gettext extension $ESPCONFIG['gettext'] =3D extension_loaded('gettext'); // HTML page title $ESPCONFIG['title'] =3D $ESPCONFIG['name'] .', v('. $ESPCONFIG['version'].'= )'; // phpESP include path $ESPCONFIG['include_path'] =3D ESP_BASE . '/admin/include/'; // phpESP css path $ESPCONFIG['css_path'] =3D ESP_BASE . '/public/css/'; // phpESP locale path $ESPCONFIG['locale_path'] =3D ESP_BASE . '/locale/'; // Unsuported web server configuration check values $ESPCONFIG['unsupported'] =3D array('cgi', 'sapi'); // Database Table Names: $DB_PREFIX =3D ""; // If your database uses a prefix, set it here. $ESPCONFIG['access_table'] =3D $DB_PREFIX."access"; $ESPCONFIG['designer_table'] =3D $DB_PREFIX."designer"; $ESPCONFIG['question_table'] =3D $DB_PREFIX."question"; $ESPCONFIG['question_choice_table'] =3D $DB_PREFIX."question_choice"; $ESPCONFIG['question_type_table'] =3D $DB_PREFIX."question_type"; $ESPCONFIG['realm_table'] =3D $DB_PREFIX."realm"; $ESPCONFIG['respondent_table'] =3D $DB_PREFIX."respondent"; $ESPCONFIG['response_table'] =3D $DB_PREFIX."response"; $ESPCONFIG['response_bool_table'] =3D $DB_PREFIX."response_bool"; $ESPCONFIG['response_date_table'] =3D $DB_PREFIX."response_date"; $ESPCONFIG['response_multiple_table'] =3D $DB_PREFIX."response_multiple"; $ESPCONFIG['response_other_table'] =3D $DB_PREFIX."response_other"; $ESPCONFIG['response_rank_table'] =3D $DB_PREFIX."response_rank"; $ESPCONFIG['response_single_table'] =3D $DB_PREFIX."response_single"; $ESPCONFIG['response_text_table'] =3D $DB_PREFIX."response_text"; $ESPCONFIG['survey_table'] =3D $DB_PREFIX."survey"; // Load I18N support require_once($ESPCONFIG['include_path'] . '/lib/espi18n' . $ESPCONFIG['extension']); esp_setlocale_ex(); // default thank you messages $ESPCONFIG['thank_head'] =3D _('Thank You For Completing This Survey.'); $ESPCONFIG['thank_body'] =3D _('Please do not use the back button on your browser to go back.'); if (!file_exists($ESPCONFIG['include_path']. '/funcs'. $ESPCONFIG['extension'])) { printf('<b>'. _('Unable to find the phpESP %s directory. Please check %s to ensure that all paths are set correctly.') . '</b>', 'include', 'phpESP.ini.php'); exit; } if (!file_exists($ESPCONFIG['css_path'])) { printf('<b>'. _('Unable to find the phpESP %s directory. Please check %s to ensure that all paths are set correctly.') . '</b>', 'css', 'phpESP.ini.php'); exit; } if (isset($GLOBALS)) { $GLOBALS['ESPCONFIG'] =3D $ESPCONFIG; } else { global $ESPCONFIG; } require_once($ESPCONFIG['include_path'].'/funcs'.$ESPCONFIG['extension']); ?> ---------------------------------------------------------------------------= ----------------------- |