You are not logged in.

#1 2007-09-01 05:32:57

nephish99
Member
Registered: 2007-09-01
Posts: 85

having lamp troubles

hello there all,
i think i have two problems with my LAMP install, i followed the wiki, mostly everything is by defaults.

when i go to localhost, i get a blank page.
when i go to localhost/index.php i get nothing also
if i go to localhost/index.html i get my little 'hello world' page.

i have the php module line uncommented, have restarted everything ( from reboot )
but nothing has changed, any ideas ?

thanks

Offline

#2 2007-09-01 06:21:31

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: having lamp troubles

Could you please explain the problem?

By now I'd say: Congratulations, you've successfully setup LAMP.


Hail to the thief!

Offline

#3 2007-09-01 08:06:51

nephish99
Member
Registered: 2007-09-01
Posts: 85

Re: having lamp troubles

ok, kinda weird,

when i open the properties of a file in nautilus, if it says that it is a type html document (even if it's a .php file ) it will run any php in <?php    ?> tags, but if it is determined to be a php script, it will not run it.
like if the file starts with <html> it is ok, but most of my stuff starts with <?php..

weird, eh?

thanks for your time on this

Last edited by nephish99 (2007-09-01 08:08:22)

Offline

#4 2007-09-01 10:38:05

harlekin
Member
From: Germany
Registered: 2006-07-13
Posts: 408

Re: having lamp troubles

I still don't really understand your problem. I'll try to answer it, though.

I don't use apache, too, but I think it's behavior isn't very different from lighttpd.
Whether a file is evaluated by the server is defined by the server's configuration file which is mostly done by the file extension, but you have to configure this. Scripts which are not defined as script being evaluated, simply are not evaluated by the server, no matter which file extension they have.

Further more, code which is enclosed by <? ?> isn't evaluated by php's default behavior either, as it is not XML(?) conform. Either you have to enable this in php, if you want to use <? ?> notation for php code, or you have to write <?php ?>, whereas the latter one is the preferable method.

Last edited by harlekin (2007-09-01 10:39:35)


Hail to the thief!

Offline

#5 2007-09-01 13:02:33

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: having lamp troubles

Are you sure that the DirectoryIndex line in /etc/httpd/conf/httpd.conf has all three of the following?
index.php
index.phtml
index.html


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#6 2007-09-01 13:06:32

nephish99
Member
Registered: 2007-09-01
Posts: 85

Re: having lamp troubles

yes, i have those in the httpd.conf,
also have php stuff in long tags,

like <?php  instead of <?

thanks

Offline

#7 2007-09-02 04:57:33

mrbug
Member
Registered: 2007-07-17
Posts: 221

Re: having lamp troubles

Dumb question, but have you done a

/etc/rc.d/httpd restart

since installing php?

Also, what is the name of the page that you're trying to access? There could also be the possibility that you have mod_rewrite enabled...


dvdtube - download all uploads from a YouTube user and then optionally create a DVD.
(Regular version AUR link / SVN version AUR link)

Offline

#8 2007-09-02 06:59:19

markc
Member
From: Gold Coast, Australia
Registered: 2007-05-15
Posts: 502
Website

Re: having lamp troubles

Here are the active PHP values that work for me...

# grep -ir php /etc/httpd/conf/*
/etc/httpd/conf/httpd.conf:LoadModule php5_module             modules/libphp5.so
/etc/httpd/conf/httpd.conf:    <IfModule mod_php5.c>
/etc/httpd/conf/httpd.conf:        DirectoryIndex index.php index.html
/etc/httpd/conf/httpd.conf:        AddType application/x-httpd-php .php
/etc/httpd/conf/httpd.conf:        AddType application/x-httpd-php-source .phps

I find these 2 aliases (in ~/.bashrc) very handy, ie; use "elog" to get an idea what is wrong with apache...

alias alog="tail -f /var/log/httpd/access_log"
alias elog="tail -f /var/log/httpd/error_log"

Offline

#9 2007-09-03 14:46:30

nephish99
Member
Registered: 2007-09-01
Posts: 85

Re: having lamp troubles

thanks marc had copied what you have, working now, don't know exactly what was wrong, but who cares ? it works now.

thanks all for your help !

Offline

Board footer

Powered by FluxBB