Fedora Linux Support Community & Resources Center
  #1  
Old 24th August 2012, 09:27 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 214
linuxfirefox
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
Reply With Quote
  #2  
Old 24th August 2012, 09:31 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
Re: HELP...I seem to have forgotten the PHP basics

Do you mean /etc/php.ini ?
Reply With Quote
  #3  
Old 24th August 2012, 10:45 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 214
linuxfirefox
Re: HELP...I seem to have forgotten the PHP basics

I got that far to no avail...thanks anyway
Reply With Quote
  #4  
Old 25th August 2012, 01:47 AM
Doug G Offline
Registered User
 
Join Date: Jul 2005
Posts: 640
windows_vistafirefox
Re: HELP...I seem to have forgotten the PHP basics

There are modular php.ini includes in /etc/php.d/
__________________
======
Doug G
======
Reply With Quote
  #5  
Old 26th August 2012, 06:54 AM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 214
linuxfirefox
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.
Reply With Quote
  #6  
Old 26th August 2012, 11:21 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
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.
Reply With Quote
  #7  
Old 27th August 2012, 06:23 AM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 214
linuxfirefox
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
Reply With Quote
  #8  
Old 27th August 2012, 02:31 PM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,105
linuxfirefox
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).
Reply With Quote
  #9  
Old 27th August 2012, 05:01 PM
clariceoshea Offline
Registered User
 
Join Date: Jun 2010
Posts: 214
windows_xp_2003firefox
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
Reply With Quote
Reply

Tags
basics, forgotten, helpi, php

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

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)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat