| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-23-2007, 12:55 AM
|
#1
|
|
Member
Registered: Oct 2003
Location: Canada
Distribution: Fedore Core 4, Ubuntu 7.04, Suse 10.2
Posts: 376
Rep:
|
Apache PHP != Command Line PHP?
Hello all,
I'm having a weird problem. When I run php from the command line it appears that the whole set of mysql functions are not available to it. I get this.
Code:
root@server:/home/htdocs/system# php movie_update_listings.php
Fatal error: Call to undefined function mysql_connect() in /htdocs/inc/functions.php on line 370
But I know mysql works on my php scripts when I am using them from Apache over the web. Could anyone shed some light on what is going on?
I am using Ubuntu 6.10 fully up to date with the latest apache php and mysql that is available from the apt-get repos.
|
|
|
|
10-23-2007, 08:34 PM
|
#2
|
|
Member
Registered: Jan 2006
Location: Brisbane, Australia
Distribution: Suse, Mandrake, IPCop, Debian, Slackware
Posts: 34
Rep:
|
In the conf file, make sure that:
extension=mysql.so
is NOT commented out.
|
|
|
|
10-23-2007, 08:48 PM
|
#3
|
|
Member
Registered: Oct 2003
Location: Canada
Distribution: Fedore Core 4, Ubuntu 7.04, Suse 10.2
Posts: 376
Original Poster
Rep:
|
Thanks. I will try that.
|
|
|
|
10-23-2007, 09:21 PM
|
#4
|
|
Member
Registered: Oct 2003
Location: Canada
Distribution: Fedore Core 4, Ubuntu 7.04, Suse 10.2
Posts: 376
Original Poster
Rep:
|
That totally fixed it thanks.
For anyone else who might have similar problems, be sure to edit the "right" php.ini file. I had two on my ubuntu system, so I changed them both heh and then it worked.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:38 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|