473,769 Members | 2,100 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How should $PHP_SELF work with a shared-SSL certificate in HTTPS?

I'm getting my own SSL certificate soon because it is the right thing to
do, but until then I have this shopping cart on an ISP that gives me free
shared SSL. The cart breaks in HTTPS because of $PHP_SELF and the cart's
tech support blames my ISP.

I'm wondering if this is true.

So, my site, let's call it mydomain.com would normally access at:
http://mydomain.com/

but when viewing in HTTPS it is: https://myISP.com/mydomain.com/

My shopping cart breaks because let's say I set up
/temp.php
as <?php phpinfo(); ?>

And view in HTTP and look at PHP_SELF: /temp.php
OK, that is normal.

But in HTTPS PHP_SELF still gives me: /temp.php
even though in the browser it is /mydomain.com/temp.php

Is this normal in a shared SSL-certificate environment?
John.
Jul 17 '05 #1
3 2525
"John Hanauer" <he**********@i nsightbb.com> wrote in message
news:Xn******** *************** ***********@63. 223.5.254...
I'm getting my own SSL certificate soon because it is the right thing to
do, but until then I have this shopping cart on an ISP that gives me free
shared SSL. The cart breaks in HTTPS because of $PHP_SELF and the cart's
tech support blames my ISP.

I'm wondering if this is true.

So, my site, let's call it mydomain.com would normally access at:
http://mydomain.com/

but when viewing in HTTPS it is: https://myISP.com/mydomain.com/

My shopping cart breaks because let's say I set up
/temp.php
as <?php phpinfo(); ?>

And view in HTTP and look at PHP_SELF: /temp.php
OK, that is normal.

But in HTTPS PHP_SELF still gives me: /temp.php
even though in the browser it is /mydomain.com/temp.php


You need to provide a bit more information. How does it break? How are the
results above different from before you had your own cert? Actually, I don't
see where your cert was ever mentioned other than in the intro to your post.
Isolate and clarify and then we can help.

- Virgil
Jul 17 '05 #2
"Virgil Green" <vj*@DESPAMobsy dian.com> wrote in
news:XZ******** **********@news svr22.news.prod igy.com:
"John Hanauer" <he**********@i nsightbb.com> wrote in message
news:Xn******** *************** ***********@63. 223.5.254...
I'm getting my own SSL certificate soon because it is the right thing
to do, but until then I have this shopping cart on an ISP that gives
me free shared SSL. The cart breaks in HTTPS because of $PHP_SELF
and the cart's tech support blames my ISP.

I'm wondering if this is true.

So, my site, let's call it mydomain.com would normally access at:
http://mydomain.com/

but when viewing in HTTPS it is: https://myISP.com/mydomain.com/

My shopping cart breaks because let's say I set up
/temp.php
as <?php phpinfo(); ?>

And view in HTTP and look at PHP_SELF: /temp.php
OK, that is normal.

But in HTTPS PHP_SELF still gives me: /temp.php
even though in the browser it is /mydomain.com/temp.php


You need to provide a bit more information. How does it break? How are
the results above different from before you had your own cert?
Actually, I don't see where your cert was ever mentioned other than in
the intro to your post. Isolate and clarify and then we can help.

- Virgil

Virgil,

First, sorry, I got a little busy this week. Didnt have time to test
check this thread.

Second, my own cert has nothing to do with anything because I haven't
gotten it yet. That was the point of the intro was to say I'll be
getting my own cert soon, but UNTIL THEN, I have to used a SHARED SSL
CERTIFICATE.

That's where my webhost has a certificate for their domain, and I can
proxy through it in a sense by going to
https://MyWebHost.com/MyDomain.com/

So when I do that though, and let's say my URI is
http://myWebHost.com/mydomain.com/test.php, PHP_SELF returns /test.php
instead of /mydomain.com/test.php which is technically the absolute web
path to the document test.php.

All I want to know is if that is normal or not. I don't know how SSL
certificates and HTTPS work under PHP.

Hope that clears things up. Summary: I'm not using my own SSL
certificate, I'm using a shared SSL certificate through my ISP. Until I
can get my own certificate, it would be nice to shine more light on this
problem now.

