 |
 |
 |
 |
| Installation and Live Media Help with Installation & Live Media (Live CD, USB, DVD) problems. |

24th August 2012, 09:27 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
HELP...I seem to have forgotten the PHP basics
what is the name of the php conf file and where does it reside
I fixed the httpd.conf
|

24th August 2012, 09:31 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
Do you mean /etc/php.ini ?
|

24th August 2012, 10:45 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
I got that far to no avail...thanks anyway
|

25th August 2012, 01:47 AM
|
|
Registered User
|
|
Join Date: Jul 2005
Posts: 640

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
There are modular php.ini includes in /etc/php.d/
__________________
======
Doug G
======
|

26th August 2012, 06:54 AM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
I've gotten as far as the phpinfo display
after using yumex to install the basic php
a long working .PHP file no longer works with this error:
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/html/log_book_MySQL.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
Code:
<?php line zero?
/*
MySQL version handle_log_book_MySQL.php
drop table log_book;
create table log_book (rowID INT NOT NULL AUTO_INCREMENT,
fdate date, actype varchar(16), acid varchar(16), nlandings float, nhours float,
PRIMARY KEY(rowID));
insert into log_book values (0,STR_TO_DATE('08/12/1973', '%m/%d/%Y'),'C150', 'N5787G',1,1.8);
insert into log_book values (0,STR_TO_DATE('08/17/1973', '%m/%d/%Y'),'C150', 'N5787G',3,1.5);
insert into log_book values (0,STR_TO_DATE('08/26/1973', '%m/%d/%Y'),'C150', 'N5787G',10,1.8);
insert into log_book values (0,STR_TO_DATE('09/01/1973', '%m/%d/%Y'),'C150', 'N5293S',9,1.7);
insert into log_book values (0,STR_TO_DATE('09/02/1973', '%m/%d/%Y'),'C150', 'N5787G',10,1.8);
insert into log_book values (0,STR_TO_DATE('09/30/1973', '%m/%d/%Y'),'C150', 'N5787G',3,1.8);
insert into log_book values (0,STR_TO_DATE('10/07/1973', '%m/%d/%Y'),'C150', 'N6293S',4,1.5);
*/
global $connection;
$user = "";
$password = "";
session_start();
if (isset($_SESSION['userMySQL']))
{
$user = $_SESSION['userMySQL'] ;
echo "user :$user<BR>";
}
if (isset($_SESSION['passwordMySQL']))
{
$password = $_SESSION['passwordMySQL'] ;
echo "password :$password<BR>";
}
echo "start initial<BR>";
echo "user :$user<BR>";
echo "password :$password<BR>";
///DB CONNECTION
if(!$connection && $user && $password)
{
echo "user :$user<BR>";
echo "password :$password<BR>";
/* Connect to MySQL server and select database. */
$connection = mysql_connect("localhost",$user, $password)
or die ('Could not connect: '.mysql_error());
mysql_select_db("landon_logbook")
or die("Could not select database");
}
else
{
}
//construct a global variable for the form profile
$fields = array("fdate", "actype", "acid", "nlandings", "nhours");
///
---------- Post added at 09:27 PM ---------- Previous post was at 09:18 PM ----------
BINGO! had to make php files in /var/www/html right permissions
chmod 777 *
---------- Post added at 09:30 PM ---------- Previous post was at 09:27 PM ----------
start initial
user :
password :
loginMySQL
landon
****password*****
Fatal error: Call to undefined function mysql_connect() in /var/www/html/log_book_MySQL.php on line 114
OH NO I solved this problem eons ago
Code:
100 function loginMySQL(){
101 global $connection;
102 //session_start();
103
104 $_SESSION['userMySQL'] = $_POST['user'];
105 $_SESSION['passwordMySQL'] = $_POST['password'];
106
107 $user = $_SESSION['userMySQL'] ;
108 $password = $_SESSION['passwordMySQL'] ;
109 echo "loginMySQL<BR>";
110 echo "$user<BR>";
111 echo "$password<BR>";
112 ///DB CONNECTION
113 /* Connect to MySQL server and select database. */
114 $connection = mysql_connect("localhost",$user, $password)
115 or die ('Could not connect: '.mysql_error());
116
117 mysql_select_db("landon_logbook")
118 or die("Could not select database");
119 displayDeleteForm();
120 }
[COLOR="Silver"]
---------- Post added at 09:54 PM ---------- Previous post was at 09:30 PM ----------
yes I tried putting :
extension=php_mysql.dll
in the php.ini
file
Last edited by clariceoshea; 26th August 2012 at 06:32 AM.
|

26th August 2012, 11:21 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
You just opened a rather large security hole by giving anyone (and any thing) read/write/execute on any file in /var/www/html
Makes the password for the database useless of course.
|

27th August 2012, 06:23 AM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
yeah I knew that but I work as follows
(1) do whatever is required to get the thing working
(2) go back and undo unnecessary changes
still the problem is
Fatal error: Call to undefined function mysql_connect() in /var/www/html/log_book_MySQL.php on line 43
It was working BEFORE my machine cratered earlier this year
---------- Post added at 09:23 PM ---------- Previous post was at 09:00 PM ----------
EASY!
used yumex to install
php-mysql
|

27th August 2012, 02:31 PM
|
|
Registered User
|
|
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
Hopefully you weren't hacked before you fixed the security (and changed the database password).
|

27th August 2012, 05:01 PM
|
|
Registered User
|
|
Join Date: Jun 2010
Posts: 214

|
|
|
Re: HELP...I seem to have forgotten the PHP basics
thanks but this isn't the NSA, CIA or FBI
I could put the whole computer back in minutes
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Forgotten login
|
mikiehoran |
Using Fedora |
2 |
20th February 2007 10:57 PM |
|
Another forgotten password
|
bobhjon |
Using Fedora |
6 |
22nd October 2005 08:07 AM |
Current GMT-time: 08:43 (Friday, 24-05-2013)
|
|
 |
 |
 |
 |
|
|