Apache 2.0 and PHP5 on WindowsXP Problems

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Apache 2.0 and PHP5 on WindowsXP Problems

Post by MrPotatoes »

i'm trying to install PHP5 with Apache 2.0 together on WinXP and i'm having some difficulties. i'm doing PHP as a module this way i can eventually learn to compile and run PHP as well as do things to it. but i'm hitting a road block.

this is the error message that i've got:

Image

i know it's there because i've checked and double checked plenty of times. i've even moved it to the C:/ directory and it couldn't find it.

these are my .cof and .ini directives:

httpd.conf (amp/bin witht he httpd.exe)

Code: Select all

# For PHP 5 do something like this:
LoadModule php5_module "C:/Program Files/AMP/php/php5apache2.dll"
#AddType application/x-httpd-php .php .box

# configure the path to php.ini
#PHPIniDir "C:/program Files/AMP/php/"

DocumentRoot "C:/Program Files/AMP/test/"
<Directory "C:/Program Files/AMP/test">
this is in the php.ini in the same folder as the httpd.exe

Code: Select all

doc_root = "C:/Program Files/AMP/test"
extension_dir = "C:/Program Files/AMP/php/ext"

now i want to load this as a module and i've got 2 php.ini's (one is in the httpd.exe folder and the other with PHP itself cuz i was told to keep it there). secondly i have the PHP folder within AMP folder.

this is the folder layout incase people are confused:

program files
-------- amp
-------- bin
---------------- httpd.exe
---------------- php.ini
-------- php
---------------- ini


thanx for your help
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

apache 2.2 sorry
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

php5apache2.dll is not built for Apache 2.2, but 2.0 last I checked.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

ok, that's what i thought. i've changed from apache 2.2 to 2.0.5 something. i'm going to try it again and see if i can get it to work

thank you so far
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

ok. i don't know what information you might need here but i've got everything installed and PHP and Apache are working perfectly and i know where and how to edit certain thins. well, as best a n00b can ;)

ok, here's the deal. MySQL is setup as a server and works very well i might add. i can go in through the cmd_line and i can query and everything. i can enter a password and do all those great things.

problem is that i cannot seem to get PHP to work with it. to be exact, it doesn't do anything. it'll read all the lines that it can and then on MySQL lines it just doesn't do anything.

the worst part is that it doesn't seem to even read the php.ini.

i've removed and restarted the webserver (apache) and it doesn't seem to need to read it and still does PHP just fine.

i want to solve these problems (there is more i need to do) so if anyone knows what's going wrong i'd seriously appreciate all your help :D
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

php.ini isn't required to start PHP, but configure it beyond the defaults. Since you are running PHP 5, you have to enable the MySQL extension (as it's not built into PHP anymore.) Add or uncomment the following line in your extensions section of the php.ini.

Code: Select all

extension=php_mysql.dll
You may need to set the PHPIniDir directive in the httpd.conf before PHP finds your php.ini, although I don't recall having to use the directive if it was located in the same directory as the php5apache2.dll.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

i did uncomment it. but enable it?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Running a phpinfo() page may tell you a few things too. Specifically if PHP found your php.ini or not (by showing where it found it.) If it says \Windows and you don't have one there, it didn't find one and went with its defaults.
User avatar
MrPotatoes
Forum Regular
Posts: 617
Joined: Wed May 24, 2006 6:42 am

Post by MrPotatoes »

man, i really want to say that i'm a professional but things liket his <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> me off

i know what was wrong and i have it working just fine

i forgot to do this:

extension_dir = "C:/Program Files/amp/Apache2/php/ext"

*ashamed*


thanx alot for the help man :thumbup:
Post Reply