View Full Version : $url *must* be https
weisburd
Sun 20th Nov '05, 10:22am
Just upgraded forum from 3.0.3 to 3.5.1.
Forum *must* operate on https, and only on https, and it did so just fine until the upgrade.
Now, when conducting a search, such as
https://www.mysite.com/vb/search.php?do=getdaily
the URL for the results gets written as:
http://www.mysite.com/vb/search.php?searchid=2093
which "works" in the sense that the results are displayed, but it's supposed to be under https, not http.
In the control panel, under vBulletin Options -> Site Name / URL / Contact Details, the URL is specified as https://www.mysite.com/vb/
So, something, somewhere, is of the opinion that the $url that gets concatenated in order to display search results *must* start with http://, and I beg to differ. Since it's my forum, I'd like to win the argument.
If someone could point me in the direction of the template (I'm using the default), or script (I've looked at search.php without success), or database table/value, I would be much obliged.
weisburd
Sun 20th Nov '05, 10:33am
The same situation arises when posting a new comment, starting a new thread.
Start here:
https://www.mysite.com/vb/forumdisplay.php?f=1
Click 'New Thread' and you go here:
https://www.mysite.com/vb/newthread.php?do=newthread&f=1
So far, so good.
However, when you click 'Post new thread' you get
http://www.mysite.com/vb/showthread.php?p=3490#post3490
and the same thing happens when you view an existing thread under https:// and then submit a reply.
Mike Sullivan
Sun 20th Nov '05, 11:00am
What webserver are you using? Could you send me a link to your PHP info?
weisburd
Sun 20th Nov '05, 11:35am
What webserver are you using? Could you send me a link to your PHP info?
I've copied the output of PHP info from that server to this location:
removed ("")
And for what it's worth, here's a lynx --head --dump:
HTTP/1.1 200 OK
Date: Sun, 20 Nov 2005 15:33:05 GMT
Server: Apache/1.3.33 (Unix)
Last-Modified: Sat, 30 Oct 2004 00:45:11 GMT
ETag: "80c128-303-4182e417"
Accept-Ranges: bytes
Content-Length: 771
Connection: close
Content-Type: text/html
Mike Sullivan
Sun 20th Nov '05, 11:42am
Well it should work in Apache. There were changes made in 3.5.1 to how HTTPS detection is done. It used to be done via a port check which wasn't correct. It's now done by looking at $_SERVER['HTTPS'].
Can you view that PHP info over HTTPS and see if there are any references to "https" in it?
weisburd
Sun 20th Nov '05, 11:59am
Can you view that PHP info over HTTPS and see if there are any references to "https" in it?
Answer would appear to be affirmative, yes sir.
Mike Sullivan
Sun 20th Nov '05, 12:02pm
Aha, your setup is returning "1" instead of "on" for the variable we need.
You can workaround this by, in includes/functions.php changing the 2 references to:
$_SERVER['HTTPS'] == 'on'
into:
$_SERVER['HTTPS'] == '1'
weisburd
Sun 20th Nov '05, 12:23pm
Aha, your setup is returning "1" instead of "on" for the variable we need.
You can workaround this by, in includes/functions.php changing the 2 references to:
$_SERVER['HTTPS'] == 'on'
into:
$_SERVER['HTTPS'] == '1'
That worked.
:D
frankjones
Mon 28th Nov '05, 8:08pm
I'm getting the same problem but the answer above doesn't work for me.
I ran https://www.mydomain.com/phpinfo.php
which had this:
<?
phpinfo();
?>
This gave the standard phpinfo page. I then searched this page for _SERVER["HTTPS"] and it wasn't on this page. There were lots of other _SERVER variables listed, just not HTTPS
also, I made a little program :
<?
$msg="$_SERVER['HTTPS']";
echo $msg;
?>
and ran this under https://www.mydomain.com/httpsinfo.php
which gave me a blank page; not an error page, but a blank page.
VBB 3.0 ran perfectly on my https site until I upgraded to 3.5.1
I tried to no avail to change the two refs to https in functions.php from "on" to "1" but that didn't work.
Thanks in advance.
Mike Sullivan
Mon 28th Nov '05, 8:25pm
I need to see the entire output from phpinfo on https.
frankjones
Mon 28th Nov '05, 8:46pm
here's the output, run under https://
PHP Version 4.2.2
System Linux make2.plesk.ru 2.4.7-10enterprise #1 SMP Thu Sep 6 16:48:20 EDT 2001 i686 unknown
Build Date Sep 5 2002 10:47:38
Configure Command './configure' '--with-apxs=/home/builder/psa_502_patch/psa/apache/files/apxs' '--prefix=/usr/local/psa/apache' '--with-regex=php' '--with-config-file-path=/usr/local/psa/apache/conf' '--enable-sockets' '--enable-track-vars' '--with-mysql=/home/builder/psa_502_patch/psa/release/dist/usr/local/psa/mysql' '--with-iodbc=/home/builder/psa_502_patch/psa/lib/dist' '--with-imap=/home/builder/psa_502_patch/psa/lib/dist' '--with-gd=/home/builder/psa_502_patch/psa/lib/dist' '--with-ttf=/home/builder/psa_502_patch/psa/lib/dist' '--with-jpeg-dir=/home/builder/psa_502_patch/psa/lib/dist' '--with-png-dir=/home/builder/psa_502_patch/psa/lib/dist' '--with-tiff-dir=/home/builder/psa_502_patch/psa/lib/dist' '--with-gettext=/home/builder/psa_502_patch/psa/lib/dist' '--with-zlib' '--with-xml' '--disable-debug' '--enable-pear' '--without-iconv'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/psa/apache/conf/php.ini
Debug Build no
Thread Safety disabled
This program makes use of the Zend Scripting Language Engine:
Zend Engine v1.2.0, Copyright (c) 1998-2002 Zend Technologies
with the ionCube PHP Accelerator v1.3.3r2, Copyright (c) 2001-2002, by Nick Lindridge
--------------------------------------------------------------------------------
PHP 4 Credits
--------------------------------------------------------------------------------
Configuration
PHP Core
Directive Local Value Master Value
allow_call_time_pass_reference
On On
allow_url_fopen
1 1
always_populate_raw_post_data
0 0
arg_separator.input
& &
arg_separator.output
& &
asp_tags
Off Off
auto_append_file
no value no value
auto_prepend_file
no value no value
browscap
no value no value
default_charset
no value no value
default_mimetype
text/html text/html
define_syslog_variables
Off Off
disable_functions
no value no value
display_errors
On On
display_startup_errors
Off Off
doc_root
no value no value
enable_dl
On On
error_append_string
no value no value
error_log
no value no value
error_prepend_string
no value no value
error_reporting
2039 2039
expose_php
On On
extension_dir
./ ./
file_uploads
1 1
gpc_order
GPC GPC
highlight.bg
#FFFFFF #FFFFFF
highlight.comment
#FF9900 #FF9900
highlight.default
#0000CC #0000CC
highlight.html
#000000 #000000
highlight.keyword
#006600 #006600
highlight.string
#CC0000 #CC0000
html_errors
On On
ignore_user_abort
Off Off
implicit_flush
Off Off
include_path
.:/usr/local/psa/apache/lib/php .:/usr/local/psa/apache/lib/php
log_errors
Off Off
magic_quotes_gpc
On On
magic_quotes_runtime
Off Off
magic_quotes_sybase
Off Off
max_execution_time
30 30
open_basedir
/usr/local/psa/home/vhosts/mydomain.net/httpsdocs:/tmp no value
output_buffering
no value no value
output_handler
no value no value
phpa
1 1
phpa.cache_dir
/home/phpacache /home/phpacache
phpa.cache_file_prune_period
1h 1h
phpa.cache_file_ttl
1d 1d
phpa.enable_php_memory_bug_workaround
0 0
phpa.file_perms
400 400
phpa.ignore_dirs
no value no value
phpa.ignore_files
no value no value
phpa.lock_threshold0
10 10
phpa.lock_threshold1
10 10
phpa.shm_group
no value no value
phpa.shm_ignore_dirs
no value no value
phpa.shm_ignore_files
no value no value
phpa.shm_key
0xc0deb00 0xc0deb00
phpa.shm_max_processes
512 512
phpa.shm_perms
666 666
phpa.shm_release_at_exit
1 1
phpa.shm_size
32 32
phpa.shm_stats_check_period
5m 5m
phpa.shm_ttl
12h 12h
phpa.shm_user
no value no value
phpa.tweaks
1 1
post_max_size
8M 8M
precision
14 14
register_argc_argv
On On
register_globals
On On
safe_mode
On On
safe_mode_exec_dir
/usr/local/lib/phpa /usr/local/lib/phpa
safe_mode_gid
Off Off
safe_mode_include_dir
no value no value
sendmail_from
me@localhost.com me@localhost.com
sendmail_path
/usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
short_open_tag
On On
SMTP
localhost localhost
sql.safe_mode
Off Off
track_errors
Off Off
unserialize_callback_func
no value no value
upload_max_filesize
16M 16M
upload_tmp_dir
/tmp /tmp
user_dir
no value no value
variables_order
EGPCS EGPCS
xmlrpc_error_number
0 0
xmlrpc_errors
Off Off
y2k_compliance
Off Off
xml
XML Support active
XML Namespace Support active
EXPAT Version 1.95.2
standard
Regex Library Bundled library enabled
Dynamic Library Support enabled
Path to sendmail /usr/sbin/sendmail -t -i
Directive Local Value Master Value
assert.active
1 1
assert.bail
0 0
assert.callback
no value no value
assert.quiet_eval
0 0
assert.warning
1 1
safe_mode_allowed_env_vars
PHP_ PHP_
safe_mode_protected_env_vars
LD_LIBRARY_PATH LD_LIBRARY_PATH
url_rewriter.tags
a=href,area=href,frame=src,input=src,form=fakeentr y a=href,area=href,frame=src,input=src,form=fakeentr y
sockets
Sockets Support enabled
session
Session Support enabled
Directive Local Value Master Value
session.auto_start
Off Off
session.cache_expire
180 180
session.cache_limiter
nocache nocache
session.cookie_domain
no value no value
session.cookie_lifetime
0 0
session.cookie_path
/ /
session.cookie_secure
Off Off
session.entropy_file
no value no value
session.entropy_length
0 0
session.gc_maxlifetime
1440 1440
session.gc_probability
1 1
session.name
PHPSESSID PHPSESSID
session.referer_check
no value no value
session.save_handler
files files
session.save_path
/tmp /tmp
session.serialize_handler
php php
session.use_cookies
On On
session.use_trans_sid
1 1
posix
Revision $Revision: 1.42.2.2 $
pcre
PCRE (Perl Compatible Regular Expressions) Support enabled
PCRE Library Version 3.4 22-Aug-2000
odbc
ODBC Support enabled
Active Persistent Links 0
Active Links 0
ODBC library iodbc
ODBC_INCLUDE -I/home/builder/psa_502_patch/psa/lib/dist/include
ODBC_LFLAGS -L/home/builder/psa_502_patch/psa/lib/dist/lib
ODBC_LIBS -liodbc
Directive Local Value Master Value
odbc.allow_persistent
On On
odbc.check_persistent
On On
odbc.default_db
no value no value
odbc.default_pw
no value no value
odbc.default_user
no value no value
odbc.defaultbinmode
return as is return as is
odbc.defaultlrl
return up to 4096 bytes return up to 4096 bytes
odbc.max_links
Unlimited Unlimited
odbc.max_persistent
Unlimited Unlimited
mysql
MySQL Support enabled
Active Persistent Links 1
Active Links 1
Client API version 3.23.51
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_INCLUDE -I/home/builder/psa_502_patch/psa/release/dist/usr/local/psa/mysql/include/mysql
MYSQL_LIBS -L/home/builder/psa_502_patch/psa/release/dist/usr/local/psa/mysql/lib/mysql -lmysqlclient
Directive Local Value Master Value
mysql.allow_persistent
On On
mysql.default_host
no value no value
mysql.default_password
no value no value
mysql.default_port
no value no value
mysql.default_socket
no value no value
mysql.default_user
no value no value
mysql.max_links
Unlimited Unlimited
mysql.max_persistent
Unlimited Unlimited
imap
IMAP Support enabled
IMAP c-Client Version 2001
gettext
GetText Support enabled
gd
GD Support enabled
GD Version 1.6.2 or higher
GIF Read Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
ctype
ctype functions enabled (experimental)
zlib
ZLib Support enabled
'zlib:' fopen wrapper enabled
Compiled Version 1.1.3
Linked Version 1.1.3
Directive Local Value Master Value
zlib.output_compression
Off Off
apache
APACHE_INCLUDE
APACHE_TARGET
Apache Version Apache/1.3.26
Apache Release 10326100
Apache API Version 19990320
Hostname:Port www.mydomain.net:443 (http://www.mydomain.net:443)
User/Group apache(48)/48
Max Requests Per Child: 100 - Keep Alive: on - Max Per Connection: 1000
Timeouts Connection: 300 - Keep-Alive: 15
Server Root /usr/local/psa/apache
Loaded Modules mod_webapp, mod_perl, mod_throttle, mod_php4, mod_frontpage, mod_ssl, mod_setenvif, mod_so, mod_unique_id, mod_usertrack, mod_headers, mod_expires, mod_cern_meta, mod_proxy, mod_digest, mod_auth_dbm, mod_auth_anon, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation, mod_mime, mod_mime_magic, mod_log_config, mod_define, mod_env, mod_vhost_alias, http_core
Directive Local Value Master Value
child_terminate
0 0
engine
1 1
last_modified
0 0
xbithack
0 0
Apache Environment
Variable Value
DOCUMENT_ROOT /usr/local/psa/home/vhosts/mydomain.net/httpsdocs
HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE en-us
HTTP_CONNECTION Keep-Alive
HTTP_COOKIE bblastvisit=1133216898; bblastactivity=0
HTTP_HOST www.mydomain.net (http://www.mydomain.net)
HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; Crazy Browser 2.0.1)
PATH /bin:/sbin:/usr/bin:/usr/sbin
REMOTE_ADDR 24.143.95.37
REMOTE_PORT 61692
SCRIPT_FILENAME /usr/local/psa/home/vhosts/mydomain.net/httpsdocs/phpinfo.php
SERVER_ADDR 69.59.149.196
SERVER_ADMIN support@mydomain.com
SERVER_NAME www.mydomain.net (http://www.mydomain.net)
SERVER_PORT 443
SERVER_SIGNATURE <ADDRESS>Apache/1.3.26 Server at www.mydomain.net (http://www.mydomain.net) Port 443</ADDRESS>
SERVER_SOFTWARE Apache/1.3.26 (Unix) mod_perl/1.26 mod_throttle/3.1.2 PHP/4.2.2 FrontPage/4.0.4.3 mod_ssl/2.8.10 OpenSSL/0.9.6f
UNIQUE_ID Q4ujo0U7lcQAACqEIHg
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /phpinfo.php
SCRIPT_NAME /phpinfo.php
HTTP Headers Information
HTTP Request Headers
HTTP Request GET /phpinfo.php HTTP/1.1
Accept image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Accept-Encoding gzip, deflate
Accept-Language en-us
Connection Keep-Alive
Cookie bblastvisit=1133216898; bblastactivity=0
Host www.mydomain.net (http://www.mydomain.net)
User-Agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; Crazy Browser 2.0.1)
HTTP Response Headers
X-Powered-By PHP/4.2.2
X-Accelerated-By PHPA/1.3.3r2
Keep-Alive timeout=15, max=999
Connection Keep-Alive
Transfer-Encoding chunked
Content-Type text/html
Additional Modules
Environment
Variable Value
PWD /root
HOSTNAME linux496.servepath.com
LD_LIBRARY_PATH /lib:/usr/lib:/usr/local/lib:/usr/local/psa/lib
PERL5LIB /usr/local/psa/lib/perl5/site_perl/5.6.0
MACHTYPE i386-redhat-linux-gnu
LANG C
LOGNAME root
SHLVL 5
SHELL /bin/sh
HOSTTYPE i386
OSTYPE linux-gnu
HOME /root
TERM dumb
PATH /bin:/sbin:/usr/bin:/usr/sbin
_ /usr/local/psa/apache/bin/httpd
PHP Variables
Variable Value
PHP_SELF /phpinfo.php
_COOKIE["bblastvisit"] 1133216898
_COOKIE["bblastactivity"] 0
_SERVER["DOCUMENT_ROOT"] /usr/local/psa/home/vhosts/mydomain.net/httpsdocs
_SERVER["HTTP_ACCEPT"] image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
_SERVER["HTTP_ACCEPT_ENCODING"] gzip, deflate
_SERVER["HTTP_ACCEPT_LANGUAGE"] en-us
_SERVER["HTTP_CONNECTION"] Keep-Alive
_SERVER["HTTP_COOKIE"] bblastvisit=1133216898; bblastactivity=0
_SERVER["HTTP_HOST"] www.mydomain.net (http://www.mydomain.net)
_SERVER["HTTP_USER_AGENT"] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; Crazy Browser 2.0.1)
_SERVER["PATH"] /bin:/sbin:/usr/bin:/usr/sbin
_SERVER["REMOTE_ADDR"] 24.143.95.37
_SERVER["REMOTE_PORT"] 61692
_SERVER["SCRIPT_FILENAME"] /usr/local/psa/home/vhosts/mydomain.net/httpsdocs/phpinfo.php
_SERVER["SERVER_ADDR"] 69.59.149.196
_SERVER["SERVER_ADMIN"] support@mydomain.com
_SERVER["SERVER_NAME"] www.mydomain.net (http://www.mydomain.net)
_SERVER["SERVER_PORT"] 443
_SERVER["SERVER_SIGNATURE"] <ADDRESS>Apache/1.3.26 Server at www.mydomain.net (http://www.mydomain.net) Port 443</ADDRESS>
_SERVER["SERVER_SOFTWARE"] Apache/1.3.26 (Unix) mod_perl/1.26 mod_throttle/3.1.2 PHP/4.2.2 FrontPage/4.0.4.3 mod_ssl/2.8.10 OpenSSL/0.9.6f
_SERVER["UNIQUE_ID"] Q4ujo0U7lcQAACqEIHg
_SERVER["GATEWAY_INTERFACE"] CGI/1.1
_SERVER["SERVER_PROTOCOL"] HTTP/1.1
_SERVER["REQUEST_METHOD"] GET
_SERVER["QUERY_STRING"]
_SERVER["REQUEST_URI"] /phpinfo.php
_SERVER["SCRIPT_NAME"] /phpinfo.php
_SERVER["PATH_TRANSLATED"] /usr/local/psa/home/vhosts/mydomain.net/httpsdocs/phpinfo.php
_SERVER["PHP_SELF"] /phpinfo.php
_SERVER["argv"] Array
(
)
_SERVER["argc"] 0
_ENV["PWD"] /root
_ENV["HOSTNAME"] linux496.servepath.com
_ENV["LD_LIBRARY_PATH"] /lib:/usr/lib:/usr/local/lib:/usr/local/psa/lib
_ENV["PERL5LIB"] /usr/local/psa/lib/perl5/site_perl/5.6.0
_ENV["MACHTYPE"] i386-redhat-linux-gnu
_ENV["LANG"] C
_ENV["LOGNAME"] root
_ENV["SHLVL"] 5
_ENV["SHELL"] /bin/sh
_ENV["HOSTTYPE"] i386
_ENV["OSTYPE"] linux-gnu
_ENV["HOME"] /root
_ENV["TERM"] dumb
_ENV["PATH"] /bin:/sbin:/usr/bin:/usr/sbin
_ENV["_"] /usr/local/psa/apache/bin/httpd
PHP License
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file: LICENSE
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
Mike Sullivan
Mon 28th Nov '05, 9:14pm
Are you actually running SSL, or are you just running standard HTTP on port 443?
frankjones
Mon 28th Nov '05, 9:26pm
I'm not sure the answer to your question.
I use an apache server with plesk 5.0 running on Linux 2.4.9-34
Plesk sets up the root for each domain to have a folder called "httpdocs" and "httpsdocs"
everything put in the "httpdocs" folder is accessed via http://www.mydomain.com
everything put in the "httpsdocs" folder is accessed via https://www.mydomain.com
all of my VBB files are in the "httpsdocs" folder, and accessed via https.
So I use a standard unix box with plesk. I do get a security pop-up box every time I go to an https://www.mydomain.com address.
Mike Sullivan
Tue 29th Nov '05, 6:54pm
Can you send me the URL to your site? PM or email (mike AT vbulletin DOT com).
Powered by vBulletin™ Version 4.0.0 Beta 2 Copyright © 2009 vBulletin Solutions, Inc. All rights