Forum Moderators: phranque

Message Too Old, No Replies

php-cgiwrap

I need help with the basics

         

twist

1:36 am on Nov 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



(I tried using pairs newsgroups but responses are sometimes days apart)

If i'm not mistaken php-cgiwrap is specific only to pair webhosting. My problem, I think, isn't with php-cgiwrap itself but more with not knowing how to create extensions or use htaccess properly. Pair has a short tutorial on how to set up php-cgiwrap [pair.com], which I have no problem getting to work. The problem is that using php-cgiwrap sitewide creates a lot of overhead and makes my site load slowly. They suggest that I only use php-cgiwrap on the files that need wrapping, basicaly password files. They suggest two ways to do this, 1) Create a htaccess with the php-cgiwrap lines only for that folder with the files you want to protect, 2) Use a different extension for files that need to be wrapped, such as file.wphp

To tackle the first problem, the only php file above root is one file that calls all the other php files below root. This means that if I want to use a htaccess file it would have to be placed below root in the folder that holds the password files. This doesn't seem to work, does this mean that htaccess files only work above root?

The second problem is with creating the .wphp extension. If I change the following,

AddType application/x-pair-sphp4 .php

to

AddType application/x-pair-sphp4 .wphp

I can access the files whose extension I change to wphp only if permissions are set to 705. Once I set permissions to 700, I can no longer access the wphp files. Am I missing a vital step in adding the wphp extension?

twist

2:50 am on Nov 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok, now im even more confused, this will wrap the wphp files,

AddType application/x-pair-sphp4 php wphp

This will not,

AddType application/x-pair-sphp4 wphp

The first one will then wrap all php files, but I only want to wrap the wphp files. I sure hope I am making a simple mistake.