Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old February 21st, 2004, 09:19 PM
~Bean~ ~Bean~ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: GA,USA
Posts: 42 ~Bean~ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ~Bean~ Send a message via AIM to ~Bean~
Apache User

tia to anyone who actually reads thru my rather lengthy problem, and special tia to anyone who can help!

My Apache/PHP web server runs a client version software for database access on another server on my LAN - 2 servers, 1 web server and 1 file/db server; the web server acts like client to the file server. The software requires that the web server (and all other client workstations) be setup as a user on the file server with full access priveleges to the data folders, these are the mapped network drives on the clients. Each workstation runs logged in not as Administrator, but as another user the same one setup on the File server w/ the full priveleges - the web server technically should be setup the same way.
From the web server:
-I can connect from the client program, and also successfully using an ODBC DSN thru Excel (which is fully supported by the software), and I have wirtten VB and VB Script that will successfully connect (even though these are technically not supported by the software)...now when I rewrite the code in PHP (see link to thread here http://codewalkers.com/forum/index.php?action=displaythread&forum=sqlhelp&id=999&realm=default ) it fails - and with help from others I think this may be due to security/permissions. It does not help that the software and ODBC driver are finicky about their connection/security parameters.

So I guess my question is what USER does apache and PHP run its services as on the web server? If it is running my PHP code as Administrator on the web server, and accessing ODBC as Administrator, this could deny access to the file server, no? So I guess I also need to know how to set or change the User in Apache...(?)

Until I figure out the best security/permissions setup I have kept the web server logged in as Administrator, but I set the mapped drives to login as the secondary login that is also setup on the file server. This allows access thru the cleint program, but the PHP doesnt work no matter what login...


Error Reported:

Microsoft OLE DB Provider for ODBC Drivers Description: [Timberline][ODBC Driver][DLL]Drive or directory unavailable [IO-WIN 3] ScreenOD.scr

Reply With Quote
  #2  
Old February 21st, 2004, 10:33 PM
brut brut is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 367 brut User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Apache User

I've never run Apache under windows, but(if you're running Apache as a service) if you look here and scroll down past the command line switch examples, it say that it defaults to the 'LocalSystem' account which has no network privileges.

Reply With Quote
  #3  
Old February 22nd, 2004, 12:28 AM
~Bean~ ~Bean~ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: GA,USA
Posts: 42 ~Bean~ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ~Bean~ Send a message via AIM to ~Bean~
RE: Apache User

OK...thanks!

Though I managed to change the user of the Apache service to another user account with proper security privileges, now my test page is telling me...

Warning: (null)(): Invoke() failed: Exception occurred. Source: Microsoft OLE DB Provider for ODBC Drivers Description: [Timberline][ODBC Driver][DLL]No such database

but YES there is such a database!

aaarrrggghhhhhh!!!!!!!

Reply With Quote
  #4  
Old March 13th, 2004, 12:15 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Apache User

We are a Timberline third party developer and have run into this problem with MS SQL server using DTS packages. We have had to code a batch file that maps the drive letter to the server share using a net use statement and explicitly declaring the username and password and make it the first step in the package in order to get it to run.
Another issue might be because you are using are running Windows 2000 SP4 or XP SP1. There is a ODBC patch available from Timberline to update if this is an issue.

Reply With Quote
  #5  
Old December 21st, 2004, 07:06 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: RE: Apache User

Hi, we are having the same problem. But cannot locate the patch at the Timberline website. Can you send the patch file by email attachment to support@iportalinc.com or give us the link to the patch file on Timberline website. Thanks a million for your pointer and help.

Dean Z.

Quote:
We are a Timberline third party developer and have run into this problem with MS SQL server using DTS packages. We have had to code a batch file that maps the drive letter to the server share using a net use statement and explicitly declaring the username and password and make it the first step in the package in order to get it to run.
Another issue might be because you are using are running Windows 2000 SP4 or XP SP1. There is a ODBC patch available from Timberline to update if this is an issue.


Reply With Quote
  #6  
Old December 22nd, 2004, 06:26 AM
~Bean~ ~Bean~ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: GA,USA
Posts: 42 ~Bean~ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ~Bean~ Send a message via AIM to ~Bean~
RE: Apache User

