HELP! Mysql / PHP won't run ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Pjotr Wedersteers

    #1

    HELP! Mysql / PHP won't run ?

    I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live)
    I also have installed MySQL 4.0.20

    Modiefied php.ini, changed the extensions_dir to 10 different things in a
    row, none helped.
    copied all the dlls all over the place, no dice.

    Uncommented the extension = php_mysql.dll and got an error starting apache.
    Commented it out again, no error ,but still the undefined function
    mysql_connect in PHP

    The script runs perfectly in my PHPEdit IDE environment, so that and MySQL
    isn't the issue (the console works too).
    checked google, found some reports of similar stuff, but none of the
    suggestions seems to be applicable.

    HELP, I'm going ape over this.
    TIA
    Pjotr


  • Pjotr Wedersteers

    #2
    Re: HELP! Mysql / PHP won't run ?

    Pjotr Wedersteers wrote:[color=blue]
    > I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live)
    > I also have installed MySQL 4.0.20
    >
    > Modiefied php.ini, changed the extensions_dir to 10 different things
    > in a row, none helped.
    > copied all the dlls all over the place, no dice.
    >
    > Uncommented the extension = php_mysql.dll and got an error starting
    > apache. Commented it out again, no error ,but still the undefined
    > function mysql_connect in PHP
    >
    > The script runs perfectly in my PHPEdit IDE environment, so that and
    > MySQL isn't the issue (the console works too).
    > checked google, found some reports of similar stuff, but none of the
    > suggestions seems to be applicable.
    >
    > HELP, I'm going ape over this.
    > TIA
    > Pjotr[/color]

    For those also busy with this, I already tried all combinations of the
    different versions of libmysql and php_mysql


    Comment

    • Tony Marston

      #3
      Re: HELP! Mysql / PHP won't run ?

      I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had it
      running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 (what fun).

      In the PHP 5 zip file all the php_???.dll files are in the 'ext' folder not
      the 'extensions' folder. There is also no 'dlls' folder as all the files are
      in the main 'php' folder. You must copy file php_mysql.dll into your
      windows/system or windows/system32 folder.

      Remember also to change your Apache httpd.conf file so that the entry

      LoadModule php4_module f:/php4/sapi/php4apache2.dll

      is changed to

      LoadModule php5_module f:/php5/php5apache2.dll

      Hope this helps.

      --
      Tony Marston

      This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




      "Pjotr Wedersteers" <x33159@westert erp.com> wrote in message
      news:411a3e43$0 $34762$e4fe514c @news.xs4all.nl ...[color=blue]
      > Pjotr Wedersteers wrote:[color=green]
      >> I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live)
      >> I also have installed MySQL 4.0.20
      >>
      >> Modiefied php.ini, changed the extensions_dir to 10 different things
      >> in a row, none helped.
      >> copied all the dlls all over the place, no dice.
      >>
      >> Uncommented the extension = php_mysql.dll and got an error starting
      >> apache. Commented it out again, no error ,but still the undefined
      >> function mysql_connect in PHP
      >>
      >> The script runs perfectly in my PHPEdit IDE environment, so that and
      >> MySQL isn't the issue (the console works too).
      >> checked google, found some reports of similar stuff, but none of the
      >> suggestions seems to be applicable.
      >>
      >> HELP, I'm going ape over this.
      >> TIA
      >> Pjotr[/color]
      >
      > For those also busy with this, I already tried all combinations of the
      > different versions of libmysql and php_mysql
      >
      >[/color]


      Comment

      • Tony Marston

        #4
        Re: HELP! Mysql / PHP won't run ?

        Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll' is the
        file that needs to be copied to the windows/system folder.

        I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had it
        running with MySQL 4.0.20 but I have recently upgraded to 4.1.3 (what fun).

        In the PHP 5 zip file all the php_???.dll files are in the 'ext' folder not
        the 'extensions' folder. There is also no 'dlls' folder as all the files are
        in the main 'php' folder. You must copy file libmysql.dll into your
        windows/system or windows/system32 folder.

        Remember also to change your Apache httpd.conf file so that the entry

        LoadModule php4_module f:/php4/sapi/php4apache2.dll

        is changed to

        LoadModule php5_module f:/php5/php5apache2.dll

        Hope this helps.

        --
        Tony Marston

        This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




        "Pjotr Wedersteers" <x33159@westert erp.com> wrote in message
        news:411a3e43$0 $34762$e4fe514c @news.xs4all.nl ...[color=blue]
        > Pjotr Wedersteers wrote:[color=green]
        >> I have Apache 2.0.50 and PHP5 on a Xp test machine (not going live)
        >> I also have installed MySQL 4.0.20
        >>
        >> Modiefied php.ini, changed the extensions_dir to 10 different things
        >> in a row, none helped.
        >> copied all the dlls all over the place, no dice.
        >>
        >> Uncommented the extension = php_mysql.dll and got an error starting
        >> apache. Commented it out again, no error ,but still the undefined
        >> function mysql_connect in PHP
        >>
        >> The script runs perfectly in my PHPEdit IDE environment, so that and
        >> MySQL isn't the issue (the console works too).
        >> checked google, found some reports of similar stuff, but none of the
        >> suggestions seems to be applicable.
        >>
        >> HELP, I'm going ape over this.
        >> TIA
        >> Pjotr[/color]
        >
        > For those also busy with this, I already tried all combinations of the
        > different versions of libmysql and php_mysql
        >
        >[/color]



        Comment

        • Pjotr Wedersteers

          #5
          Re: HELP! Mysql / PHP won't run ?

          Tony Marston wrote:[color=blue]
          > Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll'
          > is the file that needs to be copied to the windows/system folder.
          >
          > I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had
          > it running with MySQL 4.0.20 but I have recently upgraded to 4.1.3
          > (what fun).
          >
          > In the PHP 5 zip file all the php_???.dll files are in the 'ext'
          > folder not the 'extensions' folder. There is also no 'dlls' folder as
          > all the files are in the main 'php' folder. You must copy file
          > libmysql.dll into your windows/system or windows/system32 folder.
          >
          > Remember also to change your Apache httpd.conf file so that the entry
          >
          > LoadModule php4_module f:/php4/sapi/php4apache2.dll
          >
          > is changed to
          >
          > LoadModule php5_module f:/php5/php5apache2.dll
          >
          > Hope this helps.
          >[/color]
          Tony, thanks for sharing your experience, showing it can work. So something
          may be wrong here I have overlooked.
          In all my anxious and haphazard attacks of the problem I may have copied the
          wrong versions of some libs in directories the server checks before looking
          in c:\windows\syst em for them.
          I have temporarily switched back to PHP4.3.8, removed all the potential
          kill-joys and aim to redo the entire install of PHP 5 again later today.
          Hopefully that will produce good results. If not I'm sticking with 4.3.8 for
          now.
          The other suggestions you made were not the problem. I am aware of the \ext
          directory in PHP5 and it ran like a charm with apache alreay apart from
          mysql support.

          I'll see if I can get it all back in order.
          Later!
          Pjotr



          Comment

          • Tony Marston

            #6
            Re: HELP! Mysql / PHP won't run ?

            Another problem I had with PHP 5 and MySQL support was that I had copies of
            the files in the php/dlls folder in both my windows/system AND
            windows/system32 folder, so when I deleted the ones out of windows/system it
            was the ones in windows/system32 that were giving me trouble. I have found
            with PHP 5 that the only files that need to be moved out of the php folder
            into windows/system (or windows/system32) are libmysql.dll and libmysqli.dll

            Note that you may have to close down MysqlAdmin.exe when you attempt to
            replace libmysql.dll in windows/system otherwise you may hit a "file still
            in use" error.

            HTH

            --
            Tony Marston

            This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




            "Pjotr Wedersteers" <x33159@westert erp.com> wrote in message
            news:411a5cdf$0 $48933$e4fe514c @news.xs4all.nl ...[color=blue]
            > Tony Marston wrote:[color=green]
            >> Whoops. I should have said 'libmysql.dll' instead of 'php_mysql.dll'
            >> is the file that needs to be copied to the windows/system folder.
            >>
            >> I am also running Apache 2.0.50 and PHP 5 on a Windows XP box. I had
            >> it running with MySQL 4.0.20 but I have recently upgraded to 4.1.3
            >> (what fun).
            >>
            >> In the PHP 5 zip file all the php_???.dll files are in the 'ext'
            >> folder not the 'extensions' folder. There is also no 'dlls' folder as
            >> all the files are in the main 'php' folder. You must copy file
            >> libmysql.dll into your windows/system or windows/system32 folder.
            >>
            >> Remember also to change your Apache httpd.conf file so that the entry
            >>
            >> LoadModule php4_module f:/php4/sapi/php4apache2.dll
            >>
            >> is changed to
            >>
            >> LoadModule php5_module f:/php5/php5apache2.dll
            >>
            >> Hope this helps.
            >>[/color]
            > Tony, thanks for sharing your experience, showing it can work. So
            > something
            > may be wrong here I have overlooked.
            > In all my anxious and haphazard attacks of the problem I may have copied
            > the
            > wrong versions of some libs in directories the server checks before
            > looking
            > in c:\windows\syst em for them.
            > I have temporarily switched back to PHP4.3.8, removed all the potential
            > kill-joys and aim to redo the entire install of PHP 5 again later today.
            > Hopefully that will produce good results. If not I'm sticking with 4.3.8
            > for
            > now.
            > The other suggestions you made were not the problem. I am aware of the
            > \ext
            > directory in PHP5 and it ran like a charm with apache alreay apart from
            > mysql support.
            >
            > I'll see if I can get it all back in order.
            > Later!
            > Pjotr
            >
            >
            >[/color]


            Comment

            Working...