LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-20-2007, 03:09 AM   #1
cristopher5
Member
 
Registered: Jun 2006
Distribution: Slackware 13.1 & Suse 11.3
Posts: 46

Rep: Reputation: 15
Slackware 12 and apache,mysql,php


Hy
I run slackware 12.0 and i need apache,mysql and php, tu run on my pc.

i have install(from install cds) apache(httpd-2.2.4-i486-6), mysql-5.0.37-i486-1 and i have install from the pachage php-4.4.7-i486-1_slack11.0.

the problem is how to configure this 3 programs?

first i have try to config php but dont work.
This steps i have make:
locate -u

locate httpd.conf
Code:
/etc/httpd/original/httpd.conf
/etc/httpd/httpd.conf
locate libphp4.so
Code:
/usr/libexec/apache/libphp4.so
edit httpd.conf
Code:
LoadModule php4_module /usr/libexec/apache/libphp4.so
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps
apachectl start
Code:
httpd: Syntax error on line 116 of /etc/httpd/httpd.conf: Cannot load /usr/libexec/apache/libphp4.so into server: /usr/libexec/apache/libphp4.so: undefined symbol: ap_user_id
can somebody help me,pls
thanks
 
Old 08-20-2007, 03:46 AM   #2
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
slackware switched from apache1 in slack11 to apache2 in slack12
maybe the php4 package from slack11 isn't compatible with apache2

maybe try to compile php4 from source? You could try to use the slackbuild from slack11.
 
Old 08-20-2007, 05:43 AM   #3
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
go to any slackware mirror site and find the pkgs you need there - upgrade them - then look in /etc/httpd - all the files you will need to edit are there, apart from mysql - i norm use phpmyadmin to change anything there

to load php all you have to do, is go right to the bottom of httpd.conf and uncomment out the php line and then restart apache

slackware-12.0/slackware/ap/mysql-5.0.37-i486-1.tgz
slackware-12.0/slackware/n/httpd-2.2.4-i486-6.tgz
slackware-12.0/slackware/n/php-5.2.3-i486-2.tgz
 
Old 08-20-2007, 01:01 PM   #4
cristopher5
Member
 
Registered: Jun 2006
Distribution: Slackware 13.1 & Suse 11.3
Posts: 46

Original Poster
Rep: Reputation: 15
i have unistall php-5.2.3-i486-2.tgz because my aplication was make on php4(under windows) and not work correctly on this version.
How can i make php4 to run under slack 12?
thanks
 
Old 08-20-2007, 02:57 PM   #5
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
Quote:
i have unistall php-5.2.3-i486-2.tgz because my aplication was make on php4(under windows) and not work correctly on this version.
How can i make php4 to run under slack 12?
thanks
Too bad, since support for PHP4 will end in December of this year.

Dennisk
 
Old 08-20-2007, 05:41 PM   #6
johncook
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
Christopher,

Skipping over the php4 thing for the moment:

Assuming its and out of the box install with Slack 12 and that you told it to start apache and mysql in the menu during install.

If you didn't then start by chmod +x /etc/rc.d/rc.httpd and /etc/rc.d/rc.mysqld

Edit the /etc/httpd/httpd.conf - scroll right to the bottom and find the line that relates to the PHP mod and uncomment them. That's the only thing you need to do to get PHP working - it's actually including a seperate mod_php.conf file but i think you've already covered these bits in your original post. You may want to tweak /etc/httpd/php.ini but unlikely. You'll probably want to add lots of other stuff like Servername and other config to the apache config - see the manual which is helpfully included in /var/www/htdocs/manual/ and is therefore in localhost/manual/ if apache is running.

mysql comes with no db installed - do a less /etc/rc.d/rc.mysqld and read the instructions about installing the root db. When you do this you'll get a message about doing the all important setting passwords thing. If you need network access to the Mysql server - ie from another Webserver or Terminal then make sure you comment the SKIP-NETWORKING line in /etc/rc.d/rc.mysqld.

Right, comming back to the PHP4.0.....

