LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 08-13-2004, 01:15 PM   #1
Mikessu
Member
 
Registered: Sep 2003
Distribution: Gentoo, FreeBSD 5.1
Posts: 122

Rep: Reputation: 15
PHP can't connect MySQL after upgrading to php5


Hi, I just ran cvsup and upgraded PHP. I readed /usr/ports/UPDATING about new changes and installed php5 base and extensions. I chose MySQL-support when it asked me what to compile in php. Anyway, now I can't connect to MySQL with php. It says this when browsing php-sites:

Fatal error: Call to undefined function mysql_connect() in blah blah line blah

and it says this when I'm trying to browse PHPSysInfo:

Fatal error: Call to undefined function preg_split() in /usr/home/mikko/www/sysinfo/includes/os/class.FreeBSD.inc.php on line 46

What have I done wrong? I also tried downgrading to php4 but got those same errors, so it seems I've been messing up with something.

EDIT:
Php sysinfo's site says it shouldnt even work with PHP5, I'll try cvs-version for that. Still don't know what's wrong with MySQL.

EDIT 2:
And it seems that PhpSysinfo requires xml-module.. which I've also compiled in php, this is strange.

Last edited by Mikessu; 08-13-2004 at 01:30 PM.
 
Old 08-13-2004, 03:26 PM   #2
Marble
Member
 
Registered: Feb 2003
Distribution: FreeBSD 5.2
Posts: 113

Rep: Reputation: 15
What does phpinfo(); say? It show what modules are loaded. Also you need to put the path to your modules directory in php.ini (look for "extension_dir = ").
The path is somewhere like:
/usr/local/lib/php/*some number*

Put that in that php.ini line to load the modules (extensions)

php 5 is still kind of iffy. It is out of beta and all, but I have run across numerous scripts that don't work with it yet, jfyi.

I personally don't care for the new method, I find it's a hassle to track down issues and it was never really well documented. Sure UPDATING talks about it, but there is a core number of default extensions that you find on most hosts (ones you take for granted). If you install php4 without installing the extensions your scripts don't work. Then you install the ones you think you need and you still run into issues.
What, I feel, needed to be documented is what base extensions were normally installed previously so you had an idea of what you should run. Plus setting up php properly just doubled in time and hassle.

I have a dev server and php4 has had issues since the upgrade. Not all the extensions work. Some (3 of them) kill httpd and cause a seg fault and if I don't include those, some of the scripts for things I need to maintain on my local server before uploading quit working - CubeCart, etc...

*rant over*

Since we are on this issue, anyone know *why* they decided to use this method? Is it a prep for php5?

Last edited by Marble; 08-13-2004 at 03:32 PM.
 
Old 08-13-2004, 03:55 PM   #3
Mikessu
Member
 
Registered: Sep 2003
Distribution: Gentoo, FreeBSD 5.1
Posts: 122

Original Poster
Rep: Reputation: 15
Ok, I got it work now, only thing I had to change was module path. I also downgraded back to php 4, because most ready-to-use scripts don't seem to work perfectly yet. ;-)

Last edited by Mikessu; 08-13-2004 at 03:58 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Upgrading PHP..and maybe MySQL too? Vort3x Mandriva 4 11-23-2004 06:40 PM
Upgrading PHP,.. and maybe MySQL too? Vort3x Linux - Software 1 10-29-2004 12:35 PM
upgrading php 4.2.3 to php5 pelegk2 Linux - Software 1 10-17-2004 06:45 PM
Upgrading Apache MySQL PHP on RH9 TheLimey Linux - Newbie 0 05-22-2004 04:51 PM
PHP and MySQL after upgrading Redhat Shinjuku Linux - Software 5 05-02-2003 01:37 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration