Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I need some ideas/help with Apache, PHP, (MYSQL) issues.... I am in the process of setting up a web server using Apache, PHP, mysql, etc... (nuke/postnuke?) and have hit a snag.
and just in case you are wondering --- I have googled! (and searched various LUG's, etc... to no avail)
I currently have three domains configured ( using name based virtual domains ) but they are not live yet, so I can't provide the address... Two of the domains use standard html based pages and the third uses php.... The html pages work perfectly - using the correct domain name - but the php ones don't and fail with the following error: "file index.php is of the type application/x-httpd-php, and Mozilla does not know to handle this file type"... followed by the option to "save the file". If I replace the index.php page with an index.html file, it works fine. I have tried this from a few local machines... (I don't think the problem is with the browser - I can read other PHP based sites just fine :-)
Background - I have apache installed and running (html pages served correctly), apache-php module installed, PHP4 installed, etc....
note: I have checked httpd.conf and it contains the lines:
LoadModule php4_module /usr/lib/apache/1.3/libphp4.so and
DirectoryIndex index.html index.htm index.shtml index.cgi index.php
I checked and re-checked the config files..... Mysql is working (I can create and edit databases), but the php pages just won't load....
I also can't view local PHP based (non-database linked) pages: eg. If I point my browser to /usr/share/phpmyadmin/index.php I get the same error as above.
Hmm well I appear to have fixed mine when I uncommented the lines and restarted apache, but it seems Mozilla had cached the server response for the one php file I was testing with and wanted to download it. Going to a different php file in Moz worked, and using a different browser on the php file I was testing with worked as well. You might want to try the same strategy and see if that's what's happening to you.
Fatal error: Call to undefined function: mysql_connect()
Thanks for the replies and tips, however my problem still exists, although it has changed a bit....
I am not getting the above error anymore. I now get this instead:
"Fatal error: Call to undefined function: mysql_connect() in /usr/share/postnuke/pnadodb/drivers/adodb-mysql.inc.php on line 170"
this line relates to database authenticaion... but I have no trouble connecting to mysql using 'msqlcc', 'mysql Navigator', 'phpmyadmin' etc. so I guess it is some kind of apache - php - mysql issue still.
I am running debian (SID) using a custom 2.4.20 -6 SMP kernel
almost everything has been installed using apt-get and I have no incomplete/broken packages.... (just so you know)
note: I have completely uninstalled and reinstalled the following using debian's apt-get .... (using unstable versions = SID)
apache 1.3.27 (Debian/GNU Linux)
postnuke & drupal (I am trying both)
& any other dependecies
(i have checked again that all the required lines relating to php are in the httpd.conf file)
Note also, vigorous "googling" revealed that the above problem occurs (has occured) with some regularity on RH7* in relation to a php4-msql issue, but I have found no examples of this problem using debian.... (I did try a downgrade to the stable (woody) version of php4 / php4-mysql but again, nothing)
The *really* frustrating part is I have an almost identical configuration on my laptop and it works perfectly -
I am willing to look at *ANY* suggestions, ideas, hunches.... anyone?
I am not familier with apt-get, did you compile php? If you did you need to compile in mysql support into php, A basic configure line I use is:
Make sure to change the path to wherever the mysql is installed to. From the sounds of it you now have php working correctly if you are getting that error, You can see if you have mysql installed into php by creating a file called phpinfo.php and putting this line in the file:
<? phpinfo() ?>
Look for a section called mysql and that might help you out. Post back if you run into any more problems
No I didn't compile php (although I am getting to the point where I probably will). 'apt-get' is the debian download manager. the version of php4 I am using has mysql suport compiled in... some of the output from your <? phpinfo() ?> file: (mysql is listed near the end)
So your laptop can bring up the pages you were having problems with with mysql?
If so, are you using a desktop as your server? if you are you might just have something cached in your browser that is giving you problems, if your laptop is working fine then your server is probably working fine.
So I guess my question for you is: Is your laptop being able to serve pages off the server, that is pages that connect to a database?
Well I am glad I could at least get you thinking in the correct direction, now sit back and glow in the knowledge that you have it working, you have conquered the beast and you are king on your domain :-)