Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 380497
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T14:59:41+00:00 2026-05-12T14:59:41+00:00

I installed php 5.3 through MacPorts and now i tried to connect to a

  • 0

I installed php 5.3 through MacPorts and now i tried to connect to a database (MySQL)
but always when i’m trying to call mysql_connect(); im getting an error:

Call to undefined function mysql_connect() 

My setup is:

  • Leopard 10.5.7

Installed and active packages via Macports that may be related to this problem:

  • php5 @5.3.0_2+apache2+macosx+pear
  • php5-mysql @5.3.0_0+mysql5
  • mysql5 @5.0.85_0

I know that this error appears when php is compiled without mysql support
but the package php5-mysql should add this support to php.

I really dont know what i can do.
I tried so many possible configurations but none of them worked.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T14:59:42+00:00Added an answer on May 12, 2026 at 2:59 pm

    Just at the moment of writing my question I found a solution so maybe it’s useful to anyone else:

    The problem with the php 5.3 installation via macports is that there is a line in the php.ini thats wrong.

    ; Directory in which the loadable extensions (modules) reside.
    extension_dir = "./"
    

    should be changed to:

    ; Directory in which the loadable extensions (modules) reside.
    ; extension_dir = "./"
    

    (just uncomment it, right.)

    PHP 5.3 finds the extension_dir itself so there is no need for extension_dir anymore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect to a mysql db through php running on my
I recently installed PHP on IIS/Windows 7, but it isn't working. I am getting
I have Memcache installed and working for PHP apps run through Apache (v2.2) but
It's been a while since I've installed PHP for Windows, but every guide I've
I originally installed a recent version of wamp (php 5.3) but I need to
I just installed XAMPP beta with PHP 5.3 on Vista, but installed it in
I installed php and mysql on a Windows 2003 server running IIS6. I uncommented
I am trying to print generated forms / receipts through PHP (the printers will
How can I check whether apache is installed with php and mysql on Ubuntu
I've written several Web MVC apps but never before in PHP, and I'm trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.