Re: [PHP] shell expansion (globbing) from inside php cli script

2005-06-27 Thread Jasper Bryant-Greene
Brian V Bonini wrote: >>> I can echo out the command and get a well formed command, i.e. >>> one that will execute from a command prompt, but when I try to >>> exec() $cmd from within the script the globbing is taken >>> literally. Try shell_exec(). I don't think exec() goes via the shell. -- PH

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-27 Thread Jasper Bryant-Greene
= sprintf('/services.php/%s'. $i); header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $url); Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Question about HTTP 301 permanent redirects

2005-06-28 Thread Jasper Bryant-Greene
er("Status: 301 Moved Permanently"); > > ?> Waste of time. Go read the HTTP spec. Apologies for missing the typos, I was rather in a hurry. The point is, it wasn't a 301 redirect. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: date problem

2005-06-28 Thread Jasper Bryant-Greene
t a different result. Can anyone > help with the SQL? Read up on the MySQL DATEDIFF() function, if you are using MySQL. Other DBMSs should have an equiv. function. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] force https

2005-06-28 Thread Jasper Bryant-Greene
close it in the following, unless you like infinite loops: if($_SERVER['HTTPS'] != 'on') { } Assuming that you're using Apache. I'm not sure if other servers set that variable. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: date problem

2005-06-28 Thread Jasper Bryant-Greene
Mario netMines wrote: > Hi Jasper and thanks for the quick reply. > > something tells me it's not a straightforward SQL query that I have to > use here but a logic using PHP and SQL. Please don't top-post. It can be done in SQL quite easily, as can many things people

[PHP] Re: MySQL error

