Beginner's help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dogblatt
Forum Newbie
Posts: 4
Joined: Mon Oct 06, 2003 6:26 am

Beginner's help

Post by dogblatt »

Hi there folks,

I'd appreciate some help regarding configuring php alongside an Apache server, because I'm getting nowhere fast!

I've installed Apache - http://localhost displays the server info. I've configured the httpd-conf file and added the AddType bits and bobs. I've placed the php.ini file in C:/Windows. I've also created a phpinfo page. However, whenever I try and view this page at http://localhost/phpinfo.php I get two error messages, either:

The requested URL /php/php.exe/phpinfo.php was not found on this server.

or the standard 404 message.

And yes, I've restarted Apache on numerous occasions!

I'm doing something blindingly obvious wrong but can I see it? Can I heck!
Any help would be greatly appreciated.

Thanks a lot,

Dan
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

to which location did you install php and what exactly did you add to httpd.conf?
What about using php as apache module?
dogblatt
Forum Newbie
Posts: 4
Joined: Mon Oct 06, 2003 6:26 am

Post by dogblatt »

Hi there,

I installed PHP at C:/ and added these lines to httpd.conf:

AddType application/x-httpd-php .phtml .php .php3 .php4
AddType application/x-httpd-php-source .phps
ScriptAlias /php/ "c:/php/"
Action application/x-httpd-php "/php/php.exe"

I just can't see what I'm doing wrong......:x

Dan
Cruzado_Mainfrm
Forum Contributor
Posts: 346
Joined: Sun Jun 15, 2003 11:22 pm
Location: Miami, FL

Post by Cruzado_Mainfrm »

maybe u have set the doc_root directive in the php.ini to some other location, the best solution is leave that directive empty, it works for me perfectly that way
dogblatt
Forum Newbie
Posts: 4
Joined: Mon Oct 06, 2003 6:26 am

Post by dogblatt »

I've just checked that and it's empty. I've uninstalled everything and am just reinstalling it and configuring it now. Fingers crossed!

Cheers,

Dan
dogblatt
Forum Newbie
Posts: 4
Joined: Mon Oct 06, 2003 6:26 am

Post by dogblatt »

Sorted!

The PHP parser was in a folder called php 4.2.3.2 (or something like that!), and I'd configured it to look in a folder called php. No wonder it couldn't find it! Everything works nicely now.

Ah well, you live and learn. :oops:

Thanks for your help folks,

Dan
Post Reply