Results 1 to 10 of 20
I am running Fedora CORE 3 on one computer, and FC2 on another. I finally got some help with enabling apache (httpd actually), so that it works on boot. But ...
- 05-15-2005 #1Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
Setting up PHP and MySQL
I am running Fedora CORE 3 on one computer, and FC2 on another. I finally got some help with enabling apache (httpd actually), so that it works on boot. But now I want to get PHP and MySQL working with it. It looks like PHP is set up with Apache already, because it did this durring installation of the operating system, but it seems like it is a matter of enabling PHP and MySQL.
I get a error in the apache (httpd) error log when a php page with phpinfo() is viewed.
Here is the error I get in the apache log:
Any help would be nice. Thanks.[client 127.0.0.1] PHP Warning: Unknown(/var/www/html/users/index.php): failed to open stream: Permission denied in Unknown on line 0
[client 127.0.0.1] PHP Warning: (null)(): Failed opening '/var/www/html/users/index.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0
- 05-15-2005 #2
Re: Setting up PHP and MySQL
that part looks interesting. does the apache user have access to the users subdirectory?
Originally Posted by version2
the easiest thing to test php is to create a phpinfo file in a directory that you already know apache can read, like /var/www/html/
create a file called phpinfo.php and place it inside that dir. the file should only have this code
and then try to hit the pageCode:<?php phpinfo(); ?>
- 05-16-2005 #3Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
Re: Setting up PHP and MySQL
Thats what I thought I did, and that was the error I got: inside the apache error log. I'll try again though.
Originally Posted by jledhead
EDIT:
I get a blank page. Nothing outputted.
This is what is in the error log now:
[client 127.0.0.1] PHP Warning: Unknown(/var/www/html/phpinfo.php): failed to open stream: Permission denied in Unknown on line 0
[client 127.0.0.1] PHP Warning: (null)(): Failed opening '/var/www/html/phpinfo.php' for inclusion (include_path='.:/usr/share/pear') in Unknown on line 0
- 05-16-2005 #4Linux Newbie
- Join Date
- Sep 2003
- Location
- St.Charles, Missouri, USA
- Posts
- 201
Im gonna bet that the apache webroot isnt user writable so you made the file as root. Try
as root then retry viewing the file.Code:chmod 777 /var/www/html/phpinfo.php
Powered by Gentoo
never ever ever use the hardened option in make.conf!
- 05-16-2005 #5Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
PHP Error
Greetings,
Also, Can you check if you have the php-pear rpm installed as well or not?
Regards
- 05-17-2005 #6Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
I guess it was a permissions problem. I set it to 777 and it worked.
I'm pretty sure I have pear installed, and PHP works anyway. Now I have to see if MySQL works properly.
- 05-17-2005 #7Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
I installed Webmin on my Fedora CORE 3 computer. From there, I "started" MySQL so I could use it with PHP. However, I was trying to get Zpanel to work, but I don't know the root mysql password. It does not seem to be my "normal" root password.
(Sorry for the double post.)
- 05-18-2005 #8
if I am not mistaken (and its possible I am), mysql installs with a blank root password.
I use phpmyadmin for my sql stuff, seems to be a little better at that then webmin, not to knock webmin, I use that a lot
- 05-18-2005 #9Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
I don't use webmin for managing MySQL, I just started that service from webmin (then I fixed it so my computer would start MySQL on boot).
Originally Posted by jledhead
The blank password did not work. I've installed ZPanel, the same version before and it worked (actually last time I installed it, I used no root password, but that was on a windows computer).
EDIT: I have downloaded phpmyadmin, and I get an error:
This could be caused because of a number of reasons: for example file privilages aren't set properly, or because this version of phpmyadmin may not been tested with my version of MySQL. But until I test to see what the real problem is here, I'd thought I'd post this error anyway just incase it helps anyone.Error
MySQL said:
#2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
- 05-18-2005 #10
found this in another place
try that from command and see if you can get anything positiveTo see if mysql is running type this:
$ ps -aux | grep mysqld
You should get some output regarding the running mysqld processes
To set the root password do this from the terminal:
$ /usr/local/mysql/bin/mysql -u root -p
Password: (just hit return)
This should get you into the mysql command line interface.
Now type:
mysql> update user set Password=PASSWORD('your_password_here') where
User = 'root';
mysql> flush privileges
mysql> quit


Reply With Quote
