-   Linux - Software (
-   -   apache php-mysql configuration problems (

ugol 11-08-2003 05:55 PM

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:
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.:confused:
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!!

akaBeaVis 11-08-2003 09:13 PM

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.

All times are GMT -5. The time now is 03:52 PM.