OpenBSD: PHP and MySql

  • Xel02
  • Proficient
  • Proficient
  • Xel02
  • Posts: 261

Post 3+ Months Ago

Hey, I've just setup a new webserver for a friend of mine. This is my first time using OpenBSD and my first time setting up MySQL too.

MySQL seems to work fine by itself and the Apache server is running fine with PHP, but I can't seem to get PHP to connect to the MySQL server. When I try phpMyAdmin it says it can't load the MySQL extension and phpinfo() shows no mention of MySQL.

I've included the extension mysql.so in the php.ini but it doesn't seem to load it. I'm trying to find the log file but I can't seem to do that either.

Any help would be appreciated.

Note. Apache is chrooted, and I don't know if that affects PHP although it is loaded as a module in Apache. I do have a mysql.sock file in the chroot jail though.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • xtc
  • Novice
  • Novice
  • xtc
  • Posts: 34
  • Loc: London UK

Post 3+ Months Ago

Hello,

check these things.

the path to the extensions within the php.ini

try and do a small script

<?
phpinfo();
?>

That will output whats configured currently

php -m

to see what modules are loading/not loading.

If the apache is chrooted make sure all the modules are also chrooted.

I have had this problem a few times with the various bsd versions. its normally a path issue.. check it out.. also make sure that you have configured it WITH mysql :)

http://forum.lucidnow.com
  • Xel02
  • Proficient
  • Proficient
  • Xel02
  • Posts: 261

Post 3+ Months Ago

Thank you SO much, it wasn't the config or anything I just had to add the mysql module to it. It didn't seem to want to load it by itself.

But your php -m command showed me what to do thanks again.

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 75 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.