I think de-installing mySQL and PHP might be a bit pre-mature, at least at
this point.

(This advise is from years of experience trouble shooting this stuff on my
different systems. take it as it is given, freely and with a helpful hand.
If anyone has issues with this procedure, please advise me with constructive
criticism. I am always looking for a better way)

First, check some things out as individuals...

1) can you connect to mySQL via the mySQL manager?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on

NOTE: I find unstalling and reinstalling a LOT faster than trying to track
down issues on windows machines. Now, this is only a good idea IF you don't
have any real databases running. IF you do, then you need to think hard
about this and dedcide which would be easier; reinstalling and setting up
your databses with the new installation or trying to find the problem.

2) does your Apache serve pages?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on

At this point, may I suggest my configuration.

[NOTE: actually, delay this point until you verify PHP works]

I added a 'conf.d' directory as a sibling to conf directory in my Apache
directory. In there I have all my virtual domains defined (this may not
apply to you.) BUT, I also have my PHP configuration definitions. I don't
place this info in the main apache conf file. To much trouble editing that
thing. I've placed my PHP.conf file at the end of this message. (And yes!
I'm on a Win32 box! I'll leave it to you to see why I don't need a Volume
letter! HINT: Apache, mySQL and PHP are NOT in C:\program Files\...)

3) does your PHP work from the command line?

- If so, then you are good there.

- If not, then un-install and reinstall.

- Make sure this works before you go on

NOTE: To install, my I suggest a new procedure. I know this works on NT and
2k, but I'm not sure about XP (I hope you'll let me know!)

I have a virtual volume (I use G) labeled UNIX (the label is immaterial to
the app, it's for me). On that volume I have etc. home, usr and tmp, just
like my UNIX box. You don't need a virtual volume for this to work, just
make these directories on any working volume you wish to use. I do this
becasue I'm lazy about backups. With my method, I just backup the entire
volume and all my apps and files are ready to be but back if (or I shoudl
say when) I have to re-install windows.

I have PHP installed at etc/php. I did this by hand. I did not use the

I dropped ALL the DLLs that the install manual said to place in the SYSTEM
directory into that etc/php directory. Then I copied extensions and sapi in
there as well. Then I rename and copied the PHP.exe that was in the CLI
directory to php-cli.exe and placed it in the etc/php directory. This is the
command line executable.

In the php.ini I only had to change 3 lines...


; Paths and Directories ;


include_path = ".;G:\etc\php\extensions"

extension_dir = "G:\etc\php\extensions"

and then uncomment this line...


Once this is all done, you will need to modify your PATH environmental
variable. I have no idea where that is in XP, but you can find it.

At the end of the existing string add...

<current PATH string>;X:\path\to\your\php

Now, X is your volume letter and the complete path to the php directory.

Now, from a command prompt (DOS box) you should be able to key in php and
key in any legal PHP command and get the proper response. And this is from
ANY directory on your system.

Now you can read the Apache conf directions above.

Once that is done, create a test.php file and place it in your apache
default directory and key this in to your browser.

If all is right, you should get back your test page!

If you have any questions, drop me a line.

Hope this helps and not confuse.



# php.conf

# Adding PHP integration


# PHP is an HTML-embedded scripting language which attempts to make it

# easy for developers to write dynamically generated webpages.


# Un*x version

# LoadModule php4_module modules/libphp4.so

# Windows Win32 version

LoadFile "/etc/php/gnu_gettext.dll"

LoadModule php4_module "/etc/php/sapi/php4apache2.dll"

Action application/x-httpd-php "/etc/php/php.exe"

ScriptAlias /php/ "/etc/php/"

AddType application/x-httpd-php .php .phtml

AddType application/x-httpd-php-source .phps


# Cause the PHP interpreter handle files with a .php extension.


<Files *.php>

SetOutputFilter PHP

SetInputFilter PHP

LimitRequestBody 524288



# Add index.php to the list of files that will be served as directory

# indexes.


DirectoryIndex index.php

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to