Installing SSL cert has broken my php for the site

schwim

Well-Known Member
Aug 2, 2006
213
0
166
Hi there everyone,

I have a problem. I installed a SSL cert through X-Ramp via the WHM panel, and the cert installed fine, and https checks out A-OK, but now, I can't get any of my scripts to work unless I'm visiting the site via a secure connection.

If I visit https://www.mysite.com/script.php, it comes up fine.

If I visit http://www.mysite.com/script.php, I get the following:

Warning: Unknown(): open_basedir restriction in effect. File(/path/to/shop/zc_install/index.php) is not within the allowed path(s): (/home/moppetfr:/usr/lib/php:/usr/local/lib/php:/tmp) in Unknown on line 0

Warning: Unknown(/path/to/shop/zc_install/index.php): failed to open stream: Operation not permitted in Unknown on line 0

Warning: (null)() [function.include]: Failed opening '/path/to/shop/zc_install/index.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in Unknown on line 0
I don't want to force the visitor into a secure connection to view everything on the site, just to make a final order.

How do I get php working again during an unsecure connection?

thanks,
json
 

nuroweb

Registered
Sep 21, 2008
2
0
51
I have a similar issue. I installed a shared SSL certificate on the server.

All sites still work fin on "http", but with "https" after getting the certificate error it gievs me the same "Warning: Unknown(): open_basedir restriction in effect.".

I've been playing around with open_basedir settings, but to no avail. What's strange is that when I disable open_basedir from Main/Security Center/PHP open_basedir tweak for a particular domain, then I can access by "https://mysite.com" only to get redirected to "http://mysite.com". But if I go to "https://mysite.com/script.php" it gives me a 404 not found message.

My shared certificate is sef-signed and I'm using WHM 11.23.2 on CENTOS Enterprise 5.2.
 

tomdchi

Well-Known Member
Feb 24, 2008
140
3
68
Atlanta, GA
cPanel Access Level
DataCenter Provider
schwim:
Check to see if you php app has settings to use ssl only. I have used some php programs that if the ssl option is set in it then it will automatically use it.
Just a guess but maybe the open_basedir tweak could cause a problem. Also, check your php handler and change it to another option to see if it helps.

nuroweb:
I don't know if using a self signed cert is causing your problems or not but why not get one issued by a ca. You can use one from godaddy and it only cost 10 bucks.
 

nuroweb

Registered
Sep 21, 2008
2
0
51
nuroweb:
I don't know if using a self signed cert is causing your problems or not but why not get one issued by a ca. You can use one from godaddy and it only cost 10 bucks.
I ended up moving the site I really needed SSL on to a dedicated IP with a self-signed cert. I didn't bother getting one from a CA because it's only for an internal site used by me and two other people. I normally get them from a CA for public sites.