LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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.

Notices

Reply
 
Search this Thread
Old 11-08-2003, 05:55 PM   #1
ugol
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
apache php-mysql configuration problems


Hello everybody! This will be a little bit hard to explain, but I will try and hope I will get an answer to this. I really do!
I'm trying to learn some PHP and of course run in to a trouble right away trying to configure it. First of all let me tell what I got at this moment. Apache 2.0 witch I installed from the Mandrake 9.1 CD(runs on localhost). MySql server runs on localhost as well and installed from Mandrake 9.1 CD. PHP 4 with MySql support installed from Mandrake 9.1 CD. In order to check if PHP works I created the script:
<?php
print phpinfo();
?>
It gives me a lot of info on the PHP(there is section about mysql as well). Then I tried to create MySql database using PHP and it worked perfectly fine(here a learned functions like mysql_create_table().
Then I created an html form, witch allows a user to upload pictures to the server and here when I got the first problem. PHP returned the error message "safe_mode restriction in effect" It was telling me that script with UID 21 can not access directory with UID 501.
After I make a research I found out that my PHP came preconfigured for me. And it order to make it do what I want it to do I need to edit php.ini file in /etc directory. I went to /etc but php.ini was not there. Then I decided to find out if there is any files like php.ini anywhere in my computer and found 2 files in /usr/share/doc/libphp. One is php.ini-recommended and another one php.ini-destro. I checked php.ini-recommended and found out that safe_mode was off in it. And then I moved it to the /etc directory and renamed it to php.ini. After that the scrip that uploads files to my server worked just fine, but I got a problem with MySql. The script that was creating tables in Mysql returned error message that there is no such a function like mysql_create_table(). I checked phpini() script and it returned info without mysql section in it. Then I removed this php.ini file again and after restart I was able to create tables in MySql but was not able to uploads any files. Now looks like I can not use MySql future with the file uploading future together.
I will appreciate if anybody can drop a line with an idea how to make it work. I'm new in Linux Apache PHP and MySql. I'm ex-windows user. And I really REALLY like LINUX!!
 
Old 11-08-2003, 09:13 PM   #2
akaBeaVis
Guru
 
Registered: Apr 2003
Location: Maryland
Distribution: Slack 9.1,10 Mandrake 10,10.1, FedCore 2,3, Mepis 2004, Knoppix 3.6,3.7, SuSE 9.1, FreeBSD 5.2
Posts: 1,109

Rep: Reputation: 45
check out the section in that file (php.ini) that begins with "[MySQL]", there are things there that need to be set up, perhaps most important the "mysql_default...." stuff.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
mysql-php-apache problems.. khuti2005 Linux - Newbie 4 10-20-2005 03:28 PM
Apache/PHP/MySQL Problems! Ryand833 Linux - Software 1 04-13-2004 09:37 PM
Apache MySQL PHP configuration Gilion Linux - Software 1 02-02-2004 10:58 AM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
PHP/MYSQL Configuration drweb Linux - Newbie 3 06-29-2003 02:11 PM


All times are GMT -5. The time now is 03:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration