| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 84751 | 2007-11-16 22:40:00 | Problem Viewing Local PHP files | CaptinMoor (8392) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 612168 | 2007-11-16 22:40:00 | Hi there guys and girls, well I have a bit of a problem . When trying to view . PHP files that I have hosted on my local server I cannot view them . Both Firefox and IE try to download these files . When I do in fact download them and then view by selecting the application (Firefox or IE) the browser window opens and then just keeps opening more and more and more pages . I have had a pretty decent search on google but have not found anything that can resolve this problem . I think that this is more than likely a configuration problem with the Ubuntu Server that I am running . However I cannot be sure . Here is the version of Apache2 that I am running Server version: Apache/2 . 0 . 55 Server built: Aug 16 2007 22:27:29 Server's Module Magic Number: 20020903:11 Architecture: 32-bit Server compiled with . . . . -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D HTTPD_ROOT="" -D SUEXEC_BIN="/usr/lib/apache2/suexec2" -D DEFAULT_PIDLOG="/var/run/apache2 . pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="/var/run/apache2/accept . lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/apache2/mime . types" -D SERVER_CONFIG_FILE="/etc/apache2/apache2 . conf" Also you can try viewing the PHP pages for yourself by visiting my server . This is located at 58 . 28 . 158 . 178 . The main files that I am having problems with are: mydnsconfig/ 17-Nov-2007 11:12 - php/ 17-Nov-2007 10:50 - phpmyadmin/ 08-May-2006 23:57 - Any help would be greatly appreciated . Cheers Captin ;) |
CaptinMoor (8392) | ||
| 612169 | 2007-11-16 23:04:00 | This may sound like a silly question but have you got PHP installed on your web server?? (if you haven’t you will need to download php from http://nz.php.net/ & install it) | stu161204 (123) | ||
| 612170 | 2007-11-16 23:45:00 | This may sound like a silly question but have you got PHP installed on your web server?? (if you havent you will need to download php from http://nz.php.net/ & install it) There is never a silly question. Only silly answers. Anway Yeah, I have got it installed. I installed it when I built the server. However had to go and make sure it was all working still though. Good question, any other ideas?? |
CaptinMoor (8392) | ||
| 612171 | 2007-11-17 01:14:00 | Document structure elements? i.e., <!DOCTYPE HTML PUBLIC "-//W3C//DTD... etc That stuff is essential, and tells the browser how the file should be displayed. |
vinref (6194) | ||
| 612172 | 2007-11-18 09:36:00 | Your web browser will decide what to do with a document based on the MIME type sent back by the server. If you are getting the download box then the server is probably sending the PHP source document as a binary/unknown file (application/octet-stream). Try saving the downloading file - if the saved file is the PHP code then you will need to make the server run them as CGI scripts instead of treating them as ordinary files. | TGoddard (7263) | ||
| 612173 | 2007-11-18 18:11:00 | Probably a dumb question but do you have your addtype or addhandler set for php have a look in your apache httpd.conf is there a handler in there that mentions php? something like AddType application/x-httpd-php .php .phtml I had a similar problem years ago and it was because my PHP wasn't set up correctly, i had to add something to my httpd.conf This thread should help (www.webmasterworld.com) |
Morgenmuffel (187) | ||
| 1 | |||||