Member
Last active 14 years ago
Hi Nicolas,
There is cached file in par-root for my case (Remember you told me to create such folder due to noexec fop2 service to start in my server?)
Here is the cached file:
# ls
cache-f0a3f11efb4858d29f477772e1bc9d218df72f95
Anyway, I have done completely and I have fixed the checkbox issue, and now I can see what are those extensions buttons which I selected previously whenever I click to edit the group on the right in FOP2 Group. I have done that by adding the following codes into page.fop2groups.php.
Codes:
$results = fop2_get_group($itemid);
if (($datarray['group']==$results['name']) && ($results['name']!="")) {
echo "<td><input type=checkbox CHECKED name='includebot[]' value='".$devname."'";
} else {
echo "<td><input type=checkbox name='includebot[]' value='".$devname."'";
}
Cheers!
Chu.
Hi guy,
I have realised that the caching in the folder /usr/local/fop2/temp is causing problem!
I have manually deleted some buttons from table fop2buttons, but when I went to the panel, they are still there?
I have stop and restart service FOP2, but to no avail.
Then I stop the FOP2 service again and delete the cache file and restart the FOP2 service.
I went to the panel and now the buttons are displayed correctly?
So, I have no choice but to include a statement in /etc/init.d/fop2 script to delete the cache when I restart the FOP2
service to ensure that the buttons are shown correctly.
Cheers!
Regards,
Chu
Hi,
I have successfully installed fop2admin into freepbx2.2.1, and since then the missing extension buttons issue had already been resolved.
Now, I have another issue, and this issue concerns the logic of the function fop2_all_freepbx_buttons()
in functions.inc.php.
Whenever I want to maintain the buttons in the Fop2 Buttons screen, it will always display all the buttons directly from the two tables devices & users? As a result, this is very difficult for me manage the buttons since I can't delete anything from FOP2 Buttons screen. Why can't we just link the table fop2buttons together with table fop2users instead of linking tables devices & users with fop2buttons and let FOP2 Buttons module to extract users directly from fop2users instead of from tables devices&users? So that whenever I want to hide any buttons from displaying, I can simply go to FOP2 Users module to delete the user from there. If any new extension created in freepbx, the FOP2 Users module should able to detect and insert new record into the table fop2users, so that I can manually manage them at FOP2 Users screen. Don't you find that this should be the way to manage buttons more efficient? The purpose for the FOP2admin is to maintain the buttons, right?
Best Regards,
Chu
Hi guys,
Another issue is the user deletion, when I delete FOP user, it did not delete user from the fop2uttons.
So, I have edit the functions.inc.php again to look for the function statement fop2_del_user($id),
and I added a new line to delete the user from fop2buttons using the exten field.
Cheers!
Regards,
Chu
function fop2_del_user($id) {
$id = intval($id);
$thisItem = fop2_get_user($id);
$exten = $thisItem['exten'];
$results = sql("DELETE FROM fop2UserGroup WHERE exten = '$exten'","query");
$results = sql("DELETE FROM fop2users WHERE id = '$id'","query");
$results = sql("DELETE FROM fop2buttons WHERE exten = '$exten'","query");
Hi guys,
I have finally fixed my problem by editing the PHP script in /var/www/html/admin/modules/fop2admin.
In the PHP file functions.inc.php, I comment the following statement, then ev erything is working fine for now.
Cheers!
Best regards,
Chu
// fop2_del_button($boton_id_a_borrar);
<?php
function fop2admin_get_config($engine) {
// Executed on APPLY in FreePBX, we regenerate the fop2buttons if needed
global $amp_conf, $db, $active_modules;
$fopbutton = fop2_all_freepbx_buttons();
$botonesdefinidos = fop2_list_botones();
foreach ($botonesdefinidos as $devname => $datarray) {
if(!array_key_exists($devname,$fopbutton)) {
$results = sql("SELECT id FROM fop2buttons WHERE device='$devname'","getRow",DB_FETCHMODE_ASSOC);
$boton_id_a_borrar = $results['id'];
// fop2_del_button($boton_id_a_borrar);
}
}
HI
I have realised the real issue that actually causing all extensions gone.
That is the "Apply Configure change" red button on top screwed up the whole thing!!! (I am running on FreePBX 2.2.1)
When I select fop2admin from Module Admin and click on "process", and then click on "confirm" button to complete the installation, I immediately login into mysql and look into table fop2buttons and I can see all the extensions are there. However, when I click on the red button "Apply configuration changes" on top, and I try view the table again, all extension are gone except the last 3 records??? how come like that?
Regards,
Chu
Hi,
I have run /usr/local/fop2/autoconfig_buttons_freepbx.sh both with and without fop2admin.
When the fop2admin plugin installed, I can't see any extensions except ZAP/G0 and ZAP/G1.
When the fop2admin plugin uninstalled, I can see all the extension buttons.
I looked into the shell script /usr/local/fop2/autoconfigure_buttons_freepbx.sh and I realized that the script
actually retrieve the extension buttons from the table fop2buttons when it found there is fop2admin plugin as shown below:-
mysql -ENB -u $DBUSER -p$DBPASS -h $DBHOST $DBNAME -e \
"SELECT device AS channel,type,if(type<>'trunk',exten,'') AS extension,\
label,mailbox,context,'$QUEUECONTEXT' as queuecontext,concat('*',mailbox) AS extenvoicemail, \
privacy,\`group\`,IF(type='trunk',IF(email<>'',concat('splitme-',email),''),email) as email, \
queuechannel,originatechannel FROM fop2buttons WHERE device NOT LIKE 'USER/%' AND device<>'' \
ORDER BY type,exten" | sed '/\*\*/d' | sed 's/: /=/g' | sed '/.*=$/d' | while read LINEA
So, I open and view the data in the table fop2buttons, and I noticed that there only 3 records which are the
ZAP/G0, ZAP/G1 and Park/default? Where are the extensions? I can only found them in table fop2users???
Can anyone please advise me what is gone here?
Thankyou and best regards,
Chu
I don't think this is a good practiice to install a non-debugging version perl just because FOP2 alone making alot of complaints. If I did that, then I am covering up all posible errors and warnings. This is definitely not a good concept in software development.
You see, i have many many other applications running on the same server also calling the perl and why all without any errors? So why only FOP2 alone is giving me so much warnings?
No, thanks, I am not going to recemmend your product till you have a better version.
Best regards,
Chu
Hi guys,
This is my first time running FOP2, I have installed everything as guided by the online manual.
Somehow, I couldn't run the fop2_server, and I got the followings:
Can't run with DEBUGGING Perl at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 253.
BEGIN failed--compilation aborted at /tmp/par-root/cache-f0a3f11efb4858d29f477772e1bc9d218df72f95/inc/lib/Filter/Crypto/Decrypt.pm line 37.
Compilation failed in require at script/fop2_server.pl line 1.
BEGIN failed--compilation aborted at script/fop2_server.pl line 1.
[failed]
At first, I thought this could be the issue of the non-debugging perl? But, when I try to install perl-5.8.5 and I have got a lot of conflicts and warnings. And I have found that I am running on newer version of perl-5.8.8.6
So, can anyone please advise me how could I fix my problem?
Thanks and best regards,
Chu