banjo Posted August 5, 2009 Report Share Posted August 5, 2009 Greetings. I just started using PHP on my web site and I am writing simple scripts for hit counters etc. (Yeah, I know... Welcome to the 20th Century). Unfortunately running them requires uploading my code to the server and then trying to figure out what went wrong remotely with very little error output. The system I am developing on is not a server, so it won't run my PHP directly. It seems crazy to me that I cannot find a way to run a simple PHP script without turning my system into a server. I have Googled the net, and I have searched Mandriva, and most of the suggestions involve "Install Apache" or run XAMPP, which basically installs Apache. Is that really necessary? I don't want to invest the time and energy to build/understand/configure/trouble-shoot/maintain/secure an Apache server on my computer just to see if my PHP script will search a directory or increment a hit counter. It seems like maximum overkill. Surely there is a way to run a PHP script from a CLI or simple GUI without all of the infrastructure of a server. Please? Sorry if this has been asked a gazillion times, but my searches have got me nowhere. This board is the best, and Linux rocks! Banjo (_)=='=~ [moved from Software by spinynorman] Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted August 5, 2009 Report Share Posted August 5, 2009 I've never tried it, but you should just need the php package installed that will give you php support. Normally when I've done anything with php I've had a web server running with php installed. There is php for the cli so it should be enough without requiring apache as well. Quote Link to comment Share on other sites More sharing options...
paul Posted August 5, 2009 Report Share Posted August 5, 2009 get and ide. netbeans is the latest trendy app. or eclipse with php plugin They both have debuggers Quote Link to comment Share on other sites More sharing options...
banjo Posted August 6, 2009 Author Report Share Posted August 6, 2009 Yes! :D I am running Mandriva 2008.1. I opened the package manager and found the package for php cli and installed it. I can now run my simple hit counter from the command line. I tried installing a php cli at work earlier today on my fnWindows platform and when I tried to run php.exe the system just told me that it could not run that application. ??? But here on my Linux it works fine. I looked at netbeans, but it appears that the debugger requires a local or remote server to run the php. I will have to look into that in more detail later. For now, I have enough to work with. Thanks to all for the usual quick solution. Banjo (_)=='=~ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.