Jump to content

Recommended Posts

Hi,

 

I had Apache 2 and MySQL4.1 working fine with PHP4 in my XP box. Now that I'd like to switch PHP from 4 to 5.

 

I then set up PHP5 by unzipping php-5.2.4-Win32.zip to C:\ while keeping PHP4 in the same box.

 

To switch from PHP4 to PHP5, I did the followiings.

1. delete php.ini (originally used by PHP4) in C:\WINDOWS

2. include PHP 5 root dir (C:\php-5.2.4-Win32\) in environmental path.

3. make sure php.ini in PHP 5 root dir has the following entries

  extension_dir = "C:\php-5.2.4-Win32\ext"

  extension=php_mysql.dll

  extension=php_mysqli.dll

4. configure httpd.conf to make sure it has the following entries

  LoadModule php5_module "C:/php-5.2.4-Win32/php5apache2_2.dll"

  PHPIniDir "C:/php-5.2.4-Win32/"

 

All dirs look correct.

 

And then I created a simple page <?php phpinfo(); ?> in order to verify PHP5 works with Apache2 and MySQL4.1. However, it shows an blank page.

 

Please note that if I commented out PHPIniDir "C:/php-5.2.4-Win32/" in httpd.conf, I get the attached page in which 2 lines look weired.

Configuration File (php.ini) Path  C:\WINDOWS 

Loaded Configuration File  (none) 

 

Configuration File (php.ini) C:\WINDOWS

Loaded Configuration File (none)

 

Can somebody tell me what I'm missing or got wrong?

 

Thanks,

 

Paul

 

[attachment deleted by admin]

Hi there,

 

I thought it was not necessary to uninstalled PHP4 as originally I set it up via a zip file.

 

I did do the followings to disabled PHP4.

1. remove the php.ini (used by php4) from C:\WINDOWS

2. remove php4 path from environmental variables and replace it with php5 path

3. copy C:\php-5.2.4-Win32\libmysql.dll, php-5.2.4-Win32\php5ts.dll, php-5.2.4-Win32\php_mysql.dll, php-5.2.4-Win32\php_mysqli.dll to C:\WINDOWS\System32

 

Together with what I did to set PHP5 up, I think PHP5 should have been enabled. It looks like it from the phpInfo I attached in my original post. Apparently, it says "PHP Version 5.2.4".

 

The real problem now looks like that I still don't get MySQL support enabled. phpInfo doesn't show the MySQL section at all.

 

What's wrong with my setup?

 

Thanks,

 

Paul

Hi,

 

Yes, PHP5 path is included in system variables.

 

I did the following to double check.

1. My Computer > Properties > Advanced> Environment Variable. In System variables section, PHP5 root is there, while PHP4 root is not included any more.

2. Open a Command Prompt window,

a. without changing directory to PHP5 folder, do

    echo %PATH%

    PHP5 is shown as part of the displayed string.

b. php -v

    PHP shows the version number 5.2.4

 

Based on these, I assume I had the path set up right. phpInfo shows the right PHP5 version too.

 

Thanks,

 

Paul

 

  • 2 weeks later...

Silly question, but you do have a php.ini file under C:\Windows?

 

PHP will continue to work without php.ini, but only with 'default' values.

 

Also, the files you moved which are pre-fixed php_XXX.dll normally reside in the php extension folder (C:\php\ext?).  Try moving these files back, restarting apache and running you php test again :)  I tested this on my server tonight and can confirm that mysql support wasn't loaded after moving these files.  Let me know how you get on.

 

Dave

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.