Skip to main content

Posts

Showing posts with the label ubuntu

How to start using and developing on Ubuntu Linux?

I am a newbie Linux user who came from 10 years using windows OS, and developing in Microsoft languages. I want to have a good experience in Linux world and developing on it. First, I want to learn how to use this new OS, then how to start developing on it, I am interested in web applications, specially using Java/PHP because I have some experience in both and it will be a good start. Second, I want to learn how to develop on it. Are there any video tutorials to give me a good starting push? any recommended books or references? Source: Tips4all

Remotely accessing web server, and connecting to local mysql (via php)

I am trying to connect to my local mysql server via php. so my code looks as follows: $con = mysql_connect("localhost", "user", "password"); mysql_select_db("database", $con) or die('ERROR 4'); ok, we've all seen that before. So when I run this PHP script on the machine with the mysql database, everything runs fine. But once I access this script remotely (on the server, with the local mysql database) it cannot connect to the database. Is there any way to make it so the PHP code connects to the mysql database via a local reference? Or do I need to look into connecting to the mysql database through an IP address? edit: To clarify, when I access the script on the server from somewhere else, it doesn't work edit 2: When I check the error log it states "Call to undefined function mysql_connect()"

PDO_OCI: could not find driver

Today my problem is connected with PDO, OCI8 and PDO_OCI. But from the beginning. I'm using Ubuntu 11.10 and PHP version: 5.3.8-1ubuntu3. I have installed Oracle 10g Express, configured it and it works fine. The next step I had to do was integration between Oracle and PDO. So I found this link: http://lacot.org/blog/2009/11/03/ubuntu-php5-oci8-and-pdo_oci-the-perfect-install.html and do it step by step (without instaling PDO, which was installed previously with pdo_mysql). When I tried to do it on Ubuntu 10.10 - it was working. Now, on 11.10 I get an error: 'Could not find driver' when I try to open my website application. I checked phpinfo() and in the row PDO there are: PDO support - enabled, PDO drivers - mysql. There is nothing about oci in this section, although few lines under it I have PDO Driver for OCI 8 and later - enabled. Hope somebody can help with this. Best regards, Mateo.