Saving Site's Settings

I'm kinda new to PHP programming and I'm working on a large project at my university.Currently I'm working on adding as many choices to the Admin account so he could customize the site to his needs.All I wanted to know is what is the customary way in most sites to save these customization settings?Should I just put them in the database? Or maybe save them in a file (XML or some other kind)?Been scouring Google to find some information but didn't get anything useful so hopefully someone here could help me figure this out.

Moved: Draggables Saving State Cookie Behaviour

Saving Form Input To Folder

hello phpfreaks! first off i have zero knowledge of php. it's just that i need this in my project. what i would want to do is all the values input in the form "tracker.html" when the SUBMIT button is clicked will be saved in my desktop folder named "LOGS". the saved values will be save as an html file name "logs.html" then it can be viewed also by clicking on the PREVIEW button in the tracker. and also if can be done, each will be save separately according to it's CATEGORY.

Php Config Settings

Php Settings Pages

what I'm trying to do is to setup a page called settings.php that the admin runs to order to turn option in the web site on or off. I don't know how to do this since I never done this before. My code is below.

<link href="mainframe.css" rel="stylesheet" type="text/css">

<?phprequire_once '../config.php';

$db = new DbConnector();$db->DbConnector();

if(isset($_GET['submit'])) {

$db->query('UPDATE '.SETTING_TABLE.' SET option='.$_POST['banner'].' WHERE setname=''');

Server Settings

How do I setup my PHP code and server to accept custom domains on my program like tumblr does? http://www.tumblr.com/docs/en/custom_domainsI know the domain owner needs to do the A name part but what needs to be done my side?

Cheers in advance

Changing Network Settings

Hi,
I'm not sure if this is possible, however I'm sure somebody will be able to point me in the right direction. Relativley new to php here.
I would like to write a small app that will change my IP/Subnet Mask/Gateway depending on a selection made from a dropdown list. I will have a tota; of 50 different IP settings & drop downs (each drop down will represent a different location)
I have yet to start writing the app, just on paper so far - can this be done?
I have seen examples of batch scripts like the one below that work, would I need to incorporate something like this into my php?

Application User Settings

I'm working on a project and at some point ill need to save user specific settings ex: show/hide email etc... configuration file is not the case i thin because there are specific to every user, database will be the choice but what practice(logic) is the best to save these settings?Thank you!

Moved: Crontab Settings

Privacy Settings On A Social Network

I'm writing a mini social network and I'm having trouble figuring out how to deal with privacy settings.I have established a range of privacy options (level 1-4):
1. Only Facebook friends can see profile (users connect via FB)
2. Only current classmates
3. Past + current classmates
4. All users in given group
I am writing a function to return a list of available users based on a given parameter (eg. Find all classmates of a user). Obviously I have to respect users privacy settings, so I thought to query against all users with level 2 permissions, however I realise that I may miss out some classmates who are FB friends but have permission levels set to 1.

Secondly, I'm looking to find out the relationship between two users (a function that I can plug in 2 user IDs and return their relationship...classmates, FB friends, past classmates, no relationship) which I can then use to determine whether a user has permission to view another users profile.

I don't have much code as of yet, because I spent a long time exploring one avenue which I now realise to be the wrong one!

Any suggestions/help would be greatly appreciated!

How To Make Configuration Settings Available To All Scripts

I have a configuration file, and I use parse_ini_file() to parse it into an array at the initial entry point of my script.
I would like the settings to be available to all downstream scripts/methods/functions. Note that my intent is not to change them outside of the configuration file, and ideally they will be readonly, however, if not, I suppose that is okay and I will just be sure not to modify them.
I've read about dependency injection, and while this mostly makes sense, it seems like a lot of script/troubleshooting for little if any value for this scenario.
I've read that global variables are bad (couples your objects to some "god" object, cannot unit test, difficult to troubleshoot, difficult to work with multiple developers, potential conflicts with other classes, namespace pollution), but maybe not for this case?
Another option is defining a bunch of constants to the appropriate values, but this seems redundant.
Or maybe some static class with all the values?
What would be the best way to make configuration settings available to all PHP scripts, functions, and methods?

Error Reporting, Specific Settings

I have been working on this awhile (the perfect PHP error handling for my coding style). I have tried to set it up as: Code: [Select]<?phperror_reporting(E_ALL & E_STRICT & ~(E_NOTICE));?>I want this to show me E_ALL errors, E_STRICT errors, and NOT show me E_NOTICE.Is this the right way to set that up, or am I doing something wrong. I haven't used E_STRICT before butI am anxious to see what kind of errors that have it showing since I haven't messed with it before.

It Is Not Safe To Rely On The System's Timezone Settings. Help!

Hey everyone. I was hoping to get some help on something that I am working on.First, I hope this is the right place to post this. Please forgive me if this is the wrong forum.

I am new to PHP as I work mostly as a Sys Admin. Recently, I have been working on a project running a number of applications on PHP.I configured a box and a PHP application that has a web interface.

Everything looks good except for when I log into the web interface. I am greeted with this message: Code: [Select]Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/www/base/base_main.php on line 138nI have done a lot of research trying to figure out what is causing this.A lot of websites and posts on other sites suggested that the fix would be to make a change in the php.ini file in the : date.timezone section.

I did make that change, however the issue still persists.

I decided to make a quick test.php file to read the configuration file and see if I can get additional information.

I opened up the test.php web page and made sure I was reading the correct configuration file. Which, according to the test page, I am.

Moving forward, under the DATE section of the test.php file, I see this: Code: [Select]Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/www/apache22/data/test.php on line 2Which is what I see as well when I log into the application's interface.

Under that date section, it says the following:

Code: [Select]Default timezone -- America/Los_AngelesWhich is my timezone.For a test, I changed the "date.timezone" section in my php.ini file to "America/New York", restarted apache and loaded the config file backup.Looking at the date section again, the error is still there and the DEFAULT TIMEZONE is still pointing to "America/Los_Angeles".

So it appears that its not reading my config file or I am completely missing something.

Here is the full section of the DATE part of the test.php file: Code: [Select]date/time support enabled"Olson" Timezone Database Version 2011.4Timezone Database internalDefault timezone America/Los_Angeles

Directive Local Value Master Valuedate.default_latitude 31.7667 31.7667date.default_longitude 35.2333 35.2333date.sunrise_zenith 90.583333 90.583333date.sunset_zenith 90.583333 90.583333date.timezone no value no valueI have been trying to figure this out for the past few day with no luck.I was hoping someone might be able to help me out here.Thanks for the help.

TCG

Settings Page Redirects To Options.php When I Save

I am writing the code for my options page in my wordpress theme. It was working for awhile and the next time i checked, it couldnt save. When i hit save, it redirects to options.php. When i remove the code for the social options it still doesnt work and yet it was working before i included that code. What could be the problem
here is the code

Saving Operators From Url

I'm trying to get an equation from a user that types it in the url, ex) 1+2+3. I can get the 1,2,3 fine, but the + operator is no longer in the string. Same with the * and / operators. Is there a way to keep them as a string using $_GET?

Saving Checkboxes

Hi,I'm completely new to anything that is not html but I'm wondering if in something like php I can get a checkbox to permanently save through reloads and different machines. My idea was just to have a page with only a checkbox on it, and then load that through and iframe in html. If anybody could give me the code for that checkbox page (complete if possible as I don't really know anything about that type of programming) I would be very grateful.Thank You

Not Saving To Table

Am trying to update a table called "budget_request" and also inserting the data of that table into another table called "Budget". The Update works but it is not inserting into the other table. please help me out.. check my code below
<?php
$id = $_GET['id'];
?>
<?php

Saving Webpage As Pdf

I am looking for a way of saving currently open webpage as a pdf file.........I searched for that and even gone for this site http://www.tcpdf.org. But there also I didn't find any perfect way of doing this all....If somebody else has tried tcpdf for that or done something like that, then plzzzzz plzzz plzzzz do help me....Thanx......