[PHP] Continuance of the struggle (trying to understand)
Hi all, After my escapades with the real basics and realizing my laptop wasn't logged on as Administrator, I now am trying to work out why this script works sometimes but not others. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html If I save this as phptest.php and open IE pointing it to localhost/phptest.php it works fine. Get both lines of text followed by the pages of gumpf about php. However if I paste this into a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Continuance of the struggle (trying to understand)
Col Day colind...@aol.com wrote in message news:23.81.45586.2820b...@pb1.pair.com... Hi all, After my escapades with the real basics and realizing my laptop wasn't logged on as Administrator, I now am trying to work out why this script works sometimes but not others. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html If I save this as phptest.php and open IE pointing it to localhost/phptest.php it works fine. Get both lines of text followed by the pages of gumpf about php. However if I paste this into a That was weird! I was saying, If I paste this into a webpage I only get the HTML line as before. Anyone have any ideas? PHP is obviously working as is apache. Just don't understand why they don't show up in web pages. Cheers again all! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Continuance of the struggle (trying to understand)
Hi Shreyas, Ok, as far as I can tell the script should show This is an HTML line reflecting that I am seeing the HTML part of the script followed by This is a PHP line to show that PHP is installed and working fine. If I view the script directly in IE by going to http://localhost/phptest.php I get the output: This is an HTML line This is a PHP line followed by a large and detailed list of the PHP install which includes things like compiler language etc. If I paste the script into a web page then all that is displayed is This is an HTML line. Nothing else whatsoever. I am fairly confused. I've tried a couple of different web page creators (Webplus 10 and Web page maker) and get the same result. Sorry if I sound extremely naive but it's bugging me now and I want to understand. Cheers Shreyas Agasthya shreya...@gmail.com wrote in message news:aanlkti=4ke1stf8tan7+ecjo-ux5cj=t9-0qctcfk...@mail.gmail.com... Col, Can you let us know what exactly you see when you say http://localhost:/phptest.php ? Regards, Shreyas On Tue, Oct 5, 2010 at 4:20 PM, Col Day colind...@aol.com wrote: Col Day colind...@aol.com wrote in message news:23.81.45586.2820b...@pb1.pair.com... Hi all, After my escapades with the real basics and realizing my laptop wasn't logged on as Administrator, I now am trying to work out why this script works sometimes but not others. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html If I save this as phptest.php and open IE pointing it to localhost/phptest.php it works fine. Get both lines of text followed by the pages of gumpf about php. However if I paste this into a That was weird! I was saying, If I paste this into a webpage I only get the HTML line as before. Anyone have any ideas? PHP is obviously working as is apache. Just don't understand why they don't show up in web pages. Cheers again all! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Regards, Shreyas Agasthya -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: New to PHP and struggling with the basics
Thanks Gary! Nice to know I'm not the only one who has struggled with the Basics. Hopefully I can get my brain around it sometime soon. Cheers Col. Gary php-gene...@garydjones.name wrote in message news:i8f1r9$j4...@dough.gmane.org... Col Day wrote: Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. Don't know what it makes you, but I remember trying to install Apache PHP separately a couple of years ago. The frustration of mismatching versions (Apache only supporting PHP version something, PHP only playing well with Apache version something-else) was... rather high. Head met keyboard several times. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Continuance of the struggle (trying to understand)
LOL! This is WITH xammp!! Gary php-gene...@garydjones.name wrote in message news:i8f26m$j4...@dough.gmane.org... Col Day wrote: Col Day colind...@aol.com wrote in message news:23.81.45586.2820b...@pb1.pair.com... html head titlePHP Test/title /head body pThis is an HTML line /p !-- close your tag, you evil man! :-) -- ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html If I paste this into a webpage I only get the HTML line as before. What do you mean, webpage? foo.php, for example, or foo.html? If the latter then I am guessing your Apache will serve the page purely as html, and it will never be processed by php. If the former then check that Apache is configured to run php files through php before serving them (must admit, I'm not sure how to do that, it depends on your Apache and PHP). Or, really, just install xampp, it's by far the easiest way and will avoid all the problems associated with configuring two rather complex pieces of software. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Kranthi Many thanks, any idea on the name of the error logs? Peter, Yes, browsing to the correct location but still getting the 403. this website requires you to log in. Abah, I've gone to the httpd-userdir.conf file and replaced it with your text (not including the directory tree), restarted apache (after each change) but am still getting the same error. However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. Any further thoughts? It has to be something simple that I'vw not done! Cheers all. kranthi kranthi...@gmail.com wrote in message news:aanlktik6=68ho+hdfpvd3x2qmrudlz_ttco2oqk1b...@mail.gmail.com... apache error logs will be helpful in this case. Their location varies depending upon your installation. But in any case they'll be insde your server directory (IIRC it is c:/Program Files/Apache Software Foundation/Apache by default) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New to PHP and struggling with the basics
Hi all, Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule (after telling me what I've done wrong)) and have installed Apache 2.2 and PHP 5.3.3 onto a laptop running Vista. (yes I know!!!). I've had Apache running fine with my basic web site created using Serif's Webplus10 but wanted to experiment with PHP as I want an uploadable area on my website for my friends and family to submit video/photos. I've checked the install of PHP using php -v and I get the output that PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20) but when I try and go to the test.php file (below) I get an http 403 webiste requires you to log in. Error message. html head titlePHP Test/title /head body pThis is an HTML line ?php echo pThis is a PHP line/p; phpinfo(); ? /body /html This is the text of the test.php file which I have plonked down in /apache/htdocs What have I missed? the Dummies book is quoting PHP 5.0.0 as the latest release so not too far away really. Thanks for your help. Cheers. Col Day -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
Steve, That's superb, many thanks for the link! I shall give it a go! Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. I have just printed off the first 40 pages so that i can read it whilst looking at the screen ratrher than switching about, however I will give Xammp a go first and foremost seeing as I only want to test my own web page before I start to buy hosting elsewhere. Seeing as you are so great :-) Any ideas of the best way to script an upload page that will deliver files to the server? Family photo's and video clips mainly. Thoughts? Also, many thanks to everyone who has tried to help a muppet. But I guess we all gotta start somewhere! Cheers again! Steve Staples sstap...@mnsi.net wrote in message news:1286202653.4703.48.ca...@webdev01... Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php, and it is simple to use/work with. And if you install to defaults there, you will put your web files into C:\xampp\htdocs\ and everythign should just work. The way i read your initial post, is that you installed just apache, and just php... if you did this, then you may not have integrated php into apache properly, so then your php pages will not work. just my $0.02 here, cuz if it doesn't work after you install XAMPP, then there is something else wrong. And the other thing, is that you're running on vista, and vista doesn't like things running on localhost (or at least it didn't used to) Steve On Mon, 2010-10-04 at 13:51 +0100, Col Day wrote: Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to PHP and struggling with the basics
In addition, I think I may have got to the bottom of what I was doing wrong in the first place. I recently swapped out my laptop for my wifes one (she upgraded, well I upgraded hers, and I got the old one) and I forgot that this one didn't automatically boot up into the Administrator profile. Doh! Cheers again all! Col Day colind...@aol.com wrote in message news:a2.70.25536.9a5f9...@pb1.pair.com... Steve, That's superb, many thanks for the link! I shall give it a go! Yes I did install apache then php, however I tried to follow the instructions in the Dummies book (what does it make me if I can't follow the dummies book?) but to no avail. I have just printed off the first 40 pages so that i can read it whilst looking at the screen ratrher than switching about, however I will give Xammp a go first and foremost seeing as I only want to test my own web page before I start to buy hosting elsewhere. Seeing as you are so great :-) Any ideas of the best way to script an upload page that will deliver files to the server? Family photo's and video clips mainly. Thoughts? Also, many thanks to everyone who has tried to help a muppet. But I guess we all gotta start somewhere! Cheers again! Steve Staples sstap...@mnsi.net wrote in message news:1286202653.4703.48.ca...@webdev01... Col. Since you're new to php, then an easy way to install apache, is using XAMPP ( http://www.apachefriends.org/en/xampp.html ) I would suggest you remove the apache you have installed, and the php you installed, and install the XAMPP package as it comes prebuilt with mysql, ftp, apache and php, and it is simple to use/work with. And if you install to defaults there, you will put your web files into C:\xampp\htdocs\ and everythign should just work. The way i read your initial post, is that you installed just apache, and just php... if you did this, then you may not have integrated php into apache properly, so then your php pages will not work. just my $0.02 here, cuz if it doesn't work after you install XAMPP, then there is something else wrong. And the other thing, is that you're running on vista, and vista doesn't like things running on localhost (or at least it didn't used to) Steve On Mon, 2010-10-04 at 13:51 +0100, Col Day wrote: Hi Kranthi, No, I just literally get the HTML line shown but absolutely nothing beneath it. kranthi kranthi...@gmail.com wrote in message news:aanlktin2xnthqm-pp7qwtgo=sqtkctthtwz+08bbw...@mail.gmail.com... they should be something like error_log-[date] not sure about windows though However I have found that if I paste the html into my web page created by Serif WebPlus 10 I get the html line but not the php line. are you saying that you are getting the php code in your browser ? ?php echo pThis is a PHP line/p; phpinfo(); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php