[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] PHP4!



Sorry for not mentioning about the raq. it's a raq3, the problem is that I
can make PHP4 work, but I cannot do anything with mysql. Since PHP4 is
coming with its built in mysql support I cannot configure or compile it with
the original mysql on raq3.

In other words, you already have MySql on the machine? And you're able to build databases and tables with it through direct line commands, via Telnet? In short, MySql itself is working, right? :-)

First off, Omer, I'll repeat something oft said and frequently overlooked...just in case. (And I would guess a lot of us forget this step once in a while).

After completing this installation you MUST stop and restart Apache. You can't just restart it; you have to stop Apache and THEN restart it.

/etc/rc.d/init.d/httpd stop
/etc/rc.d/init.d/httpd start

A great thing about stopping and restarting: if your important configurations are off, Apache won't restart and it will tell you where the problem is (what file and line) and you can Telnet in and fix it. Stopping and starting is a great diagnostic for problems with installations, in my experience.

Again, that's "just in case" since you probably did that already.

That said...

Was your PHP installation procedure exactly like the one described in the link I gave you?

I ask because the PHP4 installation's support for MySql shouldn't be a problem with an already installed version of MySql (if it's current, anyway). PHP and MySql do NOT have to be installed during the same installation procedure at all. You can install PHP4 over an already present MySql. But you need to use apxs AND do the specific configuration command

--with-mysql

Like this:

-start the configuration of your php source
$yourdirectory/php_xxx>./configure \
                                        --with-apxs=/usr/sbin/apxs \
                                        --with-mysql \
                                        --enable-track-vars

And the precise configuration of these lines in httpd.conf is also critical (although this is probably okay if you can use PHP4):

-open your httpd.conf with an editor, usually you can find it in
 /etc/httpd/conf
        $>vi /etc/httpd/conf/httpd.conf
 check whether these lines has been added to httpd.conf:

 LoadModule php4_module        /usr/lib/apache/libphp4.so
 AddModule mod_php4.c

If those aren't there after the installation (or if they are incorrectly written), you need to add or change them appropriately.

If you could let us know what the problem is (what error messages you're getting with PHP and MySql) then maybe we can track the problem down. I sure hope this helps.

Alfredo

--
People-Link/Institute for Mass Communications
www.people-link.org
Communications for a Better World...and for the People Who are Building One!
Members, Local 1180, Communications Workers of America, AFL-CIO