Anyone know how to set this thing up?
Post Reply
Quote
Re: Anyone know how to set this thing up?
Posted by matt on Tue Jan 27th at 4:45pm 2004


After formating my PC about 6 monthes ago, I now want to re-install my PHP environment. What really is blowing my mind is that it should be working, but isn't. I've got Apache installed in C:\Apache, and the PHP parser and files under C:\PHP so the parser is at C:\PHP\php.exe, and have tweaked the mime types in httpd.conf so that they point to the parser:

AddType application/x-httpd-php .phtml .php .php3 .php4
AddType application/x-httpd-php-source .phps

ScriptAlias /PHP/ "C:"
Action application/x-httpd-php "/PHP/php.exe"

I make the test page with <?php phpinfo(); ?> but all that does it give the file as text. So, I'm guessing that my mime types arn't set up right. Any help would be greatly appreachiated.

Matt

[addsig]




Quote
Re: Anyone know how to set this thing up?
Posted by scary_jeff on Tue Jan 27th at 5:03pm 2004


Does it work if you put the php directory in the apache directory and not bother with the path alias?



Quote
Re: Anyone know how to set this thing up?
Posted by matt on Tue Jan 27th at 5:54pm 2004


no, its has to be set up this way to my knowledge. [addsig]



Quote
Re: Anyone know how to set this thing up?
Posted by Leperous on Tue Jan 27th at 6:18pm 2004


Well, I have in mine the same things but with a small difference:

ScriptAlias /php/ "c:/apache/php/"
Action application/x-httpd-php "/php/php.exe"

Bear in mind that you need to copy the php.ini file to your windows directory, be running Apache and visiting the php pages under http://localhost





Quote
Re: Anyone know how to set this thing up?
Posted by matt on Tue Jan 27th at 6:52pm 2004


yup, I've got appache working fine. I'll try what you said lep. [addsig]



Quote
Re: Anyone know how to set this thing up?
Posted by matt on Tue Jan 27th at 7:34pm 2004


did what you said but its still not working. [addsig]



Quote
Re: Anyone know how to set this thing up?
Posted by matt on Tue Jan 27th at 9:08pm 2004


AAAARRRRRGGGHHHH

OK i've reinstalled the files in C:\Apache\php\php-4.3.3RC4-Win32\ and have set the mimes as follows:


AddType application/x-httpd-php .phtml .php .php3 .php4
AddType application/x-httpd-source .phps

ScriptAlias /php/ "c:/apache/php/php-4.3.3RC4-Win32/"
Action application/x-httpd-php "php/php-4.3.3RC4-Win32/php.exe"

And in c:\Windows\php.ini I've got doc_root pointing to C:\Apache\htdocs. I've restarted apache about a million times trying to get this thing to work, i'm still using my phptest page to see if it works, but of no avail.

Help!

[addsig]




Quote
Re: Anyone know how to set this thing up?
Posted by 7dk2h4md720ih on Tue Jan 27th at 9:46pm 2004


*looks on with interest*

I got apache and php working on my old computer, but It wouldn't work on XP. Don't know if it was XP or something I wasn't doing right though. [addsig]




Quote
Re: Anyone know how to set this thing up?
Posted by scary_jeff on Tue Jan 27th at 10:01pm 2004


Just give up trying to do it a clever way where you you understand what's going on and get phptriad or some other php installer That's what I did.



Quote
Re: Anyone know how to set this thing up?
Posted by Leperous on Tue Jan 27th at 11:23pm 2004


Oh, and you have to have this in your php.ini:
extension_dir = "c:\apache\php"





Quote
Re: Anyone know how to set this thing up?
Posted by matt on Wed Jan 28th at 7:34pm 2004


I did a fresh install and i still can't get it working. What the heck am i doing wrong? Could someone please explain in what respect I should be putting the file paths for the Script Alias and Action s**t.

I'm on the edge of sanity here.

[addsig]




Quote
Re: Anyone know how to set this thing up?
Posted by Leperous on Wed Jan 28th at 8:17pm 2004


Uninstall, then reinstall from fresh, and RTFM on how to set PHP up!

Oh and double check you're trying to view a .PHP file under localhost, the number of times I've thought something was php only to find out I had file extensions hidden and was playing around with .php.txt files...





Quote
Re: Anyone know how to set this thing up?
Posted by DesPlesda on Thu Jan 29th at 2:52am 2004


<troll>

If you really want a good Apache/MySQL/PHP setup, go and get a really old box, stick a copy of GNU/Linux on it (I like Slackware) and hook it up to your local network. Means that not only do you have a decent test box, you also have a neat little centralised file/admin/whatever unit on your network.

</troll>






Post Reply