Re: [PHP] Another question about Google maps

2008-11-16 Thread Michael Kubler
Well, it shows up for FFox v2 and v3 on Windows XP as well. I managed to replicate it by shift+refreshing the page. I also managed to stop it mid load by setting Firefox to 'Work Offline' just as it displayed the flash of both boxes. Using the Web Developer plugin for FFox I can tell you that

Re: [PHP] Another question about Google maps

2008-11-16 Thread tedd
At 1:29 AM +1030 11/17/08, Michael Kubler wrote: Well, it shows up for FFox v2 and v3 on Windows XP as well. I managed to replicate it by shift+refreshing the page. I also managed to stop it mid load by setting Firefox to 'Work Offline' just as it displayed the flash of both boxes. Using the

Re: [PHP] CREATE question

2008-10-30 Thread Micah Gersten
AFAIK, the query commands just pass the query to the DB engine. The DB decides whether or not to execute. You need special permissions in mssql and mysql to create things. I don't know about informix. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Dan

Re: [PHP] CREATE question

2008-10-30 Thread Daniel Brown
On Thu, Oct 30, 2008 at 2:19 PM, Dan Shirah [EMAIL PROTECTED] wrote: Is it possible for us to use PHP to create temp tables in our database? [snip!] But all that does is give me an ifx_prepare fails message. (Forwarded to PHP-DB as well.) Dan, make sure Informix is set to allow that

Re: [PHP] CREATE question

