Drew_13 Posted January 12, 2007 Share Posted January 12, 2007 I have set up PHP 5.2 and Apache 2.0 on my comp, as localhost. I set up my httpd.conf file in Apache to point to a folder for php files. I added this folder to my php.ini file. Basically when I go to http://localhost my browser still displays the contents of my Apache2/htdocs file. There is one php file in there, however it is trying to open as a Microsoft PictureIt! file. When I load http://localhost it says that Apache 2.0 and PHP 5.2 are running properly. i have been through two walkthroughs now on how to make this work neither have provided proper set up steps. Any help would be greatly apprectiated! Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/ Share on other sites More sharing options...
Draicone Posted January 12, 2007 Share Posted January 12, 2007 Have you used an AddType in your httpd.conf to map .php files to php.exe? And you have to put files in your htdocs directory unless you use a virtual host in httpd.conf. Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-158779 Share on other sites More sharing options...
Drew_13 Posted January 12, 2007 Author Share Posted January 12, 2007 thanks for the help, this is all i added under addtype:ScriptAlias /php/ "c:/php/"AddType application/x-httpd-php .php .php5Action application/x-httpd-php "/php/php-cgi.exe"SetEnv PHPRC "C:/php" Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-158790 Share on other sites More sharing options...
Drew_13 Posted January 12, 2007 Author Share Posted January 12, 2007 This did not solve my problem . . . Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-159351 Share on other sites More sharing options...
Draicone Posted January 13, 2007 Share Posted January 13, 2007 [code]Action application/x-httpd-php "/php/php-cgi.exe"[/code]Try setting that to C:/php/php-cgi.exe and, if possible, don't use a ScriptAlias. Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-159885 Share on other sites More sharing options...
Drew_13 Posted January 13, 2007 Author Share Posted January 13, 2007 problem solved, thanks alot ! Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-160081 Share on other sites More sharing options...
Drew_13 Posted January 14, 2007 Author Share Posted January 14, 2007 and yea now mysql is giving me trouble. i really am i newbie . .. . i installed mysql and copied libmysql.dll from my php folder to system32. then i removed the ";" from extension=php_mysql.dll, and extension=php_mbstring.dll in my php.ini file. and now my apache wont restart . . . does anyone know what i have missed? thanks! Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-160208 Share on other sites More sharing options...
wildteen88 Posted January 14, 2007 Share Posted January 14, 2007 have you set-up the [size=4][tt]extension_dir[/tt][/size] directive in the php.iniAlso turn on the [size=4][tt]display_startup_errors[/tt][/size] too in the php.iniAlso it is better to add the PHP folder to the Windows PATH and keep all PHP files in one location - the PHP folder. Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-160427 Share on other sites More sharing options...
Drew_13 Posted January 15, 2007 Author Share Posted January 15, 2007 how should i set up my extension_dir? right now it points to my PHP/ext Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-160836 Share on other sites More sharing options...
wildteen88 Posted January 15, 2007 Share Posted January 15, 2007 The extension_dir should be set the location of PHP's extensions folder. FOr example say you have PHP installed the root of your hard drive [nobbc](C:\)[/nobbc]: in a folder called PHP (C:\PHP) then the extension_dir should be set to "C:\PHP\ext"WHen you've set the extension_dir save the php.ini and restart Apache. Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-161365 Share on other sites More sharing options...
Drew_13 Posted January 17, 2007 Author Share Posted January 17, 2007 my extension_dir is correct and apache will still not restart Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-162871 Share on other sites More sharing options...
wildteen88 Posted January 17, 2007 Share Posted January 17, 2007 Look in Apaches error log, should be in the logs folder with in the root of Apache's installation folder, eg C:\Program Files\Apache Group\Apaches\logsIt may be Apache's configuration that may be the problem. Rather than loading PHP as CGI load it as an Apache module instead. Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-163025 Share on other sites More sharing options...
Drew_13 Posted January 18, 2007 Author Share Posted January 18, 2007 i am getting this error: <OS 10048>Only one usage of each socket address <protocol/network address/port> is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting downunable to open logsapache displays this error and then shuts down Quote Link to comment https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/#findComment-163886 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.