简体   繁体   English

连接 PHP 与 Oracle MacOS

[英]Connecting PHP with Oracle MacOS

I am new to Oracle and PHP.我是 Oracle 和 PHP 的新手。 I tried to connect to it multiple times but I am still struggling.我多次尝试连接它,但我仍然在挣扎。

I write the Php Files on TextEdit for MacOS and upload them to the FileManager of a Hosting Service like Dreamhost or Bluehost.我在 MacOS 的 TextEdit 上编写 Php 文件,并将它们上传到 Dreamhost 或 Bluehost 等托管服务的 FileManager。 I access the DB via the internet at Oracle Database Actions / SQL.我通过 Internet 在 Oracle 数据库操作 / SQL 访问数据库。

I saw $ora = oci_connect('system', '1234Abcd', '//192.168.178.43/orcl.shared');我看到$ora = oci_connect('system', '1234Abcd', '//192.168.178.43/orcl.shared'); in the article below and now that system is the db_username and 1234Abcd the db_password but I don't now the rest of the code.在下面的文章中,现在系统是 db_username 和 1234Abcd db_password 但我现在不是代码的 rest。

https://marc.vos.net/howto/oracle-oci8/ https://marc.vos.net/howto/oracle-oci8/

And my hosting service confused me even more by saying the items of oci_connect must also include the username and password of the hosting service.我的托管服务更让我感到困惑,说 oci_connect 的项目还必须包含托管服务的用户名和密码。

Please help me out: :)请帮帮我:)

For further details just leave a comment.有关更多详细信息,请发表评论。

Easiest is to subscribe to the oracle alway free oci tier.最简单的是订阅 oracle 始终免费的 oci 层。 https://www.oracle.com/cloud/free/ This gives you a good, free working database and a platform to develop on. https://www.oracle.com/cloud/free/这为您提供了一个很好的、免费的工作数据库和一个开发平台。 It also gives you a wealth of documentation that help you step by step to get the bits connected.它还为您提供了丰富的文档,可帮助您逐步连接各个位。 https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/apache-on-oracle-linux/01-summary.htm https://docs.oracle.com/en-us/iaas/developer-tutorials/tutorials/apache-on-oracle-linux/01-summary.htm

If your goal is to learn to install and maintain oracle databases start with creating a vm to install oracle on.如果您的目标是学习安装和维护 oracle 数据库,请先创建一个虚拟机来安装 oracle。 When the application part and the db part are both new, start walking, start with free oci (Not saying this is slow btw) learn how it works and if you still want, install php on your Mac.当应用程序部分和数据库部分都是新的时,开始步行,从免费的 oci 开始(不是说这很慢)了解它是如何工作的,如果你仍然想要,在你的 Mac 上安装 php。 It certainly is possible but OS X has its quirks.这当然是可能的,但 OS X 有其怪癖。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM