Problem with php in suse 11

First
I installed php5, apache2, mysql packges in “install or remove software packages and manage software repositories” from suse11 DVD( i checked all the packages that had php or apache or mysql in it’s name)!

but now i don’t know how to set documentroot and where to put my php scripts to test them!

If anybody helps me i will be really pleasant, thanks!

Secound
I installed these packages from the source according to steps told in:
How to install MySQL on SuSE Linux :: laffers.net
How to install Apache on SuSE Linux :: laffers.net
How to install PHP on SuSE Linux :: laffers.net
(here i say thanks to laffers)

i set the documentroot according to these tutorials(in httpd.conf)…
again i have problem!
Please tell any more change that i have to do to make my php scripts working!

The default place to put your content (i.e. scripts) is /srv/www/htdocs/ as a php script will be handled wherever it sits.

However! They won’t be parsed by default, you need to enable the parser. If you’ve installed the YaST module for httpd configuration then you can go into that. There’s a list of modules that are enabled or disabled - find the php5 module and enable it.

Hope that helps.

Document Root is determined by your Apache config files. Look in /etc/apache2/httpd.conf for a section called DocumentRoot. Also make sure php_mod is installed and enabled. You can check this with the command: httpd2 -M (I’m not sure if this is the right command - not on Linux at the mo, it might be httpd either). php_mod should come up as loaded if it’s installed.

You might have sussed everything out by now but just incase you’re still struggling here’s a couple of links that helped me set up a LAMP server on openSUSE:

HowTo: Configure a Linux Apache Web Server on Suse/openSUSE for SSI, Includes, CGI, Common Gateway Interface, AddHandler, ExecCGI, AllowOverride, htaccess, DocumentRoot

Apache Quickstart HOWTO - openSUSE

thank u!
The problem is with firefox…
I can browse scripts in konqueror easily, but i just can’t preview my pages(that i put in /srv/www/htdocs/) in firefox!
That’s a different problem! should i do some changes in firefox preferences?

You don’t need to make any changes in Firefox.

su to root in the terminal and issue these commands to start and stop Apache and MySQL:

rcapache2 start

rcapache2 stop

rcmysql start

rcmysql stop

Now you should be able to view your PHP pages in Firefox by typing the following into the URL bar:

http://localhost/anySub-DirectoriesYouMayHaveCreated/nameOfYourScript.PHP

You might know all that already - just making sure it isn’t something basic that’s stopping things working!

i did that, and also i restarted my computer, but it is not still working in Mozila!
if the problem is with apache or mysql, it shouldn’t work in konqueror:confused:

the error that I recieve is “Offline web page…”

the other problem in suse is that i can not connect it to my adsl! is there a good guid to do that?

I think I found the answer to your problem here:

XAMPP’s Localhost isn’t working in offline-mode?

Looks like it was a setting in Firefox after all! As for the internet connection, you’d best make a new post in the Network/Internet forum. Best of luck!

Yes, exactly!
But why it can’t find my network connection automatically?
I have this problem with my ADSL, too!

When i enter MyComputer the icon shows offline status, but i can surf the web!:eek:

Low speed (about3Ki/s) may cause this problem! wouldn’t it?