Home > Undefined Function > Fatal Error Call To Undefined Function Mysql Connect Ubuntu Php5

Fatal Error Call To Undefined Function Mysql Connect Ubuntu Php5

Contents

With both php -i, and phpinfo(), the config file is given as /etc/php.ini, which is the one I've been playing with, and is the only one I am aware of. To show error messages, add this line before the $connect part: ini_set('display_errors',1);. Join Date Oct 2008 Beans 57 DistroUbuntu Karmic Koala (testing) Re: Fatal error: Call to undefined function mysql_connect() in /var/www/welcome.php o Originally Posted by piyush.neo i am using ubuntu 9.10 with How much interest should I pay on a loan from a friend? navigate here

Each works with no problem on their own. Sum of neighbours What does a well diversified self-managed investment portfolio look like? After installing the package it is working fine with mysqli adapter. Books for chess traps more hot questions question feed default about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / look at this site

Fatal Error Call To Undefined Function Mysql Connect Ubuntu Php5

Does that work? –wanovak Dec 11 '12 at 17:16 I've tried restarting the server, still happens. –user1765369 Dec 11 '12 at 17:21 I'm using xampp, after adding Find the php-mysql RPM for the version of PHP that is installed on your system. Sample Code

Did Sputnik 1 have attitude control? Now it works fine. I can't believe I didn't try that sooner. *facepalm* Last edited by xworld (2012-11-08 00:47:48) Offline Pages: 1 Index »Networking, Server, and Protection »[SOLVED]Call to undefined function mysql_connect() Board footer Jump Call To Undefined Function Mysql_connect() Windows add a comment| 2 Answers 2 active oldest votes up vote 0 down vote How do I resolve unmet dependencies?.

To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will Do they work? –samayo Dec 11 '12 at 17:16 Perhaps not, as I have tried entering incorrect user/pass and my 'or die' statement is not showing! –user1765369 Dec 11 Please check your PHP configuration. DocumentationNot sure if it matters but I have made the switch to a systemd only installation and have It wasn't working originally so I created a new http user using this command:useradd -d /srv/http -r -s /bin/false -U httpAnd replaced /srv/http with the directory of my choice.

See also MySQL: choosing an API guide and related FAQ for more information. Call To Undefined Function Mysql_connect() Linux In the software world, a lot can change in a very short time, and doing things this way makes it more likely that you will find the best information. There are a lot of questions here on SO and I definitely checked them all out. I configured Apache to read my .php pages from /home/user/code/php instead of /srv/http.

  1. I reinstalled the other packages which got removed when I removed php5-common with the following command sudo apt-get install php5-cli sudo apt-get install php5 libapache2-mod-php5 sudo apt-get install php5-mysql and restarted
  2. Recently I made a little change.
  3. Related 0MySQL and PHP problems8PHP and MySQL not communicating0php and mysql issues0Could Not Connect: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)0Installing LAMP - PHP not connecting with MySQL
  4. It turns out I was using the msql_connect() function instead of mysql_connect().
  5. See also MySQL: choosing an API guide.
  6. php mysql ubuntu mysql-connect undefined-function share|improve this question edited Feb 26 at 14:39 Peter Mortensen 10.2k1369107 asked Dec 11 '12 at 17:12 user1765369 1282213 How about other built in
  7. current community chat Stack Overflow Meta Stack Overflow your communities Sign up or log in to customize your list.
  8. share|improve this answer edited Feb 25 at 16:50 Peter Mortensen 10.2k1369107 answered Jul 6 '15 at 2:41 syyu 16629 don't forget to restart apache after that sudo service apache2
  9. Ask Ubuntu works best with JavaScript enabled UbuntuCommunityAsk!DeveloperDesignDiscourseHardwareInsightsJujuShopMore ›AppsHelpForumLaunchpadMAASCanonical current community chat Ask Ubuntu Ask Ubuntu Meta your communities Sign up or log in to customize your list.
  10. more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed

Php Mysql Connect Undefined Function

Found it after running php -m. http://askubuntu.com/questions/484256/ubuntu-server-14-mysql-php-connect-problem What kind of bicycle clamps are these? Fatal Error Call To Undefined Function Mysql Connect Ubuntu Php5 more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed Call To Undefined Function Mysql_connect() Php more hot questions lang-php about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation Science Other

Is the mass of an individual star almost constant throughout its life? check over here This means that php5-mysql was looking for php5-common (=5.3.6-13ubuntu3.1) but I had php5-common (=5.3.6-13ubuntu3.9) installed. Its a very different beast now –RiggsFolly Dec 4 '15 at 12:36 2 Why all the down-votes? Are independent variables really independent? Call To Undefined Function Mysql_connect() Xampp

UPDATE Since this answer still gets the occasional click I am going to update it to include PHP 7. I was able to see all my .php files. The problem was with one file. his comment is here Isn't that more expensive than an elevated system?

Make space between rows constant Replace lines matching a pattern with lines from another file in order Sum of neighbours This riddle could be extremely useful Players stopping other player actions Call To Undefined Function Mysql_connect() Codeigniter Why would a password requirement prohibit a number in the last character? Is there a role with more responsibility?

asked 2 years ago viewed 2603 times active 2 years ago Linked 148 How do you restart Apache?

Can Communism become a stable economic strategy? Is intelligence the "natural" product of evolution? Once I removed that, I no longer received the "fatal error" messages. Call To Undefined Function Mysql_connect() Php 7 PHP works okay on its own though, through Apache and at the command line.

Ubuntu Logo, Ubuntu and Canonical Canonical Ltd. But then I'm not entirely certain whether that line is required to be un-commented or not. [correction: the error stated was actually due to a typo, but running from the command Why does argv include the program name? weblink Do you have extension_dir = "/usr/lib/php/modules/" in php.ini?

Fix for ubuntu (and PHP 5): sudo apt-get install php5-mysql After installing the client, the webserver should be restarted. Not the answer you're looking for? I will look into it but I would really like to get this working first as it worked previously until I moved to a new server. –user1765369 Dec 11 '12 at If you don't see it, you need to recompile PHP with MySQL support, or reinstall a PHP package that has it built-in, both of which are beyond the scope of this

Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the