Jump to content

Set an Apache PHP File Handler


tdromba

Recommended Posts

Hi All:

 

I\'m asking for a little help using some of Apache\'s file handling functionality. First of all, here\'s my server configuration:

 

Apache/1.3.27 PHP/4.1.2 on FreeBSD.

 

I need to set up a php file handler for file types .xyz. So, the client requests foo.xyz, and it gets piped to my php file handler and then on to the client. I tried adding this to httpd.conf:

 

AddHandler php-xyz-parser /home/none/www/xyz_parser.php

<FilesMatch "*.xyz">

   SetHandler php-xyz-parser

</FilesMatch>

 

But got nothing, the .xyz file is apparently not being parsed. If anyone has dealt with this or a similar problem, I would love to hear from you!

 

Thanks in advance for your help.

 

TD

Link to comment
Share on other sites

Thanks for your note.

 

The tricky thing about what I need to pull off is that the .xyz files are not php files, they\'re data files that I need to parse with php. So, adding the type:

 

AddType application/x-httpd-php .php .xyz

 

parses the data files with php, but, there\'s no php in the .xyz file. What has to happen is apache needs to hand the .xyz file to the php handler to be processed ... tricky. But, I know it can be done with perl, why not php??? :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.