Forum Moderators: coopster & phranque

Message Too Old, No Replies

Apache, PHP, with perl CGI and Mysql backend, ACCESS IS DENIED

         

timmay82

11:46 pm on Jun 25, 2006 (gmt 0)

10+ Year Member



Hi,
I'm new to both Perl and CGI. Recently I was asked to take over production of a website for a leaving coworker. The site runs on a Windows XP machine using: Apache, PHP5, Perl CGI, and Mysql. I have set the site up on several test computers succesfully. However on the main computer which the site must run I get an error "Access is denied" in the Apache error log. Thats it, no description of whats denying access to whom, or why access is being denied. I tracked it to where I call the CGI perl script using the php function popen(). I cannot tell if the perl script starts running or if it never starts.

The perl script is passed a file name and then parses the html in the file and passes information to the Mysql database. Running a dummy perl script (straight from a perl IDE, only perl and Mysql interact) with the file name hard coded works on every computer including the computer generating the error. And I have checked the database connection string and there are no apparent errors in its contents or syntax (once again this same file works on at least 3 other computers).

Has anyone had this happen before? Which part of the website is causing the problem, PHP, Perl, Mysql, or Apache? Is there anything I can do to my configuration to get a more descriptive error message?

This post was light on code, if anyone would like to see the code causing the problem let me know. Thanks,

Tim

coopster

7:00 pm on Jun 26, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, timmay82.

I would start with a basic script (brand new script) and all that it does is use the popen function. Create a small text file in the same directory as the script and see if you can successfully open and process the text with that function.

This should at least let you know whether or not you have your server configured correctly for this part of your processing.

timmay82

3:21 am on Jun 28, 2006 (gmt 0)

10+ Year Member



Thanks, I'll try that out. I probably won't get to it this week though.

Lets say that it works and the perl script runs fine. That would probably mean that there is a problem connecting Perl and Mysql. I know there was a password difference and I've already set that so Mysql uses the "old style" password. If all connection information is correct any ideas what might cause the access is denied message?

Tim

coopster

3:48 pm on Jun 28, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member




Lets say that it works and the perl script runs fine.

Actually, I was saying bypass the whole perl-script part of it for now. Just see if you can use that function in a simple script first. One step at a time ;)