Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> setting: > > max_execution_time = -1     ; Maximum execution time of each script, in > seconds > max_input_time = -1    ; Maximum amount of time each script may spend > parsing request data > ;max_input_nesting_level = 64 ; Maximum input variable nesting level > memory_limit = 2036M      ; Maximu

Re: [PHP] [php] while loop failure

2009-04-06 Thread Virgilio Quilario
> Does any one knows why while loop below ends after few loops when it meant > to keep in loop? > > File name: while_loop_script.php > > define('run', 0); > define('START', 10); > > while(START >run){ > > $ch = curl_init("mydomain/update_script.php?action=run"); > curl_exec($ch); > curl_close($ch);

Re: [PHP] [php] scheduled task in php

2009-04-02 Thread Virgilio Quilario
> Please how can you run a timed php script file via window scheduled task. or > how can u execute a php script on a a time interval for instance every > 4minutes hi Andrew, first schedule a task, locate and select your php.exe, and schedule it to run daily for the moment. after creating it, you

Re: [PHP] Error on .htaccess

2009-04-01 Thread Virgilio Quilario
> In all the servers i had tested my system i dont have any problem, but in > this server the apache are displaying to me the error 500 "Internal Server > Error". > > Someone can say tome what is wront with my .htaccess? > > RewriteEngine On > > RewriteCond %{REQUEST_FILENAME} !-f > RewriteCond $1

Re: [PHP] thread question

2009-04-01 Thread Virgilio Quilario
>>> Hi all, >>> >>> Another question: >>> >>> If a script starts to perform an operation and the user browses away will >>> that terminate the thread perfoming the operation eg. the operation is >>> aborted ? >>> >>> Mvh >>> Toke >> >> the script is aborted as soon as server gets no response from t

Re: [PHP] thread question

2009-03-31 Thread Virgilio Quilario
> Hi all, > > Another question: > > If a script starts to perform an operation and the user browses away will > that terminate the thread perfoming the operation eg. the operation is > aborted ? > > Mvh > Toke the script is aborted as soon as server gets no response from the browser when it sent o

Re: [PHP] Sort a multi-dimensional array on a certain key followed by another key

2009-03-28 Thread Virgilio Quilario
> Ok so, I have an array > > [0(index)][1st key][2nd key] > > Basically I don't care about the index. As a matter of fact I'd prefer it > reset to still be in order afterwards. > > However, I need to sort the 1st key and keep correlation w the second key. > Then sort on the second key. > > I have v

Re: [PHP] Calling function on the same line?

2009-03-28 Thread Virgilio Quilario
> > I miss the utility to do stuff like that ... seriously ... but in any case: > > echo ($f = 'str_replace') ? $f("a", "b", "aaa") : null; > ?> > > where echo is optional. > > Regards you mean this virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] foreach and form submission.

2009-03-28 Thread Virgilio Quilario
> Hi all. > > I'm writing a script that accepts several different forms with different > content. Depending on what data is sent with the form the script will do one > or the other think. > > Before the form data is processed I'd like to scrub it of HTML tags. > > I can do this manually as below

Re: [PHP] PHPizabi - Applying php in TPL (smarty template engine)

2009-03-28 Thread Virgilio Quilario
> Well well I forgot to install Smarty, but show the message. Ididn't modify > Smasrty.class.php. And index.tpl in libs directpory don't exist only the > file in root. > > Anybody Can save me? I'm X confuss. All is new for me. > >  Warning: Smarty error: unable to read resource: "index.tpl" in > /h

Re: [PHP] PHPizabi - Applying php in TPL (smarty template engine)

2009-03-26 Thread Virgilio Quilario
> Hi there! > Any know how Can I use PHP code into Smarty Temple Engine (TPL files) ? > I usued {php} include("text.php"); {/php} but the code don't run simply > output the code. > What's the problem? Wht don't run? > > Thankx, > Luciano Felli it may be the file path. try echoing something before

Re: [PHP] Problems with implode

