Re: [users@httpd] Starting/Stopping Apache via an API
On 22/09/11 07:34, Tech Newbie wrote: The intent is to create (or find) a generic service management call that will start/stop/getStatus for any given service. For example: startService(String serviceName), stopService(String serviceName)where serviceName maybe Apache2, JBoss, etc. The routines will programmatically start/stop the specified service, preferably via an API instead of exec'ing a shell script. That's why I was wondering if /sbin/service has a companion API. *From:* Jeff Dyke jeff.d...@gmail.com *To:* users@httpd.apache.org; Tech Newbie tec...@yahoo.com *Sent:* Monday, September 19, 2011 1:38 PM *Subject:* Re: [users@httpd] Starting/Stopping Apache via an API On Mon, Sep 19, 2011 at 2:07 PM, Tech Newbie tec...@yahoo.com mailto:tec...@yahoo.com wrote: I am aware of the way to start/stop Apache via apachectl, both locally and remotely via SSH. Is there some generic unix API, perhaps related to /sbin/service, that I can remotely programmatically start Apache without exec'ing apachectl directly? I'm thinking since Apache is already configured in /etc/init.d, is there a unix API that my program can interface with, that say something like: // start Apache via some API service.start(Apache); Without my program actually exec'ing apachectl directly? All apachectl is doing is wrapping around httpd, so you want a wrapper for the wrapper? What is the ultimate intent. There are different interfaces into services (/etc/init.d) on different versions of linux, Ubuntu is different on newer versions then it was on old ones (service apache2 start vs /etc/init.d/apache2 start), though they both work. Since i always compile apache2, i've found it easiest to allow work with apachectl directly, that way the same commands work regards of unix/linux variant. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org mailto:users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org mailto:users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org mailto:users-h...@httpd.apache.org Read the man page for anacron. It might do the trick. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 01/08/11 06:11, Jeroen Geilman wrote: On 2011-07-31 21:23, Rob Stone wrote: Thanks to Richard this has now been SOLVED. Who is Richard ? I don't know who he is, but he replied to my request for assistance with my problem and made a helpful suggestion, which I followed up, and now I have a working development environment on my laptop. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 31/07/11 10:14, Jeroen Geilman wrote: On 2011-07-31 00:54, Rob Stone wrote: Sorry I have created such a discussion around my use of the word include. In future I'll try to be semantically correct. By include I mean lines of code like this that are embedded into the source html. ?php include xyz.php; ? And that's exactly the point - it's not including anything in the HTML file. It parses and executes the PHP code embedded in the HTML file, and that PHP code contains a command that includes *other* PHP code. Nowhere does anything get included in an HTML file. All of these files echo something back so if a user did a Ctl+U they would not see that line but html tags and data. Some of my php files read a database and echo back something, even if it is only no records found. But when I access my application via localhost and do a Ctl+U, I see those lines and not html tags and data. If apache2 can process a file containing ?php phpinfo(); ? and display the contents of php.ini with colourful markup, is it using the php5 engine or doing it all by itself?? Apache does not process these embedded commands; that is all done by PHP. Thanks to Richard this has now been SOLVED. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
Re: [users@httpd] PHP files not being parsed in HTML pages
On 31/07/11 08:11, LabTech wrote: Maybe I'm ancient... but I create ALL my HTML via ECHO in PHP... then all the includes WORK! I set the entire HTML PAGE within ?php and ? brackets. ECHO works! (as does INCLUDE) - Original Message - From: Jeroen Geilman jer...@adaptr.nl To: users@httpd.apache.org Sent: Saturday, July 30, 2011 4:39 PM Subject: Re: [users@httpd] PHP files not being parsed in HTML pages On 2011-07-30 23:33, Stormy wrote: At 07:06 PM 7/30/2011 +0100, Mark Rousell wrote: On 30/07/2011 18:43, Jeroen Geilman wrote: So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. HTML does not have an include directive. Please don't confuse PHP with HTML. As an aside and for the avoidance of doubt, whilst they are not strictly part of HTML, SSI are *text* in a format that can be interpreted by an HTML client. Incorrect. SSI stands for SERVER-Side Includes. The client, if it ever received such content, would not know what to do with it. Server Side Includes (which include a #include directive) are commonly available to plain HTML on many servers. If php includes as output from the server (SSI) PHP is not SSI. anything that cannot be parsed as HTML [or as HTML parsable script, js etc] by the client (browser) then it will not be render[ed ...] as desired in the browser which was the question in this thread. Servers can send anything, invalid text/html from a php script, whatever ... if the client browser cannot parse|interpret the content it is doomed to failure. Best - Paul Tired old sys-admin I'm sorry to hear that. -- J. - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org - No virus found in this message. Checked by AVG - www.avg.com Version: 10.0.1390 / Virus Database: 1518/3798 - Release Date: 07/30/11 - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org Sorry I have created such a discussion around my use of the word include. In future I'll try to be semantically correct. By include I mean lines of code like this that are embedded into the source html. ?php include xyz.php; ? All of these files echo something back so if a user did a Ctl+U they would not see that line but html tags and data. Some of my php files read a database and echo back something, even if it is only no records found. But when I access my application via localhost and do a Ctl+U, I see those lines and not html tags and data. If apache2 can process a file containing ?php phpinfo(); ? and display the contents of php.ini with colourful markup, is it using the php5 engine or doing it all by itself?? Thanks for all of your suggestions. Rob - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org
[users@httpd] PHP files not being parsed in HTML pages
Hello, I have a working domain on a free LAMP hosting service. I thought it would be a *good idea* if I set up a development environment on my Debian laptop. Followed all the Debian specific stuff about setting it up and copied all my files (html, php, js, css, etc.) into the /var/www directory. I also created a new project and entered the appropriate lines into my httpd.conf file. I can access my home page but NONE of the php is executed. It all works fine on the host server. I created a three line file to call phpinfo(), placed it into the new project's directory and it displays all of the php directives. If I make an alteration to the php.ini file and run it again you can see the change. So, why does a simple file with phpinfo() work and an html page with an include xyz.php NOT render the page as desired in the browser It just ignores the include. When I restart apache, this is what is entered in the error.log file. [Sat Jul 30 13:14:04 2011] [notice] caught SIGTERM, shutting down [Sat Jul 30 13:14:05 2011] [notice] Apache/2.2.17 (Debian) PHP/5.3.6-13 with Suhosin-Patch configured -- resuming normal operations Output of uname -a Linux roblaptop 2.6.39-2-686-pae #1 SMP Wed Jun 8 11:33:14 UTC 2011 i686 GNU/Linux When I run apachectl -M it shows php5_module (shared). I've searched various sites for some clue as to what might be the problem. I need some guidance as to where to look or which directive should be set to render php include files whilst running via a localhost. Thanks, Rob - The official User-To-User support forum of the Apache HTTP Server Project. See URL:http://httpd.apache.org/userslist.html for more info. To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org from the digest: users-digest-unsubscr...@httpd.apache.org For additional commands, e-mail: users-h...@httpd.apache.org