Apache, PHP, MySQL and Samba

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

Trogdor wrote:
nobspangle wrote:you need -qt
Among others.
You just need -qt -X he already said -X so I added -qt none of the other USE variables that might have compiled X come into play here (gtk, gnome, kde etc.)
If you keep an open mind, will your brain fall out?
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

I've updated this tutorial so it works with the slightly broken apache ebuilds.
If you keep an open mind, will your brain fall out?
dfunked
Newbie
Posts: 1
Joined: Tue Jun 14, 2005 2:47 am

Post by dfunked »

Hi, nice guide. One step missing from the Samba configuration however. Need to do this before setting the password files.

Code: Select all

# mkdir /etc/samba/private
Cheers.
Krazy
Adept
Posts: 54
Joined: Wed Sep 10, 2003 8:41 pm
Location: Auckland, New Zealand

Notes on Apache install

Post by Krazy »

Hi,

Just thought I add some comments regarding nobspangle's updated HOWTO, but from a Home 4.0 perspective.

As of the 17th July 05(*), only apache2, php, and mod_php are required to be installed as Home 4.0 already comes with the following preinstalled packages:
- mysql version 4.0.24 [*up-to-date]
- samba version 3.0.10 [*up-to-date]

Also, as of 17 July 05, apache2 is at version apache-2.0.54-r8.
This has a number fixes over the one mentioned in the updated HOWTO. Nopspangle wrote:


The Apache ebuilds are a bit broken and don't create a few folders they need to so we'll make them ourselves, here's one to hold the log files.

Code: Select all

mkdir /var/log/apache2
<snipped>

Code: Select all


mkdir /etc/apache2/conf/ssl 
mkdir /var/cache/apache2 
cd /etc/apache2/conf/ssl/ 
/usr/lib/ssl/apache2-mod_ssl/gentestcrt.sh
All the directories made manually above are now created automatically when emerging, so there's no need to do this yourself. Also emerging causes a self-signed test certificate to appear in

Code: Select all

/etc/apache2/conf/ssl
so I don't think running the shell script is required either.

Also note that emerge will install an updated PHP (and mod_php); currently you will get 4.4.0.
If your after version 5.x, then you need to take a look at this: http://gentoo-wiki.com/HOWTO_Apache2_with_PHP_MySQL

Finally, phpBB (version 2.0.16) has BLOCKED status in emerge. Too many "security issues" is then given as the reason. So for now you'll have to find another way to see if they all play together nicely ;)
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

Nobspangle, have you ever got active server pages (.asp) working under linux? I installed apache-asp and it all seemes to install ok but when you run any .asp's 'spooky login' it runs like a three legged donky!
Just wondered if you had any experiances!
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
dsltech_dude
Newbie
Posts: 3
Joined: Tue Aug 30, 2005 7:36 pm

Post by dsltech_dude »

I still can't get PHP to work on my box. I've got everything installed. Apache shows the default .htm page, but index.php just shows the file source. I've checked my conf files, followed three tuts on installing. And get nothing.
apache2 status shows running, but webmin has the X and gives an error when I try to start. Any suggestions?

I can post the contents of any config files if you need.


EDIT: Using Gentoox Home 5 I believe.

Thanks,

DSLTech_Dude
Krazy
Adept
Posts: 54
Joined: Wed Sep 10, 2003 8:41 pm
Location: Auckland, New Zealand

Post by Krazy »

dsltech_dude wrote:Using Gentoox Home 5 I believe.
Well that's your problem! Home 5 hasn't been released yet :wink:

Have you tried the simplest page you can think of e.g. "test.php" containing just

Code: Select all

<?php phpinfo()?>
v1.1 xbox, stock HD, soft-modded [uxe+ dualboot: UnleashX/GentooX], with Pro2.0
v1.4 xbox, stock HD, Xecuter3 (X3 3294), running headless with Home 6.1
Zombie13
Linux User
Posts: 19
Joined: Tue Nov 04, 2003 8:35 pm
Location: United Kingdom

Post by Zombie13 »

