logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: php4_module problem
Author
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Fri 08 Aug '08 8:12    Post subject: php4_module problem Reply with quote

Apache 2.2.9 does not seem to like me using PHP modules.
Using OS: Windows 2000 Pro

Code:

# PHP4 Specific
# Does not work: Not found.
#LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"

LoadFile "C:/PHP/php4ts.dll"
# Does not work: Not found
LoadModule php4_module "C:/PHP/php4apache2.dll"
PHPINIDir "C:/PHP/"
AddType application/x-httpd-php .php


As you can see, as soon as LoadModule php4_module is called, the whole thing stops working.

Help is appreciated.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Fri 08 Aug '08 10:09    Post subject: Reply with quote

PHP 4 does not run natively with Apache 2.2.x under Windows. Steffen compiled a PHP 4 version that runs with Apache 2.2.x You can find it on the download page.
It is recommend to update to PHP 5!
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Fri 08 Aug '08 10:36    Post subject: Reply with quote

* Note: I did actually get PHP4 working on Apache2.2 on Win2000, so I am not sure how to do it now.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Fri 08 Aug '08 11:41    Post subject: Reply with quote

LochieJ wrote:
so I am not sure how to do it now.

?? What do you want to do?
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Sat 09 Aug '08 1:21    Post subject: Reply with quote

Set up PHP4 as a LoadModule and get it to start.

(It won't start Rolling Eyes )
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Sat 09 Aug '08 4:45    Post subject: Reply with quote

Quote:
... download page.

Where?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Sat 09 Aug '08 9:40    Post subject: Reply with quote

http://www.apachelounge.com/download/

php4apache2.dll-php4.4.x.zip


keep the rest of your files from PHP.net


How to install read the "Readme First.txt" in the downloaded zip.
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Sun 10 Aug '08 0:50    Post subject: Reply with quote

Fixed.

Settings -> Control Panel -> System -> Environment Variables :

* Added C:/PHP/
* Added C:/PHP/ext/ (for safety)
* Added C:/Program Files/Apache Software Foundation/Apache2.2/

Runs smoothly now.

*Note: How are you supposed to add sub-domains with VirtualHost??
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Sun 10 Aug '08 10:51    Post subject: Reply with quote

Please view the documentation => http://httpd.apache.org/docs/2.2/vhosts/name-based.html

if you still have a question please ask again.
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Mon 11 Aug '08 9:13    Post subject: Reply with quote

Ok. VirtualHost is working now.

I'd like to automatically serve a file for download when a user connects.

Eg: http://10.1.1.70:443 with no proxy opens an octet stream file for download.

Thanks.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 11 Aug '08 10:04    Post subject: Reply with quote

create a vhost for that port and make a redirect to that file

in that vhost

Redirect permanent / http://10.1.1.70:443/path/to/file.ext
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Mon 11 Aug '08 10:40    Post subject: Reply with quote

Nope. Not working.

Using: Redirect permanent / "http://10.1.1.70:443/loader-1557859387.jar"
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7407
Location: EU, Germany, Next to Hamburg

PostPosted: Mon 11 Aug '08 14:11    Post subject: Reply with quote

Shall that also working from outside your LAN?
Back to top
LochieJ



Joined: 08 Aug 2008
Posts: 8

PostPosted: Tue 12 Aug '08 3:36    Post subject: Reply with quote

No. Local only (security / development only server).
Back to top


Reply to topic   Topic: php4_module problem View previous topic :: View next topic
Post new topic   Forum Index -> Apache