2005-07-01 Thread Jasper Bryant-Greene
nter, you probably want "ESCAPED BY '\''" rather than "ESCAPED BY '\'" (added a ' to close the first quote, as the second one is escaped. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] reading PDF's

2005-07-01 Thread Jasper Bryant-Greene
n't need OCR in most cases, as the text is stored as real text, not as images of text, in the PDF. Surely there must be a PDF-to-text utility out there somewhere, because there's plenty of open-source PDF reading utils around... Jasper -- PHP General Mailing List (http://www.php.ne

[PHP] Re: WebHosting suggestions

2005-07-01 Thread Jasper Bryant-Greene
or the service, as you will end up much better off. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Currency stored as cents

2005-07-02 Thread Jasper Bryant-Greene
Satyam wrote: Now, am I missing something in all this? Please comment. Thanks Satyam Just use the Arbitrary Precision Mathematics functions in PHP, set to a precision of 2 decimal places. There's bcmath[1] and GMP[2]. Jasper [1] http://www.php.net/bc [2] http://www.php.net/gmp -

[PHP] Re: Currency stored as cents

2005-07-02 Thread Jasper Bryant-Greene
ts as it likes during processing, and use number_format() whenever displaying to limit it to 2 decimal places. That, coupled with storing them as decimals with 2 decimal places in my MySQL databases, achieves everything I need. Jasper -- PHP General Mailing List (http://www.php.net/) To uns

[PHP] Re: mail()===false but msg is sent!

2005-07-02 Thread Jasper Bryant-Greene
ell, firstly your subject does not match what you're doing. PHP is weakly-typed, so $result may be a value that evaluates to FALSE while not actually being a boolean value. In your subject you use the === operator to check types, but you're not doing it in the code sample. You should

[PHP] Re: x years old

2005-07-02 Thread Jasper Bryant-Greene
as 1988-07-06 it is showing it as 17 years old instead of 16...any idea whats wrong in the above code? Use floor() instead of round(). Using the round() function will round anyone whose age is above 16.5 to 17, while floor() always rounds down. Jasper -- PHP General Mailing List (http://www.ph

[PHP] Re: Group By problems

2005-07-03 Thread Jasper Bryant-Greene
e users table and then looping over the data table separately inside the users loop. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: setting initial vlaue of optionbox

2005-07-03 Thread Jasper Bryant-Greene
Ross wrote: value="" Keeps the value of $subject that was previously entered in the textarea even after the form is submitted with php_self(). Is this possible with the listbox?? { ?> selected>Some Option Alter to suit your needs, of course. Jasper -- PHP General Ma

[PHP] Re: Help a Norwegian student!

2005-07-03 Thread Jasper Bryant-Greene
t; or something similar." How do I solve this problem??? If you're on Windows, follow the other posted advice :) If you're on *nix, make sure PHP was compiled with MySQL support, i.e. the MySQL client libraries were compiled in. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] zlib.output_compression

2005-07-12 Thread Jasper Bryant-Greene
LacaK wrote: I see contents using Network Monitor, so I se response header and contents andthey are uncompressed, so somresion does not uccured. It's likely the browser is uncomressing it before you ever see it. I would telnet to port 80 and make an HTTP request to see for sure. To turn

Re: [PHP] zlib.output_compression

2005-07-12 Thread Jasper Bryant-Greene
by design -- it doesn't make sense to allow setting it at runtime as some output could already have been made. Be interesting to see what the bug report digs up, though -- can we have a link? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: How to read PHP variables.

2005-07-13 Thread Jasper Bryant-Greene
Bruno B B Magalhães wrote: That's my problem: I have a configuration files with the following structure... $vars['varname'] = 'varvalue'; If you trust the config file: Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: 404 Header Problems

2005-07-13 Thread Jasper Bryant-Greene
e 404 error page you've set up in Apache config. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Displaying HTML safely

2005-07-15 Thread Jasper Bryant-Greene
scripting isn't important for your application... Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is GD available

2005-07-15 Thread Jasper Bryant-Greene
ys that gd should be supported out of the box. I am going to try and find the rpm for php-4.3.11 and reinstall it. That is the GD library, not the GD PHP extension. The latter requires the former, but they are not equivalent. Please don't top-post. Jasper -- PHP General Mailing List (htt

Re: [PHP] Re: Displaying HTML safely

2005-07-16 Thread Jasper Bryant-Greene
sers use IE, so unless you enjoy shutting out the majority of your customers, we do need to work around it. Let's not get this thread OT though. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Session warning

2005-07-16 Thread Jasper Bryant-Greene
efore the first Unicode BOM, or any kind of output can screw it up. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: jpgs into database

2005-07-17 Thread Jasper Bryant-Greene
tring of text. Don't forget to mysql_real_escape_string() it. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Post URL ?

2005-07-18 Thread Jasper Bryant-Greene
s the Internet. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Post URL ?

2005-07-18 Thread Jasper Bryant-Greene
added via JavaScript when a link/button is clicked, then it won't be visible in the source. Regardless, though, it's not really any form of security. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] objects destroyed in same order as created?

2005-07-20 Thread Jasper Bryant-Greene
y objects in the reverse order that they were created? Is there any way to work around this? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Rate to charge

2005-07-20 Thread Jasper Bryant-Greene
to account your expertise in PHP and MySQL, and in the problem domain. If you do not have a lot of expertise in either of those areas then you may not want to charge as highly. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Rate to charge

2005-07-21 Thread Jasper Bryant-Greene
Evert | Rooftop wrote: Jasper Bryant-Greene wrote: I'm in New Zealand and charge NZ$50/hour as a base rate for PHP web development. I don't know what that is in your currency, try www.xe.com/ucc to find out. That's almost probably as cheap as india. True, but markets a

Re: [PHP] objects destroyed in same order as created?

2005-07-21 Thread Jasper Bryant-Greene
Shaw, Chris - Accenture wrote: Jasper, I would have thought php would have called the destructors on each of the classes in a LIFO fashion, but if it doesn't, just use unset() as a workaround, where you can remove the classes in the order you want. I should add that this behaviour see

[PHP] Re: System specific information gathering

2005-07-21 Thread Jasper Bryant-Greene
than using system() to execute 'uptime' etc. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] On register_shutdown_function: What might be the problem?

2005-07-22 Thread Jasper Bryant-Greene
want performed. If you execute, for example, "/some/path/somescript &", then the exec() function will return immediately and somescript will continue to run. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] speed - PHP/MYSQL

2005-07-23 Thread Jasper Bryant-Greene
tead, execute the query once (without the "hour(time)=$1 and " and the "limit 1", and use a while($row = mysql_fetch_assoc($result)) { } type function to get all 23 rows. That will be much faster. By the way, that should probably be "order by time desc" not "o

[PHP] Re: PHP and Perl

2005-07-23 Thread Jasper Bryant-Greene
your message is hidden within another thread and is very likely to be missed. In this situation I would simply use the PHP execution functions (exec(), system(), shell_exec(), etc.) to call Perl scripts that use the modules or functions written in Perl. Jasper -- PHP General Mailing List

[PHP] Re: Don't ejecute a sentence if a field is empty

2005-07-23 Thread Jasper Bryant-Greene
Jesús Alain Rodríguez Santos wrote: Hello I'm new: I need to know how can I stop a php sentence if my db is empty, for example I have writed a php sentence, if every fields from mmy db are full, there is no problem, but I delete every values from the all fields in my db when I ejecute my script m

[PHP] Fundamental question about ADTs

2005-07-29 Thread Jasper Bryant-Greene
Photo { private $caption; [...] public function setCaption($newCaption) { $this->caption = $newCaption; } } It just seems so pointless.. Thanks in advance for any comments. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A question on the term CFG.

2005-08-07 Thread Jasper Bryant-Greene
Or if it's PHP 5 they might be using an __autoload() magic function which gets called whenever a class that isn't declared is instantiated. That function could be require()ing another file. Jasper Chris wrote: That isn't created by PHP, it must be declared in the code so

Re: [PHP] Java - toString() <-> php - ?

2005-08-07 Thread Jasper Bryant-Greene
If you use PHP 5 just use the __toString() magic method which does exactly that. http://www.php.net/manual/en/language.oop5.magic.php#language.oop5.magic.tostring Jasper Rory Browne wrote: Um - did you read my last email regarding var_dump var_export and print_r Did you try them? Do they

Re: [PHP] A question on the term CFG.

2005-08-07 Thread Jasper Bryant-Greene
Well if you're using 4.3.10 as you said in your other post then __autoload is not supported anyway. A grep on autoload would've turned it up. I'm assuming you've tried a grep for "CFG" to find the declaration? Jasper wayne wrote: Hi Jasper, I thought abo

Re: [PHP] How to start a global variable within a function?

2005-08-08 Thread Jasper Bryant-Greene
Jasper Wong HoWang wrote: as title, how to start a global variable within a function? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About Get_meta_tags()

2005-08-08 Thread Jasper Bryant-Greene
on? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Generating a 404 status message with header()

2005-08-09 Thread Jasper Bryant-Greene
ErrorDocument as specified in Apache's config. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Generating a 404 status message with header()

2005-08-09 Thread Jasper Bryant-Greene
d doesn't exist in the DB, Apache will not automatically display the ErrorDocument. So my suggestion is simply to include() it in that case. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] N/A

2005-08-09 Thread Jasper Bryant-Greene
specific question then post back to the list. Oh, and a descriptive subject rather than "N/A" may help if you want people to read your message. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] N/A

2005-08-09 Thread Jasper Bryant-Greene
R. Ragunathan wrote: can we implement lock to a table using postgres with php. if any of u all knows the solution do reply back. You may also want to look at the following URL: http://www.postgresql.org/docs/8.0/interactive/explicit-locking.html -- PHP General Mailing List (http://www.php.net

Re: [PHP] html_entity_decode () for …, ’, etc.

2005-08-10 Thread Jasper Bryant-Greene
y be a PHP 5 feature? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date field

2005-08-10 Thread Jasper Bryant-Greene
If it's MySQL, then just do an SQL query with a WHERE clause like this: WHERE updated > DATE_SUB(NOW(), INTERVAL 1 YEAR) Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
I couldn't care less about what any other search engine (evil or not) does or sees. robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it&#x

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
Jochem Maas wrote: Jasper Bryant-Greene wrote: robots.txt will not do what you want it to. Just sniff for those robots' User-Agents (Google, MSN and Yahoo all publish their UA strings on their websites, AFAIK) and send different content if it's one of those. they will hammer

Re: [PHP] Blatantly Evil Question

2005-08-11 Thread Jasper Bryant-Greene
nt to hide your content from the major search engines, since they all use robots.txt You misunderstand his original question. He wants to show different content to search engines than to users. He understands this is a bad thing to do, but just wants to know how to do it anyway. Jasper -- PHP

Re: [PHP] header redirect not working

2005-08-12 Thread Jasper Bryant-Greene
($this->CMS_base_path); In other words, tell us what the $this->CMS_base_path field contains when that line is executed. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Mail-id validation script

2005-08-12 Thread Jasper Bryant-Greene
email addresses at [1], or just Google for PHP email validation [2]. Jasper [1] http://www.ietf.org/rfc.html [2] http://www.google.com/search?q=php+email+validation -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] wrapping text

2005-08-13 Thread Jasper Bryant-Greene
John Taylor-Johnston wrote: Folks are complaining mail arrives and text will not wrap. $message comes directly from a textarea. Old mail readers, I guess? How can I make their life better and make the text wrap? http://www.php.net/wordwrap -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] array varible problems

2005-08-13 Thread Jasper Bryant-Greene
and the nested statement(s) are executed. If it evaluates to FALSE, the execution of the loop ends." Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array varible problems

2005-08-14 Thread Jasper Bryant-Greene
$i is less than 3. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array varible problems

2005-08-14 Thread Jasper Bryant-Greene
[EMAIL PROTECTED] wrote: Hello Jasper, Does your means : I need to rewite the source / result page as the following ? [snip] Yes. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Problem when encoding non-english into UTF-8

2005-08-15 Thread Jasper Bryant-Greene
l for the job. Take a look at the iconv extension[2]. Jasper [1] http://www.php.net/utf8_encode [2] http://www.php.net/iconv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Javascript Src and HTTP_REFERER

2005-08-16 Thread Jasper Bryant-Greene
Dotan Cohen wrote: And, the thing is, within this javascript_dump.php, HTTP_REFERER shows nothing, because it gives you the referer of the html page (page1) that contains this

Re: [PHP] Initiating cronjobs from PHP?

2005-08-16 Thread Jasper Bryant-Greene
tever is appropriate for your application) and which executes all jobs in the table and removes them when complete. That way you don't need to dynamically alter your crontab. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Anyone on the list using Moodle?

2005-08-17 Thread Jasper Bryant-Greene
#x27;s no real reason for doing this although it may be a hack because some of the required files in that script may expect a $CFG object to exist. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Anyone on the list using Moodle?

2005-08-17 Thread Jasper Bryant-Greene
an explanation. The post I just sent to the list regarding your earlier question explains this. If you do not instantiate an object before using it, it is automatically instantiated as an object of the stdClass class. You can then add and read attributes, like an "array dressed up as

Re: [PHP] mail()

2005-08-17 Thread Jasper Bryant-Greene
e+MTA+server Now surely you could have managed that? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] ob_start changed from php4 to php5?

