Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

php extension location question

Status
Not open for further replies.

dessie1981

Programmer
May 9, 2006
116
0
0
GB
Hi Everyone.

Just a quick question,

I have been building an online store for the last few weeks on a windows system using easyphp (a package containing mysql apache and php).
Now i am at the stage where i am moving the site onto a unix box running fedora. I have apache and mysql installed and running fine but i am having a problem with my php extensions.
When i login to my site i have to communicate with the db and i am getting the following error.

DB Error : extemsion not found

Do you think that the problem is that php is looking in the wrong place for the db extensions?
My pear extensions are all installed in the following dir
/usr/share/pear
and i have the db extension installed here too.

Should my php extensions be installed in /usr/lib/php/modules?

Any help would be much appreciated.

Regards
Dessie
 
is the php_mysql.dll file in the extensions directory?
/usr/lib/php/modules

can we also try a basic mysql test that does not use the DB extension (changing the variables for the right data)?

Code:
mysql_connect($dbhost, $username, $pwd) or die("cannnot connect to host: " . mysql_error());
mysql_select_db($dbname) or die ("cannot select database ".mysql_error());
echo "all ok";
 
hi the php_mysql.dll file is not in the dir.
There is only a file called ldap.so here.

I also ran the above script and added in two extra debug statements, one before the mysql_connect line and one after.
Only the dbug before the mysql_connect line printed.
"all ok" did not print either.
There was no mysql_error() messsage either.
 
have a hunt for the php_mysql.dll file elsewhere. perhaps in the php directory. failing that, you may have to download the extensions separately. did you install php yourself or use an installer?
 
Ill have a look around and ill get back to you, i installed it with the fedora core 4 os installation.
I ran up2date and a locate for the file but it does not seem to be present. I am gonna try a fresh install of apache and php from downloads from the net.
 
don't worry about apache. do a source build of the latest php snapshot from the cvs. it will upgrade you to 5.2.x as well.
 
Got it working eventually!

Yeah the --without-mysql we saw in the phpinfo() script is the default setting for php5, how crazy and stupid is that?

Found a great step by step guide to resolve this.


Thanks for all your help btw.

Dessie
 
no worries. it became the default from version 5 when the licences granted my mysql and php diverged. php then defaulted to bundling sqlite.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top