Hi I am hoping someone can help me to understand why I am getting varied results with some PHP code I have written to upload files to S3 then call an EC2 instance to perform actions on the uploaded file.
Here is the order i do things -
1) use S3 class to put file
$result = s3 -> putObjectFile($uploadDIR, $bucket, $name, S3::ACL)
...
I have a situation utilizing class table inheritance where the base object (which is abstract) is extended by specific types of the object.
For example, Person --> User --> Prospect
However, in some instances like with Prospect, sometimes it extends User and sometimes it doesn't. I can't reverse the relationship because User !== Prospe...
My site has a lot of dynamic stats with names of people, places and topics that all have their own associated pages. I want to automatically link each of these to their page based on data I've set up in a MySQL database of 'words' and 'links'.
What would be an efficient way of automatically linking 20-50 occurrences of potentially 15-20...
I store all my dates for post in my forum in datetime (0000-00-00 00:00:00).
I see that phpBB, punBB and all popular forums store dates in int?
What is better?
...
I have a variable $params which gets data from the database:
$params = mssql_fetch_array($result)
As far as I know, it is associative array. I want another array $tempParams to hold the value of this array. Can I assign it by using the following statement:
$tempParams = $params
In addition, do I need one single statement to decla...
I need to select a number of attributes for all of the users in a particular group from a PHP application. I realize that I could query the 'member' attribute of the group to get the dn of every member and then make a separate LDAP query for the attributes of each member. I am hoping however, that there is a single query that I can perfo...
Hi all,
This might be a too bigger ask, but before I outsource it, I would like to try to understand it first, and do it for myself.
I am working on a project that involves an existing database. I am building the site around the existing data, but have run into issues with timestamps. Basically, I am hoping someone can give me a snippe...
I'm developing my own PHP framework, and I'm trying to do things more "by the book".
I want to build login system. I have done this plenty of times, but now I just want to confirm/get some feedback on a system.
I know we need...
A Session Object
A User Object
A Login Controller
What my question is, is who holds what power?
Here's ...
Hi all,
After getting an answer from this thread, it would save me alot of retyping if any readers could refer to it: link text
I find that I need to update(within a mysql db) a timezone code, singularly (e.g 10+, 1-, etc) to olsen code (e.g "Europe/London", etc) according to what already exists within the user_timezone column. What wou...
I would like to scan a specific select tag for all the option-tags values and content in PHP. So that from this
<select>
<option value="donald">duck</option>
<option value="david">moose</option>
</select>
<select id="something"> <!--ignore this one -->
<option value="sdfas">fs</option> <!-- ignore this one -->
...
I would get somethin...
using Fast CGI I can't get it to read the php.ini file. See my phpinfo below.
System Windows NT WIN-PAFTBLXQWYW 6.0 build 6001
Build Date Mar 5 2009 19:43:24
Configure Command cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--with-snapshot-template=d:\php-sdk\snap_5_2\vc6\x86\template" "--with-php-build...
Suggestions for an updated title are welcome, as I'm having trouble easily quantifying what I'm trying to do.
This is a web-based form with PHP doing the calculations, though this question probably has an algorithmic or language agnostic answer.
Essentially, there is an Amount field and a Charge Code field.
The Charge code entered r...
The implementation used where I work uses about 10 columns in the table: CUSTOMFIELD1, CUSTOMFIELD2 etc. And every time I look at it, I think there must be a better way.
Not everyone will use all 10, some will use 0 and so there these empty columns just staring back at me, begging to be used.
So if there is a better way... ideally, I t...
Hi all,
I need to be grabbing the URL of the current page in a Drupal site. It doesn't matter what content type it is - can be any type of node.
I am NOT looking for the path to theme, or the base url, or Drupal's get_destination. I'm looking for a function or variable that will give me:
http://mydrupalsite.com/node/number
In full. E...
How do I post a variable in PHP without using a form, and accessing the variable from the next page.
What I am really trying to do though, is post a variable like this:
$username = "Sam";
$_POST[$username];
and then I am trying to access it from a page that I meta refresh to.
Any ideas?
...
INSERT INTO `test` (`x`, `y`) WHERE `id` = `$id`
VALUES (`$x`, `$y`)
Whats wrong with this query? I run this in a mysql_query() function in a php file.
...
Hi All,
I'm pretty new to iPhone SDK and Coca dev. I'd like to know how to call a web service which will take the lat and long values from my iPhone and feed them to a webservice so I can retrieve the City,State. I already have the phone location stuff squared away. I'm only looking for where I should pass this info to and how I can pars...
How can I secure the data that my session posts so that to reduce injections?
Is there perhaps something I need to add when I use $_SESSION[''] = $var; or when I retrieve the data by $var = $_SESSION[''];?
...
Hello, I have a folder named upload which is filled with folders of users uploaded files.
Is there any way I can stop people from directly downloading my users files by simply typing the folder names and file name into the address bar?
Example: user Jim's folder is stored at HOST/uploads/jim
user Jim's important file "myimportantfile....
As I know, strtolower makes the string all lowercase and ucfirst makes the string's first letter capitalised.
I am asking, is it possible to make every word within the string capitalised?
Example $string = "hello world" - How can I make this appear "Hello World"?
...