Modern Browser complain if there are non-https elements in https websites. This makes sure that if the user visits via https all elements of the page are also retrieved using SSL. Furthermore it uses https urls in emails that are send to the user, if SECURE_URL_BASE is set in project/project.inc.
The only remaining places where URL_BASE is used is when it is used as master_url where it is important that it is in sync with what the scheduler uses.
Oddly enough, I couldn't repro this on Chrome or Firefox;
I remained logged in after quit/restart browser,
even though the cookie said it was for this browsing session only.
The SETI@home result table is about to run out of 32-bit IDs,
so we need to move to 64-bit result IDs.
This will happen to the workunit table at some point too.
I changed the server C++ code to use the "long" type for all DB IDs
(and to use appropriate conversion codes like %lu).
"long" is 64 bit on 64-bit machines.
For uniformity I did this for all tables,
even ones (like app) that will never get big.
I chose NOT to change the DB schema for now.
The new code will work with 32-bit ID fields in the DB.
As projects approach the 32-bit limit on a table they can change
its ID field, and fields that reference this table, to BIGINT.
This is likely to happen only on the result and workunit tables.
I put functions in html/ops/db_update.php
to change the IDs of these tables.
In "strict mode", inserts fail if they don't supply values
for columns with no default defined in the schema
(in non-strict mode, 0 and '' are implicit defaults).
Starting with MySQL version 5.6, strict mode is the default.
This breaks some of the BOINC web code,
which does inserts without giving values to some columns.
There are two ways to solve this:
1) change the schema to give defaults everywhere
2) change the PHP code to supply values for more columns.
I'm using 1) in some cases and 2) in others.
This commit fixes some of the errors; there are others.
Change the way we see if a web server is running on a host.
Fetch http://host, and check for 2xx or 4xx status.
With this change, new server_status.php works on SETI@home.
remote_server_status.php (script for seeing if remote daemons are running)
did this by ps -C command,
and seeing if the last line of the output contained the command.
This didn't work for SETI@home, because the daemons are symbolic links in bin/.
The command that ps knows about is the file name after resolving the link.
This generally doesn't contain the original command name,
so it would look like no remote daemons are running.
Fix: look up the PID (in pid_host/xxx.pid) and use "ps PID".
This also correctly distinguishes between daemons
that use the same program on the same host.
There were a couple of issues:
- the server status page is served from a web server, say X.
A daemon is "remote" if it runs on a machine other than X.
This is not the same as having a <host> element in the daemon's
config.xml entry.
Add logic to correctly classify daemons as remote or not.
- get rid of the <uldl_host> stuff.
There can be separate upload and download servers,
and they are identified by <upload_url> and <download_url>.
They may or not be remote;
to decide this, compare the host part of the URL
with the host part of the project's master URL.
- Hosts are specified with the machine name (e.g. isaac)
or domain name (isaac.ssl.berkeley.edu).
Keep track of this distinction.
The server status page was one of the oldest and cruftiest parts of BOINC.
It flew in the face of the model/view/controller paradigm,
and had the kind of convoluted structure that beginning programmers
often produce.
Plus it didn't work with remote daemons.
Also:
- use "admin_error_page()" instead of "error_page()" in admin pages
- add footer w/ Main Page link to admin pages
- code cleanup in delete user function
When deleting a user (from the delete_spammers.php script),
remove records that refer to that user in
private_messages, notify, credit_user, badge_user, and friend tables.
Notes:
- This change eliminates some dangling references,
but in general a BOINC DB doesn't have referential integrity.
The code should check for dangling references.
- Functions like BoincUser::delete() should delete a user record,
not try to remove things that refer to it.
The function delete_user() (in user.inc) does this.
I seemed to be playing whack-a-mole with problems related to
recursive inclusions of project.inc.
Solve this by changing how the use of mysqli can be inhibited:
instead of defining NO_MYSQL in project, put <no_mysqli/> in config.xml