Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: confiarus on April 26, 2011, 10:17:30 AM

Title: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 26, 2011, 10:17:30 AM
Installed OpenUpload on 8.0beta6 and it installed ok.  When opening the page using the following format: "https://myserver.domain.tld/openupload", I get a blank browser page which shows "done" at the bottom of the browser screen.

Used both IE8 and Firefox 3.x and had same results.  This is the only contrib I'd installed after installing SME 8.0beta6 .

Tried also using the ip address of the server (ex: https://10.168.1.11/openload), but, still
had same result.

Anyone have any ideas?
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Stefano on April 26, 2011, 12:04:51 PM
what about searching into /var/log/httpd/error_log file for any error?
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 26, 2011, 09:51:08 PM
Thank you for your reply.  I am a linux server novice but trying to learn.  I looked at the log and it doesn't show any error related to openupload.  Apache is working because the default page will display when I open it up in a browser  (This website is currently under contruction page).

I still just get a page with an HTTP 500 error msg
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Stefano on April 26, 2011, 11:15:24 PM
take a look into /var/log/httpd/access_log
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 28, 2011, 08:09:58 PM
Looked into the log.  First, I tried to access the page and then captured the log.  The result is shown below for this access attempt:

rcs.local 10.168.1.122 - - [28/Apr/2011:11:01:15 -0700]
"GET /openupload HTTP/1.1" 301 239 "-" "Mozilla/4.0
 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)"


rcs.local 10.168.1.122 - - [28/Apr/2011:11:01:15 -0700]
"GET /openupload/ HTTP/1.1" 302 - "-" "Mozilla/4.0
 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)"


rcs.local 10.168.1.122 - - [28/Apr/2011:11:01:16 -0700]
"GET /openupload/index.php?action=login HTTP/1.1" 500 - "-" "Mozilla/4.0
 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)"
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: cactus on April 28, 2011, 08:41:54 PM
take a look into /var/log/httpd/access_log
I think you mean the error_log files, access_log only log access related data errors are redirected to error_log.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Stefano on April 28, 2011, 09:07:12 PM
I think you mean the error_log files, access_log only log access related data errors are redirected to error_log.

Hi cactus..

