Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Windows Server 2012 - PHP Website

More
15 Jul 2015 17:29 #3440 by support
This error message is specific to the situation it covers. You are definitely right that the text could be improved - point noted. You can always ask :-)

Please Log in or Create an account to join the conversation.

  • alexf
  • Topic Author
  • Visitor
  • Visitor
15 Jul 2015 06:30 #3438 by alexf
Replied by alexf on topic Windows Server 2012 - PHP Website
Thank you for the help. Changing the variable name did the trick.

Is the same error message used for different exceptions? An additional text like "Variable is readonly" in the error message would have helped me a lot.
"Access rights of the topic do not allow writing" lead me to the point that I am having problems with the firewall or the DCOM configuration.

Best regards

Please Log in or Create an account to join the conversation.

More
14 Jul 2015 16:21 #3437 by support
The error message says "Access rights of the topic do not allow writing.".

This means that the problem has nothing to do with COM/DCOM or Windows security settings.
It has to do with OPC item-level permissions. The item "Demo.Single" simply isn't writeable - it is read-only.

Other items are writeable. E.g. those that are under the Simulation branch and have "Register" in their name.

Best regards
The following user(s) said Thank You: alexf

Please Log in or Create an account to join the conversation.

  • alexf
  • Topic Author
  • Visitor
  • Visitor
14 Jul 2015 14:40 #3435 by alexf
Windows Server 2012 - PHP Website was created by alexf
Hello Community!

I am using the Windows Server 2012 with IIS 8 to run a PHP Website. On some user interactions, I have to write values to the OPC server.

Used components:
Windows Server 2012
IIS 8
Sql Server 2014
PHP 5.6.0
Quick OPC 5.34

Before changing everything, I tried the script " ReadAndDisplayValue.php" from the PHP example folder.

While reading the variable works, I am having problems to write the value of the OPC variable.

My code (PHP part only):
// Create EasyOPC-DA component 
    $Client = new COM("OpcLabs.EasyOpc.DataAccess.EasyDAClient");
 
    // Read item value and display it
    print $Client->ReadItemValue("", "OPCLabs.KitServer", "Demo.Single");
    print $Client->WriteItemValue("", "OPCLabs.KitServer", "Demo.Single", 1)

I get the following output if the site with the code is opened:

"
3.4280347824097
Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> OpcLabs.EasyOpcRaw.DataAccess.RawEasyDAClient<br/><b>Description:</b> Access rights of the topic do not allow writing. ' in C:\inetpub\kkgs14-18\ReadAndDisplayValue.php:13 Stack trace: #0 C:\inetpub\kkgs14-18\ReadAndDisplayValue.php(13): com->WriteItemValue('', 'OPCLabs.KitServ...', 'Demo.Single', 1) #1 {main} thrown in C:\inetpub\kkgs14-18\ReadAndDisplayValue.php on line 13
"

While testing and developing, I have turned of the windows firewall.
I configured the DCOM settings for the "OpcEnum" and "OPCKitServer". I set the "access permissions" and "Launch and activation permissions" for the two objects for my "IIS APPPOOL\<username>" User.
The apppool user is allowed to launch, activate and access the objects local.
After I changed the DCOM settings, I restarted the server and opened the ReadAndDisplayValue.php" page again but without success. Do you have any suggestions?
Thank you for your help!

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.056 seconds