LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-01-2005, 07:56 PM   #1
backpacker
Member
 
Registered: Jun 2005
Distribution: Fedora 11
Posts: 68

Rep: Reputation: 15
php install and test,maybe...


(1)I tested my php file,I got message said that "Call to undefined function:mysql_connect() in /var/www/html line 2".My test.php is <?php $link=mysql_connect();...?>.

(2)I downloaded php-5.0.5 and ./configure it.But there was no Makefile in the file I downloaded.

Hope someone help me.Thanks.
 
Old 11-01-2005, 07:57 PM   #2
backpacker
Member
 
Registered: Jun 2005
Distribution: Fedora 11
Posts: 68

Original Poster
Rep: Reputation: 15
For question(1),I use php-4.2.23.
 
Old 11-01-2005, 08:03 PM   #3
alfal
LQ Newbie
 
Registered: Oct 2005
Posts: 2

Rep: Reputation: 0
1.Are you ./configure php with mysql? Such as:./confiugre --with-mysql=/usr/local/myql

2.you ./configure is successed? no error?
 
Old 11-02-2005, 03:11 AM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Have you actually got PHP + MySQL server installed + configured correctly? I don't understand your problems installing PHP if you've already been able to run PHP scripts from your webserver. Anyways, what distro are you using - can you not find pre-compiled packages available that install + tie the two together correctly? Assuming PHP + MySQL is installed, it might be your PHP code based on the error returned. What was the rest of your PHP code to connect to your MySQL database?
 
Old 11-02-2005, 11:42 PM   #5
backpacker
Member
 
Registered: Jun 2005
Distribution: Fedora 11
Posts: 68

Original Poster
Rep: Reputation: 15
My distro RedHat9,adn mysq-5;php-4;apache-2.0.55.

My php code is an example from php official web site:<?php $link=mysql_connect('localhost','user','password');...?>,and I tested <?php phpinfo();> work OK.In fact my trouble came since I upgrated to mysql-5,before that my php code seems get correct output.

It's weird.
 
Old 11-03-2005, 02:09 AM   #6
backpacker
Member
 
Registered: Jun 2005
Distribution: Fedora 11
Posts: 68

Original Poster
Rep: Reputation: 15
"Fatal Error:Call to undefined function:mysql_connect() in /var/www/html/test.php on line 2" meant php parser can not be able to find its function library?Some wrong with path setting?Terroble!
 
Old 11-03-2005, 02:12 AM   #7
backpacker
Member
 
Registered: Jun 2005
Distribution: Fedora 11
Posts: 68

Original Poster
Rep: Reputation: 15
I posted for help on the forum of php.net but nobody answers me.Please!
 
  


Reply



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
about test.php dummyagain Linux - General 3 01-28-2010 12:58 AM
Test php code on Apache backpacker Linux - Newbie 3 12-17-2005 04:14 AM
php test? skate Linux - Software 5 06-01-2005 10:50 AM
horde screen blank, test.php says gettext = no posixjunkie Linux - Software 1 06-21-2004 09:49 PM
Can't test php, browser keeps downloading it Elijah Linux - Software 5 05-22-2004 03:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:45 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