Jump to content

Recommended Posts

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...

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.