i've got it going. no avail.
thanks,
ephman
i've got it going. no avail.
thanks,
ephman
PHP is a server-side scripting language. Your browser will not interpret PHP code. It has to be accessed through apache (http://localhost/). GD is a module you can use from php, it doesn't enable browsers or web servers to interpret php code.Code:sudo apt-get install libapache2-mod-php5 sudo a2enmod php5 sudo /etc/init.d/apache2 restart
how are you opening the file?
through http://localhost/ or through file://* ?
if you do it by file:// it is not done by the server and so php is never even triggered.
this might seem a stupid reply but it happens more than you think (me, me, choose me!)
chmod +x file.php
I have php-http , libapache2-mod-php5 , php-pear , php5 , php5-cli , php5-common and php5-imap installed. I think you need the first two for php pages to work.
duh!!!!!! i was accessing it through file:// the crazier i was getting over this simple simple thing the harder and more complicated it was getting for me. and i knew i swear i knew it was such a simple thing. there was really no reason for php to stop working like that. so funny. thank you everybody for your help.
thanks for your bandwidth,
ephman
I ended up following the instructions here: http://dan.drydog.com/apache2php.html and everything seems to be working. I haven't done anything with mysql yet though.
I also needed to apt-get install 'libxml2-dev' and 'libmysqlclient15-dev' for the key ./configure options to work.
i am using ubuntu 8.04 with apache 2.2.8 and php 5.2.5
good luck to the rest of you
FYI, for anyone reading this, I had this same problem. libapache2-mod-php5, apache2, mysql, PEAR, everything (as far as I could tell) that needed to be was installed. Still Apache kept giving me a download dialog for the php files instead of running them. I don't know what was wrong, but I ran your commands and they worked. The
seemed to be what did it. I guess the php module needed to be enabled.Code:sudo a2enmod php5
So thanks!!
hello guys
I thought I should comment since things kind of were up in the air as to the culprit for the errors. I was lead to this post for the same reason everyone else was I guess (my php files were trying to download and save rather then being ran by the server side script interpreter.
One person I noticed said after enabling php their scripts worked but I wonder how many people do what I did and not pay attention to the order in which they install apache and php.
What ends up happening is that installing apache first and then php without restarting apache leaves your php scripts trying to download.
I needed to restart the apache server and the php scripts ran without issue. Thanks to the post with the list of commands I ran them one by one only to be told by the prompt that the packages were already installed but after restarting the apache server tadah! it worked.
By the way this was the command:
Code:sudo /etc/init.d/apache2 restart
What's mod-php?
Bookmarks