1
maxima
How do I set a xoops module under a shared SSL
  • 2006/10/5 1:15

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I used a mypage module to display a subscription form and I need it to display under a shared SSL certificate. When I set the link with the SSL url the entire XOOPS formatting and images goes away.

It works ok when I set the SSL url as the xoops_url in mainfile.php but I don't want the entire site to be under this certificate as it causes problems with some images and functions.

So is there a method to set just this mypage module under the SSL?

2
McNaz
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 6:36

  • McNaz

  • Just can't stay away

  • Posts: 574

  • Since: 2003/4/21


Xoops doesn't support SSL naively outside of the login functionality. If you must have a module or page that takes the site from non SSL into SSL mode then a little hacking is required.

The quickest way I found to achieve this was to use the PECL runkit function php library to enable changing the XOOPS_URL constant in your code fromhttp://yoursite.com tohttps://yousite.com when required to be in SSL mode.

3
maxima
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 13:37

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


McNaz thanks for the suggestion, however I don't know what to do with that as i don't have administrator access to the server. Was that the only hacking method you were refering? Has anyone else determined a means to do this?

4
nekro
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 15:38

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


Once i posted a hack to implement SSL in all the XOOPS site -->

https://xoops.org/modules/newbb/viewtopic.php?topic_id=51459&forum=14&post_id=227027#forumpost227027

I think that in your case you shouldn t change the header.php and you should put in every page you want to change, the next code.

if ( !$_SERVER["HTTPS"] && array_search$_SERVER["REQUEST_URI"] , $secure_page ) != false ){

header("Location: https://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]);

}

5
maxima
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 22:07

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


thanks nekor your method is logical. Since I am using a shared SSL though which has a different URL shouldn't I set up an optional define? Something like
Quote:
define('HTTP_SERVER', 'http://myurl.com');
define('HTTPS_SERVER', 'https://ssl.server.com/me');


When I do try to use the hack you present I get a error page which is correct since only my URL is defined. I would try to an additional define but I don't know where to start. How can I add this additional URL.

6
nekro
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 22:15

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


i really dont understand what you are speaking about. Please describe better your problem

7
maxima
Re: How do I set a xoops module under a shared SSL
  • 2006/10/5 22:28

  • maxima

  • Not too shy to talk

  • Posts: 152

  • Since: 2006/3/4 4


I don't have a SSL certificate for my domain. I use the server's certificate which is https:/ /pro12.server21.com/username

The change your hack suggests for mainfile.php only allows for my current URL to be defined. I need to place a second define which will present the server's Shared SSL so when the page to be secured is called then the secured define will be read.

Right now when the page to secure is called the hack is placing the https: before my domain which is the right process but there is no SSL associated with my domain so I get a 404 error.

Just want to know how I would add the additinal URL define.

8
nekro
Re: How do I set a xoops module under a shared SSL
  • 2006/10/6 3:23

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


I think that you should hack the links to your module and in the link redirect put ->https://somewhereunderssl.com and in somewhereunderssl.com site should be installed my hack not in the primary.

Luck!

Login

Who's Online

232 user(s) are online (151 user(s) are browsing Support Forums)


Members: 0


Guests: 232


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits