• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 492
  • Last Modified:

formmail.php throwing error

I have a form sitting on IIS7. It submits information to our staff for changes to AD, and runs some processes through the tectite formmail.php script. We have PHP 5.2.17 installed, and we currently need that version for compatibility with a JBOSS site that we also pull data from. I'm at a loss for 2 errors:

1. fopen appears to not be able to write temp files despite explicitly allowing the remote URL behavior in php.ini. I've tried icacls to add Users and CREATOR OWNER read/write/execute permissions to the network service profile temp directory to no effect, as well as changing the app pool profile value to 0. i've tried using SCRATH_PAD and defining the path to a different temp directory without success.

2. for likely a related reason, formmail.php throws a "fails to send email" error when processing the script. I'm betting that the two alerts are because of the fopen problem, and not two separate problems.

perhaps PHP is misconfigured? I'm not sure how though otherwise. I'm aware of the security changes between IIS6 and 7, but the work arounds i'm familiar with aren't working.

any help is appreciated.
0
afernandez000
Asked:
afernandez000
  • 4
  • 3
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
"remote URL behavior" only applies when you have a 'method' like 'http' in front of the file name.  When you do that, you are almost certainly restricting access to 'read-only' because it will use the 'anonymous' user to access that file.  To use 'fopen', IIS has to allow 'write' access to that directory or file.  That is separate from the Windows permissions.
0
 
afernandez000Author Commented:
Is there a particular way to set that in IIS7? I'm more familiar with 6, and poking at the site and app pool authentication settings doesn't reveal a way to specify it in an obvious way
0
 
Dave BaldwinFixer of ProblemsCommented:
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
afernandez000Author Commented:
I'll try troubleshooting with the manual, but I believe this has been done already - no harm in repeating.
0
 
afernandez000Author Commented:
no luck so far; i've verified everything via the php online documentation
0
 
Dave BaldwinFixer of ProblemsCommented:
You'll have to click on "Request Attention" and get some others to look at your question.
0
 
Mark BradyPrincipal Data EngineerCommented:
As I am coming in on the tail end of this question I would like to suggest a couple of things that perhaps you have not tried.
1: Can you Confirm 100% that the script has WRITE access to the folder in the path in your script?
    If the answer is YES then you must have written a small script to test file writing abilities. Or you may have used a simple file upload script top upload an image or other file to test the server can accept new files.

If the answer is no then please take the following steps.
Using an FTP client check the file/folder permissions on your website and make sure you have at least one folder that can be used to store / upload / write new files

Test that folder by running a simple file upload script as file uploads are stored in a temp directory until you "MOVE" them inside your script  (move them to their final resting place)

Also test a simple fopen, w  command and make sure you can create, write to and save/close a file.

Once all these are working then you have eliminated the permissions problem issue and move on to other things. Can we at least try these things before guessing at other possibilities?

Sorry if you have already done all these things but there is nothing above to state that you have and the results of those tests.
0
 
afernandez000Author Commented:
tHANK YOU
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now