Fop 2.11 - Visual Phonebook
Hey all,
Hopefully this will be an easy one...when I open the phonebook I am greeted with this:
Cannot for the life of me work this out. I have put a fresh copy of the html folder up on the server in the hopes that this would fix it however it still shows this message.
Server is running the following versions of PHP
This is on a CentOS 5.3 server and it is connecting to a MySQL server on another box.
Database has been added correctly and the users configured.
Hopefully this will be an easy one...when I open the phonebook I am greeted with this:
"yes") { die("no way"); } if($context=="") { $addcontext=""; } else { $addcontext="${context}_"; } // Sanitize Input $addcontext = ereg_replace("\.[\.]+", "", $addcontext); $addcontext = ereg_replace("^[\/]+", "", $addcontext); $addcontext = ereg_replace("^[A-Za-z][:\|][\/]?", "", $addcontext); $extension = ereg_replace("'", "", $extension ); $extension = ereg_replace("\"", "", $extension ); $extension = ereg_replace(";", "", $extension ); $grid = new dbgrid($db); $grid->set_table('visual_phonebook'); //$grid->set_caption(trans('Manage Phonebook')); $grid->salt("dldli3ks"); $grid->hide_field('id'); $grid->set_per_page(5); $grid->set_condition("context='$context' AND (owner='$extension' OR (owner<>'$extension' AND private='no'))"); $grid->set_default_values("context",$context); $grid->set_default_values("owner",$extension); $grid->set_input_type("context","hidden"); $grid->set_input_type("owner","hidden"); $grid->no_edit_field("context"); $grid->no_edit_field("owner"); $grid->hide_field('context'); $grid->hide_field('owner'); $grid->edit_field_condition("private",'owner','=',$extension); $fieldname = Array(); $fieldname[]=trans('First Name'); $fieldname[]=trans('Last Name'); $fieldname[]=trans('Company'); $fieldname[]=trans('Phone 1'); $fieldname[]=trans('Phone 2'); $fieldname[]=trans('Private'); $fieldname[]=trans('Picture'); //$grid->set_fields ( "id,firstname,lastname,company,phone1,phone2,owner,private,picture"); $grid->set_display_name( array('firstname','lastname','company','phone1','phone2','private','picture'), $fieldname); $grid->allow_view(true); $grid->allow_edit(true); $grid->allow_delete(true); $grid->allow_add(true); $grid->allow_export(true); $grid->allow_import(true); $grid->allow_search(true); $grid->set_search_fields(array('firstname','lastname','company','phone1','phone2')); $grid->set_input_type('picture','img'); //$grid->set_input_type('owner','select',array($extension,'')); $grid->force_import_field("context",$context); $grid->force_import_field("owner",$extension); $grid->add_display_filter('picture','display_image'); //$grid->add_display_filter('owner','display_private'); //$grid->add_edit_filter('owner','display_private'); $grid->set_user_directory('./uploads/'.$addcontext); //$grid->add_validation_type('email','email'); $grid->show_grid(); function display_image($img) { global $addcontext; if(is_file("./uploads/${addcontext}$img")) { return ""; } else { return "n/a"; } } function display_private($owner) { if($owner=="") { return trans('no'); } else { return trans('yes'); } } ?>
Cannot for the life of me work this out. I have put a fresh copy of the html folder up on the server in the hopes that this would fix it however it still shows this message.
Server is running the following versions of PHP
PHP Version 5.3.2
This is on a CentOS 5.3 server and it is connecting to a MySQL server on another box.
Database has been added correctly and the users configured.
Comments
CentOS 5.5
PHP 5.2.10 (short_open_tag = On)
FOP 2.20
I do not think you have the same problem. FOP 2.20 does not use short tags anymore. So please explain a little bit better what do you see and what happens. If you see php code when loading the phonebook, then it is probably your web server does not have php support enabled.
This is what i get after click on Phonebook link:
and see if it works. Perhaps you have mixed php versions installed, or the php.ini file is not in the place you think it should be, or you are loading fop2.11 phonebook and you still do not have short tags enabled.
If you see the php info page with the above script, check the location of the php.ini file and the status of short_open_tag