You are not logged in.
Pages: 1
I have installed LAMP stack via the CB-Welcome script.
The Apache server works and I get the "It works" page when pointing browser at localhost.
I created a php test by modifying the "It works" index.html and saving it in david/htdocs ast test.html and also as test.php
Then browser to localhost/david/test.html gives....
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
This is PHP test"
; phpinfo(); ?>
Then browser to localhost/david/test.php gives...
Server error
The website encountered an error while retrieving http://localhost/david/test.php. It may be down for maintenance or configured incorrectly.
Clearly it is not down but may well be configured incorrectly. Any suggestions or advice?
Thanks, David
Last edited by dbvolvox (2012-01-12 23:08:11)
Offline
Offline
Sorry Awebb but I cannot see anything in this wiki that helps:(
Last edited by dbvolvox (2012-01-09 22:51:40)
Offline
It's more like a checklist.
( ) Are all the packages installed, as discribed in the article?
( ) Yes? Are they? Those too? php5 php5-mysql libapache2-mod-php5?
If yes, please use the pastebin and show us your config files (for apache and so on).
I'm so meta, even this acronym
Offline
Yes, all packages are installed. The config files are the defaults loaded during cb-welcome, I haven't changed any. Phpmyadmin will not load either, i.e. localhost/phpmyadmin gives broken link error.
Offline
here's what i did: http://crunchbanglinux.org/forums/post/172739/#p172739
this worked for me immediately. did you do those exact steps (including the symlink-stuff?). and do you have the htdocs-dir?
Offline
here's what i did: http://crunchbanglinux.org/forums/post/172739/#p172739
this worked for me immediately. did you do those exact steps (including the symlink-stuff?). and do you have the htdocs-dir?
I was following that advice! So expected it to work! Yes I did the symlink and yes I have the htdocs directory and Apache runs the html files saved there but not the php ones.
Offline
have you tried to restart Apache? or check whether it is really running?
html-pages show in your browser anyway, with or without Apache. you just need it for the PHP. so it might as well not be running and you wouldn't know, right?
as per the other post in the linked thread:
sudo apache2ctl startOffline
have you tried to restart Apache? or check whether it is really running?
html-pages show in your browser anyway, with or without Apache. you just need it for the PHP. so it might as well not be running and you wouldn't know, right?as per the other post in the linked thread:
sudo apache2ctl start
Yes and I get 'httpd (pid 2747) already running'
Offline
well, ok, in that case i don't know what to do next. at least now we know all that isn't where the problem is 
Last edited by rhowaldt (2012-01-10 15:42:13)
Offline
increase error reporting and check ur logs. then plz copy/paste it here. it might be helpfull
to see what exactly is happenig when u try to locate the file.
anyway what exactly u want to do with LAMP ? if u let us know what this is all about
we might provide another more simple solution.
mine is to remove all php, phpmyadmin, apache and lamp related stuff, make
autoremove as well and the do a clean install of all the packages by using the
command below:
sudo apt-get install mysql-server mysql-client apache2 apache2-doc php5 php5-mysql libapache2-mod-php5 phpmyadminalso are u sure the permissions and all the simple stuff that might cause problems are
eliminated?
"I do not fear computers. I fear the lack of them."
Isaac Asimov
Offline
anyway what exactly u want to do with LAMP ? if u let us know what this is all about
we might provide another more simple solution.also are u sure the permissions and all the simple stuff that might cause problems are
eliminated?
I just wanted a simple development web server set up so that I could learn php programming, but seem to have stumbled at the first hurdle.
I will go through a re-install tomorrow but in answer to your question about permissions and simple stuff, no I am not sure!
Offline
If you just want to learn php, why not directly invoke php on the php file like this:
php5 /path/to/test/php.phpThat's what I do to test my scripts and stuff.
Check out Musik - an easy-to-use text-to-music converter!
Join SpiderOak using this link and get an extra 1 GB free: https://spideroak.com/download/referral … 660e787ff1
Offline
^ what? you can do that? damn! i love linux 
Offline
is possible with chaanakya's way but i rly think is better to learn and setup ur server
correct from now bacause in some months or at least when u became more advanced
in php u might want to have a production enviroment for ur projects or clients who knows 
"I do not fear computers. I fear the lack of them."
Isaac Asimov
Offline
Chaanakya's Way (a great Proustian feel don't you think) has opened the door and enabled me to debug the script- would you believe my very first php tag was wrong! grrrr I had <?php> curse that pesky >.
I do get an error report that php can't find curl.so but I am assuming I don't need it.
Only issue I now have is how to start PhpMyAdmin?
Offline
are u sure phpmyadmin is installed??? check on synaptic if it is, if is not just install it...
i am not 100% but i think choosing to install apache during installation does not
install phpmyadmin. (might be wrong, dont rly remember but plz check out if is installed).
"I do not fear computers. I fear the lack of them."
Isaac Asimov
Offline
I have got it to run by copying the phpmyadmin folder from /usr/share to /htdocs but setup will not work properly without a writable config folder. So far I haven't been able to find the right location for this?
Offline
phpmyadmin doens't run from w/in htdocs
I don't have phpmyadmin yet on #!, but when I set lammp up in ubuntu it had created a lampp directory in /opt and phpmyadmin was in there along with htdocs
try putting it in /var/www
Offline
It shows in var/www because I put it in htdocs.
Offline
I installed the lampp configuration thru the install scripts. I have phpmyadmin by default.
it is in the /etc directory.
now, to get it to 'work'...
open up your apache2.conf file -> /etc/apache2/apache2.conf
add in this line at the end
Include /etc/phpmyadmin/apache2.confthen restart apache
sudo /etc/init.d/apache2 restartthen you will find it by using
localhost/phpmyadminOffline
Thank you dkeg that worked.(except for some reason /etc/phpmyadmin/apache2.conf has lost its 2!)
Thank you all for your helpful suggestions. I now have working apache, php5, phpmyadmin, mysql.
No doubt I will be back when I get into the php learning.
Offline
Pages: 1
Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.