update-sources caused freepbx interface to not load at all

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
i get a blank screen when i go to http://ipaddress/admin/config.php.

this is what the asterisk -r log says when set at verbosity 3.

oh i wish i had not run update-sources. two hours later, this :(
otherwise, it looked like i had a working server.

seeking help...
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
You did not run update-fixes! I can duplicate that if I leave out this step. As the second to last screen in update-source says

"***************************************************************"
"*It is *HIGHLY* recommended you run update-scripts and then *"
"*update-fixes after the machine reboots. This will fix any *"
"*problems that may have been introduced by digium. If you *"
"*find a problem please post it in the PIAF forums. *"
"* *"
"*Best regards *"
"*The PBX in a Flash Development Team *"
"* *"
"* Please tap the ENTER key to continue *"
"***************************************************************"

There are a couple of interactions when update-source is run that come from the DIGIUM software. Once you run the update-fixes it is corrected. Now if you have hand modified things that all bets are off. I will change the wording to make it mandatory that update-fixes be run after the reboot that occurs with update-source.

Tom
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
thanks for the ultra quick reply. it is somewhat of an emergency :).

status shows everything is working. here is the output of status.

********************************************************************
* PBX in a Flash Version 1.2 Daemon Status *
* Running Asterisk 1.4 *
********************************************************************
* Asterisk * ONLINE * Zaptel * ONLINE * MySQL * ONLINE *
* SSH * ONLINE * Apache * ONLINE * Iptables * ONLINE *
* Fail2ban * ONLINE * Ethernet0 * ONLINE * IP Connect * ONLINE *
* BlueTooth * ONLINE * Hidd * ONLINE * NTPD * ONLINE *
* Sendmail * ONLINE * Samba * ONLINE * Webmin * ONLINE *
********************************************************************
* Running Asterisk Version : Asterisk 1.4.21.2
* Asterisk Source Version : 1.4.21.2
* Zaptel Source Version : 1.4.11
* Libpri Source Version : 1.4.7
* Addons Source Version : 1.4.7
********************************************************************
CentOS release 5.2 (Final) - 32 Bit ** Kernel: 2.6.18-92.1.10.el5

------

as far as the web-interface, everything else comes up except the freepbx interface. when i first visit the ipaddress, and click on freepbx then it asks me for my password, which is accepted and then blank.

oh also, i did not custom install. i would not know how to. i did install HPEC. then when the process completed (incl update-scripts and fixes), and freepbx did not show up, i decided to do update-sources again. and this second time, i did not opt for HPEC. did everything else as a non-advanced user would.

i did run update-scripts and update-fixes after the whole update-sources routine was completed. relevant extensions (incl remote ones) are connecting. as i can tell through "sip show peers". so the system appears to be working.

awaiting your response. pl let me know if i should supply any other log. i hope that i do not have to go back to the original ISO build...
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
The only way I could duplicate the behavior is but running update-source and then after the reboot *NOT* running update-fixes and trying to logon to freepbx. Once I ran update-fixes (You don't have to run update-scripts for a few weeks) I could log back into freepbx

Have you edited anything by hand? If so it may be quite complex to fix.

Look in /etc/httpd/conf/httpd.conf for AllowOveride which if you are using htaccess should set to none. If you are using database mode as evidenced by /etc/amportal.conf - AUTHTYPE=database then the AllowOveride should be set to All.

Tom
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
the only thing that i would have edited by hand is the file where one specifies the external ipadress of the PIAF box.

i did use the passwd scripts and i think they may have tinkered with some conf files (if i recall the messages right). you would know.

thanks!

----
httpd.conf
----

root@pbx:~ $ cat /etc/httpd/conf/httpd.conf | grep Allow
# Listen: Allows you to bind Apache to specific IP addresses and/or
AllowOverride None
# AllowOverride controls what directives may be placed in .htaccess files.
AllowOverride None
Allow from all
# AllowOverride FileInfo AuthConfig Limit
# Allow from all
# for additional configuration directives. See also the AllowOverride
AllowOverride None
Allow from all
AllowOverride None
Allow from all
AllowOverride None
Allow from all
# Allow server status reports generated by mod_status,
# Allow from .example.com
# Allow remote server configuration reports, with the URL of
# Allow from .example.com
# Allow from .example.com

---

access_log does not help either. only three entries when i hit reload on the /admin/config.php page.

192.168.15.138 - - [08/Aug/2008:09:08:51 -0400] "GET /admin/config.php HTTP/1.1" 401 479 "http://192.168.15.50/index.php?admin=true" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.1+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2"
192.168.15.138 - maint [08/Aug/2008:09:08:51 -0400] "GET /admin/config.php HTTP/1.1" 200 - "http://192.168.15.50/index.php?admin=true" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.1+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2"
192.168.15.138 - - [08/Aug/2008:09:08:51 -0400] "GET /favicon.ico HTTP/1.1" 200 99678 "http://192.168.15.50/admin/config.php" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4; en-us) AppleWebKit/528.1+ (KHTML, like Gecko) Version/4.0dp1 Safari/526.11.2"