2008-10-30 Thread Dan Shirah
On 10/30/08, Daniel Brown [EMAIL PROTECTED] wrote: On Thu, Oct 30, 2008 at 2:19 PM, Dan Shirah [EMAIL PROTECTED] wrote: Is it possible for us to use PHP to create temp tables in our database? [snip!] But all that does is give me an ifx_prepare fails message. (Forwarded to PHP-DB as

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-26 Thread Carlos Medina
Rob Gould schrieb: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or La Chapelle de La Mission Haut-Brion or Le Clarence

[PHP] Re: PHP/mySQL question using ORDER BY with logic

2008-10-24 Thread Colin Guthrie
Robert Cummings wrote: On Fri, 2008-10-24 at 00:18 -0400, Rob Gould wrote: Question about mySQL and PHP, when using the mySQL ORDER BY method... Basically I've got data coming from the database where a wine producer-name is a word like: Château Bahans Haut-Brion or

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached in memcache. If anything changes in an object it changes an

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Jochem Maas
Stut schreef: On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached in memcache. If anything changes in an object it

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Dan Joseph
On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will always be called at the end of script execution. but you have no

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Eric Butera
On Wed, Oct 22, 2008 at 9:42 AM, Dan Joseph [EMAIL PROTECTED] wrote: On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 14:42, Dan Joseph wrote: On Tue, Oct 21, 2008 at 5:14 PM, Stut [EMAIL PROTECTED] wrote: When a script ends everything is released (with some small exceptions), thus also all references to instances of classes. Thus AFAIK a deconstructor will always be called at the end of

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Stut
On 22 Oct 2008, at 09:35, Jochem Maas wrote: Stut schreef: On 22 Oct 2008, at 00:22, Jochem Maas wrote: Stut schreef: I use destructors to update dirty objects in memcache. care to eloborate ... sounds interesting. Nothing complicated. The core objects in my application are all cached

Re: [PHP] Re: Question about __destruct()

2008-10-22 Thread Dan Joseph
On Wed, Oct 22, 2008 at 2:29 PM, Stut [EMAIL PROTECTED] wrote: Never any issues this way? They always run without a hitch? Not had any issues to far, and it's being used on some pretty busy sites and various PHP versions and several different web servers. Terrific! Thanks for the

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Jochem Maas
Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true when a page ends its execution? Example, I call a database

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Stut
On 21 Oct 2008, at 22:08, Jochem Maas wrote: Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true when a page

Re: [PHP] Re: Question about __destruct()

2008-10-21 Thread Jochem Maas
Stut schreef: On 21 Oct 2008, at 22:08, Jochem Maas wrote: Mike van Riel schreef: Dan Joseph wrote: Hi, I want to make sure I completely understand __destruct() and when its hit... Understand that it will run if all references to a particular object are removed, but is that also true

Re: [PHP] ftp_pasv - question

2008-09-17 Thread Wolf
jogisarge [EMAIL PROTECTED] wrote: hello @all, i have to change my ftp connection in passive mode. now i am not sure, where i have to place the ftp_pasv statement. do i have to place it after ftp_connect or after ftp_login, or ... i hope somebody can help me ! by jogi Sure,

Re: [PHP] Readdir() question

2008-09-12 Thread Luke
When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and structures and such.

Re: [PHP] Readdir() question

2008-09-12 Thread Jochem Maas
Luke schreef: When I need to do 'filesystem' type things I use MySQL to map all of the files. This offers lot's of versatility in that you could just make a single folder called filesystem and have all of your files in the root of that folder - then use mysql to map virtual folders and

Re: [PHP] Readdir() question

2008-09-12 Thread Luke
Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing: ID Name Type

Re: [PHP] Readdir() question

2008-09-12 Thread Nathan Rixham
Luke wrote: Ok, one folder on your webserver, and put all of the files that you want to include on your website/system in this folder (also uploading into this folder); just in the root of that folder, so say you wouldn't have anymore folders under it. Make a table called 'Files,' containing:

RE: [PHP] Readdir() question

2008-09-12 Thread Boyd, Todd M.
-Original Message- From: Luke [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2008 7:13 AM To: Jochem Maas Cc: [EMAIL PROTECTED]; php-general@lists.php.net Subject: Re: [PHP] Readdir() question Ok, one folder on your webserver, and put all of the files that you want

Re: [PHP] Readdir() question

2008-09-11 Thread Stut
On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the

RE: [PHP] Readdir() question

2008-09-11 Thread Jay Blanchard
[snip] I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think its called, __DIR__

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Ben Stones schreef: Hi, I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need to use the magic constant I think

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same directory, I think I'd need

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Stut wrote: On 11 Sep 2008, at 13:12, Ben Stones wrote: I'm going to make a small browser based file system for ease of small updates that I make frequently on my Website. First of all I want to loop all the files on the same directory and to tell PHP read the same

Re: [PHP] Readdir() question

2008-09-11 Thread Nathan Rixham
Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto just in one include

Re: [PHP] Readdir() question

2008-09-11 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: Nathan Rixham schreef: Stut wrote: maybe this is into coding standards and ethics.. but this may be acceptable: if( !defined('__DIR__') ) { define('__DIR__' , dirname(__FILE__)); } however realistically you'd have to do this in every file and nto

Re: [PHP] multiple question form creation

2008-08-26 Thread Dan Shirah
Hi, i have a web application in which some people should be able to create form adding questions and possible answers. basically user should: 1. type the question (which will be displayed to customer) 2. select type of answers (closed, open, list, multiple answer, and so on...) 3. add

Re: [PHP] multiple question form creation

2008-08-26 Thread Alain R.
thanks a lot Dan, i already know this possibility with textarea but it is not so nice. i would like to do something like under windows/linux. to have a button and when user click on it it add a new field for a new answer... however i do not know if it is so nice step for customer... any other

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-26 Thread Micah Gersten
I said AFAIK. I was under the impression the DirectoryIndex did a redirect. I just tested it and it does not, so you are correct Jochem. He has everything he needs. He'll need the document root and $_SERVER['REQUEST_URI'] to do this. Thank you, Micah Gersten onShore Networks Internal

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-24 Thread Ólafur Waage
I am pretty certain that this isnt possible under current code. But i just wanted a confirmation on this, since i worked on the code for a while trying to get to the end point. And yes Jochem, i am looking for a magical location :P Well, thanks guys :) Ólafur Waage 2008/8/24 Micah Gersten

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-24 Thread Jochem Maas
Micah Gersten schreef: What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. you know wrong. he has all the info needed. 1. the document root of the site (/var/www/example.com) 2. the

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results Ólafur Waage 2008/8/23 Robert Cummings [EMAIL PROTECTED]: On Fri,

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Luke, i am looking for local directory info. Not URL info as i said before. And Ashley, as i said in the original mail. I had tried $_SERVER. Thanks for the reply though. Ólafur Waage 2008/8/23 Luke [EMAIL PROTECTED]: $_REQUEST? Luke Slater Lead Developer NuVoo On 23 Aug 2008, at 12:53,

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread David Otton
2008/8/23 Ólafur Waage [EMAIL PROTECTED]: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. And thanks for the reply also Ashley but as i said in my first post, i had tried $_SERVER with limited results If checking the output

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Ólafur Waage
Thanks for this David, i was using REQUEST_URI and other $_SERVER info and mixed that together. It worked in some situations but on hosted servers (like GoDaddy and others like that where they use a complicated directory setup) it does not work. Olafur Waage 2008/8/23 David Otton [EMAIL

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Jochem Maas
Ólafur Waage schreef: Robert, thanks for the reply but i had tried __FILE__ and __DIR__ (which is dirname(__FILE__)) but it doesnt work. __DIR__ only came into existence very recently IIRC, realpath(dirname(__FILE__)); will tell you what directory the *current script* is actually living in

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-23 Thread Micah Gersten
What is the point of figuring that out? If we knew that, we might be able to help you with a solution. As it stands what you want is not possible AFAIK. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I am within a certain directory

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Ashley Sheridan
How are you browsing to it from within PHP? Depending on how you are doing it, the way to get the cwd is different Ash www.ashleysheridan.co.uk ---BeginMessage--- I'll throw out an example here. I have a directory structure of: /var/www/example/ And in that i have a file: index.php That file

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Ólafur Waage
Thanks for the reply Micah but i have no interest in the URL. I am looking for the servers local path to the directory. (example: /var/www/directory/ or C:\apache\htdocs\directory\) Also the HTTP_REFERER is empty unless you are linked in from another location. And then it gives you the URL you

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Micah Gersten
You might want to try a Redirect Rule or rewrite which would tell you the HTTP PATH. AFAIK, there is no way to know which directory they tried to access unless you write your own index.php and store it in a session variable. Thank you, Micah Gersten onShore Networks Internal Developer

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Ólafur Waage
That is the brick wall i faced. There is no way to know where exactly you are (via DirectoryIndex) locally on the machine. Thanks though. 2008/8/22 Micah Gersten [EMAIL PROTECTED]: You might want to try a Redirect Rule or rewrite which would tell you the HTTP PATH. AFAIK, there is no way to

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Ashley Sheridan
On Fri, 2008-08-22 at 21:56 +, Ólafur Waage wrote: That is the brick wall i faced. There is no way to know where exactly you are (via DirectoryIndex) locally on the machine. Thanks though. 2008/8/22 Micah Gersten [EMAIL PROTECTED]: You might want to try a Redirect Rule or rewrite

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Ólafur Waage
I am within a certain directory of the server via the browser. Example: http://www.example.com/foo/bar would be /var/www/example.com/foo/bar And Apache's DirectoryIndex feature is opening a index.php file that is located at /var/www/example.com/test/index.php And from that file i need to

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Eric Butera
On Thu, Aug 21, 2008 at 8:50 PM, Ólafur Waage [EMAIL PROTECTED] wrote: I'll throw out an example here. I have a directory structure of: /var/www/example/ And in that i have a file: index.php That file echo's getcwd() and returns: /var/www/example/ Now i tell Apache or Lighty that if a

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-22 Thread Robert Cummings
On Fri, 2008-08-22 at 22:13 -0400, Eric Butera wrote: On Thu, Aug 21, 2008 at 8:50 PM, Ólafur Waage [EMAIL PROTECTED] wrote: I'll throw out an example here. I have a directory structure of: /var/www/example/ And in that i have a file: index.php That file echo's getcwd() and returns:

Re: [PHP] Quick question regarding getcwd() and directory location.

2008-08-21 Thread Micah Gersten
Once you tell apache to load /example/index.php, that's where you are. You might try looking at the $_SERVER['HTTP_REFERER']. Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Ólafur Waage wrote: I'll throw out an example here. I have a directory structure

Re: [PHP] foreach question

2008-07-29 Thread Daniel Brown
On Tue, Jul 29, 2008 at 3:25 PM, Jason Pruim [EMAIL PROTECTED] wrote: function random($random){ $randomQuery = SELECT * FROM `current` ORDER BY Rand() LIMIT 2; $result = mysql_query($randomQuery); $row[] = $result; foreach($row as $key = $value) { $random[$key] = $value;

Re: [PHP] foreach question

2008-07-29 Thread Micah Gersten
You cannot do this: $row[] = $result; You need to loop around this: $row = mysql_fetch_assoc($result); Thank you, Micah Gersten onShore Networks Internal Developer http://www.onshore.com Jason Pruim wrote: Hey Everyone... So I am attempting to pull 2 random records from a MySQL

Re: [PHP] foreach question

2008-07-29 Thread Jason Pruim
On Jul 29, 2008, at 3:33 PM, Daniel Brown wrote: On Tue, Jul 29, 2008 at 3:25 PM, Jason Pruim [EMAIL PROTECTED] wrote: function random($random){ $randomQuery = SELECT * FROM `current` ORDER BY Rand() LIMIT 2; $result = mysql_query($randomQuery); $row[] = $result;

Re: [PHP] SESSIONS QUESTION

2008-07-18 Thread tedd
At 9:59 AM -0700 7/18/08, R.C. wrote: What's the sequence here. I was able to get the password going, protect the main.php page, sent the email etc. but can't get that password to remain on the main.php when they user tries to get back to that page. Really appreciate some input and coding. I

Re: [PHP] PDO Question. Number of rows returned

2008-07-13 Thread Stephen
Kevin Waterson wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I determine how many rows a query returned? PDO returns an array, sizeof/count will get you home I

Re: [PHP] PDO Question. Number of rows returned

2008-07-13 Thread Bastien Koert
On Sun, Jul 13, 2008 at 10:30 AM, Stephen [EMAIL PROTECTED] wrote: Kevin Waterson wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I determine how many rows a query

Re: [PHP] PDO Question. Number of rows returned

2008-07-13 Thread Stephen
Bastien Koert wrote: On Sun, Jul 13, 2008 at 10:30 AM, Stephen [EMAIL PROTECTED] wrote: Kevin Waterson wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I

Re: [PHP] PDO Question. Number of rows returned

2008-07-13 Thread Bastien Koert
On Sun, Jul 13, 2008 at 11:12 AM, Stephen [EMAIL PROTECTED] wrote: Bastien Koert wrote: On Sun, Jul 13, 2008 at 10:30 AM, Stephen [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Kevin Waterson wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing

Re: [PHP] PDO Question. Number of rows returned

2008-07-12 Thread Kevin Waterson
This one time, at band camp, Stephen [EMAIL PROTECTED] wrote: I am switching to PDO and can't find an equivalent to mysql_num_rows. Am I missing something silly? Or is there a change of thinking needed for PDO? How should I determine how many rows a query returned? PDO returns an

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Ethan Whitt
I pasted your example in and it doesn't work for me (again, newbie). I will play with it and see if I can get it working. My main goal is to have Ruby-like URL's vs ?var=3425. Is this possible with .php (without mod_rewrite / something in the http server?) Thanks, Ethan On Wed, Jun 18,

RE: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Bob
but on a personal level I think it's one of the better MVCs about. Bob. -Original Message- From: Ethan Whitt Sent: 19 June 2008 17:19 To: Nathan Nobbe Cc: php-general@lists.php.net Subject: Re: [PHP] Newbie Question: How to pass URL info to .php script ? I pasted your example

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Jignesh Thummar
Ethan, you can try this: $url = www.test.com/article/3435; echo basename($url); another solution is that you can use explode() function to seprate your url from '/' or you can use regex to parse your url - Jignesh On Thu, Jun 19, 2008 at 8:18 AM, Ethan Whitt [EMAIL PROTECTED] wrote: I pasted

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Nathan Nobbe
On Thu, Jun 19, 2008 at 1:28 AM, Bob [EMAIL PROTECTED] wrote: Have you tried CodeIgniter http://www.codeigniter.com? Not as restrictive as many MVC frameworks and very easy to work with. What you wish to achieve can be done with one line. $myvar = $this-uri-segment(2); right, and if you

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Nathan Nobbe
On Thu, Jun 19, 2008 at 1:18 AM, Ethan Whitt [EMAIL PROTECTED] wrote: I pasted your example in and it doesn't work for me (again, newbie). I will play with it and see if I can get it working. My main goal is to have Ruby-like URL's vs ?var=3425. Is this possible with .php (without

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-19 Thread Chris Scott
You could just use an apache (or other web server) alias: www.test.com/article - www.test.com/article.php where article.php uses: ?php $uri_vars = explode('/', $_SERVER['PATH_INFO']); foreach ($uri_vars as $var) if ($var != ) echo $var . br; ?

Re: [PHP] Newbie Question: How to pass URL info to .php script ?

2008-06-18 Thread Nathan Nobbe
On Wed, Jun 18, 2008 at 10:45 PM, Ethan Whitt [EMAIL PROTECTED] wrote: Not sure how to achieve this. How can I grab a portion of a URl to send to a .php script in this fashion? www.test.com/article/3435 - Grab the 3435 to process in a script? take a look at the $_SERVER superglobal

Re: [PHP] OT - Question about nested sortable lists

2008-05-16 Thread Bastien Koert
On Fri, May 16, 2008 at 11:09 AM, Jim Lucas [EMAIL PROTECTED] wrote: I notice in a previous thread, people are suggesting using these two tools. http://developer.yahoo.com/yui/examples/dragdrop/dd-reorder.html and http://tool-man.org/examples/ Now, my question is, does anybody know if

Re: [PHP] quick question

2008-05-09 Thread Richard Heyes
Ho to read date from HTML form - How to read $_POST['date']=dd/mm/ string variable as a date? If you want a unix timestamp then try investigating strtotime(). -- Richard Heyes ++ | Access SSH with a Windows mapped drive | |

Re: [PHP] quick question

2008-05-09 Thread Richard Heyes
Well, when I try date('d/m/y', strtotime($_POST('date')) - it seems mixing day and month, I tried setlocale(LC_ALL, 'en_GB'); but it didn't strtotime() returns a unix timestamp (ie number of seconds since 1970ish. Nothing to do with the date object. -- Richard Heyes

Re: [PHP] quick question

2008-05-09 Thread Stut
Well, when I try date('d/m/y', strtotime($_POST('date')) - it seems mixing day and month, I tried setlocale(LC_ALL, 'en_GB'); but it didn't If you're sure that's the format of the date, this will do it... list($day, $month, $year) = explode('/', $thedate); $thetimestamp = mktime(0, 0, 0,

Re: [PHP] Re: Question regarding fopen

2008-05-01 Thread James Dempster
?php $foldersystem = getcwd().'/test1'; $id = '54961'; $imgstr = 'tdtdtdtd'; //uniqid(); $i = 2; $imagenamesmall = $foldersystem . '/' . $id . $imgstr . '-s' . $i . '.jpg'; echo $imagenamesmall; // For debugging purposses -- returns exactly what I want. //attempt to create folder

Re: [PHP] Re: Question regarding fopen

2008-05-01 Thread Joep Roebroek
Strangely enough.. It does.. But I have also tried adding a letter (which gives me the good result) and then renaming it... But then the value is wrong again :S I've never had a problem like this.. Very strange.. 2008/5/1 James Dempster [EMAIL PROTECTED]: ?php $foldersystem =

Re: [PHP] Re: Question regarding fopen

2008-05-01 Thread James Dempster
Do you have a piece of example code that will reproduce the problem? -- /James On Thu, May 1, 2008 at 12:26 PM, Joep Roebroek [EMAIL PROTECTED] wrote: Strangely enough.. It does.. But I have also tried adding a letter (which gives me the good result) and then renaming it... But then the

Re: [PHP] Re: Question regarding fopen

2008-05-01 Thread Joep Roebroek
This problem is getting stranger by the minute. I will explain in a little more detail what the script is actually for.. It is an advert site and per advert, you can add 5 photo's.. Now you set the $i = 2; When I set the $i (which indictates the index of the photo, so $i = 5; is the last photo)

Re: [PHP] Re: Question regarding fopen

2008-05-01 Thread Joep Roebroek
Small correction $i = 4, means the last photo not 5.. Not so important but still.:P 2008/5/1 Joep Roebroek [EMAIL PROTECTED]: This problem is getting stranger by the minute. I will explain in a little more detail what the script is actually for.. It is an advert site and per advert, you can

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Ryan S
/* Top posting from my cell... 1. Format hard drive 2. Install redhat fc8 or Ubuntu 8.04 3. Load the new MySQL installation with your backup file If you really have to stay with windoze, remove and re-install apache. Look at the system log files as they SHOULD tell you what was causing the

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Jason Pruim
On May 1, 2008, at 8:56 AM, Ryan S wrote: /* Top posting from my cell... 1. Format hard drive 2. Install redhat fc8 or Ubuntu 8.04 3. Load the new MySQL installation with your backup file If you really have to stay with windoze, remove and re-install apache. Look at the system log files

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Ryan S
/* Top posting from my cell... 1. Format hard drive 2. Install redhat fc8 or Ubuntu 8.04 3. Load the new MySQL installation with your backup file If you really have to stay with windoze, remove and re-install apache. Look at the system log files as they SHOULD tell you what was

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Jason Pruim
On May 1, 2008, at 9:30 AM, Ryan S wrote: /* Top posting from my cell... 1. Format hard drive 2. Install redhat fc8 or Ubuntu 8.04 3. Load the new MySQL installation with your backup file If you really have to stay with windoze, remove and re-install apache. Look at the system log

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Ryan S
Cant afford a new comp or a new OS and as for your last statement: http://www.sophos.com.au/pressoffice/news/articles/2006/02/macosxleap.html _almost_ no virii for the Mac :) /* None that have effected my computers here at work, or at home. No anti- virus, no firewall's ;) Oh and I'll

Re: [PHP] Xampp question, pretty much 0T

2008-05-01 Thread Jason Pruim
On May 1, 2008, at 11:43 AM, Ryan S wrote: Cant afford a new comp or a new OS and as for your last statement: http://www.sophos.com.au/pressoffice/news/articles/2006/02/macosxleap.html _almost_ no virii for the Mac :) /* None that have effected my computers here at work, or at home. No

Re: [PHP] Xampp question, pretty much 0T

2008-04-30 Thread Ryan S
clip After reading a bit I see that if I just copy the data directory in the mySql directory, I can restore it from there? any idea if I have that wrong? Hmm I guess, but I'd take the safer road and open a console and run: mysqldump.exe -u username -p --all-databases --add-drop-database --opt

RE: [PHP] Xampp question, pretty much 0T

2008-04-30 Thread Wolf
Top posting from my cell... 1. Format hard drive 2. Install redhat fc8 or Ubuntu 8.04 3. Load the new MySQL installation with your backup file If you really have to stay with windoze, remove and re-install apache. Look at the system log files as they SHOULD tell you what was causing the

RE: [PHP] Xampp question, pretty much 0T

2008-04-30 Thread Daevid Vincent
just can't do without. Daevid Vincent http://daevid.com -Original Message- From: Wolf [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 30, 2008 6:06 AM To: Ryan S; php php Subject: RE: [PHP] Xampp question, pretty much 0T Top posting from my cell... 1. Format hard drive 2

Re: [PHP] Xampp question, pretty much 0T

2008-04-29 Thread Chris
Ryan S wrote: Hello! I have been using XAMPP for quite some time now (thanks to the recommendations from this list) without any real complaints... and the only reason I am writing here is because i am sure a lot of you guys run the same thing considering the amount of people who recommended

Re: [PHP] Xampp question, pretty much 0T

2008-04-29 Thread Ryan S
You could try their forums: http://www.apachefriends.org/f/?language=english Thanks! Just after I posted i started searching on google and found them, have joined and posted... no reply as yet... just the waiting game now i guess. Main prob is I cant even get phpmyadmin running to copy the

Re: [PHP] Xampp question, pretty much 0T

2008-04-29 Thread Chris
After reading a bit I see that if I just copy the data directory in the mySql directory, I can restore it from there? any idea if I have that wrong? Hmm I guess, but I'd take the safer road and open a console and run: mysqldump.exe -u username -p --all-databases --add-drop-database --opt

Re: [PHP] Hack question

2008-04-18 Thread Jim Lucas
Al wrote: I'm still fighting my hack problem on one of my servers. Can anyone help me figure out what's the purpose of this code. The hack places this file in numerous dirs on the site, I assume using a php script because the owner is nobody. I can sort of figure what is doing; but, I can't

Re: [PHP] Hack question

2008-04-17 Thread Al
Can you explain this in more detail for me. Sounds like this code is providing the entry point for the other hack code. Greg Bowser wrote: I can sort of figure what is doing; but, I can't figure out what the hacker is using it for. It will allow him to upload and execute arbitrary code on

Re: [PHP] Hack question

2008-04-17 Thread Daniel Brown
On Thu, Apr 17, 2008 at 8:15 AM, Al [EMAIL PROTECTED] wrote: Can you explain this in more detail for me. Sounds like this code is providing the entry point for the other hack code. It probably is, by reading the code from the malicious /tmp files (/tmp should not allow any execution, by the

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Daniel Brown has written on 4/16/2008 5:20 PM: On Wed, Apr 16, 2008 at 5:14 PM, Pete Holsberg [EMAIL PROTECTED] wrote: Why do I need both from_addr and field_4 (Email Address)? Could I just use $from = $_POST['field_4']? Sorry, I noticed it after I started rewriting the form

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Daniel Brown
On Thu, Apr 17, 2008 at 12:17 PM, Pete Holsberg [EMAIL PROTECTED] wrote: [snip!] OK. Here's what I have now for processor.php: ?php // $where_form_is=http://.$_SERVER['SERVER_NAME'].strrev(strstr(strrev($_SERVER['PHP_SELF']),/)); $where_form_is =

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Daniel Brown has written on 4/17/2008 12:29 PM: I'll reiterate: Note the mail() parameters. There's no header information there. RTFM: http://php.net/mail You just have your mail() function wrong. Reiterating my code as well (with updated field_4 data): ?php

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Daniel Brown
On Thu, Apr 17, 2008 at 12:37 PM, Pete Holsberg [EMAIL PROTECTED] wrote: OK. I don't see a mail() in your code. Would it be mail($to, $subject, $body, $headers); ? Entirely my fault, Pete. I'm a moron sometimes. Could've sworn it was in there. Sorry about that. Yes, you've

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Pete Holsberg
Ooops! processor.php is now: ?php $where_form_is = http://.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])./; $to = [EMAIL PROTECTED],[EMAIL PROTECTED]; $subject = SUBSCRIBE; //$from = $_POST['field_4']; == this was the culprit $body = Form data: Name: .$_POST['field_1'].

Re: [PHP] Newbie question about sending email

2008-04-17 Thread Daniel Brown
On Thu, Apr 17, 2008 at 12:50 PM, Pete Holsberg [EMAIL PROTECTED] wrote: 1E6 thank yous!! My TI SR-10 couldn't handle that calculation and blew up in my hand. ;-P -- /Daniel P. Brown Dedicated Servers - Intel 2.4GHz w/2TB bandwidth/mo. starting at just $59.99/mo. with no contract!

Re: [PHP] Hack question

2008-04-16 Thread Aschwin Wesselius
Al wrote: I'm still fighting my hack problem on one of my servers. Can anyone help me figure out what's the purpose of this code. The hack places this file in numerous dirs on the site, I assume using a php script because the owner is nobody. I can sort of figure what is doing; but, I can't

Re: [PHP] Hack question

2008-04-16 Thread Greg Bowser
I can sort of figure what is doing; but, I can't figure out what the hacker is using it for. It will allow him to upload and execute arbitrary code on your server. Generally speaking, arbitrary code execution is a bad thing. :). -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Hack question

2008-04-16 Thread Aschwin Wesselius
Al wrote: I'm still fighting my hack problem on one of my servers. Can anyone help me figure out what's the purpose of this code. The hack places this file in numerous dirs on the site, I assume using a php script because the owner is nobody. I can sort of figure what is doing; but, I can't

Re: [PHP] Hack question

2008-04-16 Thread Daniel Brown
On Wed, Apr 16, 2008 at 12:13 PM, Al [EMAIL PROTECTED] wrote: I'm still fighting my hack problem on one of my servers. Can anyone help me figure out what's the purpose of this code. The hack places this file in numerous dirs on the site, I assume using a php script because the owner is

<    2   3   4   5   6   7   8   9   10   11   >