Wasn't that a bug in the original 8.x release that they fixed with an update?

In any case, if you come across the patch I would be interested in at least giving it a try as well...

Since I can't get the ODBC thing to work in PHP, I will probably use ASP/VB.NET since at I can at least get it to work using that.

Reply With Quote
  #7  
Old January 13th, 2005, 12:44 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: RE: Apache User

I was successfully able to make a php connection to timberline's database by way of using a dsn, odbc, php, and apache 2. I had to change the user account that apache uses to my network login and then I created a timberline dsn in administrative tools named test and I used the following code:

php Code:
Original - php Code
  1.  
  2. <?
  3. if (isset($_POST['submit']))
  4. {
  5.   $con = odbc_connect('test',$_POST['user'],$_POST['pass']);
  6.   if ($con)
  7.   {
  8.     echo "odbc connected<br>";
  9.     $sql = "select * from MASTER_JCM_JOB_1";
  10.     $exc = odbc_exec($con,$sql);
  11.   }
  12.   else {
  13.     echo "odbc not connected<br>";
  14.   }
  15. if($exc)
  16. {
  17.   echo "selection completed<br>";
  18.   while($row = odbc_fetch_row($exc) )
  19.        echo $row->Job."<br>";
  20. }
  21. else { echo "selection failed<br>";
  22.   }
  23. }
  24. ?>
  25.  
  26. <form method='POST' action='index.php'>
  27. Timberline Test Interface<br>
  28. Username: <input type='text' name='user'><br>
  29. Password<input type='password' name='pass'><br>
  30. <input type='submit' name='submit' value='submit'>
  31. </form>



I hope this helps...


Quote:
I've never run Apache under windows, but(if you're running Apache as a service) if you look here and scroll down past the command line switch examples, it say that it defaults to the 'LocalSystem' account which has no network privileges.


Reply With Quote
  #8  
Old January 13th, 2005, 10:19 PM
~Bean~ ~Bean~ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: GA,USA
Posts: 42 ~Bean~ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ~Bean~ Send a message via AIM to ~Bean~
RE: Apache User

I am now working on an ASP page to do this but I get the same error with that...

php Code:
Original - php Code
  1. Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
  2. [Timberline][ODBC Driver][DLL]No such database.


If I didn't have full permissions open to "Everyone" on the Timberline server I would say that their is still a permissions problem...it's either that or some other problem with my server config...



Did you do any special permissions on the Timberline server?
If I can I am going to try your code...but I believe I'll get the same error...

Reply With Quote
  #9  
Old January 14th, 2005, 12:54 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: RE: Apache User

In my case, I don't have any special permissons to the timberline DB. I made a system DSN and pointed it to the data directory on my server in the form of //server/datadir/ as opposed to a mapped network drive. Perhaps the issue lies in not being able to find the data directory, as such, it can't find the DB?

One other thing to try -- use an incorrect user name and password to see if it is successfully checking against the db in that respect.

Let me know how it goes.

Quote:
I am now working on an ASP page to do this but I get the same error with that...

php Code:
Original - php Code
  1. Microsoft OLE DB Provider for ODBC Drivers (0x80040E4D)
  2. [Timberline][ODBC Driver][DLL]No such database.


If I didn't have full permissions open to "Everyone" on the Timberline server I would say that their is still a permissions problem...it's either that or some other problem with my server config...



Did you do any special permissions on the Timberline server?
If I can I am going to try your code...but I believe I'll get the same error...


Reply With Quote
  #10  
Old January 15th, 2005, 03:49 AM
~Bean~ ~Bean~ is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: GA,USA
Posts: 42 ~Bean~ User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
Send a message via ICQ to ~Bean~ Send a message via AIM to ~Bean~
RE: Apache User

Thanks...I got it to work by changing the ODBC drive from "T:" to "//server/data"

what a crock....figures........

Reply With Quote
  #11  
Old March 4th, 2005, 12:40 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
ASP Connection String

I too am having similar issues. I went to try changing the ODBC driver from using the mapped drive to the UNC path, but the ODBC driver will not allow be to manually type in a path. Do you set up the connection on the fly without first setting up a named odbc link? If so, can you please send the the connection code you are using? Thanks for the help.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Apache User


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |