Re: [PHP] problems configuring php5.2.0 and php4.4.4 with mysql5.0.27

2006-12-09 Thread Robert Cummings
On Sat, 2006-12-09 at 11:37 +0100, Erik Nordlander wrote: Hi, im having troubles configuring php5.2.0 (since this version didnt work i also tried 4.4.4 without success) with mysql 5.0.27 and apache 2.2.3. The apache server is working properly, and so does the mysql server. This doesn't mean

[PHP] using growisofs in a PHP/HTML page

2006-12-09 Thread Pedro Quaresma
Hi I'm trying to write a make a backup, page. I do the backup of all the databases (into /tmp/CopiaSeguranca), I do the copying of some directories to /tmp/CopiaSeguranca, and then I want to write a DVD of all the files in /tmp/CopiaSeguranca. Everything is ok, except for the last step. (...)

Re: [PHP] using growisofs in a PHP/HTML page

2006-12-09 Thread Pedro Quaresma
On Saturday 09 December 2006 15:17, you wrote: when running something through a web browser/server the command is being run as/by the user that the web server runs as (in a unix/apache environment that's generally apache or nobody). hence the likely difference between how this works in a

[PHP] file uploads Q?

2006-12-09 Thread William Stokes
Hello, I have somehow managed to write a scipt that is able to upload and resize images to a server :))) Sad part is that now the user can upload only one image at a time.(user has a browse button for browsing images in his local disk and can pick only one at a time). Is it possible to allow

Re: [PHP] file uploads Q?

2006-12-09 Thread Richard Lynch
On Sat, December 9, 2006 12:18 pm, William Stokes wrote: Is it possible to allow user pick several images and upload them all at once? (I need to pass the images to a function for the resize). Or do I need to give several browse buttons to allow multiple file uploads? Yes, you would need to

Re: [PHP] problems configuring php5.2.0 and php4.4.4 with mysql5.0.27

2006-12-09 Thread Richard Lynch
Did you configure/install MySQL *and* the mysql-dev packages or whatever your OS needs for the MySQL headers to be there? Did you also compile MySQL and install it? Is there a libmysqlclient somewhere like /usr/local/lib or /usr/lib or whatever is appropriate for your system? On Linux, did you

Re: [PHP] Load Extensions

2006-12-09 Thread Richard Lynch
On Fri, December 8, 2006 1:25 pm, Igor Kravchenko wrote: Can someone help me with this, please? I cannot load extensions. I setup php5 in the c:\php folder. I specified extension_dir = C:\php\ext. Everything else is setup correctly because php works. for me, I can load phpinfo file. It

Re: [PHP] How to not be abused by mail form injectors?

2006-12-09 Thread Richard Lynch
if (strstr($subject, \r) || strstr($subject, \n)) die(spammer); if (strstr($from, \r) || strstr($from, \n)) die(spammer); That right there will kill off most of your header injection attacks, assuming you have already got $from = $_REQUEST['from'] or something similar. The main thing is to make

Re: [PHP] Ensuring that variable contains a number

2006-12-09 Thread Richard Lynch
My take: $number = (int) $number; if ($number 1) $number = 1; You could error out for 1, or compare the original with the (int) cast to see if PHP considers them = and error out if not, while using the (int) cast to be SURE you have an int, or... But a typecast and inequality test should be

Re: [PHP] PHP Grammar

2006-12-09 Thread Richard Lynch
I think what you want is in here: http://lxr.php.net On Wed, December 6, 2006 10:59 am, yo plop wrote: Hello I have been asked to do a compiler from PHP5 to C code using Lex and Yacc I don't think i can find it already done and open source, but if i could get the PHP grammar (in Lex/Yacc

Re: [PHP] PHP5 Inheritance/method override problem

2006-12-09 Thread Richard Lynch
You can't override the method signature in subclasses in PHP5. If you want this in PHP6, research the ...discusssion... from last month on this topic on the PHP-Internals mailing list, and weigh in if it's not already a Dead Horse. I recall the ...discussion... more for entertainment value than

Re: [PHP] PHP analytics

2006-12-09 Thread Richard Lynch
?php //untested code: session_start(); if (!isset($_SESSION['username'])){ require 'login.inc'; //login form to set $_SESSSION['username'] exit; } $username_sql = mysql_real_escape_string($_SESSION['username']); $self_sql = mysql_real_escape_string($_SERVER['PHP_SELF']);

Re: [PHP] Include problem

2006-12-09 Thread Richard Lynch
There is also a set_include_path function, I do believe. On Wed, December 6, 2006 4:26 am, Ashley Hales wrote: I am trying to use includes on a free php server but I cannot set the includes_path myself. Consequently when I try to include common elements or library files I run into trouble as

Re: [PHP] Ensuring that variable contains a number

2006-12-09 Thread Dotan Cohen
On 10/12/06, Richard Lynch [EMAIL PROTECTED] wrote: My take: $number = (int) $number; if ($number 1) $number = 1; You could error out for 1, or compare the original with the (int) cast to see if PHP considers them = and error out if not, while using the (int) cast to be SURE you have an

RE: [PHP] PHP Installation question

2006-12-09 Thread Beauford
Solved. Ditched Slackware 10 and installed Slackware 11. Both were installed the exact same way, so who knows Thanks to all. -Original Message- From: Ryan Creaser [mailto:[EMAIL PROTECTED] Sent: December 7, 2006 10:05 PM To: Beauford Cc: php-general@lists.php.net Subject: Re:

[PHP] Error Display

2006-12-09 Thread Craige Leeder
I have been working with PHP5 since it's release, and until a few months ago, have never experienced the problem I am about to describe to you. I am not sure weather it has been discovered previously or not, nor do I know exactly how to replicate it, but I would like to know if you have

[PHP] Embedded Video

2006-12-09 Thread Beauford
Not sure if this can be done with PHP, or if I would need to use a java script or something. If anyone has any ideas it would be appreciated. I have a video on my site and I want something to say that the video is loading and then disappear once the video starts. Thanks again. -- PHP General

Re: [PHP] Embedded Video

2006-12-09 Thread Craige Leeder
You would need to use Java or Flash to load the video and check the loaded size against the total size. - Craige On 12/9/06, Beauford [EMAIL PROTECTED] wrote: Not sure if this can be done with PHP, or if I would need to use a java script or something. If anyone has any ideas it would be