Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
i am using the following rpms on redhat 8.0:
i'm having a slight issue and i can't figure out what it is.
php and mysql both work correctly -- independently of each other.
however, if i have a page on php that is supposed to do something to a database, it does not work. for example, if i have code that is supposed to connect to database xyz with username punt and password x123 and insert values to a db, it will not do so.
right now, i have a submit button that does "if submit... insert the data and redirect to the page. else: reload the form." and each time i hit the submit button, the form reloads.
i probably should get "else" to output the php error, but i don't know the php code for outputting the error.
but also, does anyone know specifically what may be wrong with my php-mysql configuration? is this a known problem?
i don't know if it's connecting to the database ok. but it doesn't say "warning, cannot connect to the database at mysql.sock" or whatever i usually get. in fact, the page that retrieves the records (i have an insert records page and a retrieval page) has no problems. it is only on the page with insertions that i am getting no inserts -- just a reload of the page... so it's executing the "else" which just reloads the form.
how can i output the actual error? what would the php command be?
i don't know about the $_POST[submit] or $_GET[submit] unless these are new additions to php 4.2.2. it worked before... that's why i'm clueless. and since i did a huge upgrade of httpd and the like, i'm thinking that something in my configuration of httpd/apache2.0 and mysql/php is wrong.
i ended up changing all the settings that looked possibly applicable in /etc/php.ini.
turns out that register_globals is turned off by default in php 4.2.2 but is on in earlier versions.
register_globals = On
was all i needed to do to fix it.
though i'm curious as to how to avoid a security breach, as the comments in php.ini say the following:
; You should do your best to write your scripts so that they do not require
; register_globals to be on; Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of