LinuxQuestions.org
Visit Jeremy's Blog.
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-08-2002, 02:03 PM   #1
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
PHP not working


Hi all,

I'm running Slackware 8.1 on a P233. It's a recent install since my last server died on me, and I installed Apache and PHP during the initial Slack install. I'm running Apache 1.3.26 and PHP 4.2.1.

Apache was pretty much going with a few simple tweaks to httpd.conf. I knew PHP was installed, but tried to include mod_php.conf in httpd.conf to test it; at first it didn't work at all, and I got the error: "libmysqlclient.so.10: cannot open shared object file: No such file or directory". I did "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mysql/lib/mysql" and the error went away, but it said mod_php was already loaded when I restarted httpd.

At this point, I have added index.php to my DirectoryIndex, and also added the line "AddType application/x-httpd-php .php
" in httpd.conf, but I still cannot view PHP files on my web server. It's asking me if I want to download the index.php file, it's not handling it. But WHY?!?!

Also, when I run export LD_LIBRARY_PATH.... it doesn't stick. It stays until I log in againand I have to do it again if I want to reload httpd or I get the same error mentioned above.

Thanks a ton and I'm sorry if I didn't explain clearly.
 
Old 08-08-2002, 03:18 PM   #2
champ
Member
 
Registered: Jul 2002
Distribution: Slackware 10.0
Posts: 46

Rep: Reputation: 16
First of all, I don't think you have to include mod_php.conf.
The reason you get that error is that the php module is loaded in the httpd.conf.

Check that you have these lines in httpd.conf:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c

If you have these lines you don't have to include mod_php.conf.
And since you have added the AddType..., it should work.

To check if php is running, you can do this after you have restarted your server:
lynx http://localhost -dump -head | grep Server

About the library thing, its much simpler and just add the library path in your /etc/ld.so.conf and just run ldconfig.
 
Old 08-08-2002, 08:06 PM   #3
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by champ
First of all, I don't think you have to include mod_php.conf.
The reason you get that error is that the php module is loaded in the httpd.conf.

Check that you have these lines in httpd.conf:
LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c

If you have these lines you don't have to include mod_php.conf.
And since you have added the AddType..., it should work.

To check if php is running, you can do this after you have restarted your server:
lynx http://localhost -dump -head | grep Server

About the library thing, its much simpler and just add the library path in your /etc/ld.so.conf and just run ldconfig.
Thanks champ, I checked through my httpd.conf and I was not loading/adding the php module with the commands you gave. I'm not sure why it said it was already loaded when I tried the Include before though.

I added the path to ld.so.conf and ran ldconfig like you said yesterday and it didn't work. It said it could not find the file.... although I can only suspect permissions but I did it as root. I'll look into it some more because I have to set LD_LIBRARY_PATH every time to load httpd...

Thanks for the help
 
Old 08-22-2002, 10:25 AM   #4
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Rep: Reputation: 30
Same problem, but what if I don't have MySQL and
just want to use PHP for testing or other than
database access? Can PHP be loaded w/o MySQL?
 
Old 08-22-2002, 10:56 AM   #5
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
You can use PHP without MySQL, but you may have to recompile PHP without MySQL support. I don't think there's a way to disable it in the conf files or php.ini.

Someone with a little more experience may be able to correct me though
 
Old 08-22-2002, 02:23 PM   #6
raypen
Member
 
Registered: Jun 2002
Location: Midwest
Distribution: Slackware
Posts: 365

Rep: Reputation: 30
Went ahead and installed MySQL 3.23.52. I notice there is no libmysqlclient.so.10
only libmysqlclient.a in the distribution. Does this mean that I will have to use
APXS to compile a DSO in order to get the right file or is it located somewhere
else. NOTE: I just downloaded the binary and installed it.
 
Old 08-22-2002, 03:01 PM   #7
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Original Poster
Rep: Reputation: 15
I'm not sure, I compiled MySQL on my machine.

If you haven't already, try 'find / -name libmysqlclient.so.10' to make sure it's not hidden somewhere.

If it isn't there, and you are able to use apxs to create the DSO from libmysqlclient.a then I would think it would work, but I have never used apxs.
 
  


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
PHP not working eikeland Linux - Software 4 07-13-2005 07:00 PM
Help getting php working TheDirtyPenguin Linux - Software 12 03-19-2004 05:19 AM
PHP not working SoftwareParadis Linux - Software 1 06-08-2003 03:02 PM
PHP Not working.. Dirt Linux - Newbie 1 06-06-2003 08:22 PM
PHP Not working? hubergeek Linux - Software 1 03-26-2002 10:29 AM

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

All times are GMT -5. The time now is 04:51 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