Gier NL Posted January 26, 2011 Share Posted January 26, 2011 Hey guys! It's been a while since i worked with PHP and even longer since installing it for test purposes in my school days. Here's my problem: I want to test a PHP script locally. I installed XAMPP(Windows XP), default settings. 127.0.0.1 is localhost, loading the page gives me the 'XAMPP for Windows' control pannel. XAMPP status: MySQL database ACTIVATED PHP ACTIVATED Perl with mod_perl ACTIVATED Apache::ASP ACTIVATED HTTPS (SSL) ACTIVATED Common Gateway Interface (CGI) ACTIVATED Server Side Includes (SSI) ACTIVATED IPv4 ACTIVATED IPv6 ACTIVATED SMTP Service DEACTIVATED FTP Service ACTIVATED PHP version: 5.3.1 The test file: phptest.php Location: C:\Xampp\htdocs Content: <? phpinfo(); ?> Opening the file from explorer will make IE try and download the file Typing localhost/phptest.php in IE displays an empty webpage(thus the file is found on localhost). I'm a programmer so i'm not used to setting up a server, the test enviroments i've worked in thusfar have been set up by a network specialist so i have no experience in that since my school years(over 6 years ago). All i know is that the problem is probably in the Appache settings handling .PHP files, or inside the PHP settings but i'm losing myself in the giant .ini files and can't find a solid solution online Could somone help me on this, i'm getting worked up with frustration... Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 26, 2011 Share Posted January 26, 2011 Use full opening php tags (always) - <?php phpinfo(); ?> Quote Link to comment Share on other sites More sharing options...
Gier NL Posted January 26, 2011 Author Share Posted January 26, 2011 Thanks, it works! *facepalm* for not noticing that... Quote Link to comment Share on other sites More sharing options...
Gier NL Posted January 26, 2011 Author Share Posted January 26, 2011 Now i'm having trouble with integrated PHP in my HTML... I eddited the httpd(?) file in some xampp directory(can't find the instructions anymore to copy/paste, had to remove a # somewhere in some file i can't remember, but it was fine since the setting didn't have the # in the first place) The i created a .htaccess file(C:\Xampp\htdocs) and added(just) these lines: RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html This should fix my problem according to the totorial, but it doesn't work, i restarted before testing. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.