Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Then proceeding to testing I took a bit of code using mysql_connect() which gives a undefined function error if not proceeded by dl("mysql.co").
I like to set up my server so I don't need the dl line, the documentation of php4-mysql tells me to include a line in php4.ini saying: extension=mysql.so. However: cat /etc/php4/apache/php4.ini | grep mysql tells me this line is already in the php4.ini file.
Not that familiar with Debian, but I'll take a shot in the dark. Is PHP compiled with MySQL support? I know when I compile it I have to add the --with-mysql option to the configure script. Maybe it isn't and that's why you're having to do the dl thing.
In debian php comes precompiled in a *.deb package. MySQL isn't compiled in, but provided with module loaded in the dl command. I'd like this module to be linked at boottime, which is why I'm trying to do it this way. Is compiling with mysql support necessary?
On RedHat 7.x and above and SuSE 8.2 I've had to pass the option in the configuration script to compile with mysql support. If I didn't then using mysql commands did like you're experiencing before you do the dl thing. But as long as I compiled with the mysql support I didn't have to do anything to use mysql functions.
Distribution: Xubuntu 12.04, Mythbuntu, Ubuntu Server 12.04
Compiling in MySQL support is equivalent to installing the php-mysql extension and adding the line to php.ini, which is usually done during installation of the MySQL extension. You also stated it is there.
The only idea I have at the moment is that your php.ini is not parsed by your PHP on Apache startup.
Just to be sure, install another extension, check it is enabled as extension in php.ini and try to use it.
In case this also does not work: do you use Debian's standard Apache and PHP packages or did you get them elsewhere and/or compile them yourself? Are there any other php.ini on your system (updatedb; locate php.ini - the first one will take some time)?