Jump to content

PHP Development and Debugging [solved]


Recommended Posts

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]

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

(_)=='=~

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...