dsltech_dude wrote:I still can't get PHP to work on my box. I've got everything installed. Apache shows the default .htm page, but index.php just shows the file source. I've checked my conf files, followed three tuts on installing. And get nothing.
apache2 status shows running, but webmin has the X and gives an error when I try to start. Any suggestions?

I can post the contents of any config files if you need.


EDIT: Using Gentoox Home 5 I believe.

Thanks,

DSLTech_Dude
Have a look here... http://uk.php.net/manual/en/install.unix.apache2.php

I ran into the same problem when I first installed Apache. Take notice of the "LoadModule" and "AddType" parts on that page. :)
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

Please can you elaborate, I have installed apache (emerge apache2) and got it working, but for some reason emerge mod_php didn't work because 'the file was not on the server' so I left it a month and last night I ran emerge mod_php and it installed. But now I can't get apache to use it. What do I do now?
I folowed the link above but I still cant get it going, any help would be great as I want to get phpsysinfo working.
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
vplayer
1337
Posts: 442
Joined: Thu Oct 07, 2004 11:06 pm
Location: USA

Post by vplayer »

hi,

did you update config /etc/conf.d/apache2 with
APACHE2_OPTS="-D SSL -D PHP4"

and
Restart Apache: /etc/init.d/apache2 restart
Box: XBOX ver 1.1
Mod: Xecutor 2.3 lite+
Hdd: WD 80GB
Dash: Evox, Ava, XBMC
Linux: Gentoox Pro 4.2
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

Yeh I did thanks, mod_php had added #APACHE2_OPTS="-D SSL -D PHP4" so I just removed the '#' and restarted apache, but when I browse to http://mail.cheesyboofs.co.uk/info/index.php it just prints the php instead of running it!
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
clpalmer
Power user
Posts: 288
Joined: Sat Jan 29, 2005 6:38 pm

Post by clpalmer »

I don't recall what I did way back when I set up php with apache, but I did a little tinkering with my apache install (that I don't really use) and all I had to do with it was define the -D PHP4 for it to work. One thing to check, though. After you defined that, did you refresh the page in your browser. Make sure it's not just displaying the cached screwed up version. Small thing, I know, but It's got me before =)

Another thing to try might be making a simple test php script in case there's something that it doesn't like about phpsysinfo. Try adding this to info.php:

Code: Select all

<head>
<title> PHP Test Script </title>
</head>
<body>
<?php
phpinfo();
?>
</body>
</html>
and executing that.
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

Thanks for reply,
Make sure it's not just displaying the cached screwed up version. Small thing, I know, but It's got me before =)
If you click on my link above and it doesn't work for you either then it can't be a cache problem :wink:

I have created your script and posted it http://mail.cheesyboofs.co.uk/info/info.php but what 'should' it do? If the page is supposed to be blank then php is working and it's phpsysinfo that is not...

Also when I try to install phpBB it says the same!
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
cheesyboofs
Power user
Posts: 239
Joined: Wed Jan 26, 2005 1:32 pm
Location: Luton UK
Contact:

Post by cheesyboofs »

I've just checked the /etc/apache2/conf/modules.d directory refered to by the /etc/conf.d/apache2 file and I dont have any mod_php files???

-rw-r--r-- 1 root root 3213 Jul 22 07:15 40_mod_ssl.conf
-rw-r--r-- 1 root root 8053 Jul 22 07:15 41_mod_ssl.default-vhost.conf
-rw-r--r-- 1 root root 583 Jul 22 07:15 45_mod_dav.conf
-rw-r--r-- 1 root root 902 Jul 22 07:15 46_mod_ldap.conf

whats going on?
Go fully native, it's the destiny of all Mk1 XboxesImage
The needs of the many out way the needs of the few or the one ...
vplayer
1337
Posts: 442
Joined: Thu Oct 07, 2004 11:06 pm
Location: USA

Post by vplayer »

hi,

dont know whether the emerge got you php5 so go ahead and change PHP4 to PHP5 and try.

If that doesnt work, i kinda remember that i did emerge apache2 && emerge mod_php . I will try to find out that for you..
Box: XBOX ver 1.1
Mod: Xecutor 2.3 lite+
Hdd: WD 80GB
Dash: Evox, Ava, XBMC
Linux: Gentoox Pro 4.2
Post Reply