Click to See Complete Forum and Search --> : php+mysql+apache


johanolsen
10-25-2001, 12:19 PM
Hia!

I'm installing GlobeCom's mp3 Juke on one of my boxes and got a little problem.... can't connetc to MySQL.

phpinfo tell me that I got gd and MySQL support
if I run it from the command line, but if I call the
same script from apache, I don't. What am I missing here? It seems to me that when I call the script from
apache it won't pick up my /etc/php.ini.

I got this in my php.ini:
extension=gd.so
extension=mysql.so

and all the php stuff in httpd.conf...

and I'm running
Linux foo.bar.com 2.4.3-20mdk #1 Sun Apr 15 23:03:10 CEST 2001 i686 unknown
php 4.0.6
Apache-AdvancedExtranetServer/1.3.19 (Linux-Mandrake/3mdk)
php-mysql-4.0.6-3mdk
mysql Ver 11.13 Distrib 3.23.36, for pc-linux-gnu (i686)

Do I really have to recompile php? I thought that was not
needed when using php-mysql? I've already been down tht route but failed to compile gd, needed by php.
I've also tried the gd rpm, but that didn't work.

/jvo

Anon
10-26-2001, 06:18 AM
I'm not very familiar with the linux platform, but since it seems you've already got mysql support compiled into php, maybe your MySQL server isn't running?

or your script is pointing to the wrong host?

johanolsen
10-26-2001, 08:07 AM
It sure is running...

[johan@car johan]$ ps -ef | grep mysql
root 1446 1 0 Oct24 ? 00:00:00 /bin/sh /usr/bin/safe_mysqld --d
mysql 1471 1446 0 Oct24 ? 00:00:00 /usr/sbin/mysqld --basedir=/ --d
mysql 1529 1471 0 Oct24 ? 00:00:00 /usr/sbin/mysqld --basedir=/ --d
mysql 1530 1529 0 Oct24 ? 00:00:00 /usr/sbin/mysqld --basedir=/ --d
mysql 1537 1529 0 Oct24 ? 00:00:00 /usr/sbin/mysqld --basedir=/ --d
johan 7372 7350 0 12:00 pts/5 00:00:00 grep mysql

johanolsen
10-26-2001, 10:35 AM
One more thing.... Looking at the output from phpinfo.

Configuration File (php.ini) Path is set to /etc/php.ini
when I'm running the script from the commndline (
mySQL+gd are both present).
-------------------
Configuration File (php.ini) Path is set to /etc when I'm
running the script from Apache (mySQL + gd
are not present).

The output from both are here...
http://you.genie.co.uk/diablo/phpinfo.html
http://you.genie.co.uk/diablo/phpinfo-commandline.html

/jvo