Thanks,

John Hanauer.

Jul 17 '05 #3
In article <Xn************ *************** *******@63.223. 5.254>, John Hanauer wrote:
So when I do that though, and let's say my URI is
http://myWebHost.com/mydomain.com/test.php, PHP_SELF returns /test.php
instead of /mydomain.com/test.php which is technically the absolute web
path to the document test.php.

Following this group, i've seen the group come up with this:

function geturl()
{
$ports = array('https' => 443, 'http' => 80);
$prefix = empty($_SERVER['HTTPS']) ? 'http' : 'https';
$url = $prefix;
$url .= $_SERVER['SERVER_PORT'] != $ports[$prefix] ? ':' .
$_SERVER['SERVER_PORT'] : '';
$url .= '://';
$url .= $_SERVER['HTTP_HOST'];
$url .= $_SERVER['REQUEST_URI'];
return $url;
}

--
Tim Van Wassenhove <http://home.mysth.be/~timvw>
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6046
by: Ankur Gupta | last post by:
How can I retrieve all the page name with arguments passed to itself? Using Php_Self tag with the following URL: http://localhost/workplaceGSA/index.php?start_bottom_count=0&bottom_total_count=7 returns: http://localhost/workplaceGSA/index.php
10
15204
by: tHatDudeUK | last post by:
My form action code to submit values to itself have stopped working using the code form action = <?=$_SERVER?> This code used to work My web host recently told me they enabled phpsuexec option in apache which apparently needs me to CHMOD my PHP page to 750 and the directory to 755. (I don't know what this means but know how to CHMOD files). I have CHMODed the
5
2835
by: Maja | last post by:
here's situation: i have installed php 5 and apache 2.0. i can call my page with: localhost\\subdir\page.php inside my page i use links like this:
5
1805
by: Kevin Haryett | last post by:
My host is running WIMP and has set up shared configuration. Lets say the address is http://kevin.host.com Now, the actual directory is c:\inetpub\wwwroot\kevin If I check PHP_SELF from a test file, it reports it as /kevin/test.php instead of /test.php leading me to believe that there is something
12
4463
by: Don | last post by:
What's the PHP equivalent for the following? if(window.location == "http:/site.com/page1.html") { } else { }
1
4194
by: Michael Brennan-White | last post by:
If I submit my for using a get action the resulting page loads . If I use a post action I get an error page saying "The page cannot be found". I am calling the originating page!!! This happens in IE as well as FireFox. This code has been tested on a Win2003 server, IIS6, PHP 5.0.3, mySQL 4.1.8 and it works fine. The problem server is a Win2k server, IIS5, PHP 5.0.4, mySQL 4.1.11.
7
2491
by: Dynamo | last post by:
I am using values stored an $_POST array to display records from a table before asking the user if he is sure he wants to delete them. If the user confirms then the records are deleted. Without boring you with all of the code here is the rough idea. <?php $delete = '( id = ' . implode(' OR id = ', $_POST ) . ' ) '; if (!isset($_POST)) { // Then display the records that were marked for deletion ?>
5
4759
by: amygdala | last post by:
Hi, I read something about PHP_SELF possibly issuing security flaws, since requesting... http://www.mydomain.com/thescript.php/bogus ....would output '/thescript.php/bogus' if PHP_SELF is issued in thescript.php
4
5672
by: Jim Carlock | last post by:
Are the XSS / Cross Site Scripting attacks fixed in Version 4.44? I'm seeing that $_SERVER doesn't return the $_SERVER appended to it. I was just messing with a few things and noticed that PHP_SELF returns only the page name now and without the $_GET query... http://blog.phpdoc.info/archives/13-XSS-Woes.html
18
10756
by: zoilus | last post by:
Can not determine how "<?=PHP_SELF?>" is supposed to work. The below is the line of code. <!-- <form name="search" method="post" action="<?=$PHP_SELF?>"--> When the above statement is run the following is the result. You don't have permission to access /dev/forms/forms_testing/< on this server.
0
9589
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9996
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8872
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5307
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3564
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.