Jump to content

A Problem displaying PHP files


Recommended Posts

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!
Link to comment
https://forums.phpfreaks.com/topic/33835-a-problem-displaying-php-files/
Share on other sites

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!
have you set-up the [size=4][tt]extension_dir[/tt][/size] directive in the php.ini

Also turn on the [size=4][tt]display_startup_errors[/tt][/size] too in the php.ini

Also it is better to add the PHP folder to the Windows PATH and keep all PHP files in one location - the PHP folder.
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.
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\logs

It may be Apache's configuration that may be the problem. Rather than loading PHP as CGI load it as an Apache module instead.
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 down
unable to open logs


apache displays this error and then shuts down

Archived

This topic is now archived and is closed to further replies.

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