Php remote connection Oracle error oci_connect (): ORA-12541: TNS: nolistener

Source: Internet
Author: User
The situation is as follows: Oracle and php are not on the same machine and can access Oracle on the machine where Oracle is located. But when remotely connected via php, the error oci_connect (): ORA-12541: TNS: nolistener is reported. The listener of the Oracle machine has been enabled. How to solve the problem of ph... is as follows:

  1. Oracle and php are not on the same machine, and Oracle can be accessed on the machine where Oracle is located.

  2. But when remotely connected via php, the error oci_connect (): ORA-12541: TNS: no listener is reported.

  3. The listener of the Oracle machine has been enabled.

How to solve php remote connection? Thank you!

Reply content:

The situation is as follows:

  1. Oracle and php are not on the same machine, and Oracle can be accessed on the machine where Oracle is located.

  2. But when remotely connected via php, the error oci_connect (): ORA-12541: TNS: no listener is reported.

  3. The listener of the Oracle machine has been enabled.

How to solve php remote connection? Thank you!

All methods have been tried. After oracle is uninstalled and re-installed, everything is normal...

On the oracle server, run the following command to check whether the oracle listening service is running normally.

su - oraclelsnrctl status

If the listening service is normal, the following similar results should be output. XXX is the name of serive and instance.
Service "XXX" has 1 instance (s ).
Instance "XXX", status READY, has 1 handler (s) for this service...
The command completed successfully

First, make sure that an error is reported in PHP.no listenerSo it must beno listenerYou do not need to question this.

1. remote connection to Oracle (whether Oracle allows remote access)
2. Can PHP server connect to Oracle server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.