[LUNI] Epic LAMP Fail
jjirsa at comcast.net
jjirsa at comcast.net
Mon Sep 13 16:06:15 CDT 2010
Clyde,
If you see a section for "mysql", "mysqli", and "pdo" in the phpinfo() output, then the modules are loaded.
So, if you run a script at the command line with a call to mysql_connect(), do you still get an error?
If you call it from a browser, do you get an error?
BTW, some distros have a CLI and an Apache PHP config file (like in SuSE, you have /etc/php5/cli/php.ini and /etc/php5/apache2/php.ini), so depending on how the page is called, you might or might not see an error.
Jeff
----- Original Message -----
From: Clyde Forrester <clydeforrester at gmail.com>
To: Linux Users Of Northern Illinois (Chicago) - Technical Discussion <luni at luni.org>
Sent: Mon, 13 Sep 2010 19:31:00 -0000 (UTC)
Subject: Re: [LUNI] Epic LAMP Fail
The server is running just dandy. I created the database and table, and
populated it from the mysql command line.
The problem appears to be a matter of properly engaging the mysql
functions in php.
According to phpinfo, the extensions directory is
/usr/lib/php5/20060613. I look there and find pdo.so, pdo_mysql.so,
mysql.so, and mysqli.so.
There are a couple tables of information in the mysql and mysqli
sections of phpinfo.
I didn't see anything in phpinfo referring to "compiled" or "support".
Barry Von Ahsen wrote:
> on 10.4, php5-mysql doesn't require mysql-server, see if that got installed
>
> if it did get installed, is it running?
>
> #netstat -anl | grep 3306
>
> if it is running, can you connect from the cli?
>
> #mysql -u root -ppassword database
>
>
>
> to use DB.php, you probably need php-db, the PHP PEAR library
>
>
> -barry
>
>
>
> Hef wrote:
>> rebooting counts, yes.
>>
>> as for phpinfo(),
>> Look for refences to mysql, see if it was specifically compiled
>> without mysql support, see if the mysql extension got installed
>> correctly.
>>
>> On Sun, Sep 12, 2010 at 7:38 PM, Clyde Forrester
>> wrote:
>>> Anything in particular I should be looking at? There's a ton of info there.
>>>
>>> Joseph Booker wrote:
>>>> Also, running a file with just may be helpful.
>>>>
>>>> On Sun, Sep 12, 2010 at 7:15 PM, Hef
>>>>> wrote:
>>>>
>>>> did you restart apache after changeing the php.ini file and installing
>>>> php5-mysql?
>>>>
>>>> On Sun, Sep 12, 2010 at 6:53 PM, Clyde Forrester
>>>>> wrote:
>>>> > I have Ubuntu 9.10, Apache 2, MySQL, PHP 5. But I'm getting errors
>>>> > trying to tie it all together.
>>>> >
>>>> > mysql_connect("localhost","root","password");
>>>> > gives me: Fatal error: Call to undefined function mysql connect() ...
>>>> >
>>>> > I googled up a storm on this one. I have php5-mysql and
>>>> libmysqlclient.
>>>> > There is no php5-mysqli available through the package manager, but I
>>>> > think it's irrelevant. I did uncomment the extension=msql.so
>>>> line, and
>>>> > even change it to mysql.so, and reboot. Didn't seem to help.
>>>> >
>>>> > I tried other examples, like the one in the O'Reilly book. require
>>>> > 'DB.php'; gave me: Warning: require(DB.php) [function.require]:
>>>> failed
>>>> > to open stream: No such file or directory ...
>>>> >
>>>> > This should be THE simplest application of THE most common use of
>>>> Linux
>>>> > (web serving) on possibly THE most common distro. Yet it's
>>>> lookin' at me
>>>> > like maybe I got two heads, tryin' to do sumpthin' so radical.
>>>> >
>>>> > I'm hoping it's some logical oversight, like when the Hello.c program
>>>> > won't compile because they thought that no one would need the header
>>>> > files in a standard install.
>>>> >
>>>> > Any ideas?
>>>> >
>>>> > c4
>>>> >
>>>> > (Full disclosure: I posted this on chicagolinux a few minutes
>>>> ago, also.)
--
Linux Users Of Northern Illinois (Chicago) - Technical Discussion
http://luni.org/mailman/listinfo/luni
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://luni.org/pipermail/luni/attachments/20100913/679ea0b7/attachment.html
More information about the LUNI
mailing list