as stated here (http://forums.contribs.org/index.php/topic,47450.msg234219.html#msg234219) there's no evidence of errors in error_log..
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: cactus on April 28, 2011, 09:10:45 PM
as stated here (http://forums.contribs.org/index.php/topic,47450.msg234219.html#msg234219) there's no evidence of errors in error_log..
Oops, missed that. That is strange though, normally errors are logged there.

To OP, are you sure you checked the error_log entries around the time you tried? The error_log files are rotated, which means that the error could be in an older copy of the error_log file, with a name like error_log.x (x being a number).
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 29, 2011, 11:11:04 AM
Yes, I checked all error logs in the directory.  See below my notes,

*********************************************************
At 01:51:33
From browser on another computer, browsed to http://10.168.1.11 (the sme server) to establish timeline only.

error log result.... (don't have an web page setup, so, this is expected)

[Fri Apr 29 01:51:33 2011] [error] [client 10.168.1.100] File does not exist: /home/e-smith/files/ibays/Primary/html/favicon.ico

[root@sme8 httpd]#


At 01:54:00
From browser on another computer, browsed to https://10.168.1.11/openupload.  Got Http 500 error as before.

error log result....

[Fri Apr 29 01:51:33 2011] [error] [client 10.168.1.100] File does not exist: /home/e-smith/files/ibays/Primary/html/favicon.ico


This is the end of the log and no error was logged because nothing was appended to end of the log.
Also, I did an ls -l to find the most current error log in the directory to search for errors.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Stefano on April 29, 2011, 11:18:54 AM
ok..

open a shell and login as root

go to /etc/ and edit php.ini

changing from
Code: [Select]
display_errors                         = Off
display_startup_errors                 = Off

to
Code: [Select]
display_errors                         = On
display_startup_errors                 = On

save file

restart httpd service with
Code: [Select]
service httpd-e-smith restart

try again.. you should see the error

when everything is ok, do
Code: [Select]
expand-template /etc/php.ini
service httpd-e-smith restart

b]NOTE:[/b] manual editing of configuration files is usually not a good idea.. this time is for debugging purpose only
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: cactus on April 29, 2011, 04:19:50 PM
NOTE: manual editing of configuration files is usually not a good idea.. this time is for debugging purpose only
See also: http://wiki.contribs.org/PHP#Display_Error_Messages
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 29, 2011, 08:50:24 PM
Thanks for reply.   I edited php.ini and browsed to https://10.168.1.11.   The browser displayed the errors below:
********************************************************************************
Warning: session_start() [function.session-start]: open(/var/lib/openupload/tmp/sess_6c24cc13b5f0621b3e26dbe0c9ee46e8, O_RDWR) failed: Permission denied (13) in /usr/share/openupload/lib/general.inc.php on line 5

Fatal error: Smarty error: unable to write to $compile_dir '/usr/share/openupload/templates_c'. Be sure $compile_dir is writable by the web server user. in /usr/share/openupload/lib/smarty/Smarty.class.php on line 1092

Warning: Unknown: open(/var/lib/openupload/tmp/sess_6c24cc13b5f0621b3e26dbe0c9ee46e8, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/openupload/tmp) in Unknown on line 0
***************************************************************************

Before I modified the "php.ini" file, I saved it to "php.old" with the thought that once I'm finished with the debugging, I'd copy the "php.old" back to "php.ini".  Is it okay to do that?

Also, can you explain what the "expand-template /etc/php.ini" does?   I don't understand "expand-template".  I googled it but its still not clear.   
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Stefano on April 29, 2011, 09:48:28 PM
I googled it but its still not clear.   

don't google.. read the wiki, search the forum and, of course, read the documentation ;-)
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 29, 2011, 09:54:13 PM
In my previous post, the browse to location was "https://10.168.1.11/openupload" instead of "https://10.168.1.11"....just forgot to type in all of the info...
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: cactus on April 29, 2011, 11:04:19 PM
Thanks for reply.   I edited php.ini and browsed to https://10.168.1.11.   The browser displayed the errors below:
********************************************************************************
Warning: session_start() [function.session-start]: open(/var/lib/openupload/tmp/sess_6c24cc13b5f0621b3e26dbe0c9ee46e8, O_RDWR) failed: Permission denied (13) in /usr/share/openupload/lib/general.inc.php on line 5

Fatal error: Smarty error: unable to write to $compile_dir '/usr/share/openupload/templates_c'. Be sure $compile_dir is writable by the web server user. in /usr/share/openupload/lib/smarty/Smarty.class.php on line 1092

Warning: Unknown: open(/var/lib/openupload/tmp/sess_6c24cc13b5f0621b3e26dbe0c9ee46e8, O_RDWR) failed: Permission denied (13) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/openupload/tmp) in Unknown on line 0
***************************************************************************
I am under the impression that you did not set the proper PHPBaseDir for your ibay. It seems the code you are using is living outside the scope of your ibay. By a protection mechanism PHP is not authorized to execute or access code outside of the tree it is invoked from, in your case most likely the html folder of your ibay.
Can you elaborate some more on how you installed openupload and where you have put the files?

Before I modified the "php.ini" file, I saved it to "php.old" with the thought that once I'm finished with the debugging, I'd copy the "php.old" back to "php.ini".  Is it okay to do that?
It is not a bad thing, but there is no need to. SME Server has a mechanism that generates configuration files based on templates that are supplied with values from the internal configuration database, normally the admin does not see this as this is handled by the server-manager panels.

Also, can you explain what the "expand-template /etc/php.ini" does?   I don't understand "expand-template".  I googled it but its still not clear.
It is the SME Server instruction to regenerate the configuration file you specify, in your case /etc/php.ini.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on April 30, 2011, 12:56:08 AM
Quote
I am under the impression that you did not set the proper PHPBaseDir for your ibay. It seems the code you are using is living outside the scope of your ibay. By a protection mechanism PHP is not authorized to execute or access code outside of the tree it is invoked from, in your case most likely the html folder of your ibay.
Can you elaborate some more on how you installed openupload and where you have put the files?

I followed the instructions (paragraphs 1 thru 4) on this link: http://wiki.contribs.org/OpenUpload (http://wiki.contribs.org/OpenUpload).
(There are no references to "PHPBaseDir" or "ibay" at that link.) 

Everything installed ok without errors.  I then created "admins" group using Server Manager.  Then, next, tried to browse to the "https://10.168.1.11/openupload" page.  Also, I didn't do any other "Additional Options".  The instructions seem to be very straightforward.  I copied and pasted instead of typing so as not to introduce typing errors.

 Cactus and Stefano, thank you for the info on "expand-template".  I'm still in the basic learning phase and realize how much I do not know.  Also, thanks for the quick replies.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Daniel B. on May 04, 2011, 05:44:47 PM
Hi.

For OpenUpload to work, you have to update e-smith-base from the smeupdates-testing repo (at least 5.2.0-56.sme). I'll modify the rpm so it'll be a requirement.

Regards, Daniel
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on May 05, 2011, 09:39:07 AM
[quotePosted by: VIP-ire
« on: Yesterday at 09:44:47 AM » Insert Quote

Hi.

For OpenUpload to work, you have to update e-smith-base from the smeupdates-testing repo (at least 5.2.0-56.sme). I'll modify the rpm so it'll be a requirement.

Regards, Daniel
][/quote]

Daniel,
What is "e-smith-base" and how does it relate to "openupload".  Also, is there a link or page where I can find
very very basic information on "e-smith-base" ?   And, where are instructions for updating "e-smith-base"? I did a search on the SME website and can't find anything on this.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Daniel B. on May 05, 2011, 09:46:43 AM
e-smith-base is a core package of the SME Server distribution. To update it from smeupdates-testing, you can run:
Code: [Select]
yum --enablerepo=smeupdates-testing update e-smith-base e-smith-ldap
[...]
signal-event post-upgrade && signal-event reboot

Then, you'll have to fix permissions on files owned by openupload rpm:
Code: [Select]
rpm --setugids openupload smeserver-openupload

a recent version of e-smith-base is needed for openupload in order to have apache user with the same uid/gid than www (see http://bugs.contribs.org/show_bug.cgi?id=6425 for details).

Regards, Daniel
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on May 06, 2011, 11:06:49 AM
Thank you !!!   the previous steps allowed to login screen to be displayed without errors !  However,
when I typed in username and password (for user "admin") , it says "login incorrect".

In server manager I double checked to make sure my "admins" group was ok, and created a new user and added that user to the "admins" group and set a password.   Still, I get "login incorrect".  Also, wanted to
mention that after I followed the previous steps, I'd also reverted the php.ini back to original.
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Daniel B. on May 06, 2011, 11:17:29 AM
Have you configured the LDAP auth as explained here (http://wiki.contribs.org/OpenUpload#Installation) ? Please show me the output of
Code: [Select]
db configuration show openupload
You should check your LDAP database is correctly populated. you can try to bind to LDAP from the command line using something like this
Code: [Select]
ldapsearch -x -D uid=admin,ou=Users,dc=domain,dc=tld -W
You'll be asked for the admin password. If you see some results (LDIF entries), it means that the admin user is correct in the LDAP database.

You can check /var/log/ldap/current to find why the auth doesn't work.

Regards, Daniel
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: confiarus on May 11, 2011, 07:55:59 PM
Quote
Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
« Reply #20 on: May 06, 2011, 03:17:29 AM »
--------------------------------------------------------------------------------

Have you configured the LDAP auth as explained here ? Please show me the output of

db configuration show openupload

I followed the instructions as written.  However, after going back and looking at the link, I notice
there's a note that wasn't there before which is related to the e-smith base updates.  In any case, I also did the e-smith update as shown in the note.
[root@sme8 ~]# db configuration show openupload
openupload=webapp
    Authentication=ldap
    DbName=openuploaddb
    DbPassword=***blanked***
    DbUser=openuploaduser
    MaxUpload=10
    MaxUploadSize=750
    RequireSSL=login
    access=private
    status=enabled
[root@sme8 ~]#

Quote
You should check your LDAP database is correctly populated. you can try to bind to LDAP from the command line using something

like this

ldapsearch -x -D uid=admin,ou=Users,dc=domain,dc=tld -WYou'll be asked for the admin password. If you see some results (LDIF

entries), it means that the admin user is correct in the LDAP database.

The results are below in a table.  I know the problem lies with LDAP because if I set the
authentication for "internal", I'm able to login to openupload without any problems.   Also, I'm
having trouble when creating new users in "server-manager".   If I add a new user, I will
be able to add the new user, however, I'll get a message that an "error occurred" when I do
a "save".   And the account will be locked even if I change the password several times.
[root@sme8 ~]# ldapsearch -x -D uid=admin,ou=Users,dc=rcs,dc=local -W
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# rcs.local
dn: dc=rcs,dc=local
objectClass: organization
objectClass: top
objectClass: dcObject
dc: rcs
o: XYZ Corporation

# Users, rcs.local
dn: ou=Users,dc=rcs,dc=local
objectClass: top
objectClass: organizationalUnit
ou: Users

# Groups, rcs.local
dn: ou=Groups,dc=rcs,dc=local
objectClass: top
objectClass: organizationalUnit
ou: Groups

# admin, Users, rcs.local
dn: uid=admin,ou=Users,dc=rcs,dc=local
uid: admin
cn: Local Administrator
sn: Administrator
userPassword:: ***blanked***
mail: admin@rcs.local
givenName: Local
objectClass: inetOrgPerson

# admins, Groups, rcs.local
dn: cn=admins,ou=Groups,dc=rcs,dc=local
gidNumber: 5000
cn: admins
memberUid: admin
memberUid: www
objectClass: posixGroup
objectClass: mailboxRelatedObject
mail: admins@rcs.local
description: administrators group

# Computers, rcs.local
dn: ou=Computers,dc=rcs,dc=local
objectClass: organizationalUnit
objectClass: top
ou: Computers

# www, Groups, rcs.local
dn: cn=www,ou=Groups,dc=rcs,dc=local
cn: www
gidNumber: 102
memberUid: admin
objectClass: posixGroup

# www, Users, rcs.local
dn: uid=www,ou=Users,dc=rcs,dc=local
cn: e-smith web server
gidNumber: 102
homeDirectory: /home/e-smith
loginShell: /bin/false
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
shadowExpire: -1
shadowFlag: 134538308
shadowInactive: -1
shadowLastChange: 15087
shadowMax: 99999
shadowMin: -1
shadowWarning: 7
uid: www
uidNumber: 102

# admins, Users, rcs.local
dn: uid=admins,ou=Users,dc=rcs,dc=local
gidNumber: 5000
homeDirectory: /home/e-smith
loginShell: /bin/false
objectClass: account
objectClass: posixAccount
objectClass: shadowAccount
shadowExpire: -1
shadowFlag: 134538308
shadowInactive: -1
shadowLastChange: 15088
shadowMax: 99999
shadowMin: -1
shadowWarning: 7
uidNumber: 5000
uid: admins
cn: administrators group

# user1, Groups, rcs.local
dn: cn=user1,ou=Groups,dc=rcs,dc=local
objectClass: posixGroup
cn: user1
gidNumber: 5003

# search result
search: 2
result: 0 Success

# numResponses: 11
# numEntries: 10
[root@sme8 ~]#




Edit by cactus: blanked passwords
Title: Re: SME 8.0 beta6 : OpenUpload installs ok but webpage is blank
Post by: Daniel B. on May 12, 2011, 09:19:36 AM
The results are below in a table.

Please, edit your previous post and remove your LDIF entries, this is private data, especially your admin password.

  I know the problem lies with LDAP because if I set the
authentication for "internal", I'm able to login to openupload without any problems.   Also, I'm
having trouble when creating new users in "server-manager".   If I add a new user, I will
be able to add the new user, however, I'll get a message that an "error occurred" when I do
a "save".   And the account will be locked even if I change the password several times.[/color]

So you should open a bug in bugzilla