Hello all, I have Apache, MySQL and PHP running and I tired to open the PHP test page using a web browser but it did not show anything but a blank page. How do you correctly configure PHP in SuSE 8.1? And also how do you test to see it is running correctly. According to the manual it says to use browser and type http://localhost/test.php Which directory do you put the PHP file? Thanks, Scott
Scott wrote:
According to the manual it says to use browser and type http://localhost/test.php Which directory do you put the PHP file?
usr/local/httpd/htdocs Alternatively, put it in /home/xyz/public_html and point the browser to http://localhost/~xyz/test.php - that way you shouldn't need to think so much about file permissions. JDL
El sáb, 30-11-2002 a las 15:34, John Lamb escribió:
Scott wrote:
According to the manual it says to use browser and type http://localhost/test.php Which directory do you put the PHP file? usr/local/httpd/htdocs
/srv/www/htdocs in 8.1
Alternatively, put it in /home/xyz/public_html and point the browser to http://localhost/~xyz/test.php - that way you shouldn't need to think so much about file permissions.
Gustavo Muslera wrote : | El sáb, 30-11-2002 a las 15:34, John Lamb escribió: | > Scott wrote: | > > According to the manual it says to use browser and type | > > http://localhost/test.php Which directory do you put the PHP file? | > | > usr/local/httpd/htdocs | | /srv/www/htdocs in 8.1 | I've got more or less a follow up problem,. My PHP works and i know how to read the httpd.conf file but when i tried to pass a parameter like this http://localhost/test.php?testvar=123 and printed it in php like this : <html> <body> <? printf("Test var equals : ".$testvar); ?> </body> </html> I didn't see any value of testvar, it just is not set while normally testvar is just set !. Any ideas how to debug this ?? Grtz Dries -- <End of message>
dries wrote:
Any ideas how to debug this ??
Grtz Dries
Does it work if you try this? <html> <body> <? printf("Test var equals : ".$HTTP_GET_VARS{'testvar'}); ?> </body> </html> Also, take a look in php.ini (usually in /etc) for : register_globals = On HTH sjb
sjb wrote:
dries wrote:
<html> <body> <? printf("Test var equals : ".$HTTP_GET_VARS{'testvar'}); ?> </body> </html>
Also, take a look in php.ini (usually in /etc) for :
register_globals = On
Just to clarify that a bit... Old versions of PHP passed the GET variables (and POST etc) into a global namespace and could be accessed as "echo $testvar". Recent versions of PHP do not register these variables in the global namespace. Although you can change that in the php.ini file. Its best to always have register_globals set to Off. Then access your variables either as above, or as $_GET['testvar']. FYI jalal -- GPG fingerprint = 3D45 5509 D380 26A4 523E A9D8 A66A 5F38 CA43 BB0E
jalal wrote : | sjb wrote: | > dries wrote: | > | > | > <html> | > <body> | > <? printf("Test var equals : ".$HTTP_GET_VARS{'testvar'}); ?> | > </body> | > </html> | > | > Also, take a look in php.ini (usually in /etc) for : | > | > register_globals = On | | Just to clarify that a bit... | | Old versions of PHP passed the GET variables (and POST etc) into a | global namespace and could be accessed as "echo $testvar". | Recent versions of PHP do not register these variables in the global | namespace. Although you can change that in the php.ini file. | | Its best to always have register_globals set to Off. Then access your | variables either as above, or as $_GET['testvar']. | | FYI | jalal Thanks both of you (Jalal and Sjb). I can only test this this evening at home (since i run 8.0 here at my work), but i am almost sure that this will be the cure for my problem !! Grt Dries -- <End of message>
Hi, Thanks everyone for their help especially John Lamb. Now it works properly with the exception that I am unable to update my test database using the browser. Do you have to set a permission level for the database so others can add to the database? I have granted usage for the user but when I press submit my data goes into the twilight zone and not in my database. Thanks in advance for the help.. Scott -----Original Message----- From: John Lamb [mailto:J.D.Lamb@btinternet.com] Sent: Saturday, November 30, 2002 1:34 PM To: suse-linux-e@suse.com Subject: Re: [SLE] PHP Question Scott wrote:
According to the manual it says to use browser and type http://localhost/test.php Which directory do you put the PHP file?
usr/local/httpd/htdocs Alternatively, put it in /home/xyz/public_html and point the browser to http://localhost/~xyz/test.php - that way you shouldn't need to think so much about file permissions. JDL -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
This 8.1 is load of rubbish when I installed 6.4 & 7.1 Apache worked from day one, But the other day I had to download Apache 2 and installed it, even thou it was listed on the 8.1 install CD, I put my files in /usr/local/apache2/htdocs Just to refresh your memory on Wednesday 04 December 2002 07:12 Scott told us: => Hello all, => => I have Apache, MySQL and PHP running and I tired to open the PHP test page => using a web browser but it did not show anything but a blank page. How do => you correctly configure PHP in SuSE 8.1? And also how do you test to see it => is running correctly. => => According to the manual it says to use browser and type => http://localhost/test.php Which directory do you put the PHP file? => => Thanks, => => Scott => => -- From Eric (KMail 1.4.3 in Linux, SuSE 8.1) NO ATTACHMENT WAS SENT WITH THIS EMAIL IF THERE IS ONE IT IS A UNDETECTED VIRUS, IF THERE IS ONE PLEASE LET ME KNOW ....
Is there a reason you just don't look at your httpd.conf file? -----Original Message----- From: suse-linux-e-return-125615-tech=rainstix.com@suse.com [mailto:suse-linux-e-return-125615-tech=rainstix.com@suse.com]On Behalf Of Eric Richards Sent: Saturday, November 30, 2002 12:16 PM To: SeSE Subject: Re: [SLE] PHP Question This 8.1 is load of rubbish when I installed 6.4 & 7.1 Apache worked from day one, But the other day I had to download Apache 2 and installed it, even thou it was listed on the 8.1 install CD, I put my files in /usr/local/apache2/htdocs Just to refresh your memory on Wednesday 04 December 2002 07:12 Scott told us: => Hello all, => => I have Apache, MySQL and PHP running and I tired to open the PHP test page => using a web browser but it did not show anything but a blank page. How do => you correctly configure PHP in SuSE 8.1? And also how do you test to see it => is running correctly. => => According to the manual it says to use browser and type => http://localhost/test.php Which directory do you put the PHP file? => => Thanks, => => Scott => => --
From Eric (KMail 1.4.3 in Linux, SuSE 8.1)
NO ATTACHMENT WAS SENT WITH THIS EMAIL IF THERE IS ONE IT IS A UNDETECTED VIRUS, IF THERE IS ONE PLEASE LET ME KNOW .... -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Terry Ashley wrote:
Is there a reason you just don't look at your httpd.conf file?
Be fair. It's not obvious that apache is configured by a file called httpd.conf and less obvious still that that file is located in /etc/httpd, at least in some versions of SuSE, ;-)
-----Original Message----- From: suse-linux-e-return-125615-tech=rainstix.com@suse.com [mailto:suse-linux-e-return-125615-tech=rainstix.com@suse.com]On Behalf Of Eric Richards Sent: Saturday, November 30, 2002 12:16 PM To: SeSE Subject: Re: [SLE] PHP Question
Just to refresh your memory on Wednesday 04 December 2002 07:12 Scott told us:
=> => According to the manual it says to use browser and type => http://localhost/test.php Which directory do you put the PHP file?
JDL
Check if youve installed Apache, mod_php4 and mysql using rpm -q. After that if all is installed start apache and mysql. Then after that create a test.php file which contains these lines: <? phpinfo(); ?> Save that file and save in your apache's htdocs' directory, commonly on /usr/local/httpd/htdocs and point your browser to http://localhost/test.php If all goes well, then youll see all your php version info. HTH. --- Scott <eoakes1@tampabay.rr.com> wrote:
Hello all,
I have Apache, MySQL and PHP running and I tired to open the PHP test page using a web browser but it did not show anything but a blank page. How do you correctly configure PHP in SuSE 8.1? And also how do you test to see it is running correctly.
According to the manual it says to use browser and type http://localhost/test.php Which directory do you put the PHP file?
Thanks,
Scott
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
===== Xander R. Solis --------------------------- "Human Knowledge belongs to the world." GNUPG Key: 1024D/5257774A __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com
participants (9)
-
dries
-
Eric Richards
-
Gustavo Muslera
-
jalal
-
John Lamb
-
Scott
-
sjb
-
Terry Ashley
-
Xander Solis