You are not logged in.

#1 2003-01-01 06:57:04

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

php apps not connecting with mysql

I am not getting php applications using mysql, connected to mysql server. Apache, phpMyAdmin (mysql management) and phpSysInfo all work fine. PostNuke connected to mysql, which run fine on other distros, don't connect. Following error appears:
Fatal error: Call to undefined function: mysql_connect() in /home/httpd/html/ami-proto/pnadodb/adodb-mysql.inc.php on line 105

Local address: http://localhost/ami-proto/index.php.
File config.php is:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'root';
$pnconfig['dbpass'] = '';
$pnconfig['dbname'] = 'amidb';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '0';
I am not using password (when running on my own machine).

Offline

#2 2003-01-01 15:56:12

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: php apps not connecting with mysql

rebuild php with mysql support


apt-get install arch

Offline

#3 2003-01-02 01:07:34

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: php apps not connecting with mysql

Arielext wrote:

rebuild php with mysql support

How do you do it with Arch Linux? I already did Apache with php (read thread: http://bbs.archlinux.org/viewtopic.php?t=253) and works fine.

How do you test if php is running with mysql? PhpSysInfo only shows the Apache-php relation.

Offline

#4 2003-01-02 05:18:38

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: php apps not connecting with mysql

rasat wrote:
Arielext wrote:

rebuild php with mysql support

How do you do it with Arch Linux?

I found the solution. To run php with mysql, untag "extension=msql.so" in /usr/etc/php.ini. For more information, please read:
http://bbs.archlinux.org/viewtopic.php?t=253

Offline

#5 2003-01-02 05:49:10

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: php apps not connecting with mysql

Sorry, I made a typing error. The extension is:
extension=mysql.so (not 'msgl.so')

Offline

#6 2003-01-05 07:15:32

rasat
Forum Fellow
From: Finland, working in Romania
Registered: 2002-12-27
Posts: 2,176
Website

Re: php apps not connecting with mysql

I came across another reason why PostNuke and other php-mysql apps may not run with mysql, is due to version mysql-3.23.54. If installed with mysgl-3.23.51 or earlier version, it will not run. You must upgrade the database. Most php apps, like PostNuke, PHPnuke, phpMoney and phpBB, have an easy upgrade system.

PS. To install an older mysql version will not work on Arch Linux 0.4.

Offline

#7 2003-01-30 01:00:32

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: php apps not connecting with mysql

i got some trouble to runing this i did uncoment the mysql.so
( question do i did it rigth ? if you chek this out you will see whi i ask
rooty.dhis.org/index.php )
im a complete newbie runing apache php mysql so any help is welcome
on index.php
cannot load MySQL extension,
please check PHP Configuration. ( but i did uncoment mysql.so )
on admin.php
Warning: main(home/httpd/html/includes/sql_layer.php) [function.main]: failed to create stream: No such file or directory in /home/httpd/html/mainfile.php on line 48

Fatal error: main() [function.main]: Failed opening required 'home/httpd/html/includes/sql_layer.php' (include_path='.:/php/includes') in /home/httpd/html/mainfile.php on line 48
( ????? )
on routty.dhis.org/teste.php        ( teste is the name in my native language for test tongue )
it looks good


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#8 2003-01-30 02:51:30

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: php apps not connecting with mysql

Did you restart apache?

Offline

#9 2003-01-30 11:26:30

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: php apps not connecting with mysql

shure thing tongue


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#10 2004-03-23 01:12:46

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: php apps not connecting with mysql

this tread is old but there is something bad about php to make stuff work i must rebuid php and remove this  --with-mysql=shared,/usr from the pkgbuild and yes stuff work then


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#11 2004-03-23 03:04:28

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: php apps not connecting with mysql

You have to enable mysql in /etc/php.ini (extension=mysql.so).  It's not built in because some people may not want to use mysql with php (maybe they're using postgres...).


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#12 2004-03-26 00:28:19

jlvsimoes
Member
From: portugal
Registered: 2002-12-23
Posts: 392
Website

Re: php apps not connecting with mysql

i did forget about it and thaks


-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GU/ d- s: a- C L U P+ L+++ E--- W+
N 0+ K- W-- !O !M V-- PS+ PE- V++ PGP T 5 Z+ R* TV+ B+
DI-- D- G-- e-- h! r++ z+ z*
------END GEEK CODE BLOCK------

Offline

#13 2005-10-21 07:10:07

shadowhand
Member
From: MN, USA
Registered: 2004-02-19
Posts: 1,142
Website

Re: php apps not connecting with mysql

I'm gonna revive a dead horse here (magic ain't it? yikes ) and say that this info NEEDS TO BE SOMEWHERE when php is installed. I just spent the last 20 minutes freaking out because php was saying that "mysql_connect" was an "undefined function".


·¬»· i am shadowhand, powered by webfaction

Offline

Board footer

Powered by FluxBB