Anyone know how to set this thing up?

Anyone know how to set this thing up?

Re: Anyone know how to set this thing up? Posted by matt on Tue Jan 27th 2004 at 4:45pm
matt
1100 posts
Posted 2004-01-27 4:45pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
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 :smile:
Re: Anyone know how to set this thing up? Posted by scary_jeff on Tue Jan 27th 2004 at 5:03pm
scary_jeff
1614 posts
Posted 2004-01-27 5:03pm
1614 posts 191 snarkmarks Registered: Aug 22nd 2001
Does it work if you put the php directory in the apache directory and not bother with the path alias?
Re: Anyone know how to set this thing up? Posted by matt on Tue Jan 27th 2004 at 5:54pm
matt
1100 posts
Posted 2004-01-27 5:54pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
no, its has to be set up this way to my knowledge.
Re: Anyone know how to set this thing up? Posted by Leperous on Tue Jan 27th 2004 at 6:18pm
Leperous
3382 posts
Posted 2004-01-27 6:18pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
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
Re: Anyone know how to set this thing up? Posted by matt on Tue Jan 27th 2004 at 6:52pm
matt
1100 posts
Posted 2004-01-27 6:52pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
yup, I've got appache working fine. I'll try what you said lep.
Re: Anyone know how to set this thing up? Posted by matt on Tue Jan 27th 2004 at 7:34pm
matt
1100 posts
Posted 2004-01-27 7:34pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
did what you said but its still not working. :cry:
Re: Anyone know how to set this thing up? Posted by matt on Tue Jan 27th 2004 at 9:08pm
matt
1100 posts
Posted 2004-01-27 9:08pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
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. :sad:

Help!
Re: Anyone know how to set this thing up? Posted by 7dk2h4md720ih on Tue Jan 27th 2004 at 9:46pm
7dk2h4md720ih
1976 posts
Posted 2004-01-27 9:46pm
1976 posts 198 snarkmarks Registered: Oct 9th 2001
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.
Re: Anyone know how to set this thing up? Posted by scary_jeff on Tue Jan 27th 2004 at 10:01pm
scary_jeff
1614 posts
Posted 2004-01-27 10:01pm
1614 posts 191 snarkmarks Registered: Aug 22nd 2001
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 :smile: That's what I did.
Re: Anyone know how to set this thing up? Posted by Leperous on Tue Jan 27th 2004 at 11:23pm
Leperous
3382 posts
Posted 2004-01-27 11:23pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
Oh, and you have to have this in your php.ini:
extension_dir = "c:\\apache\\php"
Re: Anyone know how to set this thing up? Posted by matt on Wed Jan 28th 2004 at 7:34pm
matt
1100 posts
Posted 2004-01-28 7:34pm
matt
member
1100 posts 246 snarkmarks Registered: Jun 26th 2002 Occupation: Student! Location: Edinburgh
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.
Re: Anyone know how to set this thing up? Posted by Leperous on Wed Jan 28th 2004 at 8:17pm
Leperous
3382 posts
Posted 2004-01-28 8:17pm
Leperous
Creator of SnarkPit!
member
3382 posts 1635 snarkmarks Registered: Aug 21st 2001 Occupation: Lazy student Location: UK
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...
Re: Anyone know how to set this thing up? Posted by DesPlesda on Thu Jan 29th 2004 at 2:52am
DesPlesda
204 posts
Posted 2004-01-29 2:52am
204 posts 30 snarkmarks Registered: Feb 14th 2002 Occupation: Student Location: Tasmania, Australia
<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>