----

wondering if php keeps logs somewhere. i am at the limit of my unix familiarity... so waiting for ideas.
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
rerun passwd-master and choose only the second choice which is the freePBX setup. If this does not work It will have to wait till I get back. I am out on my boat going diving at the moment.

I reran update-source from my phone on one of my lab systems and it works just fine. Are you using freepbx alpha or beta. If so good luck with that.

Won't be back till this evening sorry...

Tom
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
1. I am not using anything alpha. just stock stuff.
2. just ran passwd-master.

-----passwd-master - Version 1.2.7 released on Date 080208
CentOS release 5.2 (Final) - 32 Bit
*************************************************************************
* FREEPBX PASSWORD OPTIONS *
* *
* By default freepbx is set to AUTHTYPE=database in pbxinaflash *
* This means you will have to log in each time you wish to do anything *
* with FPBX. The default is admin/admin for username and password *
* This can be tedious. You can set the AUTHTYPE=none. This will allow *
* you to use your maint username and password thus one less password! *
* This is accomplished using .htaccess verification to the admin area. *
* *
* Do you wish to disable the admin/admin user in freepbx and enable the *
* the use of the maint password instead? Remember you will set this *
* password in the next step. *
* THIS IS OPTIONAL! IF YOU DON'T UNDERSTAND WHAT THIS DOES THEN DO NOT *
* RUN THIS PORTION. THERE IS NO UNINSTALL SCRIPT FOR THIS MODULE *
* *
* Y = Yes N = No Ctrl C to exit this script *
*************************************************************************

-----

Selected Y in response to this. Set the password after that. Still it does not work.

i guess i am stuck till you are back from diving. given that asterisk is running, i am thinking it makes sense to wait.

have fun!!
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
problem fixed. or so it seem for now.

----

i checked apache error log. saw this.

