Results 11 to 20 of 20
Greetings,
If still you are not able to reset the password for MySQL please refer to the following link:
http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html
Regards...
- 05-18-2005 #11Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
Greetings,
If still you are not able to reset the password for MySQL please refer to the following link:
http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html
Regards
- 05-19-2005 #12Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
Ive gotten this far in the terminal. I wasn't able to do the stuff in the terminal. It did not reconize the first part. I got this far however:
I've tried resetting the password using this document: http://sunsite.mff.cuni.cz/MIRRORS/f...rmissions.html as well as using another way to do the same thing. I've tried using webmin to reset the password. But I am still unable to use MySQL. Maybe there is something wrong with my (unchanged) PHP settings that is not allowing MySQL to be used.Usage: /usr/lib/mysql/mysql_config [OPTIONS]
Options:
--cflags [-I'/usr/include/mysql']
--libs [-L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm]
--socket [/var/lib/mysql/mysql.sock]
--port [3306]
--version [3.23.58]
Webmin can edit/add/change anything mysql, but I can't do anything using PHP. I even tried installing PHPBB:
Should I reinstall MySQL? (which download then?)phpBB : Critical Error
Could not connect to the database
- 05-19-2005 #13Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
Greetings,
If you can't get back from the point you are I wud suggest you to reinstall the MySQL. You can find the appropriate version of MySQL from http://www.mysql.com as it depends on your requiremnet which version of MySQL you want.
Regards
- 05-21-2005 #14Just Joined!
- Join Date
- Dec 2004
- Location
- localhost
- Posts
- 56
I've done that twice. Once with the RPM version: I don't have two of the needed lib's. And I tried with the .tar.gz type file, following instructions, which did nothing and I still have the old version. I guess I can live without MySQL...
Originally Posted by KidCloudWala
I tried to install an FTPd program, and now I need libtasn1.so.2 which I don't know where to get, and if I knew where to get it, how to install it.
I'll continue to look for an FTPd program, or attempt to fix my upload script I tried to make (which might be better than getting an ftpd program working...). Here is the script anyway:
I am probably going to try to find a simple upload file code that someone else made, and edit it to my needs because this doesn't seem to be working correctly.Code:<?php require("auth.php"); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>FC3 Server Upload Area</title> <style type="text/css"> td{font-family:Arial;font-size:12px;} .t1{background:#eeeeee;border:1px solid #445970;border-width:1px 1px 1px 1px;} .t2{background:#667b92;border:1px solid #445970;border-width:1px 1px 1px 1px;} .t3{background:#889db4;border:1px solid #445970;border-width:1px 1px 0px 1px;} a:link{color:#667b92;text-decoration:underline;} a:visited{color:#667b92;text-decoration:underline;} </style> </head> <body> <table width="100%" cellspacing="1" cellpadding="0" class="t2"> <tr> <td align="center"><font color="#FFFFFF">FC3 Server Upload Area</font></td> </tr> </table> <table width="100%" cellspacing="1" cellpadding="0" class="t3"> <tr> <td align="center"><font color="#FFFFFF">Specs</font></td> </tr> </table> <table width="100%" cellspacing="2" cellpadding="0" class="t1"> <tr> <td> <?php // Disk information $disk_total = disk_total_space("/"); $disk_free = disk_free_space("/"); $r_disk_total = round(disk_total_space("/")/1024/1024/1024,3); $r_disk_free = round(disk_free_space("/")/1024/1024/1024,3); $used = $r_disk_total - $r_disk_free; $usage = (($disk_free / $disk_total) * -100) + 100; echo "<table cellpadding=\"1\" cellspacing=\"0\"> <tr> <td width=\"125\">Disk free:</td> <td>" .$r_disk_free. " gigabytes.</td> </tr> <tr> <td>Disk used:</td> <td>" .$used. " gigabytes.</td> </tr> <tr> <td>Disk total:</td> <td>" .$r_disk_total. " gigabytes.</td> </tr> <tr> <td>Disk usage:</td> <td>" .round($usage). "%.</td> </tr> </table>"; ?> </td> </tr> </table> <table width="100%" cellspacing="1" cellpadding="0" class="t3"> <tr> <td align="center"><font color="#FFFFFF">Management</font></td> </tr> </table> <table width="100%" cellspacing="2" cellpadding="0" class="t1"> <tr> <td> <?php // >>> Uploader Script <<< echo "<a href=\"logout.php\">Logout</a> <a href=\"?type=\">Uploaded file index</a> <a href=\"?type=mkdir\">Make a directory</a> <a href=\"?type=rmdir\">Remove a directory</a> <a href=\"?type=upfile\">Upload file(s)</a> <a href=\"?type=unlink\">Remove a file</a> "; if ($_GET['type'] == "mkdir" | $_POST['type'] == "mkdir") { /*** Make dir ***/ if ($_POST['confirm'] == "y") { mkdir($_POST['path']. "/" .$_POST['name'], $_POST['chmod']) or die("Could not create the directory."); } else { echo "<form action=\"\" method=\"post\"> Make a directory <table cellpadding=\"1\" cellspacing=\"0\"> <tr> <td width=\"125\">Name:</td> <td><input type=\"text\" name=\"name\"></td> </tr> <tr> <td>Path:</td> <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td> </tr> <tr> <td>Chmod:</td> <td><input type=\"text\" name=\"chmod\" value=\"0755\"></td> </tr> <tr> <td><input type=\"hidden\" name=\"type\" value=\"mkdir\"> <input type=\"hidden\" name=\"confirm\" value=\"y\"></td> <td><input type=\"submit\" value=\"Create\"></td> </tr> </table> </form>"; } /*** END Make dir ***/ } else if ($_GET['type'] == "rmdir" | $_POST['type'] == "rmdir") { if ($_POST['confirm'] == "y") { rmdir($_POST['path']. "/" .$_POST['name']); } else { echo "<form action=\"\" method=\"post\"> Remove a directory <table cellpadding=\"1\" cellspacing=\"0\"> <tr> <td width=\"125\">Name:</td> <td><input type=\"text\" name=\"name\"></td> </tr> <tr> <td>Path:</td> <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td> </tr> <tr> <td><input type=\"hidden\" name=\"type\" value=\"rmdir\"> <input type=\"hidden\" name=\"confirm\" value=\"y\"></td> <td><input type=\"submit\" value=\"Remove\"></td> </tr> </table> </form>"; } } else if ($_GET['type'] == "unlink" | $_POST['type'] == "unlink") { if ($_POST['confirm'] == "y") { unlink($_GET['name']) or die("Could not delete the file."); } else { echo "<form action=\"\" method=\"post\"> Remove a File <table cellpadding=\"1\" cellspacing=\"0\"> <tr> <td width=\"125\">Name:</td> <td><input type=\"text\" name=\"name\"></td> </tr> <tr> <td>Path:</td> <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\"></td> </tr> <tr> <td><input type=\"hidden\" name=\"type\" value=\"unlink\"> <input type=\"hidden\" name=\"confirm\" value=\"y\"></td> <td><input type=\"submit\" value=\"Remove\"></td> </tr> </table> </form>"; } } else if ($_GET['type'] == "upfile" | $_POST['type'] == "upfile") { if ($_POST['confirm'] == "y") { extract($_POST); $file1_name = $HTTP_POST_FILES['upload1']['name']; $file1_size = $HTTP_POST_FILES['upload1']['size']; $file1_type = $HTTP_POST_FILES['upload1']['type']; $file2_name = $HTTP_POST_FILES['upload2']['name']; $file2_size = $HTTP_POST_FILES['upload2']['size']; $file2_type = $HTTP_POST_FILES['upload2']['type']; $file3_name = $HTTP_POST_FILES['upload3']['name']; $file3_size = $HTTP_POST_FILES['upload3']['size']; $file3_type = $HTTP_POST_FILES['upload3']['type']; if (file_exists($path."/".$HTTP_POST_FILES['upload1']['name']) && $overwrite != "y") { echo "File already exists for upload 1."; exit(); } else { echo "Note: A previous file by the same name as upload 1 has been overwritten. "; } if (file_exists($path."/".$HTTP_POST_FILES['upload2']['name']) && $overwrite != "y") { echo "File already exists for upload 2."; exit(); } else { echo "Note: A previous file by the same name as upload 2 has been overwritten. "; } if (file_exists($path."/".$HTTP_POST_FILES['upload3']['name']) && $overwrite != "y") { echo "File already exists for upload 3."; exit(); } else { echo "Note: A previous file by the same name as upload 3 has been overwritten. "; } // If hosted in web directory if (strpos($path, "/var/www/html/")) { str_replace("/var/www/html/", "http://fc3.quate.net/", $path); } $ftmp = $HTTP_POST_FILES['upload1']['tmp_name']; $fname = $HTTP_POST_FILES['upload1']['name']; move_uploaded_file($ftmp, $fname); $ftmp = $HTTP_POST_FILES['upload2']['tmp_name']; $fname = $HTTP_POST_FILES['upload2']['name']; move_uploaded_file($ftmp, $fname); $ftmp = $HTTP_POST_FILES['upload3']['tmp_name']; $fname = $HTTP_POST_FILES['upload3']['name']; move_uploaded_file($ftmp, $fname); if (!(is_uploaded_file($_FILES['upload1']['tmp_name']))) { } else { echo "Upload 1 sucessfully uploaded. The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES['upload1']['name']. "\">" .$path. "/" .$HTTP_POST_FILES['upload1']['name']. "</a> "; } if (!(is_uploaded_file($_FILES['upload1']['tmp_name']))) { } else { echo "Upload 2 sucessfully uploaded. The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES['upload12']['name']. "\">" .$path. "/" .$HTTP_POST_FILES['upload2']['name']. "</a> "; } if (!(is_uploaded_file($_FILES['upload1']['tmp_name']))) { } else { echo "Upload 3 sucessfully uploaded. The file is located at <a href=\"" .$path. "/" .$HTTP_POST_FILES['upload3']['name']. "\">" .$path. "/" .$HTTP_POST_FILES['upload3']['name']. "</a> "; } } else { echo "<form action=\"\" method=\"post\"> Upload file(s)<table cellpadding=\"1\" cellspacing=\"0\"> <tr> <td width=\"125\">Upload:</td> <td><input type=\"file\" name=\"upload1\" value=\"\"></td> </tr> <tr> <td>Upload:</td> <td><input type=\"file\" name=\"upload2\" value=\"\"></td> </tr> <tr> <td>Upload:</td> <td><input type=\"file\" name=\"upload3\" value=\"\"></td> </tr> <tr> <td>Chmod for all:</td> <td><input type=\"text\" name=\"chmod\" value=\"0755\"></td> </tr> <tr> <td>Path for all:</td> <td><input type=\"text\" name=\"path\" value=\"/var/www/html/\" disabled></td> </tr> <tr> <td>Overwrite previous files?</td> <td><input type=\"checkbox\" name=\"overwrite\" value=\"y\"> Yes</td> </tr> <tr> <td><input type=\"hidden\" name=\"type\" value=\"upfile\"> <input type=\"hidden\" name=\"confirm\" value=\"y\"></td> <td><input type=\"submit\" value=\"Upload\"></td> </tr> </table> </form>"; } } ?> </td> </tr> </table> <div align="right">[img]fedora_linux.png[/img]</div> </body> </html>
Well, thanks everyone for all the help. Although I didn't get too far with getting MySQL to work, I've learned somethings durring the process.
Thanks.
- 05-21-2005 #15hotscripts.com seems to have a lot of stuff that should fit that bill.
Originally Posted by version2
- 06-01-2005 #16Just Joined!
- Join Date
- Jun 2005
- Posts
- 2
Re: Setting up PHP and MySQL
I am running Fedora CORE 3 on one computer. I get a error when use php connect to mysql:
#2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
Mysql already started. I can work with mysql in Konsole.
Anyone help me, pls! Thanks.
- 06-01-2005 #17Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
FTP File Upload Code
Greetings,
Version2 please try the under mentioned file upload code for FTP
##############################
#!/bin/sh
HOST=<IP Address of the FTP Server>
USER=<Username>
PASS=<Password>
FILE="$1"
FOLDER="$2"
MODE="$3"
if [ $MODE == "" ]; then
MODE="ascii"
fi
echo "Uploading file $FILE"
ftp -in $HOST << END
user $USER $PASS
$MODE
cd $FOLDER
hash
mput $FILE
bye
END
############################
Regards
- 06-01-2005 #18Just Joined!
- Join Date
- Apr 2005
- Posts
- 88
MySQL Connect
Greetings,
Just create the mysql.sock file using the touch command i.e. touch /var/lib/mysql/mysql.sock and the start the mysql server. To start the mysql server start the mysqld server by giving the command
service mysqld start.
Regards
- 06-01-2005 #19Just Joined!
- Join Date
- Jun 2005
- Posts
- 2
Re: MySQL Connect
I have done but still get the same error.
Originally Posted by KidCloudWala
Pls help me!
- 10-26-2009 #20Just Joined!
- Join Date
- Oct 2009
- Posts
- 19
Hello...
I had this problem too, and this way worked pretty good with me....I have a question about this, does it mean that every php file saved in this folder that I want to see has to be first used with the chmod command? or can I just make the chmod 777 /var/www/html for the entire folder?
thanks for your responses


Reply With Quote