hmm.... assuming that re-writing the code to function on PHP5 is not an option ( and assuming that there is not platform (windows) specific code in there that'll stop the php running )... the reference in the error to "undefined symbol: ap_user_id" looks like some incompatability between the php4 library and the apache binary.

I've had a punt around for php4 packages for Slack 12 but i can't find any. The only thing i can sugest is get the PHP source code and recompile the module against apache... failing that, get the apache 1.2 packages for slack11 to go with the php4 packages for slack11 - they _should_ have been compiled against each other and _should_ therfore work.

good luck with that.
 
Old 08-20-2007, 05:57 PM   #7
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
as far as i know php 4 support ended withslack 11
 
Old 08-21-2007, 11:51 AM   #8
janhe
Member
 
Registered: Jul 2007
Location: Belgium
Distribution: slackware64 14.2, slackware 13.1
Posts: 371

Rep: Reputation: 54
If you have the time and the will, you can compile php4 from source.

Just download and mount the appropriate slack 11 source cd iso. (you don't have to burn it per se, just "mount -o loop /path-to-iso-file /mountpoint", adapt to your own situation)
cd into the directory with the source, and run the file that ends in .SlackBuild
this should create a new package for you.

this might work, it might not.
I never ran a web server, and I only once compiled a package from the source cd, so my instructions may be incomplete.
 
Old 08-21-2007, 01:00 PM   #9
Carpo
Member
 
Registered: Aug 2003
Location: Somewhere
Distribution: Gentoo (for now)
Posts: 364

Rep: Reputation: 30
nevermind

Last edited by Carpo; 08-21-2007 at 01:02 PM.
 
Old 08-22-2007, 04:36 AM   #10
Orangutanklaus
Member
 
Registered: May 2006
Posts: 93

Rep: Reputation: 15
I use this thread because I had the same problem like the thread starter.
I installed a cms and edited the document root in the httpd.conf file and uncommented the php line to aktivate php.
After the restart I got a directory tree view (index of /) and a click at the index.php resulted in a download.

So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
Unfortunately I got the directory tree view again but a click at the index.php resulted in the correct display this time.

My only problem for now is the directory tree view when I open my site but I guess I will find the reason soon.

What I don't understand is why ever a proofed distribution like Slackware comes along with such a crazy configuration
mismatch in one of the most used features (xamp) under Linux.

Regards,
Orangutanklaus
 
Old 08-22-2007, 09:00 AM   #11
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 -current
Posts: 1,158

Rep: Reputation: 62
Quote:
Originally Posted by Orangutanklaus View Post
My only problem for now is the directory tree view when I open my site but I guess I will find the reason soon.
That's because you haven't properly edited the DirectoryIndex directive in httpd.conf. Locate the following section:
<IfModule mod_dir.c>
</IfModule>
and add index.php and restart the server. Check out apache documentation for more on this.
 
Old 08-22-2007, 11:04 AM   #12
Orangutanklaus
Member
 
Registered: May 2006
Posts: 93

Rep: Reputation: 15
Thank you. I figured it out already.
 
Old 12-11-2007, 11:23 PM   #13
hottdogg
Member
 
Registered: Aug 2004
Distribution: opensuse ,debian/ubuntu
Posts: 222

Rep: Reputation: 30
I'm new to LAMP development in slackware 12...

Quote:
Originally Posted by Orangutanklaus View Post

So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
yup, this is true, someone should contact Pat for the typo so he can correct it in -current

anyway,
what I want to ask is
how to make the development doesn't involves root login?
Because the default web directory is owned by root,nonroot php developer can't write in that directory. So ,developer can only code in home dir but can't preview.
What's the usual workaround for this?
Any suggestion?

sorry a little bit oot.
 
Old 12-14-2007, 02:13 AM   #14
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
in httpd.conf add/edit mod_userdir.c module, you would be able to access files with domain/~username/file
 
Old 12-14-2007, 01:35 PM   #15
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by hottdogg View Post
I'm new to LAMP development in slackware 12...

Quote:
Originally Posted by Orangutanklaus View Post

So I checked the modphp.conf file and saw that the path to the php5 module was wrong.
It was lib/httpd/modules/libphp5.so but the libphp5.so is located in /usr/lib/httpd/modules/libphp5.so.
I changed the path and restarted the deamon again.
yup, this is true, someone should contact Pat for the typo so he can correct it in -current
No, this is not true. The path is relative to the ServerRoot defined in httpd.conf (/usr by default), as are all the LoadModule directives.

Quote:
how to make the development doesn't involves root login?
Because the default web directory is owned by root,nonroot php developer can't write in that directory. So ,developer can only code in home dir but can't preview.
What's the usual workaround for this?
Any suggestion?
You could add a symlink from within /var/www/htdocs to the directory you like to code in. Alternatively you could make a directory in htdocs which is owned by your user. BTW, apache does not have root access either. It runs as the user and group defined in httpd.conf (apache:apache by default in apache2). If everything in htdocs is root:root, apache is only able to access them by virtue of their global privileges.

Brian
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APACHE,PHP, MYSQL - Slackware 10.2 Probs Tiepo Slackware 4 06-10-2006 08:01 PM
Slackware 10.2 + Mysql + Apache + PHP + Tomcat Black187 Slackware 5 11-16-2005 07:11 AM
Slackware 10.2 + Mysql + Apache + PHP + Tomcat Black187 Linux - General 1 11-16-2005 02:11 AM
Slackware 9.0 / MySQL /PHP/Apache ..? MikeFoo1 Linux - Newbie 2 05-03-2004 11:49 PM
Minimal Slackware + Apache + PHP + MYSQL 7s3an Slackware 5 03-24-2003 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration