473,320 Members | 2,122 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Connection to mysql working in eclipse but not on apache?

I have installed apache, php5 and mysql on my laptop.

I write my code in eclipse and when I test it inside eclipse, the mysql
database connection is working, I can execute the script inside
eclipse. But when I put that same script into my htdocs on the apache
server running on the same laptop and access it using my browser, I get
a "Call to undefined function mysql_connect()" error message.

Feb 18 '06 #1
3 2082
frustratedcoder wrote:
I have installed apache, php5 and mysql on my laptop.

I write my code in eclipse and when I test it inside eclipse, the mysql
database connection is working, I can execute the script inside
eclipse. But when I put that same script into my htdocs on the apache
server running on the same laptop and access it using my browser, I get
a "Call to undefined function mysql_connect()" error message.


Not familiar with using PHP in Eclipse, but it sounds as if your module is
not loading the MySQL extension. Try phpinfo() on both systems to see where
it's reading the ini from, and how the paths are setup. Make sure the
webserver isn't running chroot (or that the chroot environment is correctly
configured).

C.

Feb 18 '06 #2
frustratedcoder wrote:
I have installed apache, php5 and mysql on my laptop.

I write my code in eclipse and when I test it inside eclipse, the mysql
database connection is working, I can execute the script inside
eclipse. But when I put that same script into my htdocs on the apache
server running on the same laptop and access it using my browser, I get
a "Call to undefined function mysql_connect()" error message.

Have you copied libmysql.dll into the apache2\bin directory?

-david-

Feb 18 '06 #3
I tried phpinfo on both setup's and they appear to be loading the same
php.ini file, both using the file located at c:\windows\php5.

What is chroot

Feb 18 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ernest | last post by:
Hello I think that I'm having a problem with a damaged table, but I'm not sure. First of all, I'm using the following: -Suse 9.0 (Kernel 2.4.21-192) -MySQL 4.0.15 -PHP 4.3.3 -Apache 1.3.28
2
by: pancho | last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO on a Solaris 8 box - this module is needed to host some existing sites I will be migrating Note. I built PHP4 from source and...
0
by: Ryan Schefke | last post by:
------=_NextPart_000_0077_01C34C8B.2B90C960 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit ..I just sent this out to the win32 distribution list but no one has...
0
by: Pav Lucistnik | last post by:
Hi folks, we're seeing strange behaviour of mysql connections over network here lately. Server and client are on different machines. Server (corpdb) is Mysql 3.23.52 on FreeBSD 4.6.2-RELEASE,...
0
by: Howard | last post by:
I have Apache Web Server 2.0.55 installed locally with MySQL 5.0.18-nt, and of course PHP 5.1.2 I also have installed phpMyAdmin. It is accessible through http://localhost/phpMyAdmin. The pathing...
3
by: tulika dutta | last post by:
after 8 hrs my MySQL connection with JDBC gets time out. It gives the error java.sql.SQLException: No operations allowed after connection closed.Connection was implicitly closed due to underlying...
1
by: priya19 | last post by:
Warning: open(/tmp\sess_b609ea08fa1da72b0daef1233c822e7b, O_RDWR) failed: m (2) in C:\apache\htdocs\cmi\quick_find.php on line 2 Warning: MySQL Connection Failed: Can't connect to MySQL server on...
5
by: gerardsmink | last post by:
Hello, I have written a java program that can connect with a mysql server. When i run the program in Eclipse it works fine, when i create a jar and run the program outside eclipse the program...
1
by: Alien | last post by:
Hi guys, I am doing JSP stuff in eclipse and when I open my file, i get a red cross on the line: <%@page import="org.apache.xml.serialize.*"%> When i move my mouse over it says:
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.