2005-08-18 Thread Jasper Bryant-Greene
d have to be two NEWLINE characters... PHP eats (does not output) any NEWLINE character immediately following a ?> closing PHP tag. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP MySQL insert

2005-08-18 Thread Jasper Bryant-Greene
ng are in your character set. For example, I use UTF-8 for all output, and all the characters I ever use are (of course) in the UTF-8 character set. Therefore I only need to use htmlspecialchars() to turn characters that have special meaning in HTML (&, ', ", <, >, etc.) into

Re: [PHP] Week Days

2005-08-18 Thread Jasper Bryant-Greene
unday') { $dayInFuture = strtotime("+1 day", $dayInFuture); } Disclaimer: untested code. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Automated data upload for customers

2005-08-19 Thread Jasper Bryant-Greene
uploading bit, and perhaps a database abstraction layer such as PEAR's DB package[3] for the MySQL bit. Before I sit down and start coding this thing from scratch, does anyone know if there is something similar out there already that could give me a head start? HTH Jasper

Re: [PHP] Automated data upload for customers

2005-08-19 Thread Jasper Bryant-Greene
Richard Lynch wrote: On Fri, August 19, 2005 3:47 pm, Jasper Bryant-Greene wrote: For CSV, it's as simple as explode() the data by "\n" (perhaps strip out any "\r" before you start) and then explode() by ",". Depending on the software they're using, you

Re: [PHP] upload large files troubles

2005-08-19 Thread Jasper Bryant-Greene
super-user-friendly and your users didn't necessarily know how to use FTP). Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php explained in sql

2005-08-19 Thread Jasper Bryant-Greene
n what you actually want to do: colname<>'' colname<>0 colname IS NOT NULL Or, if you're in MySQL >= 5.0.2 and are using true boolean values: colname IS TRUE or, if you just want to check if it's TRUE or UNKNOWN: colname IS NO

Re: [PHP] Super globals ?

2005-08-20 Thread Jasper Bryant-Greene
Wong HoWang wrote: Hello, I want to know that is there any way to create a super global in PHP? Only with the runkit extension. Take a look: http://www.php.net/runkit Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Super globals ?

2005-08-20 Thread Jasper Bryant-Greene
Kevin Waterson wrote: This one time, at band camp, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: Wong HoWang wrote: Hello, I want to know that is there any way to create a super global in PHP? Only with the runkit extension. Take a look: http://www.php.net/runkit This is e

Re: [PHP] preg_match

2005-08-20 Thread Jasper Bryant-Greene
n, \r when you meant \\r, \t when you meant \\t, and so on... Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Super globals ?

2005-08-20 Thread Jasper Bryant-Greene
Kevin Waterson wrote: This one time, at band camp, Jasper Bryant-Greene <[EMAIL PROTECTED]> wrote: Because he asked for superglobals, not globals. $GLOBALS (not $_GLOBALS) meh, force of habit happens to be an example of a superglobal. and variable can be set within its scope,

Re: [PHP] exec ping

2005-08-20 Thread Jasper Bryant-Greene
#x27;ping -c 10 168.192.0.1', $nn); Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] exec ping

2005-08-20 Thread Jasper Bryant-Greene
Juan Pablo Herrera wrote: Thanks Jasper, well, i need make a explode of results of the ping. The idea is check a host and when the host don´ t response send a email. I don't explode the result of the ping. If it was me, I'd try opening a socket connection to the host instead, and ch

Re: [PHP] support for database interaction

2005-08-21 Thread Jasper Bryant-Greene
e functions. And please refrain from spamming the list with 4 almost-identical messages. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how to know when a php library is installed

2005-08-21 Thread Jasper Bryant-Greene
Lizet Pena de Sola wrote: Hello all: I need to test whether a library is installed with php or not. In this case it's the tidy library I need for a project. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: Problem between php4.4 and mysql

2005-08-21 Thread Jasper Bryant-Greene
On 21 Aug 2005, at 21:24, Jasper Bryant-Greene wrote: As far as your database problem goes... Have you recently installed MySQL 4.1 or has it previously been working with MySQL 4.1? Alex Scott wrote: I Installed it about a month ago (from RPM's) and php 4.4 as well the two were wo

Re: [PHP] Re: Problem between php4.4 and mysql

2005-08-21 Thread Jasper Bryant-Greene
M. Sokolewicz wrote: Jasper Bryant-Greene wrote: Well, it's hard to say without a bit more detail. Are you able to give us the actual error that PHP is giving on the database connected pages? I assume you are using the mysqli functions rather than the mysql functions to access

Re: [PHP] php vulnerability

2005-08-21 Thread Jasper Bryant-Greene
ent XMLRPC vulnerabilities affecting a large range of PHP applications. IMHO the vulnerability is much more likely to be in an application built in PHP than in PHP itself. Do you run a firewall on your server? Which ports remain open? Jasper -- PHP General Mailing List (http://www.php.net/) To u

Re: [PHP] php vulnerability

2005-08-22 Thread Jasper Bryant-Greene
look at any filesystem or shell calls you make and ensure that all parameters that are sourced from user input are properly checked to ensure that the user hasn't entered something they shouldn't've. For example "../../../etc/passwd" to a file_get_contents() call. Jaspe

Re: [PHP] Resizing thumbnails to the browser

2005-08-22 Thread Jasper Bryant-Greene
;); imagejpeg($my_gd_image); Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Files passing through

2005-08-22 Thread Jasper Bryant-Greene
simple loop until EOF and using fread(). I haven't tested that claim, so YMMV. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Large URI request problem

2005-08-22 Thread Jasper Bryant-Greene
might be called by the browser before the calling page has finished loading (esp. with newer pipelining browsers), and therefore before the session vars are saved... You could try it, though. Any other ideas? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Large URI request problem

2005-08-22 Thread Jasper Bryant-Greene
same, or an equally long, list to the calling script in the URL...) Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Files passing through

2005-08-23 Thread Jasper Bryant-Greene
you assign the output of fread() to a variable and then print it? Why not just: print(fread($fd, 2048)); which would be faster because it doesn't need to assign to a variable, wouldn't it? Maybe I'm missing something.. Jasper -- PHP General Mailing List (http://www.php.net

Re: [PHP] preg_match

2005-08-23 Thread Jasper Bryant-Greene
ct that the character following it happens to not make it a special character. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Files passing through

2005-08-23 Thread Jasper Bryant-Greene
Richard Lynch wrote: On Tue, August 23, 2005 12:48 am, Jasper Bryant-Greene wrote: Kim Steinhaug (php list) wrote: I'm using this method, works fine with 50mb+ files : if( $fd = fopen ($filepath, 'r')){ while(!feof($fd)) { $buffer = fread($fd, 2048);

Re: [PHP] Mac OS X file name encoding problem

2005-08-23 Thread Jasper Bryant-Greene
filesystem encoding, that on Mac OS X is Unicode, so I tryied this before: $filename = utf8_encode($filename); Wouldn't it be utf8_decode(), since you're trying to go *from* a Unicode filesystem (Mac OS X)? Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] question on order of variables passed to a function