sims_: [Fri Aug 08 11:54:11 2008] [error] [client 192.168.15.138] PHP Warning: require_once(DB.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /var/www/html/admin/common/db_connect.php on line 14
[11:54am] sims_: [Fri Aug 08 11:54:11 2008] [error] [client 192.168.15.138] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'DB.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/admin/common/db_connect.php on line 14

---

since guru is out diving, decided to adventure into freepbx IRC. a kind soul there asked me to look into apache error log.

then asked me to do pear install DB. I did. and that seems to have fixed this problem. meaning, now freepbx interface is loading.

----

since i would like to use update-sources on a frequent basis, i was wondering if this can still be looked into as to why this problem arose.

thanks!!
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
i jumped too soon when i said problem fixed. apache error log continues to post some warning messages. i am pasting them here to see if you have any views on why there are showing up and whether these are normal.

i am going to run update-sources one more time to see if it helps any. will report.

----


[Fri Aug 08 12:09:56 2008] [error] [client 192.168.15.138] PHP Warning: Unknown: open(/var/lib/php/session/sess_91kg7jod9q9eioeove86f3a2a1, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://192.168.15.50/admin/config.php?type=setup&display=index
[Fri Aug 08 12:09:56 2008] [error] [client 192.168.15.138] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://192.168.15.50/admin/config.php?type=setup&display=index

-----

I completed update-source, update-scripts, update-fixes. freepbx comes up. maybe because of the "pear DB install" that was done prior to this iteration of update-source. but the error in httpd error log still remains. here it is.

[Fri Aug 08 13:27:02 2008] [error] [client 192.168.15.138] PHP Warning: Unknown: open(/var/lib/php/session/sess_91kg7jod9q9eioeove86f3a2a1, O_RDWR) failed: Permission denied (13) in Unknown on line 0, referer: http://192.168.15.50/admin/config.php?type=setup&display=index
[Fri Aug 08 13:27:02 2008] [error] [client 192.168.15.138] PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0, referer: http://192.168.15.50/admin/config.php?type=setup&display=index
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
Not sure why you did not have pear DB. I have found that it sometimes does not get installed on every machine. I have 4 tickets since the first release. None with an identifiable cause.

I have noticed that there are some permissions changed by Asterisk when you run update-source. I have altered and pushed out a new update-fixes that forces the couple of folders back to the appropriate permissions. You might want to try running update-scripts and then update-fixes. There is no reason to rerun update-source for a while.

Hopefully that works. I am away and unavailable for 10 days or so working on an out of town windows (ugh) project so perhaps some other can chime in if this little patch does not help.

Tom
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

pear DB is installed from the ISO, and we have another go in the install script where there is a line - pear install DB, which is a hangover from the original install script I wrote

This command does nothing if it detects the presense of pear DB

In any case, FreePBX checks for the presence of pear DB before installing, and if it does not exist, will fail and warn you.

So it is impossible that pear DB was not installed, because you had a working installation.

Therefore, I would agree with Tom that the problem lies somewhere in how Asterisk installs,or something that happened during update source.

Joe
 

sims

New Member
Joined
Jun 20, 2008
Messages
170
Reaction score
0
i think after running update-scripts and update-fixes (post Tom's message), the php session error does not seem to reappear. thanks.

btw, i have the stock walmart $199 PC. i think 512MB of RAM. do you think that the RAM might be too less for compiling and such tasks?
 

jlrichar

New Member
Joined
May 5, 2008
Messages
22
Reaction score
0
Same problem here

Just thought I would chime in to mention I am essentially having the same problem:

http://pbxinaflash.com/community/threads/cant-login-to-freepbx.1950/?t=1950

To sum:

When I go to http://ipaddress/admin/config.php.

and login as maint with the password -it works--only I get a blank page.

Edit: "The problem with the administrative link on the inital page is that when I click on it I never get asked a username--just for the "Admin Pwd"" This works now--it was a problem with the user:rolleyes5:.



Obviously something got messed up with the update source that is resulting in the blank freepbx page.

I have not manually changed anything. I simply ran the passwd-master script, and then update-source, update-scripts, update-fixes. Now I have run those last three twice in succession.
 

Attachments

  • 2008-08-09_091452.pdf
    15.9 KB · Views: 7
Last edited by a moderator:

euser4life

Guru
Joined
Dec 18, 2007
Messages
223
Reaction score
0
Ran into this today as well

I had a PIAF system that was running asterisk 1.4.21.1 with CentOS5 and FreePBX 2.4. I went through the normal sequence for upgrading.
1. update-scripts
2. update-fixes
3. update-source

I was upgraded to CentOS 5.2 with a reboot. Next ran update-source again, which went through the "yum update -y" sequence with reboot. Next update-source was run again to pull the latest Asterisk components and then rebooted.

1. update-scripts
2. update-fixes

Got in to Kennonsoft UI and clicked on FreePBX. Asked for password and username, entered and had the same results as original poster. From tailing the httpd error logs:
"tail -f /var/log/httpd/error_log"
And had a fatal PHP error with not being able to find "DB.php"

Did a "locate DB.php" and it returned that it should be found in /usr/share/pear. But it was not there. So as suggested by the other user above, I issued a "pear install DB" This restored the DB.php file as well as some other missing directories that should have been in there

Code:
root@pbx:/usr/share/pear
Code:
 $ locate DB.php
/usr/share/pear/DB.php
/usr/share/pear/PEAR/DependencyDB.php
root@pbx:/usr/share/pear $ ll .
total 140
drwxr-xr-x  2 root root  4096 Aug 16 16:39 Archive
drwxr-xr-x  2 root root  4096 Aug 16 16:39 Console
drwxr-xr-x  3 root root  4096 May 24 09:28 data
drwxr-xr-x  4 root root  4096 Aug 16 16:40 doc
drwxr-xr-x  2 root root  4096 Aug 16 16:39 OS
drwxr-xr-x 11 root root  4096 Aug 16 16:39 PEAR
-rw-r--r--  1 root root 14778 May 24 09:28 pearcmd.php
-rw-r--r--  1 root root 34264 May 24 09:28 PEAR.php
-rw-r--r--  1 root root  1800 May 24 09:28 peclcmd.php
-rw-r--r--  1 root root 19369 May 24 09:28 System.php
drwxr-xr-x  4 root root  4096 May 24 09:28 test
drwxr-xr-x  3 root root  4096 Aug 16 16:39 XML
root@pbx:/usr/share/pear $ updatedb
You have new mail in /var/spool/mail/root
root@pbx:/usr/share/pear $ locate DB.php
/usr/share/pear/PEAR/DependencyDB.php
root@pbx:/usr/share/pear $ pear install DB
downloading DB-1.7.13.tgz ...
Starting to download DB-1.7.13.tgz (132,246 bytes)
.........................done: 132,246 bytes
install ok: channel://pear.php.net/DB-1.7.13
root@pbx:/usr/share/pear $ ll
total 188
drwxr-xr-x  2 root root  4096 Aug 16 16:39 Archive
drwxr-xr-x  2 root root  4096 Aug 16 16:39 Console
drwxr-xr-x  3 root root  4096 May 24 09:28 data
drwxr-xr-x  2 root root  4096 Aug 16 21:38 DB
-rw-r--r--  1 root root 42793 Aug 16 21:38 DB.php
drwxr-xr-x  4 root root  4096 Aug 16 16:40 doc
drwxr-xr-x  2 root root  4096 Aug 16 16:39 OS
drwxr-xr-x 11 root root  4096 Aug 16 16:39 PEAR
-rw-r--r--  1 root root 14778 May 24 09:28 pearcmd.php
-rw-r--r--  1 root root 34264 May 24 09:28 PEAR.php
-rw-r--r--  1 root root  1800 May 24 09:28 peclcmd.php
-rw-r--r--  1 root root 19369 May 24 09:28 System.php
drwxr-xr-x  4 root root  4096 May 24 09:28 test
drwxr-xr-x  3 root root  4096 Aug 16 16:39 XML


My login now completes and I can view FreePBX.
 

darmock

PIAF Developer
Joined
Oct 18, 2007
Messages
2,892
Reaction score
98
I am still away on a programming job in the middle of nowhere and the internet is pretty much non existant however. I have attempted to duplicate this behavior on ver 1.2 and 1.3 of piaf using both asterisk 1.4 and 1.6 on both 32 and 64 bit variants plus I upgraded from Centos 5.1 to 5.2 (total of 12 different iterations) and cannot duplicate the conditions you have outlined at all.

DB.php is always present and never gets deleted. I have also looked at the logs when you guys upgrade from Centos 5.1 to 5.2 and cannot find where DB.php is being deleted.

The long and the short of it is it does not seem to happen to the majority of people. I have altered both update fixes and update-source to check for the absence of DB.php and if not exist it will rerun pear install DB. Still does not explain why this has occured in only a few systems but this should fix it along with forcing the session folder to the right ownership and permissions which are changed by yum itself. There is no code within any of our programs which changes or alters DB.php at all. Has to be related to asterisk/yum or some other program.

I will be away and unavailable via phone or email for another 7 days or so. I just happend to catch this thread and had access to the internet in a small town coffee shop. Heck my cell phone doesn't work here.... grrrr. Have fun. The new programs are uploaded so once you do a update-scripts you should be well away.

As always don't run update-fixes or update-source unless you really need to update your system because of security related problems and never use yum -y update at all.


Tom
 

blando

New Member
Joined
Jul 26, 2008
Messages
2
Reaction score
0
Thank you all for this thread. I followed the update instructions exactly as I usually do but I ran into the same exact problem. The "pear install db" got me back up and running.
 

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top