php

Whats the best way to enter into a coding career?

Whats the best way to enter into a coding career? Do you need formal education and degrees or just a good portfolio? What programming languages are needed? Should you know more, or should you be specialized? Do you even have to attend college or a University, can you enter into one right outside of High School? What are your thought...

PHP File Upload...files disappearing into the great void..where noone can hear them scream..

Hi I am running Ubuntu8.041. Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch configured Can't get file uploading to work at all. Have tested locally on the Ubuntu box... and from my Vista Box. Ubuntu is running inside VMWare on the Vista box. Here is uploadTestBrowse.php <?php ?> <form enctype="multipart/form-data" a...

PHP: multiple SQL queries in one mysql_query statement

So I have an SQL dump file that needs to be loaded using mysql_query(). Unfortunately, it's not possible to execute multiple queries with it. -> It cannot be assumed that the mysql command-line client (mysql --help) is installed -- for loading the SQL file directly -> It cannot be assumed that the mysqli extension is installed /* cont...

PHP / Mail Server interaction...

First, this question is assuming that there is a working method for interacting with a Mail Server in this fashion. If it's not, please feel free to let me know. Second, I'm relatively new to working with Mail Servers, so any related reading materials would be greatly appreciated. I'm working on a project that allows the creation of o...

basic php form help (currency display)

You guys were very helpful yesterday. I am still a bit confused here though. I want to make it so that the numbers on the rightmost column are rounded off to the nearest dollar: http://www.nextadvisor.com/voip_services/voip_calculator.php?monthlybill=50&amp;Submit=Submit the code for the table looks like this: I want $offer[1,2,3,...

PHP: exec() error responses?

Below is the command I tried executing, without success: exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess'); When you add a die() at the end, it catches that there's an error: exec('ln -s ' . PLUGIN_DIR . '/.htaccess ' . ABSPATH . '/.htaccess') or die('what?!'); For the above exec() statement, a permissions proble...

Google Map API and Links

Hello, I am trying to add a link into the pop-up text bubble of a marker in Google Maps through the API. I have successfully run the below code: echo '<marker lat="43.91892" lng="-78.89231" html="Albertus Magnus College&lt;br&gt;Link to Admissions" label="Albertus Magnus College" />'; But once I actually try to add the link it fails...

What are UNIT TESTs and why should I care?

Okay, I develop web applications in PHP and Javascript and a lot of times here on SO I have seen the word UNIT TEST passing by, but nowhere on the website have I been able to found a satisfactory answer to what exactly a UNIT TEST is. So what are UNIT TESTs and should I, as a PHP and Javascript programmer, care, or are they only for 'r...

How can I have over loaded constructor in Php5?

I have two constructor : function clsUsagerEmailUserName($nickName, $email) { $this->nickName = $nickName; $this->email = $email; } function clsUsagerEmailUserName($email) { $this->email = $email; } But this is not working? What's wrong, isn't supposed to be OO at this version of ...

PHP debug_backtrace in production code?

Is there a compelling reason to not use debug_backtrace for the sole purpose of determining the calling method's class, name, and parameter list? Not for debugging purposes. It has the word "debug" in the function name, which makes me feel a little dirty to be using it in this way, but it fit the bill for what I needed to do (a single f...

Dealing with timezones in PHP

Some issues with timezones in PHP have been in the back of my mind for a while now, and I was wondering if there are better ways to handle it than what I'm currently doing. All of the issues revolve around reformating database stored dates: When dealing with a site that has to support multiple timezones (for users), to normalize the ti...

how to dynamically check number of arguments of a function in php

how can I check at runtime home many parameters a method or a function have in PHP. example class foo { function bar ( arg1, arg2 ){ ..... } } I will need to know if there is a way to run something like get_func_arg_number ( "foo", "bar" ) and the result to be 2 ...

What are your suggestions for storing AWS authentication data?

Scenario: a web application written in PHP utilizes an Amazon Web Service and must keep the Access Key ID and a Secret Access Key handy in order to function. Are there current recommendations and/or API's out there for storing this data securely? My thought is to symmetrically encrypt it into a file based on a key created from local se...

MySQL query takes >15 seconds to run, what can I do to cache/improve it? [PHP]

Well I have a videos website and a few of its tables are: tags id ~ int(11), auto-increment [PRIMARY KEY] tag_name ~ varchar(255) videotags tag_id ~ int(11) [PRIMARY KEY] video_id ~ int(11) [PRIMARY KEY] videos id ~ int(11), auto-increment [PRIMARY KEY] video_name ~ varchar(255) Now at this point the tags table has >1000 rows a...

What Code Igniter authentication library is best?

I see there are a few. Which ones are best maintained and easy to use? Or should I just write my own? ...

Where do I go from here -- regarding programming?

I seem to be in a never ending tail spin of Linux, or not, Windows or not. Web programming or system programming. Python or PHP. I'am self teaching myself programming. But it seems I keep being torn about which way to go. Unfortunately it is always seemingly good reasons to get side tracked. You know the whole open source or proprietary...

Should I use PHP or Perl for massaging my data and storing/retrieving it with MySQL?

Hi All, I have a desktop app that needs to send data to a MySQL Server. The app will be for internal company use, but the MySQL is on a server at a hosting company. The data will need to be massaged a bit before being inserted and standard simple insert, delete and update. Which should I use PHP or Perl? I use PHP now for a variety o...

Is $_SERVER[REQUEST_METHOD] manipulable?

In a PHP project I'm developing I have a couple of requests that can be either POST or GET. Currently, I'm using the $_SERVER[REQUEST_METHOD] value to determine, which request array to use. I know that $_REQUEST values can be manipulated with cookies, is the $_SERVER superglobal vulnerable to attacks? ...

Smarty Plugin for Eclipse Europa

Are there any good Eclipse plugins for creating smarty templates? I am using Europa with PDT on Ubuntu (though I doubt the OS will make a difference for this). I found SmartyPDT, but it did not seem to install properly and some of the discussions on it seemed to suggest it was for an older version of PDT. ...

Need to get specific indexes out of a PHP array

I made an array in PHP which holds a bucnh of unix timestamps. I'm trying to make a function that will return an array containing the indexes of the 3 largest numbers in that array. For instance, if the largest numbers are located at indexes 3,5 and 8 And if the largest is 5, second largest is 8 and smallest of the three is number 3, ...