2005-08-23 Thread Jasper Bryant-Greene
ou haven't defined one, it will use the error handling methods set up in PHP (log_errors or display_errors). HTH Jasper [1] http://www.php.net/trigger_error -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] possible to get a function from another domain

2005-08-23 Thread Jasper Bryant-Greene
o you mean by domain in this example? You can include() or require() the file with the function declaration in it... Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] possible to get a function from another domain

2005-08-23 Thread Jasper Bryant-Greene
e/xml?productID=54385 and returns some XML data for that product. Then call it from varupiraten.se and parse the XML. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Weird results of "=="

2005-08-23 Thread Jasper Bryant-Greene
1); // Or whatever is acceptable for you function float_equals($a, $b) { return (abs($a - $b) <= MAX_FLOAT_DELTA); } Then use float_equals($x, $y) instead of $x == $y. Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem with ' or "

2005-08-23 Thread Jasper Bryant-Greene
as a last resort use addslashes(). Jasper [1] http://www.php.net/mysql_real_escape_string [2] http://www.php.net/docs.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] problem with ' or "

2005-08-23 Thread Jasper Bryant-Greene
George B wrote: Jasper Bryant-Greene wrote: George B wrote: I made a script that posts data into a database but it has a problem whenever I enter a ' or a ". How do I bypass this problem? If it is MySQL, use mysql_real_escape_string() [1]. If any other database, have a look