2009-03-26 Thread Virgilio Quilario
>>> Dunno why you guys started talk about utf-8 problems, he has a list of >>> ids >>> which should contain only unsigned integers, otherwise I do not get how >>> that >>> query could work with an implode(',', $whatever) rather than 'id in >>> ("'.implode('","', array_map('mysql_real_escape_string'

Re: [PHP] how to make multiple sql run faster

2009-03-21 Thread Virgilio Quilario
> Usually a single transaction is faster than an insert a time (with or without > union) > >> Hi all, >> >> I am inserting more than 5000 rows into sql database but its taking more >> than 30 mins  to get it all the data inserted. I use union to insert >> multiple rows of 20 at a time. >> >> What

Re: [PHP] need help with code

2009-03-21 Thread Virgilio Quilario
>> hi Chris, >> >> basing on the code you posted, you're missing the closing brace for >> if ($accessToken===NULL) >> { >> >> there should be 3 closing braces before the last ?> > >    That'll be the next error, but that error would print "unexpected > $end on line xxx." well, if you're getting th

Re: [PHP] mysql_real_escape_string paranoid enough?

2009-03-21 Thread Virgilio Quilario
> I typically do something like this: > > $data_sql = mysql_real_escape_string($data, $connection); > $query = "insert into data(data) values('$data_sql')"; > $insert = mysql_query($query, $connection); > if (!$insert){ >  trigger_error(mysql_error($connection), E_USER_ERROR); > } > > My custom err

Re: [PHP] Select Query with Multiple Optional Values

2009-03-21 Thread Virgilio Quilario
>> Trying to find best way to accomplish following scenario.  Looking to search >> inventory through a POST form, have the following optional fields to search >> by: Product Name, Color, Size, and Status.  Search maybe for the Product >> Name and/or Color or they may search for just the Color or al

Re: [PHP] need help with code

2009-03-21 Thread Virgilio Quilario
> I hate asking for help with simple code like this because I can usually > figure it out, but I'm stumped on this one.  I'm getting a parser error on > line 13, whether I comment out the require_once line or not.   Can you help? > > require_once('twitterlib.php'); > > $consumerKey="yVVRd1QCJYBt

Re: [PHP] Having trouble with a form to mail script.

2009-03-21 Thread Virgilio Quilario
> Hi there, > Well, after reading the post about "so called experts" and licensing > programming, I > can say that I sure am not licensed or even remotely close to a novice PHP > programmer, just a ‘lil ole PHP beginner trying to get my web page set up and > learn a few things.  I’m not sure if I

Re: [PHP] today i found the best function I've ever seen

2009-03-21 Thread Virgilio Quilario
> if( !function_exists('clean_sql_term') ) > { >    function clean_sql_term($term) { >        return $term; >    } > } > > beautiful > hi Nathan, Nice find. You have found a very useful function. Here is how I use it to load needed PHP files that declares the function. if (!function_exists('clean

Re: [PHP] [News] Affordable Independent Web Developer - Search Engine Optimization Services - March 19th, 2009

2009-03-21 Thread Virgilio Quilario
> As a matter of fact "DANIEL" ...I AM A REAL PERSON ! > > You know, I really hate it that people like YOU reply back to me with your > self-vain - self-important attitudes - and act like no one else on the F-ing > planet has the right to live or even share the same air you breath > > Y

Re: [PHP] Trying To Read - Show A Csv File Line By Line

2009-03-21 Thread Virgilio Quilario
> The for loop iterates through each field of each line, the while loop > iterates through each line.  Move the out of the for loop, right > before the end of the while loop as follows: > $row = 1; > $handle = fopen("try3.csv", "r"); > while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { >  

Re: [PHP] Script Analysis (was Conclusion of "use strict"...)

2009-03-21 Thread Virgilio Quilario
> Thanks, > I downloaded Netbeans week or two ago and I found all that. I thought there > is > something more advanced (these things have any decent editor/ide (for > example > eclipse + pdt also have all that)). We are talking completely different > level > of checks :-) In the end I may switch to

Re: [PHP] how to make for statement run faster

2009-03-20 Thread Virgilio Quilario
> I have a program where I process more that 5000 list of 100 data at  time > but it very slow due to many  *for statement*s. how you make it run faster code for statements to use a variable or contant for testing in every iteration like below for ($i = 0; $i < 100; $i++) {} also try to optimize

Re: [PHP] Web Development/Application Analysis

2009-03-20 Thread Virgilio Quilario
>> Hello, >> >> I have just hired a remote PHP programmer. His main job is web >> development and applications. >> >> I have few concerns, I would be happy if someone can point me to the >> right direction. >> >>   1. How can I provide him the requirements. I mean how can I analyze >> the site and

Re: [PHP] Script Analysis (was Conclusion of "use strict"...)

2009-03-20 Thread Virgilio Quilario
On Fri, Mar 20, 2009 at 6:47 PM, Pierre Lilliman wrote: > > I have been using same program for some (not very long time), and I find it > very useful, although it has some annoying things (inability to work with all > kinds of include expressions). Still I think every serious PHP developer > sh

Re: [PHP] Smarty Tips and Techniques

2009-03-20 Thread Virgilio Quilario
> Hi Virgil, > > After your last post here, I looked at your site, then the Smarty site. > That was what triggered this question. Templates are a black art to me. > I don't even know where to begin to understand them. Every reference I > have looked at so far assumes that I already understand the M

Re: [PHP] Looking for a configurable Flash or PHP Live Chat Box or Shout Box With Rooms Optional

2009-03-19 Thread Virgilio Quilario
> Does anyone have a good link to something like this for reasonable > price or free? > > Configurable meaning skinnable and sizeable? > > Something Ajaxy would be cool but it would need to save state like the > facebook IM feature on their site. > > Thanks, T here is a good list of free scripts h

Re: [PHP] Smarty Tips and Techniques

2009-03-19 Thread Virgilio Quilario
> That looks nice, but how do I get to the point where I can understand > how to use it? > > I have also looked at the Smarty site , but > their documents assume significant experience in building and using > templates. > > Where can I find guidance or tutorials on how to do

Re: [PHP] preg_replace() question

2009-03-18 Thread Virgilio Quilario
> 1. What is the overhead on preg_replace? it really depends on your operation. when you think it can be done using str* functions then go for it as they are much faster than preg* functions. > 2. Is there a better way to strip spaces and non alpha numerical > characters from text strings? I susp

[PHP] Smarty Tips and Techniques

2009-03-18 Thread Virgilio Quilario
Hi list, Just wanna share my collection of Smarty scripting tips and techniques. Smarty is a template engine for PHP that you can use to separate data and logic from web design. This way programmers can work on the php scripts and designers can work on the templates for the same web site. Here is

Re: [PHP] PHP/Apache: script unexpectedly invoked multiple times in parallel every 30 secs.

2009-03-11 Thread Virgilio Quilario
> Hi all, > > I wrote a PHP script running in Apache which takes more than 30 seconds to > complete. It uses set_time_limit() to extend the time it is allowed to run. > The script generates thumbnails from a list of images. Upon completion, the > script redirects the browser to another page using H

Re: [PHP] This code using _GET exploitable

2009-03-11 Thread Virgilio Quilario
> filtered schreef: >> Hi, >> >> we have script containing >> >>   > > let say I do: > > example.com/yourscript.php?studio=alert('I am > an evil haxor'); > > excusing the fact that the query is not urlencoded, what happens on your site > (replace domain and script name to match your site/script) >

Re: [PHP] Silly question - include vs. eval

2009-03-11 Thread Virgilio Quilario
>> Hi, >> >> I wondering what is the difference between include(), and eval(' >> ?>'.file_get_content().' > >> If there is something I should be aware, please, let me know. > > Use include since it allows a cache like eAccelerator or APC to work. > Eval never gets cached. Also, include let's the e

Re: [PHP] Handling (very) large files with PHP

2009-03-11 Thread Virgilio Quilario
> *Handling (very) large files with PHP* > > Hello, I am planning a project in PHP, and I have few unsolved issues that > I'd like you to help me... > > The project will start by loading a file of about 50GB. > The file has a many objects with a pattern, for example, > > > Name: Joe > Joe likes to

Re: [PHP] Re: PHP Frameworks

2009-03-09 Thread Virgilio Quilario
> wrote: >> @todd; Micah - Precisely why I presented the question anew. Not only do I >> not have enough time to troll through the archives; I was looking for a >> fresher set of responses based on today's smorgasbord. Thank you for your >> input; I have looked at both YII and CI and they look

Re: [PHP] web refreshing problem

2009-03-09 Thread Virgilio Quilario
>>> >> my php program does not display current result of submitted form >>> >> instead the previous content is shown until you refresh manually >>> >> (which means resubmitting the form). >>> >> >>> >> Can someone help me out because, I want to display the result of the >>> >> latest form result an

Re: [PHP] Error in Building an XML File

2009-03-09 Thread Virgilio Quilario
> I am using PHP to build an XML file, but I keep on getting an XML > error when open the file in Google Chrome. > - > This page contains the following errors: > > error on line 30 at column 318: Entity 'iuml' not defin

Re: [PHP] Retrieving Image Location in PHP from MySQL

2009-03-09 Thread Virgilio Quilario
> I am using a WAMP server for my coding purposes. My MySQL Version is > 5.0.51b, PHP version is 5.2.6 and Apache version is 2.2.8 > > I have created a database with one of the tables containing a location of > the image. Using PHP I am trying to retrieve the location of the image (from > the mysql

Re: [PHP] web refreshing problem

2009-03-09 Thread Virgilio Quilario
>> Hi, >> >> my php program does not display current result of submitted form >> instead the previous content is shown until you refresh manually >> (which means resubmitting the form). >> >> Can someone help me out because, I want to display the result of the >> latest form result and not the old

Re: [PHP] Opendir on site root directory?

2009-03-09 Thread Virgilio Quilario
>> >> >> I want to index the files on a website recursively. The program will >> run >> >> in >> >> >> the site root >> >> >> directory, which GETCWD reports as D:/Websites/Website_1.  I can open >> >> any >> >> >> file in the root >> >> >> directory simply using its file name; Joe.dat, for example

Re: [PHP] Line Break Problem

2009-03-09 Thread Virgilio Quilario
> Hi, > >  I have a question regarding using line breaks in PHP. I have the code > something like: > >       echo "1" . "\t " . $x . "\t" . $y . "\r\n"; > > When I run the code, it looks like a whole blob of text, but when I use "View > Source", the line breaks are formatted then correctly. > Any

Re: [PHP] PHP includes

2009-03-09 Thread Virgilio Quilario
> I'm working on learning php and have been toying with includes, and I am > trying to figure the advantages/disadvantages to using them. > > I know that using them eliminates the need to "put" the files once altered > as with a template, however, is that the only advantage. > > My particular conce

Re: [PHP] PHP - user profile page with pic

2009-02-23 Thread Virgilio Quilario
> --- > Use FreeOpenSourceSoftwares, Stop piracy, Let the developers live. Get > a Free CD of Ubuntu mailed to your door without any cost. Visit : > www.ubuntu.com > -

Re: [PHP] optimizing space for array of booleans

2009-02-23 Thread Virgilio Quilario
> Some languages allows to bit-pack structures to save spaces. Since PHP > doesn't have native set data type and operations, will array of booleans be > optimized as such? If not, how can I achieve the same result? I need to save > about 200 boolean values and I guess it's a good idea to use bitset

Re: [PHP] display_errors and error_reporting not enough?

2009-02-17 Thread Virgilio Quilario
> I want to enable error messages while I'm testing or developing. > I use php 5.2.4 on ubuntu server. > These two lines does only print notices. > >ini_set('display_errors', 1); > error_reporting(E_ALL); > ?> > > When I make something wrong like syntax error; I get blank pages. > Is there so

Re: [PHP] Full versus relative URLs

2009-02-17 Thread Virgilio Quilario
> Here's a question related to my last post. When specifying a link in a > HTML file (like to the css or an image file), there are two ways of > doing it. One is to simply include the relative path to the file > (relative to the doc root), like: > > /graphics/my_portrait.gif > > Or you can include

Re: [PHP] Opinions Please, Describing PHP as Web Framework of C and C++

2009-02-17 Thread Virgilio Quilario
> Recently we had some serious discussion on local boards. > > I prefer calling PHP as Web Framework of C and C++ > > if you had a time for this fruitless discussion. Please send your opinions. > PHP is a server side scripting language for the Web using a C like language structure and conventions.

Re: [PHP] Apache odd behavior

2009-02-17 Thread Virgilio Quilario
> I'm submitting a url like this: > > http://mysite.com/index.php/alfa/bravo/charlie/delta > > The index.php calls has code to decode the url segments > (alfa/bravo/charlie/delta). It determines that the controller is alfa, > the method is bravo, and converts charlie and delta to $_GET['charlie'] >

Re: [PHP] Happy 1234567890 day!

2009-02-13 Thread Virgilio Quilario
> http://coolepochcountdown.com/ > > On Fri, 2009-02-13 at 13:34 -0500, TG wrote: > >> http://timestamp1234567890.com/ > > > Happy cool epoch 1234567890 day! virgil http://www.jampmark.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Simple open source CMS as a starting point

2009-02-13 Thread Virgilio Quilario
> I need simple CMS sistem that I could use as a staring point (to save some > time in setting up the structure) in developing my own CMS. The code > should be simple to understand so that I can easily get on and start > building on it. It would be of great help if it already had features like > st

Re: [PHP] How can an elephant count for nothing?

2009-02-13 Thread Virgilio Quilario
> While PHP has a lot of nice features, it also has some traps which I am > forever falling > into. One which I find particularly hard to understand is how mixed mode > comparisons work. > For instance > > $string = 'elephant'; > If($string == 0) returns true; > If($string != 0) returns false; >

Re: [PHP] Opinions needed

2009-02-13 Thread Virgilio Quilario
> I'm scripting a light-weight, low volume signup registry for a running club. > Folks sign up to volunteer for events and the like. There will generally be > a handful of signup registries at any one time. A typical registry will only > contain 50 to 100 names. Each registry is only in existence

Re: [PHP] Re: Extract result from a https remote server response

2009-02-13 Thread Virgilio Quilario
> Sorry all, I was testing in a Windows environment. > I feel like an idiot... :) > > Thanks to all. > > -- > m a r k u s > > Bruno Fajardo wrote: >> >> Assigning the return of file_get_contents to a variable? >> Didn't get your point... >> >> 2009/2/13 m a r k u s >>> >>> Shawn McKenzie wrote: >>

Re: [PHP] APC problem with PHP

2009-02-13 Thread Virgilio Quilario
>> >> > Hmm, I'll try taking down the optimizer and seeing if it segfaults or >> > not. If that's what it is it's a crying shame that apc and >> > zend_optimizer can't get along. >> >> >> maybe give eaccelerator a shot, i believe theyve got an optimizer in there. >> im not sure how it stacks up to

Re: [PHP] [Fwd] How to make a secured login form

2009-02-13 Thread Virgilio Quilario
> I have secured the login form for my CMS with a challenge-response thing > that encrypts both username and password with the > (login-attempts-counted) challenge (and; here's my problem: a system > hash) sent by the server (it would end up in your html as a hidden > inputs, or as part of a json t

Re: [PHP] PHP OOP

2009-02-12 Thread Virgilio Quilario
Java is really awesome at OOP and it is great for teaching OOP or, shall we say "illustrating OOP". OOP is a programming technique in general without any bias towards any programming language. Good background on OOP concepts is essential in learning language specific OOP implementation. So don't wo

Re: [PHP] Module Structure ideas

2009-02-11 Thread Virgilio Quilario
> Last year I began to sepearte my module files to many files for their > purposes. > > Last time use use lots of dirs for their types > > someting like > > controllers > a.cont.php > b.cont.php > definition > a.def.php > b.def.php > models > a.model.php > b.model.php > views > a.view.php >

Re: [PHP] Help on caching an object.

2009-02-11 Thread Virgilio Quilario
> My problem is very simple: > I have an object that's definately called with every page request. > It's pretty much the same for every unregistered/anonymous user. > And it's not small. Alot of attributes are being set from DB queries etc. > > Now my idea was to do some sort of caching with PHP to

Re: [PHP] (Perl) Regular Expressions - oposite match or get the non-matches of a substring

2009-02-11 Thread Virgilio Quilario
> Hi all, > > I consider myself quite good with Regular Expression, but i could never find > out how to match something like: > > "match this but not this and that" > > so i would like to match the first "match this" (or "another this") but not > "not this". > > Seems pretty straight forward but i