Strange Problem with SSL and PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Strange Problem with SSL and PHP

Post by mikusan »

Hi, this has been buggin me for quite a while.

Now, the problem is simple:
This works:
http://test/test.php
This doesn't:
https://test/test.php

SSL and PHP modules are loaded fine:
[modules.conf]

Code: Select all

LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
And here is the most important part of httpd.comf:

Code: Select all

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
My problem when i run a script with https:// is that it requires me to save the file and says that x-httpd-php application type.

I am royally confused.
User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

It's a really strange problem. I searched on 20 google pages to no avail. It seems some people encountered this problem already, but I did not see the solutions.

If anyone has even the slightest opinion or help they could give me that would be much appretiated.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

User avatar
mikusan
Forum Contributor
Posts: 247
Joined: Thu May 01, 2003 1:48 pm

Post by mikusan »

Well apparently I got a little confused. I wasn't able to get apache to serve SSL even with the module enabled and at the same time getting apache to listen to port 443 was a pain or I was too stupid to get it to work.

Apparently what works is if you install apache-ssl and then run both of them. Make sure apache-ssl has the php4 module loaded and the required changes, a restart and done.
Post Reply