The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

HELP php can't connect to mysql anymore

Discussion in 'General Discussion' started by jamesbond, Mar 7, 2003.

  1. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I just ran easyapache , everything seemed to be working fine, but then I noticed php scripts couldn't connect to mysql anymore.

    The strange thing is phpMyAdmin in Cpanel is still working.


    Warning: mysql_connect() [function.mysql-connect]: Access denied for user: 'name@localhost' (Using password: NO) in /home/name/public_html/file.php on line 141


    This is my php config file:
    './configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-xml' '--enable-bcmath' '--enable-calendar' '--with-curl' '--with-swf=/usr/local/flash' '--enable-ftp' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-png-dir=/usr' '--with-xpm-dir=/usr/X11R6' '--with-imap' '--with-imap-ssl' '--with-kerberos' '--enable-mbstring' '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-mcrypt' '--with-ming=../ming-0.2a' '--enable-magic-quotes' '--with-mysql' '--with-pear' '--enable-xslt' '--with-xslt-sablot' '--enable-safe-mode' '--enable-sockets' '--enable-track-vars' '--with-ttf' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-versioning' '--with-zlib'
     
  2. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Does anyone know how I can contact CPanel support by phone?
     
  3. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    Phew! I fixed it.

    What happened was when I installed Zend Optimizer it said 'missing php.ini' and when I looked it was indeed disappeared, so apparently Zend deleted it in the install process somehow, because I know it was there before I installed Zend.
    Very strange...

    I didn't make a copy of php.ini so I had to replace it with an older version which caused the problems with mysql.

    I then tried another php.ini and it started working again.

    For future reference, does anyone what section of php.ini can cause the problem I had (not being able to connect to mysql)?
     
Loading...

Share This Page