Edtheredhead Posted June 15, 2009 Share Posted June 15, 2009 Hi! I'm new to this board & new to programming in PHP. I've recently downloaded XAMPP so that I could learn PHP/MySQL, etc. and according to the XAMPP info, everything is installed correctly. However, when I create a php file (even a very, very simple one), it comes up as an executable file, almost as if it's unzipping. It always gives me an option of Save or Run. I click on Run, than then it comes up again. Any ideas of what I've done wrong? I'd really appreciate your help! Thanks! Ed Link to comment https://forums.phpfreaks.com/topic/162258-php-pages-come-up-as-exe-files/ Share on other sites More sharing options...
ukweb Posted June 15, 2009 Share Posted June 15, 2009 Hi It could be that the PHP file is not running through the webserver, and is instead being opened directly from your HDD. you need to access PHP files through the local web server, usually something like 'http://localhost/myfile.php' instead of opening the file direct from explorer. Link to comment https://forums.phpfreaks.com/topic/162258-php-pages-come-up-as-exe-files/#findComment-856350 Share on other sites More sharing options...
corbin Posted June 15, 2009 Share Posted June 15, 2009 Your server software (Apache?) is most likely misconfigured. Somewhere you should have: LoadModule php5_module "x:/your/path/to/php/php5apache2_2.dll" And AddType application/x-httpd-php .php Then, unless you plan to put your php.ini somewhere in your PATH environmental variable (I add PHP's directory to my PATH, but I don't know if you'll do that or not), you'll need to add: PHPIniDir "/path/to/php/folder/" Link to comment https://forums.phpfreaks.com/topic/162258-php-pages-come-up-as-exe-files/#findComment-856353 Share on other sites More sharing options...
Edtheredhead Posted June 15, 2009 Author Share Posted June 15, 2009 Your server software (Apache?) is most likely misconfigured. Somewhere you should have: LoadModule php5_module "x:/your/path/to/php/php5apache2_2.dll" And AddType application/x-httpd-php .php Then, unless you plan to put your php.ini somewhere in your PATH environmental variable (I add PHP's directory to my PATH, but I don't know if you'll do that or not), you'll need to add: PHPIniDir "/path/to/php/folder/" Okay, not to sound stupid, but I am not a hardware type of guy, where & how do I make these changes? Link to comment https://forums.phpfreaks.com/topic/162258-php-pages-come-up-as-exe-files/#findComment-856401 Share on other sites More sharing options...
PFMaBiSmAd Posted June 15, 2009 Share Posted June 15, 2009 The XAMPP package would have done those for you. What URL are you entering in your browser? And have you restarted your computer after installing XAMPP? Link to comment https://forums.phpfreaks.com/topic/162258-php-pages-come-up-as-exe-files/#findComment-856412 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.