Re: RE: RE: [PHP] passing variables to php script
On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test configuration start menu option (under configure apache server) just displays a console window for a brief moment, then immediately disappears. The icon I see near my time says Running none of 1 Apache servicesSo I have to get that straightened out first...I believe that's been my problem all along. Well, that's going to be part of it, but it's never going to work if you open it via Explorer. If you do that, apache won't be involved whether it's running or not. This will only work if you have IE (or other browser) open and put http://localhost/your-webpage.html into the browser's address bar. Further, both the webpage and PHP file need to be in your document-root. Look in your apache config file for that). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: RE: [PHP] passing variables to php script
Make sure IIS is not running. That'll cause all kinds of trouble. Tim Streater wrote: On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test configuration start menu option (under configure apache server) just displays a console window for a brief moment, then immediately disappears. The icon I see near my time says Running none of 1 Apache servicesSo I have to get that straightened out first...I believe that's been my problem all along. Well, that's going to be part of it, but it's never going to work if you open it via Explorer. If you do that, apache won't be involved whether it's running or not. This will only work if you have IE (or other browser) open and put http://localhost/your-webpage.html into the browser's address bar. Further, both the webpage and PHP file need to be in your document-root. Look in your apache config file for that). -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: RE: [PHP] passing variables to php script
Tim Streater wrote: On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test configuration start menu option (under configure apache server) just displays a console window for a brief moment, then immediately disappears. The icon I see near my time says Running none of 1 Apache servicesSo I have to get that straightened out first...I believe that's been my problem all along. Well, that's going to be part of it, but it's never going to work if you open it via Explorer. If you do that, apache won't be involved whether it's running or not. This will only work if you have IE (or other browser) open and put http://localhost/your-webpage.html into the browser's address bar. Further, both the webpage and PHP file need to be in your document-root. Look in your apache config file for that). Sorry for the top post. Make sure IIS is not running. It'll cause all kinds of trouble.
RE: RE: RE: [PHP] passing variables to php script
thanks for your assistance. From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Fri 1/13/2012 9:37 AM To: David Savage Cc: PHP General List Subject: Re: RE: RE: [PHP] passing variables to php script On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test configuration start menu option (under configure apache server) just displays a console window for a brief moment, then immediately disappears. The icon I see near my time says Running none of 1 Apache servicesSo I have to get that straightened out first...I believe that's been my problem all along. Well, that's going to be part of it, but it's never going to work if you open it via Explorer. If you do that, apache won't be involved whether it's running or not. This will only work if you have IE (or other browser) open and put http://localhost/your-webpage.html into the browser's address bar. Further, both the webpage and PHP file need to be in your document-root. Look in your apache config file for that). -- Cheers -- Tim
RE: [PHP] passing variables to php script
Installed apache onto a win2K server, and have the html file php file in the same folder (Q:\ASTERISK\) on the Q: drive (which is just another drive in this same server). I opened the html file using IE 6.0. What I'm thinking is there may be an issue with some setting on the web server. The php statements I posted were the first few statements in the script, so apparently the script didn't see the variables, so I'll have to review the httpd.conf and php.ini files to find whatever settings is preventing the acctnum, year, and month from being passed to the php script. Thanks to all of you who posted comments for this problem ! I believe it will eventually come together. David From: Ellis Antaya [mailto:ellis.ant...@gmail.com] Sent: Tue 1/10/2012 4:46 PM To: Marco Behnke Cc: php-general@lists.php.net Subject: Re: [PHP] passing variables to php script it can't work as long as long as there is Q:\ ins his form action +1 David, which web server are you running (apache, iis, ...)? What is your document_root? And last question, where are your html file and your php file(the full file path)? --- Ellis (Sent from my iPod) On 2012-01-10, at 16:25, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:57, schrieb Ashley Sheridan: o simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. Indeed. But isn't that the point? We are trying to figure out why his posting the form does not work. I say, it can't work as long as long as there is Q:\ ins his form action, no way it will do, because you leave your webserver context anyways. He must change it to a valid web url. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz http://www.behnke.biz/
Re: [PHP] passing variables to php script
On Thu, Jan 12, 2012 at 7:51 PM, David Savage dsav...@cytelcom.com wrote: Installed apache onto a win2K server, and have the html file php file in the same folder (Q:\ASTERISK\) on the Q: drive (which is just another drive in this same server). I opened the html file using IE 6.0. What I'm thinking is there may be an issue with some setting on the web server. The php statements I posted were the first few statements in the script, so apparently the script didn't see the variables, so I'll have to review the httpd.conf and php.ini files to find whatever settings is preventing the acctnum, year, and month from being passed to the php script. No, Don't open the html file from the drive! If you have installed apache, you can open IE and go to http://localhost, this will show your web site running. If you put the files from Q:\ASTERISK in the folder where the website is, or you set this correctly in httpd.conf then it will show up fine. Now, if you update the form, and replace Q:\ASTERISK\callrecs.php with /callrecs.php, then it'll probably work fine. Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: RE: [PHP] passing variables to php script
On 12 Jan 2012 at 18:51, David Savage dsav...@cytelcom.com wrote: Installed apache onto a win2K server, and have the html file php file in the same folder (Q:\ASTERISK\) on the Q: drive (which is just another drive in this same server). I opened the html file using IE 6.0. What I'm thinking is there may be an issue with some setting on the web server. The php statements I posted were the first few statements in the script, so apparently the script didn't see the variables, so I'll have to review the httpd.conf and php.ini files to find whatever settings is preventing the acctnum, year, and month from being passed to the php script. You say: I opened the html file using IE 6.0 I don't like the sound of that. Do you mean you double-clicked the file and it opened in IE or do you mean you put Q:\... into the IE address bar or what? What you should be doing is putting http://localhost/your-file.html in the IE address bar. What is your document-root? Is the Q:\thingy part of it? -- Cheers -- Tim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing variables to php script
David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post pAccount Number:input type=text name=acctnum/p pYear (4 digit):input type=text name=billyear/p pMonth (2 digit):input type=text name=billmonth/p pinput type=submit //p /form /body /html to which I would input an account number, 4 digit year, then 2 digit month. Then click Submit. What I see in the error log is: [06-Jan-2012 11:42:21] PHP Notice: Undefined index: acctnum [06-Jan-2012 11:42:21] PHP Notice: Undefined index: billyear [06-Jan-2012 11:42:21] PHP Notice: Undefined index: billmonth where line numbers point othe the following php lines: $who=$_POST[acctnum]; $year_to_process=$_POST[billyear]; ; $month_to_process= $_POST[billmonth]; WHAT AM I DOING WRONG ? David I think the error indicates that there is no acctnum,etc. set in your POST array.. but your syntax looks O.K... so, assuming the php code is in callrecs.php, I'm guessing you either have a redirect in there, or are not hitting the callrecs.php with the form data. I'd suggest to post your callrecs.php file. Donovan -- D Brooke -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing variables to php script
Am 10.01.12 21:07, schrieb Donovan Brooke: David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz smime.p7s Description: S/MIME Kryptografische Unterschrift
Re: [PHP] passing variables to php script
On Jan 10, 2012, at 15:12, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:07, schrieb Donovan Brooke: David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing variables to php script
Am 10.01.12 21:28, schrieb Mike Mackintosh: On Jan 10, 2012, at 15:12, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:07, schrieb Donovan Brooke: David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz smime.p7s Description: S/MIME Kryptografische Unterschrift
Re: [PHP] passing variables to php script
On Tue, 2012-01-10 at 21:43 +0100, Marco Behnke wrote: Am 10.01.12 21:28, schrieb Mike Mackintosh: On Jan 10, 2012, at 15:12, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:07, schrieb Donovan Brooke: David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. -- Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] passing variables to php script
On Tue, Jan 10, 2012 at 9:57 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2012-01-10 at 21:43 +0100, Marco Behnke wrote: Am 10.01.12 21:28, schrieb Mike Mackintosh: On Jan 10, 2012, at 15:12, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:07, schrieb Donovan Brooke: David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. This all depends on the browser used. IE will probably start it with any program registered to PHP files (most likely an text editor). Firefox and Chrome will probably show the PHP source code in the browser. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] passing variables to php script
Am 10.01.12 21:57, schrieb Ashley Sheridan: o simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. Indeed. But isn't that the point? We are trying to figure out why his posting the form does not work. I say, it can't work as long as long as there is Q:\ ins his form action, no way it will do, because you leave your webserver context anyways. He must change it to a valid web url. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz smime.p7s Description: S/MIME Kryptografische Unterschrift
Re: [PHP] passing variables to php script
On Tue, 2012-01-10 at 22:25 +0100, Marco Behnke wrote: Am 10.01.12 21:57, schrieb Ashley Sheridan: o simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. Indeed. But isn't that the point? We are trying to figure out why his posting the form does not work. I say, it can't work as long as long as there is Q:\ ins his form action, no way it will do, because you leave your webserver context anyways. He must change it to a valid web url. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz All of which I mentioned last Friday when David first asked the question. -- Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] passing variables to php script
it can't work as long as long as there is Q:\ ins his form action +1 David, which web server are you running (apache, iis, ...)? What is your document_root? And last question, where are your html file and your php file(the full file path)? --- Ellis (Sent from my iPod) On 2012-01-10, at 16:25, Marco Behnke ma...@behnke.biz wrote: Am 10.01.12 21:57, schrieb Ashley Sheridan: o simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather a web address interpreted by a PHP processor. Make sure your .php target is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. Indeed. But isn't that the point? We are trying to figure out why his posting the form does not work. I say, it can't work as long as long as there is Q:\ ins his form action, no way it will do, because you leave your webserver context anyways. He must change it to a valid web url. -- Marco Behnke Dipl. Informatiker (FH), SAE Audio Engineer Diploma Zend Certified Engineer PHP 5.3 Tel.: 0174 / 9722336 e-Mail: ma...@behnke.biz Softwaretechnik Behnke Heinrich-Heine-Str. 7D 21218 Seevetal http://www.behnke.biz
Re: [PHP] passing variables to php script
On Fri, 2012-01-06 at 11:53 -0600, David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post pAccount Number: input type=text name=acctnum /p pYear (4 digit): input type=text name=billyear /p pMonth (2 digit): input type=text name=billmonth /p pinput type=submit //p /form /body /html to which I would input an account number, 4 digit year, then 2 digit month. Then click Submit. What I see in the error log is: [06-Jan-2012 11:42:21] PHP Notice: Undefined index: acctnum [06-Jan-2012 11:42:21] PHP Notice: Undefined index: billyear [06-Jan-2012 11:42:21] PHP Notice: Undefined index: billmonth where line numbers point othe the following php lines: $who=$_POST[acctnum]; $year_to_process=$_POST[billyear]; ; $month_to_process= $_POST[billmonth]; WHAT AM I DOING WRONG ? David PHP must be run on a server, it looks like you're attempting to run it on your local drive without one. Try installing either Xampp or EasyPHP, which will install the Apache server with PHP for you, and then you can run your scripts over http://localhost or http://127.0.0.1 -- Thanks, Ash http://www.ashleysheridan.co.uk