Well I have a working (sort of) web server on a new install of suse 11.2 but am having issues with a few things. Not sure if it is an apache thing or a php thing.
- Style sheets will not displlay images. This is a working template that I took from one of my live sites. I use relative paths to images but they won’t display
- I can write php queries and draw data from mysql directly on the page but if I do it as an included file I get HTTP error 500
The page resides in /home/[username]/public_html and all relative paths are correct in the code.
I am trying to implement a CMS style website that I developed that works on a windows 2000 server running IIS with php and mySql and also used to work on a kubuntu server until I took their 10.4 update.
What makes this system different?
For files that are not found, look in the log files /var/log/apache2/error_log. That will tell you if it’s a path, permission or other problem.
My 2 cents: permission trouble. Take a good look in the subfolders of the site.
All files are owned by me:users and are in my public_html directory. I can place an image directly on the page and it works… when I try using a style sheet it doesn’t, pretty standard stuff here.
I need a web server that works, is there a better alternative than Suse? I’ve been messing with this for over a week now and just when I think I have it more issues arise. My goal is to host 2 live websites and have a back end development server not available to the public.
It’s not a question whether the files are owned by you, it’s whether the web server account wwwrun has read (and for directories, search also) permission on them. And access also depends on permissions on all components of the path from /. This is true of all Unix/Linux systems not just SUSE.
I’m sorry but I have no idea how to answer that as I know very little about linux. All I know is that it won’t do what I want it too.
When you find that a file is unreadable, it’s worth testing access as wwwrun to see if it has access to it. You need to become wwwrun and see if you can read the file:
# su - wwwrun
$ cat /some/file/path > /dev/null
You would have to give wwwrun a valid shell first, otherwise you can’t su to it. Afterwards, change it back to /bin/false for security.
Alternatively, instead of understanding how the Linux permission system works, just apply the million monkeys approach and randomly change things until it works. Might take a while though.
Thanks anyway but thats all greek to me.
Seriously though, the biggest downfall to linux is all that shell gobbledygoop. I am an intelligent person trained in Novell and other Windows based server languages. I am a developer and can write complex applications in ColdFusion and PHP. It is the year 2010, why can’t linux progress past the need to keep all those cryptic shell commands in ones head and use a GUI. To make matters worse is the difference from one distro to another.
All I want is a server. I’ve spent 7 or more days on this and gotten nowhere. Is there a distro that works?
Shell is just another language like CF or PHP, if you can handle those, you can handle shell.
Nonetheless, perhaps you should investigate some other distro tailored for just LAMP serving. Maybe this is more to your taste, I just found it via a search, don’t know anything about it other than what’s written there:
TurnKey Linux Virtual Appliance Library - Wikipedia, the free encyclopedia
I look at it from the exact opposite: if shell commands are still here after all those years, they are probably the most effective and time-tested way of maintaining servers.
For example, I can effectively and safely administer all my Linux servers through a lousy hotel network with a command shell. There is simply no GUI alternative to that.
I’d say: don’t give up - it’ll take more than 7 days to learn from scratch how to properly stand up a web server that is not going to get you hacked within 5 minutes of it being up.
We’re here to help, but you’ll have to accept the basics of Linux server administration: you’ll need the shell. Feel free to try out other distros (most of us probably have more than one running), but I wouldn’t hold my breath on the server-side commands being any different ('cause they’re not )
> All I want is a server. I’ve spent 7 or more days on this and gotten
> nowhere. Is there a distro that works?
they all work…they all require setup…they will all require some
basic knowledge of “shell gobbledygoop”…since openSUSE has YaST our
level of “shell gobbledygoop” is probably less than other distros…
if you want zero “shell gobbledygoop” you could go ahead and buy
Redmond Server…but, as far as i know you will still have to set it
up correctly…and, that also will probably require some understanding
of that system…and, maybe even some reading…
you can pay with money (LOTS) or you can pay with time (to learn what
little “shell gobbledygoop” is actually required) which do you have
the most of??
DenverD (Linux Counter 282315)
posted via NNTP w/TBird 188.8.131.52 | KDE 3.5.7 | openSUSE 10.3
184.108.40.206-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio
I think I’m getting it!
- Issue 1 - Sessions must not be enabled. Aany page that referances session start cause an error leading to a blank page.
- Images relative path must start with / or ./
- For some reason relative paths change from users web space to live web space
- Any php errors on a page render the page blank
Next question is how do I enable sessions? is that php or apache?
I GOT IT!!!
Thanks to everyone for their help. I found most of the issues were related to the differences in PHP/MySQL on Win 2K and Linux.
Once I removed all the code that that was breaking the web pages and then re-created it everything worked and worked well.
The only remaining question I have is why whenever there is a error in php code the server displays a blank page. Do I have to generate my own error pages? and why does FireFox show a blank page and IE displays a HTTP 500 error…