Jump to content
  • 0

mysql_connect() help


goddameit

Question


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

EDIT : Solved

Edited by goddameit
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  12/20/12
  • Last Seen:  

i think the server have some miss configuration ( like missing php5-mysql, mysql-client) plus need to enabled mysqli.dll extension in PHP.INI

if you dont want to have any problem you need to install this, to have you LAMP runing at 100%

apt-get install libapache2-mod-php5

apt-get install php5-gd

apt-get install php5-dbg

apt-get install php5-pgsql

apt-get install php5-mysql

apt-get install libapache2-mod-perl2

apt-get install php5-cli

apt-get install php5-common

apt-get install php5-curl

apt-get install php5-dev

apt-get install php5-imap

apt-get install php5-ldap

apt-get install php5-mhash

apt-get install php5-odbc

apt-get install php5-xsl

apt-get install mysql-client

apt-get install php5-idn

apt-get install php5-imagick

apt-get install php5-mcrypt

apt-get install php5-ming

apt-get install php5-ps

apt-get install php5-pspell

apt-get install php5-recode

apt-get install php5-tidy

apt-get install php5-xmlrpc

Edited by aisha
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

...

hi sir, I have a problem hope you can help me.

I'm doing some php work, and here is a little sample of what I'm doing

$connect = @mysql_connect('localhost', 'account', 'password');
if (!$connect) {
....(something for end)
}
$bool = mysql_select_db('test',$connect);
if (!$bool) {
....(something for end)
}

at first I think account and password is what I use for login phpMyAdmin, but it's fail (mysql_connect login fail)

so I use another what I use for login ftp, it work well when php do mysql_connect

but it will fail when do mysql_select_db, even I go to phpMyAdmin and create an an user which same as this account,

it still tell me ' Access denied '.

could you tell me where is I missed or what I shouldn't do that?

i think the server have some miss configuration ( like missing php5-mysql, mysql-client)

if you dont want to have any problem you need to install this, to have you LAMP runing at 100%

apt-get install libapache2-mod-php5

apt-get install php5-gd

apt-get install php5-dbg

apt-get install php5-pgsql

apt-get install php5-mysql

apt-get install libapache2-mod-perl2

apt-get install php5-cli

apt-get install php5-common

apt-get install php5-curl

apt-get install php5-dev

apt-get install php5-imap

apt-get install php5-ldap

apt-get install php5-mhash

apt-get install php5-odbc

apt-get install php5-xsl

apt-get install mysql-client

apt-get install php5-idn

apt-get install php5-imagick

apt-get install php5-mcrypt

apt-get install php5-ming

apt-get install php5-ps

apt-get install php5-pspell

apt-get install php5-recode

apt-get install php5-tidy

apt-get install php5-xmlrpc

Hi Guys,

This is a sales topic, not a support topic. If you don't have a service with us, post your questions and issues somewhere else more appropriate on the forums. If you do have a service with us, submit a support ticket.

Also, I am not your personal PHP tutor; please avoid asking me questions on how to correct your script. And 'apt-get' is for Debian/Ubuntu; our RO services run CentOS and come pre-installed with PHP5 + modules.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  118
  • Reputation:   6
  • Joined:  12/20/12
  • Last Seen:  

just change apt-get for yum install ... no big deal

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  707
  • Reputation:   168
  • Joined:  01/26/12
  • Last Seen:  

just change apt-get for yum install ... no big deal

Hi Aisha,

Okay thanks for continuing your spam; but I had already clearly stated that the modules are already pre-installed with the PHP5 that we provide. I have now reported your post to be removed.

Also to add...

PHP5 can't be installed by default repo's on CentOS 5; so it's not "no big deal". You need to install the EPEL repo for it to work properly. Nice try there though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...