Re: [PHP] Easier way to clean GET Variables ?

2005-08-24 Thread Jasper Bryant-Greene
y in the first place. Then you can do things like: mysql_query("INSERT INTO table (col) VALUES ('{$_SAFE_POST['val']}')"); Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Easier way to clean GET Variables ?

2005-08-24 Thread Jasper Bryant-Greene
Robert Cummings wrote: On Wed, 2005-08-24 at 23:12, Jasper Bryant-Greene wrote: Graham Anderson wrote: Is there a way to loop thru all of these GET requests by: putting the GET variables into an array processing the variable strings with trim/striptags/etc in a loop exploding the variables

Re: [PHP] Easier way to clean GET Variables ?

2005-08-25 Thread Jasper Bryant-Greene
Burhan Khalid wrote: Jasper Bryant-Greene wrote: Robert Cummings wrote: [snip] Still need to check isset() status unless you've disabled E_NOTICE which I don't advise since it's sloppy ;) Yeah, I usually would in a real script. Just slipped my mind when writing that exam

Re: [PHP] trying to get phpmail to send an attachment

2005-08-25 Thread Jasper Bryant-Greene
->AddAttachment($_FILES['userfile']); (square brackets, as $_FILES is an array, not a function) Jasper -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

<    1   2   3   4   5   >