OESF Portables Forum
General Forums => General Discussion => Topic started by: Anonymous on May 08, 2004, 03:40:46 pm
-
Hi, Couldnt find this on the forums but having loaded apache and php, I cant work out how to stop it, (started it using ./bin/httpd and works fine) there is no apachectl?
Any help greatly appreciated.
Thanks
Mark
-
Something like killall apached or apache or whatever it is. Issue ps ax to find the process(es).
-
Here\'s a bash script that I uses to start/stop Apache. I put this in /home/QtPalmtop/bin and then attached it to an icon on one of my tabs. It uses the sudo utility to run stuff as root without having to login as root. You\'d need to install that to run the script as is.
I\'m also using Opie-sh to display dialog boxes from the script. Another package you\'d want to install.
#!/bin/bash
#--------------------------------
# Toggle Apache on/off.
# 2003-06-07 - r.l. stoner
#--------------------------------
(
checkit=`ps -ef | grep http | grep -v grep | wc -l`
#echo $checkit
if [ $checkit -ne 0 ]
then
echo "Stopping Apache ..."
sudo killall httpd
opie-sh -m -w -t "Apache Toggled" -M "Apache has been terminated." -g
exit 0
else
echo "Starting Apache ..."
sudo /home/www/bin/httpd
opie-sh -m -I -t "Apache Toggled" -M "Apache has been started." -g
exit 0
fi
) > /tmp/doapach.log
#--- end of script ---#
-
Thanks for your replies, I\'ll have a go with the script.
One other question using phpmyadmin with mysql.
If I login to mysql from another machine I connect to the zaurus web server using its IP address e.g. 192.168.0.x which puts me at the right place on the z. However, from there (main.php) I cant reach any links because it is looking for localhost which is not on my desktop (Mac OS or OSX). Do you know how I get to localhost, or do I need to change user table in mysql with different hostname or add a new user and put the desktop IP there. Sorry this is so confusing (and not strictly z related)!
Best Regards
Mark
slc750, sharp rom
-
Mark,
Apachectl was left out of the apache ipk for some reason, but you can get apachectl from the Zaurus Software Index.
http://killefiz.de/zaurus/showdetail.php?app=341 (http://killefiz.de/zaurus/showdetail.php?app=341)
As for your phpmyadmin problem, why not just install one of the mySQL clients on your PC, and forget about phpmyadmin?
Mike.
-
Mike,
I\'ll download apachectl and try it, thanks.
The phpmyadmin would be nice to solve so I can use a web browser from another machine for editing, admin etc. True, I could use the mysql client though I will still have the same problem connecting. A readup os the mysql manual about setting up remote access will help me, so here goes ;-)
Mark
slc750,sharp rom