Re: [PHP] [OFF] - Fraudulent web orders - any ideas?
It may well be that they're using anonymous proxies. I know of a couple that spread the visiting IP addresses over a wide range of IP addresses, although everything does make it back eventually. Also possible is that they are using infected Windows machines and proxies. In the case of anonymous proxies, it should be possible to get the full range of IP addresses from somewhere and block all access through anonymous proxies - serious customers won't wast time going through such proxies, only people who really have something to hide go through such proxies. In the case of infected windows machines, you have a different problem because there are millions of such machines which act as spam relays, virus distributors, ... Keeping in mind that you want to make sales on your site as easy as possible, the best I can think of is to create a session cookie for the visitor which contains their IP address and check that IP address against one that you have stored locally for that session. If the IP address differs, blow the whistle on that visitor. To conceal that you are checking their IP address, call the cookie something like 'SaleID' or 'ItemID' and run the IP address through md5sum to get an md5 checksum and use that instead of the IP address itself. It wont get all of them, but it will make a difference, and make them have to work harder to get around the security on your site. In a case like this, you would also have to keep a database entry of what credit card number came from what IP address. If that card tries and fails more than twice and comes from different iP addresses every time, block that card number. Does Amex keep an online database of stolen/disabled credit cards? Maybe being able to query something like that in real time would be of advantage (actually I think some idea like this was presented very early in the thread). At the moment I don't have any other ideas. Hopefully what I've suggested here helps. best regards Markus On Monday 23 August 2004 23:33, Brian Dunning wrote: > The plot thickens. I added AVS *and* CVM to the site - and the Amex > orders are still going through. Amex ignores CVM, and the address was > correct, so the thieves must have gotten ahold of printed statements > that show the billing address. Any idea how to combat THAT? They are > using fake IP addresses now so I can't keep up by blocking IP's. > > Your clever ideas appreciated. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Using php_value in .htaccess files
[EMAIL PROTECTED] wrote: *** This Email Has Been Virus Swept *** Is there anything special one has to do in order to enable the use of the "php_value" directive in the context of an apache .htaccess file? I notice that on some hosts I can drop in something like: php_value auto_prepend_file groove.php with impunity. Other hosts, it causes Apache to generate an internal server error. -Weston Although this may not be your problem it's always a good idea to test for the existence of the module before attempting to change any of it's values: php_value auto_prepend_file "groove.php" Neil This communication is confidential to the intended recipient(s). If you are not that person you are not permitted to make use of the information and you are requested to notify the sender immediately of its receipt then destroy the copy in your possession. Any views or opinions expressed are those of the originator and may not represent those of Advanced System Architectures Ltd. *** This Email Has Been Virus Checked *** -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] chat server and chat client
Greetings, Does anyone know how to use PHP to develop a simple chatting server and client? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Accessing form values from multi selects or checkboxes
Hi, Is there a way I can access the values selected in a multi-select dropdown or group of checkboxes without appending square brackets to the name of the input field in my form so that it automatically becomes an array in PHP? i.e. rather than this: appleorange I would like to be able to do this, but still access the elements: appleorange Basically I am using a JavaScript chained select function which complains when I use square brackets in a field name, and before I start hacking the code I wanted to see if there was an alternative way of doing it server side. Thanks all, Alex -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Where clause
Hi, I have a table with 2 fields: id_from and id_to. I want to interogate the database and to display the results if the id_to is equal to some current id OR id_from id_from is equla to saame current id. I use this but doesn't work $sql = "SELECT id_from, id_to FROM ids WHERE id_from ='$current_id' OR id_to='$current_id' "; $result = mysql_query($sql); How can i do? Thanks
Re: [PHP] How to add Zlib support
Curt Zirzow wrote: > * Thus wrote Mauricio Pellegrini: >> >> It's a requisite that the compression library has to be zlib. >> >> I don't know how to do that. >> >> I guess I should reconfigure with >> >> './configure' >> '--with-mysql' >> '--with-apxs=/usr/local/apache/bin/apxs' >> '--with-zlib' >> '-enable-dbase' >> >> then run ./make and ./make install >> >> But I'm afraid tha something could go wrong and end-up >> with a whole useless installation > > These procdures should go without any flaws. If you're extra parnoid, > the best thing to do is back up your current stuff so incase there > is something wrong, you can restore them: > > php module for apache should be located in: > /usr/local/apache/libexec/libphp.so > > php config files: > /usr/local/lib/php*.ini > > php misc files (aka pear, headers, etc.): > /usr/local/lib/php/* > > And finaly the executables for php: > /usr/local/bin/php* > > > HTH, > > Curt Ok, Thanks . But should I recompile only php or do I have to recompile apache,mysql,etcetera,etcetera? -- Mauricio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Where clause
The answer to this is quite simple if you look in a manual. mysql_query returns a resource id from which you extract the results using things like mysql_result() or mysql_fetch_object() or mysql_fetch_row(). Look up the manual on those commands. On Tuesday 24 August 2004 13:24, Phpu wrote: > Hi, > I have a table with 2 fields: id_from and id_to. > I want to interogate the database and to display the results if the id_to > is equal to some current id OR id_from id_from is equla to saame current > id. > > I use this but doesn't work > > $sql = "SELECT id_from, id_to FROM ids WHERE id_from ='$current_id' OR > id_to='$current_id' "; $result = mysql_query($sql); > > How can i do? > > Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system command
Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Where clause
[snip] I have a table with 2 fields: id_from and id_to. I want to interogate the database and to display the results if the id_to is equal to some current id OR id_from id_from is equla to saame current id. I use this but doesn't work $sql = "SELECT id_from, id_to FROM ids WHERE id_from ='$current_id' OR id_to='$current_id' "; $result = mysql_query($sql); [/snip] This looks OK, but you may want to add parentheses $sql = "SELECT id_from, id_to FROM ids WHERE (id_from ='$current_id' OR id_to='$current_id') "; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to count objects instances
Robert Cummings wrote: On Mon, 2004-08-23 at 20:54, John Holmes wrote: [EMAIL PROTECTED] wrote: hi, What is best method(if it's possible) to count how many times an object is instanced in one time script call? I means that if i have a class named "Test", i what to know how many times she's called, how many copies exists etc. The idea is for monitoring in the way to optimizing the code. The method get_declared_classes() only shows only the classes included/required. There's no predefined variable or method for determining this, that I'm aware of, short of counting how many "new Test" lines you have. You could write a wrapper class for Test that kept count of the instances and returned a new object upon request... In PHP5: class Foo { static $instances = 0; function __construct() { Foo::$instances++; } function __destruct() { Foo::$instances--; } static function getNumInstances() { return Foo::$instances; } } $foo = new Foo(); $fee = new Foo(); echo 'Count: '.Foo::getNumInstances()."\n"; unset( $foo ); echo 'Count: '.Foo::getNumInstances()."\n"; Add this to the class as well: public function __clone () { self::$instances++; // You might as well use the "self" operator } -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
Eric Peters wrote: I think I've boiled my problemfor some reason I can't header() a serialized $_POST variable Running PHP 5.0 Final (and also tested with 4.3.3): -- begin file -- function jpcache_debug2($s) { header("X-CacheDebug-five: $s"); print $s; } $myVariable = serialize($_POST); jpcache_debug2($myVariable); ?> -- end file -- Response Headers - Begin output: Date: Mon, 23 Aug 2004 23:56:14 GMT Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/5.0.0 mod_ssl/2.8.12 OpenSSL/0.9.6b X-Powered-By: PHP/5.0.0 X-CacheDebug-five: a:0:{} Connection: close Transfer-Encoding: chunked Content-Type: text/html a:1:{s:3:"foo";s:3:"bar";} Anyone know why my header() output behaves so funky? Thanks, Eric Try to use unserialize(); -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing form values from multi selects or checkboxes
Alex Bovey wrote: Is there a way I can access the values selected in a multi-select dropdown or group of checkboxes without appending square brackets to the name of the input field in my form so that it automatically becomes an array in PHP? Write your own function to parse $_SERVER['QUERY_STRING'] or the raw post data? -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The 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] how to count objects instances
Curt Zirzow wrote: * Thus wrote Robert Cummings: On Mon, 2004-08-23 at 20:54, John Holmes wrote: [EMAIL PROTECTED] wrote: You could write a wrapper class for Test that kept count of the instances and returned a new object upon request... In PHP5: class Foo { static $instances = 0; function __construct() { Foo::$instances++; } function __destruct() { Foo::$instances--; } And: function __clone() { Foo::$instances++; } Curt Ooops, didn't see your post, hehe... By the way, use "self" instead of "Foo", just in case you change the class' name. -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing form values from multi selects or checkboxes
On Tuesday 24 August 2004 18:00, Alex Bovey wrote: > Basically I am using a JavaScript chained select function which complains > when I use square brackets in a field name, manual > PHP and HTML -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* It has been said that man is a rational animal. All my life I have been searching for evidence which could support this. -- Bertrand Russell */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] post file from one server to other
dear Sirs, I have a database with binary file. I want to post that file from my server to another one with posting method. I have no problem to post any text data but I can not post binary data such as picture.jpe. Where can I find some solution about this Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ... extendet library ...
Hi all, I just starting with php, and i hawe problem with Bzip2 library. I will using this library, but when I use function "bzcompress()" in the editor ZDE (Zend Development Enviroment 3.0.2), this editor write text "Call to undefined function: bzcompress() ... ". Example: In help this function it's in section "INSTALL" information this text: "You will need to use the --with-bz2[=DIR] configuration option when compiling PHP to enable bzip2 support." Must I this funkcions aktivated? Where (file) I must write this text, and how? (Please example). PS: I hawe Apache2.0.50 and PHP5.0.1, from instal-packed "XAMPP BASIC package 1.4.6" Thanks, ... kofi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Where clause
read mysql manual: you must replace ' to ` ' to `` in your $sql so $sql = "SELECT id_from, id_to FROM ids WHERE id_from =`$current_id` OR id_to=`$current_id`"; or more intelligent without ``` in your $sql so $sql = "SELECT id_from, id_to FROM ids WHERE id_from =$current_id OR id_to=$current_id"; because for ANY SQL DATABASE IN THIS WORLD something without " ' ` is integer (your ids is integers :) ) "Phpu" <[EMAIL PROTECTED]> ???/ ? ?: news:[EMAIL PROTECTED] Hi, I have a table with 2 fields: id_from and id_to. I want to interogate the database and to display the results if the id_to is equal to some current id OR id_from id_from is equla to saame current id. I use this but doesn't work $sql = "SELECT id_from, id_to FROM ids WHERE id_from ='$current_id' OR id_to='$current_id' "; $result = mysql_query($sql); How can i do? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] [OFF] - Fraudulent web orders - any ideas?
If the problem is only with AmEx then the question is: how important is AmEx to your business? Stop accepting them or don't accept them for a little while. Just a thought because AmEx doesn't make up much of our business. Daryl Meese On Monday 23 August 2004 23:33, Brian Dunning wrote: > The plot thickens. I added AVS *and* CVM to the site - and the Amex > orders are still going through. Amex ignores CVM, and the address was > correct, so the thieves must have gotten ahold of printed statements > that show the billing address. Any idea how to combat THAT? They are > using fake IP addresses now so I can't keep up by blocking IP's. > > Your clever ideas appreciated. -- 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] system command
Daniel Schierbeck wrote: Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer Didn't need the contents of the buffer. All I needed was the last line which was contained in $output = system(). -- Ron Clark System Administrator/Web Coordinator Armstrong Atlantic State University 11935 Abercorn Street Savannah, Ga 31419 Phone: 912 961 3234 Fax: 912 927 5353 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] system command
Ron Clark wrote: Daniel Schierbeck wrote: Ron Clark wrote: Capture the output in the $output variable then ob_clean to empty the output buffer before printing the the desired message. ob_get_clean() is preferable: $output = ob_get_clean(); // Gets the buffered output and cleans the buffer Didn't need the contents of the buffer. All I needed was the last line which was contained in $output = system(). Sorry, my bad... -- Daniel Schierbeck -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: ... extendet library ...
1) find php.ini 2) uncomment ;extension=php_bz2.dll 3) restart apache 4) if it`s suck, then see event viewer for info 5) may be "Bzip2 library" wants to some additional dll`s to system32 from bzip2 site "Marko Rastislav" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED] > Hi all, > I just starting with php, and i hawe problem with Bzip2 library. I > will using this library, but when I use function "bzcompress()" in the > editor ZDE (Zend Development Enviroment 3.0.2), this editor write text "Call > to undefined function: bzcompress() ... ". > > Example: > $str = "sample data"; > $bzstr = bzcompress($str, 9); > print( $bzstr ); > ?> > In help this function it's in section "INSTALL" information this > text: "You will need to use the --with-bz2[=DIR] configuration option when > compiling PHP to enable bzip2 support." Must I this funkcions aktivated? > Where (file) I must write this text, and how? (Please example). > > PS: I hawe Apache2.0.50 and PHP5.0.1, from instal-packed "XAMPP > BASIC package 1.4.6" > > Thanks, > ... kofi. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] making sure sendmail function is on and running
Background: Server-Apache 1.3.31 OS-Windows XP PHP-5 Problem-I'm trying to run eFiction, a story/fanfiction archive script. On this, people self register, and they are supposed to get an e-mail with their password. However, I and one other attempted signing up, and neither of us got our password-email. After doing research, I heard I needed to make sure that my sendmail function was activated. How do I make sure that my sendmail function is on and running? I read the documentation and checked my php.ini, but I have some doubts. 1. My php.ini doesn't seem to include everything that should be either. In the documentation, it shows your mail section having four parts: SMTP, SMTP Port, sendmail_from, sendmail_path. However, php.ini looks like this (windows section): [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = [EMAIL PROTECTED] There is a sendmail_path down below, but it is under the For Linux Only section. What's with that? Also, I have a router. Do I need to port-forward port 25 to get sendmail to work? Thanks in advance. -Andrew
[PHP] Need help with using htaccess to override php.ini error settings
I need to active php error level "Warning" and log the errors in a file for my whole Apache virtual website. It is clear how to do everything on a script-by-script basis; but, I need to do it across the site. I can't find any direct documentation to help. The php manual and Apache directives documentation point me in the right direction; but, leave out too much for me to get it to work. I want to set error reporting to "Warning" and log the errors in one file. Maybe, send an email with the errors. Can anyone help me get started or point me to some good lit on the subject? Thanks.. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to count objects instances
Thanks, But im using php 4.3. Quoting Curt Zirzow <[EMAIL PROTECTED]>: > * Thus wrote Robert Cummings: > > On Mon, 2004-08-23 at 20:54, John Holmes wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > You could write a wrapper class for Test that kept count of the > > > instances and returned a new object upon request... > > > > In PHP5: > > > > > > > class Foo > > { > > static $instances = 0; > > > > function __construct() > > { > > Foo::$instances++; > > } > > > > function __destruct() > > { > > Foo::$instances--; > > } > > And: > function __clone() > { > Foo::$instances++; > } > > > Curt > -- > First, let me assure you that this is not one of those shady pyramid schemes > you've been hearing about. No, sir. Our model is the trapezoid! > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- This mail sent through Horde-Toaster (http://qmailtoaster.clikka.com/) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
From: "Al" <[EMAIL PROTECTED]> I need to active php error level "Warning" and log the errors in a file for my whole Apache virtual website. It is clear how to do everything on a script-by-script basis; but, I need to do it across the site. http://us2.php.net/manual/en/configuration.changes.php php_value error_reporting E_WARNING ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post file from one server to other
* Qt <[EMAIL PROTECTED]>: > I have a database with binary file. I want to post that file from my server > to another one with posting method. I have no problem to post any text data > but I can not post binary data such as picture.jpe. > > Where can I find some solution about this Look into PHP's cURL functions; these should allow you to post a binary file. -- Matthew Weier O'Phinney | WEBSITES: Webmaster and IT Specialist | http://www.garden.org National Gardening Association| http://www.kidsgardening.com 802-863-5251 x156 | http://nationalgardenmonth.org mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
Check this out: bash-2.05$ cat test.php bash-2.05$ Response: Date: Tue, 24 Aug 2004 14:35:55 GMT Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6k PHP/4.3.3 mod_perl/1.26 mod_fastcgi/2.2.10 X-Powered-By: PHP/4.3.3 X-CacheDebug-five: 7 Connection: close Transfer-Encoding: chunked Content-Type: text/html 27 26 How the bloody hell is $length being treated differently? Thanks, Eric -Original Message- From: Daniel Schierbeck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 4:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Eric Peters wrote: > I think I've boiled my problemfor some reason I can't header() a > serialized $_POST variable > > Running PHP 5.0 Final (and also tested with 4.3.3): > > -- begin file -- > > > function jpcache_debug2($s) > { > header("X-CacheDebug-five: $s"); > print $s; > } > > $myVariable = serialize($_POST); > jpcache_debug2($myVariable); > > ?> > > > > > name="foo" value="bar"> > > > > -- end file -- > > Response Headers - Begin output: > > Date: Mon, 23 Aug 2004 23:56:14 GMT > Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/5.0.0 mod_ssl/2.8.12 > OpenSSL/0.9.6b > X-Powered-By: PHP/5.0.0 > X-CacheDebug-five: a:0:{} > Connection: close > Transfer-Encoding: chunked > Content-Type: text/html > > a:1:{s:3:"foo";s:3:"bar";} > > > > name="foo" value="bar"> > > > > Anyone know why my header() output behaves so funky? > > Thanks, > > Eric Try to use unserialize(); -- Daniel Schierbeck -- 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] making sure sendmail function is on and running
This one is rather annoying as I have found out in the last couple of weeks. Depending on if your apache/php is on Windows or Unix, one or the other of the configurations you mentioned is relevant. If you have Windows, PHP can only use an extrenal smtp server, so you have to open that server up to connections from your web server to your mail server. That could be on the same physical machine as your web server, in which case the mail server will have to be configured to accept connections from localhost. In this case, you use the SMTP and smtp_port paramaters, and the sendmail parameter is ignored. If you are on Unix, PHP can only use a locally installed and callable MTA (Mail Transport Agent). That defaults to Sendmail, but Postfix, Exim, Qmail, and a few other MTA's that simulate Sendmails' functionality are acceptable. In this case, you use the sendmail parameter, which should be executable and configured, and the two parameters for Windows (which would actually be quite useful on Unix systems too) are ignored. You shouldn't need to do any port forwarding as long as both your Web and Mail servers are freely accessible to each other, say behind the firewall. Hope this sheds some light for you. regards markus. On Tuesday 24 August 2004 15:47, [EMAIL PROTECTED] wrote: > Background: > Server-Apache 1.3.31 > OS-Windows XP > PHP-5 > Problem-I'm trying to run eFiction, a story/fanfiction archive script. On > this, people self register, and they are supposed to get an e-mail with > their password. However, I and one other attempted signing up, and neither > of us got our password-email. After doing research, I heard I needed to > make sure that my sendmail function was activated. > > How do I make sure that my sendmail function is on and running? I read the > documentation and checked my php.ini, but I have some doubts. > > 1. My php.ini doesn't seem to include everything that should be either. In > the documentation, it shows your mail section having four parts: SMTP, SMTP > Port, sendmail_from, sendmail_path. However, php.ini looks like this > (windows section): > > [mail function] > ; For Win32 only. > SMTP = localhost > smtp_port = 25 > > ; For Win32 only. > ;sendmail_from = [EMAIL PROTECTED] > > There is a sendmail_path down below, but it is under the For Linux > Only section. What's with that? > Also, I have a router. Do I need to port-forward port 25 to get > sendmail to work? > Thanks in advance. > > -Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
Thanks, that has me started. Per the documentation, error_reporting must use the bitmask values form. And, that works great. However, I can't get the errors to log in a special file. They insist on being logged in the system's error log file. I've tried: php_value error_log "errors.txt" with and without the quotes, etc. John Holmes wrote: From: "Al" <[EMAIL PROTECTED]> I need to active php error level "Warning" and log the errors in a file for my whole Apache virtual website. It is clear how to do everything on a script-by-script basis; but, I need to do it across the site. http://us2.php.net/manual/en/configuration.changes.php php_value error_reporting E_WARNING ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
Exactly what part of this is confusing you? When you first request the page, $_POST is empty, so you end up with a serialized value of "a:0:{}" which has a length of 6. When you submit the form, you end up with a serialized value of: a:1:{s:3:"foo";s:3:"bar";} which has a length of 26. Maybe I missed something in this thread, but what's the issue here? ---John Holmes... PS: Sorry for the top post but OE didn't include the > characters in the reply below for some reason and I'm too lazy to add them myself. :) - Original Message - From: "Peters, Eric" <[EMAIL PROTECTED]> To: "Daniel Schierbeck" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Curt Zirzow" <[EMAIL PROTECTED]> Sent: Tuesday, August 24, 2004 10:38 AM Subject: RE: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Check this out: bash-2.05$ cat test.php function jpcache_debug2($s2) { $length = strlen($s2); $length++; $headers = "X-CacheDebug-five: $length"; header($headers); print $length . "\n"; print strlen($s2); } $myVariable = serialize($_POST); jpcache_debug2($myVariable); ?> bash-2.05$ Response: Date: Tue, 24 Aug 2004 14:35:55 GMT Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6k PHP/4.3.3 mod_perl/1.26 mod_fastcgi/2.2.10 X-Powered-By: PHP/4.3.3 X-CacheDebug-five: 7 Connection: close Transfer-Encoding: chunked Content-Type: text/html 27 26 How the bloody hell is $length being treated differently? Thanks, Eric -Original Message- From: Daniel Schierbeck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 4:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Eric Peters wrote: I think I've boiled my problemfor some reason I can't header() a serialized $_POST variable Running PHP 5.0 Final (and also tested with 4.3.3): -- begin file -- function jpcache_debug2($s) { header("X-CacheDebug-five: $s"); print $s; } $myVariable = serialize($_POST); jpcache_debug2($myVariable); ?> -- end file -- Response Headers - Begin output: Date: Mon, 23 Aug 2004 23:56:14 GMT Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/5.0.0 mod_ssl/2.8.12 OpenSSL/0.9.6b X-Powered-By: PHP/5.0.0 X-CacheDebug-five: a:0:{} Connection: close Transfer-Encoding: chunked Content-Type: text/html a:1:{s:3:"foo";s:3:"bar";} Anyone know why my header() output behaves so funky? Thanks, Eric Try to use unserialize(); -- Daniel Schierbeck -- 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] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
You have to look at the headers Exactly...submit the form and the HEADER version of the string returns "a:0:{}" But, a print() of the same string variable correctly returns "a:1:{s:3:"foo";s:3:"bar";}" Dig deeper into it :) I had to use the Developer tools plugin in Firefox to get the HTTP Headers that were returned :) Compare those two, and boggle the mind ;) Thanks! Eric -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 8:12 AM To: Peters, Eric; Daniel Schierbeck; [EMAIL PROTECTED]; Curt Zirzow Subject: Re: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Exactly what part of this is confusing you? When you first request the page, $_POST is empty, so you end up with a serialized value of "a:0:{}" which has a length of 6. When you submit the form, you end up with a serialized value of: a:1:{s:3:"foo";s:3:"bar";} which has a length of 26. Maybe I missed something in this thread, but what's the issue here? ---John Holmes... PS: Sorry for the top post but OE didn't include the > characters in the reply below for some reason and I'm too lazy to add them myself. :) - Original Message - From: "Peters, Eric" <[EMAIL PROTECTED]> To: "Daniel Schierbeck" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Curt Zirzow" <[EMAIL PROTECTED]> Sent: Tuesday, August 24, 2004 10:38 AM Subject: RE: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Check this out: bash-2.05$ cat test.php bash-2.05$ Response: Date: Tue, 24 Aug 2004 14:35:55 GMT Server: Apache/1.3.26 (Unix) mod_ssl/2.8.9 OpenSSL/0.9.6k PHP/4.3.3 mod_perl/1.26 mod_fastcgi/2.2.10 X-Powered-By: PHP/4.3.3 X-CacheDebug-five: 7 Connection: close Transfer-Encoding: chunked Content-Type: text/html 27 26 How the bloody hell is $length being treated differently? Thanks, Eric -Original Message- From: Daniel Schierbeck [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 4:53 AM To: [EMAIL PROTECTED] Subject: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Eric Peters wrote: > I think I've boiled my problemfor some reason I can't header() a > serialized $_POST variable > > Running PHP 5.0 Final (and also tested with 4.3.3): > > -- begin file -- > > > function jpcache_debug2($s) > { > header("X-CacheDebug-five: $s"); > print $s; > } > > $myVariable = serialize($_POST); > jpcache_debug2($myVariable); > > ?> > > > > > name="foo" value="bar"> > > > > -- end file -- > > Response Headers - Begin output: > > Date: Mon, 23 Aug 2004 23:56:14 GMT > Server: Apache/1.3.27 (Unix) (Red-Hat/Linux) PHP/5.0.0 mod_ssl/2.8.12 > OpenSSL/0.9.6b > X-Powered-By: PHP/5.0.0 > X-CacheDebug-five: a:0:{} > Connection: close > Transfer-Encoding: chunked > Content-Type: text/html > > a:1:{s:3:"foo";s:3:"bar";} > > > > name="foo" value="bar"> > > > > Anyone know why my header() output behaves so funky? > > Thanks, > > Eric Try to use unserialize(); -- Daniel Schierbeck -- 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] Need help with using htaccess to override php.ini error settings
From: "Al" <[EMAIL PROTECTED]> Per the documentation, error_reporting must use the bitmask values form. And, that works great. However, I can't get the errors to log in a special file. They insist on being logged in the system's error log file. There is a "log_errors" setting and a "error_log" setting. Try setting the "log_errors" value. http://us3.php.net/manual/en/ref.errorfunc.php#ini.log-errors ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post file from one server to other
see php.net/base64_encode user comments in POST protocol all content must send in, as i memorize, application/x-www-urlencoded form . then try combination like == guy at bhaktiandvedanta dot com (01-Oct-2002 11:00) You can use base64_encode to transfer image file into string text and then display them. I used this to store my images in a database and display them form there. First I open the files using fread, encoded the result, and stored that result in the database. Useful for creating random images. image.php: And in the html file you put: Guy Laor == "Qt" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: news:[EMAIL PROTECTED] > dear Sirs, > > I have a database with binary file. I want to post that file from my server > to another one with posting method. I have no problem to post any text data > but I can not post binary data such as picture.jpe. > > Where can I find some solution about this > > Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] making sure sendmail function is on and running
If you have Windows, PHP can only use an extrenal smtp server, so you have to open that server up to connections from your web server to your mail server. That could be on the same physical machine as your web server, in which case the mail server will have to be configured to accept connections from localhost. In this case, you use the SMTP and smtp_port paramaters, and the sendmail parameter is ignored. Questions: 1. What is an SMTP server? Does it come automatically with PHP or what? 2. What is my mail server, like AOL that I am using now or something else? 3. How do I make sure that my SMTP server is connecting to my mail server? 4. How do I make sure that/ configure it so my mail server is accepting connections from localhost? -Andrew
[PHP] Sessions vs. IE security
Hi there, I have a problem and i can't find solution. Poblem is with security level of IE and using session. Normaly IE sending session id to server automatically, when you lift security level in IE to HIGH (i'm talking about version 6.x now) IE doesn't send session id atomatically to server. I can live with this, nobody can probably use internet with security settings at this level ;o) But problem is when I want to include my sctipt to a client web site. Technically my script is included in frame of html page on another server. I know, using frames is . but clients are using them very offten and I can do nothing with that. Problem with sending session id from IE to server becoming in MEDIUM level of security (which is normally used) in this case (included in frame on another server) and cookies are blocked as well. It's stupid. I can't send session id by myself because my system has well running caching system dependant on variables and session_id is allways different. And probably is possible to solve it somewhere in custom setting in IE but it has to work with default IE setting of course. I can't understand why IE does this in medium level of security.. Of course who understand to micros? ;o) Do somebody has an idea ? May be there is a possibility tell to IE that my script is secure enough... Thanks S. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
On Tuesday 24 August 2004 23:15, John Holmes wrote: > There is a "log_errors" setting and a "error_log" setting. Try setting the > "log_errors" value. To be absolutely clear, you need both, enable log_errors and specify error_log. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* She asked me, "What's your sign?" I blinked and answered "Neon," I thought I'd blow her mind... */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log "./errors.txt"[and the full path string] John Holmes wrote: From: "Al" <[EMAIL PROTECTED]> Per the documentation, error_reporting must use the bitmask values form. And, that works great. However, I can't get the errors to log in a special file. They insist on being logged in the system's error log file. There is a "log_errors" setting and a "error_log" setting. Try setting the "log_errors" value. http://us3.php.net/manual/en/ref.errorfunc.php#ini.log-errors ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
Peters, Eric wrote: You have to look at the headers Exactly...submit the form and the HEADER version of the string returns "a:0:{}" But, a print() of the same string variable correctly returns "a:1:{s:3:"foo";s:3:"bar";}" Dig deeper into it :) Okay. Running 4.3.6 and 5.0.0, I see the following requests and responses. I even added a "X-CacheDebug-six" header that gets the actual value of the serialized $_POST... *** FIRST REQUEST TO test.php *** -- http://grape/test.php GET /test.php HTTP/1.1 Host: grape User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Date: Tue, 24 Aug 2004 18:36:43 GMT Server: Apache/1.3.31 (Win32) PHP/5.0.0 X-Powered-By: PHP/5.0.0 X-CacheDebug-five: 7 X-CacheDebug-six: a:0:{} Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html -- So you can see how the correct length and value are sent in the headers. Printing $s2 (within the function) shows a:0:{} -- *** SECOND REQUEST (POST) TO test.php -- http://grape/test.php POST /test.php HTTP/1.1 Host: grape User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://grape/test.php Content-Type: application/x-www-form-urlencoded Content-Length: 7 foo=bar HTTP/1.x 200 OK Date: Tue, 24 Aug 2004 18:36:57 GMT Server: Apache/1.3.31 (Win32) PHP/5.0.0 X-Powered-By: PHP/5.0.0 X-CacheDebug-five: 27 X-CacheDebug-six: a:1:{s:3:"foo";s:3:"bar";} Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html -- Again, here you can see how the length and value are correct. If you're not seeing the same thing with 4.3.3, then upgrade. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The 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] Sessions vs. IE security
Stanislav Kuhn wrote: I have a problem and i can't find solution. Poblem is with security level of IE and using session. Normaly IE sending session id to server automatically, when you lift security level in IE to HIGH (i'm talking about version 6.x now) IE doesn't send session id atomatically to server. I can live with this, nobody can probably use internet with security settings at this level ;o) But problem is when I want to include my sctipt to a client web site. Technically my script is included in frame of html page on another server. I know, using frames is . but clients are using them very offten and I can do nothing with that. Problem with sending session id from IE to server becoming in MEDIUM level of security (which is normally used) in this case (included in frame on another server) and cookies are blocked as well. It's stupid. I can't send session id by myself because my system has well running caching system dependant on variables and session_id is allways different. And probably is possible to solve it somewhere in custom setting in IE but it has to work with default IE setting of course. I can't understand why IE does this in medium level of security.. Of course who understand to micros? ;o) Do somebody has an idea ? May be there is a possibility tell to IE that my script is secure enough... It's blocking third party cookies; why is that dumb? If I'm browsing abc.com, why would I want your site (efg.com) to set a cookie? Solution: Don't use frames. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The 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] Sessions vs. IE security
--- Stanislav Kuhn <[EMAIL PROTECTED]> wrote: > But problem is when I want to include my sctipt to a client > web site. Technically my script is included in frame of html > page on another server. I know, using frames is . but > clients are using them very offten and I can do nothing with > that. Problem with sending session id from IE to server > becoming in MEDIUM level of security (which is normally used) > in this case (included in frame on another server) and cookies > are blocked as well. This is a bit of a guess, but I seem to recall that IE requires a valid P3P policy to be in place before it will include third-party cookies in a request. That's exactly what a URL within a frameset would be considered if the domain is different. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post file from one server to other
I checked the curl but I have same problem; I have to say file type to other server with some method. I couldn't find that method: "Matthew Weier O'Phinney" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > * Qt <[EMAIL PROTECTED]>: > > I have a database with binary file. I want to post that file from my server > > to another one with posting method. I have no problem to post any text data > > but I can not post binary data such as picture.jpe. > > > > Where can I find some solution about this > > Look into PHP's cURL functions; these should allow you to post a binary > file. > > -- > Matthew Weier O'Phinney | WEBSITES: > Webmaster and IT Specialist | http://www.garden.org > National Gardening Association| http://www.kidsgardening.com > 802-863-5251 x156 | http://nationalgardenmonth.org > mailto:[EMAIL PROTECTED] | http://vermontbotanical.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug?
I figured it out...wasn't a PHP thing at all but rather the Firefox addin to "view" response headers It was cheating and doing a GET to grab the headers instead of the cached POST output. Thanks for your help John, Eric -Original Message- From: John Holmes [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 24, 2004 11:42 AM To: Peters, Eric Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: Crazy Serialize/Header/$_POST PHP Error - Is this a bug? Peters, Eric wrote: > You have to look at the headers > > Exactly...submit the form and the HEADER version of the string returns "a:0:{}" > > But, a print() of the same string variable correctly returns > "a:1:{s:3:"foo";s:3:"bar";}" > > Dig deeper into it :) Okay. Running 4.3.6 and 5.0.0, I see the following requests and responses. I even added a "X-CacheDebug-six" header that gets the actual value of the serialized $_POST... *** FIRST REQUEST TO test.php *** -- http://grape/test.php GET /test.php HTTP/1.1 Host: grape User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive HTTP/1.x 200 OK Date: Tue, 24 Aug 2004 18:36:43 GMT Server: Apache/1.3.31 (Win32) PHP/5.0.0 X-Powered-By: PHP/5.0.0 X-CacheDebug-five: 7 X-CacheDebug-six: a:0:{} Keep-Alive: timeout=15, max=100 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html -- So you can see how the correct length and value are sent in the headers. Printing $s2 (within the function) shows a:0:{} -- *** SECOND REQUEST (POST) TO test.php -- http://grape/test.php POST /test.php HTTP/1.1 Host: grape User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://grape/test.php Content-Type: application/x-www-form-urlencoded Content-Length: 7 foo=bar HTTP/1.x 200 OK Date: Tue, 24 Aug 2004 18:36:57 GMT Server: Apache/1.3.31 (Win32) PHP/5.0.0 X-Powered-By: PHP/5.0.0 X-CacheDebug-five: 27 X-CacheDebug-six: a:1:{s:3:"foo";s:3:"bar";} Keep-Alive: timeout=15, max=99 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html -- Again, here you can see how the length and value are correct. If you're not seeing the same thing with 4.3.3, then upgrade. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The 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] [OFF] - Fraudulent web orders - any ideas?
On Aug 24, 2004, at 9:05 AM, [EMAIL PROTECTED] wrote: are you passing the cvm on the mc/visa charges? is that stopping them? Yes, I'm doing CVM (or whatever) and AVS on all orders. Where CVM passes, I accept anything but a NN match on AVS. If CVM is blank, I accept only YY on AVS. So far only one fake Amex order has gone through. This may be as good as I can get it without resorting to user accounts, etc. - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: post file from one server to other
thank you but I do not need display, I need to post other server. And other server is waiting as a binary file. "Ustimenko Alexander" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > see php.net/base64_encode user comments > > in POST protocol all content must send in, as i memorize, > application/x-www-urlencoded form . then try combination like > > > == > > guy at bhaktiandvedanta dot com (01-Oct-2002 11:00) > You can use base64_encode to transfer image file into string text and then > display them. I used this to store my images in a database and display them > form there. First I open the files using fread, encoded the result, and > stored that result in the database. Useful for creating random images. > image.php: > header(" Content-Type: image/jpeg"); > header(" Content-Disposition: inline"); > $sql = "SELECT data FROM image where name='".$img."'"; > $result = mysql_query($sql); > $row = mysql_fetch_row($result); > $image = $row[0]; > echo base64_decode($image); > ?> > And in the html file you put: > > Guy Laor > > > == > > > "Qt" <[EMAIL PROTECTED]> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ ÓÌÅÄÕÀÝÅÅ: > news:[EMAIL PROTECTED] > > dear Sirs, > > > > I have a database with binary file. I want to post that file from my > server > > to another one with posting method. I have no problem to post any text > data > > but I can not post binary data such as picture.jpe. > > > > Where can I find some solution about this > > > > Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] quick globalisation?
On Tue, 24 Aug 2004 12:21:03 +1000, Justin French <[EMAIL PROTECTED]> wrote: > Jay, > > "global $a, $b, $c" is used for bringing global variables INTO the > scope of the function... what I'm after is a way of making localised > variables (in function) available outside of the function. > > Justin > It also effectively makes the local variables global. As long as you do this *before* you use the vars, you're ok. Otherwise, you're going to have to use $GLOBALS. If you want a better way to do this, you could use object vars and then use get_object_vars, do a foreach, and put them in $GLOBALS. > > On 24/08/2004, at 1:38 AM, Jay Blanchard wrote: > > > [snip] > > Is there a quicker way to globalise something other than: > > > > $a = 'foo'; > > $b = 'bah'; > > ... > > $GLOBALS['a'] = $a; > > $GLOBALS['b'] = $b; > > > > ?? > > > > I was hoping for something like > > > > $a = 'foo'; > > $b = 'bah'; > > ... > > makeGlobal('a','b') /*or*/ makeGlobal($a,$b); > > [/snip] > > > > According to http://us3.php.net/language.variables.scope you could do > > something like > > > > global $a, $b, $c, ...; > > --- > Justin French > http://indent.com.au > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
On Tuesday 24 August 2004 23:37, Al wrote: > The php.ini is already set to log errors and it works; but, they are > appended to the system log. > > Just for the heck of it I tried; but it doesn't work. > > php_value error_reporting 2047 > > php_value log_errors TRUE > > php_value error_log "./errors.txt"[and the full path string] "... Don't use php_value to set boolean values. ..." And you may have to specify an absolute path. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* "People should have access to the data which you have about them. There should be a process for them to challenge any inaccuracies." -- Arthur Miller */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] delimiter question?
How can I make the following work on an apache 2.0.46/php 4.3.2 installation? /dist/gogo.php/order-inventory-form.php Right now, unless it is a question mark after the gogo.php script, it will not run. Thank You Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] post file from one server to other
> I have a database with binary file. I want to post that file from my > server to another one with posting method. I have no problem to post any > text data but I can not post binary data such as picture.jpe. The HTTP_Client class in Pear will handle post requests: http://pear.php.net/package/HTTP_Client http://pear.php.net/manual/en/package.http.http-client.php I believe it has pretty good support for sending binary data in that request. Your other option is to build your post requests manually, using sockets. I've done this, but it does require a lot of background knowledge of HTTP. Luckily there's someone on this list who knows a great deal about that. :) - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Closing my Window after Download
Ave, I use the PHP Header directives to create a page which would force-download the file for the user... What I want is to have this window close automatically once it's launched the Save As Dialog Box ... I tried several javascript window.close(), self.close() functions but none of them seem to work. The window wont close. It remains open. Anyone's got any tips for me? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Ave, Nope... Didn't work. Didn't return an error or anything, didn't delete the folders either! On 8/23/04 8:21 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote: > Let me clarify: > > system() is like working in a shell > rm -rf forces removal of the directory $file_dir, which you define befiorehand > $ret_val displays to you what happened. if you tget nothing, it did not work. > > HTH! > > Richard > > On Mon, 23 Aug 2004 16:24:23 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote: >> Ave, >> >> Richard... What exactly did you mean by this? >> >> system('rm -rf',$user_dir,$ret_val); >> >> I don't understand. >> >> >> >> >> On 8/23/04 12:11 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote: >> >>> system('rm -rf',$user_dir,$ret_val); >>> >>> On Mon, 23 Aug 2004 11:57:35 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote: Ave, I do not really know what the problem is because I don't get an error, and in fact my scripts execute fine... Except that, niether is the directory deleted, nor is the file deleted. Only corresponding database entries are deleted which I specify in my SQL code. There are 2 different functions in 2 separate places in my File Manager. 1 function deletes the User including his Folder The other deletes a particular file. The code I'm using to delete the User & his Folder is: >>> if($delete_user) { $db = mysql_connect("localhost","usr","pwd"); mysql_select_db("mydb",$db); $sql = "DELETE FROM user where login = '$user'"; $result = mysql_query($sql) or die("There is a problem."); $sql2 = "DELETE FROM file where login = '$user'"; $result2 = mysql_query($sql2) or die("There is a problem."); rmdir (imsafm/$user); echo "User $user deleted."; } ?> The name of Folder of a user is the same as his Login. Anyhow... The above code doesn¹t generate any error, and in fact does delete the database entries from the table... But it doesn¹t remove the user¹s directory. Why is that? Similarly, this is the code for deleting the file: >>> $db = mysql_connect("localhost","usr","pwd"); mysql_select_db("mydb",$db); $sql = "DELETE FROM file where ID = '$ID'"; $result = mysql_query($sql) or DIE("Cannot Do!"); unlink($P/$F); echo "File Deleted"; ?> Again, no error... The entries in the table get deleted.. But file remains in the directory. Any suggestions? >>> >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
From: "PHP Junkie" <[EMAIL PROTECTED]> Anyone's got any tips for me? Find a JavaScript list? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
PHP Junkie wrote: Ave, I use the PHP Header directives to create a page which would force-download the file for the user... What I want is to have this window close automatically once it's launched the Save As Dialog Box ... I tried several javascript window.close(), self.close() functions but none of them seem to work. The window wont close. It remains open. You wish to close which window? The "Save As" window, or the browser window which launched the "Save As" window? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Ave, Trust me I do... I double checked it actually.. On 8/24/04 1:41 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote: > Dumb question - are you sure you got the path right? > i.e. /home/public_html/rest/of/your/path > > On Tue, 24 Aug 2004 13:31:06 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote: >> >> Ave, >> >> Nope... Didn't work. Didn't return an error or anything, didn't delete the >> folders either! >> >> >> >> >> On 8/23/04 8:21 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote: >> >>> Let me clarify: >>> >>> system() is like working in a shell >>> rm -rf forces removal of the directory $file_dir, which you define >>> befiorehand >>> $ret_val displays to you what happened. if you tget nothing, it did not >>> work. >>> >>> HTH! >>> >>> Richard >>> >>> On Mon, 23 Aug 2004 16:24:23 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote: Ave, Richard... What exactly did you mean by this? system('rm -rf',$user_dir,$ret_val); I don't understand. On 8/23/04 12:11 PM, "Richard Whitney" <[EMAIL PROTECTED]> wrote: > system('rm -rf',$user_dir,$ret_val); > > On Mon, 23 Aug 2004 11:57:35 -0400, PHP Junkie <[EMAIL PROTECTED]> > wrote: >> Ave, >> >> I do not really know what the problem is because I don't get an error, >> and >> in fact my scripts execute fine... Except that, niether is the directory >> deleted, nor is the file deleted. Only corresponding database entries are >> deleted which I specify in my SQL code. >> >> There are 2 different functions in 2 separate places in my File Manager. >> 1 function deletes the User including his Folder >> The other deletes a particular file. >> >> The code I'm using to delete the User & his Folder is: >> >> > if($delete_user) { >> $db = mysql_connect("localhost","usr","pwd"); >> mysql_select_db("mydb",$db); >> $sql = "DELETE FROM user where login = '$user'"; >> $result = mysql_query($sql) or die("There is a problem."); >> $sql2 = "DELETE FROM file where login = '$user'"; >> $result2 = mysql_query($sql2) or die("There is a problem."); >> rmdir (imsafm/$user); >> echo "User $user deleted."; >> } >> ?> >> >> The name of Folder of a user is the same as his Login. >> Anyhow... The above code doesn¹t generate any error, and in fact does >> delete >> the database entries from the table... But it doesn¹t remove the user¹s >> directory. Why is that? >> >> Similarly, this is the code for deleting the file: >> >> > $db = mysql_connect("localhost","usr","pwd"); >> mysql_select_db("mydb",$db); >> $sql = "DELETE FROM file where ID = '$ID'"; >> $result = mysql_query($sql) or DIE("Cannot Do!"); >> unlink($P/$F); >> echo "File Deleted"; >> ?> >> >> Again, no error... The entries in the table get deleted.. But file >> remains >> in the directory. >> >> Any suggestions? >> >> > >>> >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
PHP Junkie wrote: Ave, Nope... Didn't work. Didn't return an error or anything, didn't delete the folders either! If you cannot delete via the php functions or via system calls, then you have a permission problem. What user/group is Apache running as? What is the output of 'ls -al' for the files you're looking to delete? -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
Ave, The browser window which launched the Save As window... On 8/24/04 1:41 PM, "John Nichel" <[EMAIL PROTECTED]> wrote: > PHP Junkie wrote: >> Ave, >> >> I use the PHP Header directives to create a page which would force-download >> the file for the user... >> >> > $file = "$P/$F"; >> header("Content-Description: File Transfer"); >> header("Content-Type: application/force-download"); >> header("Content-Disposition: attachment; filename=".basename($file)); >> @readfile($file); >> ?> >> >> What I want is to have this window close automatically once it's launched >> the Save As Dialog Box ... I tried several javascript window.close(), >> self.close() functions but none of them seem to work. The window wont close. >> It remains open. > > You wish to close which window? The "Save As" window, or the browser > window which launched the "Save As" window? > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Image Width Error
Hi all! I am trying to do something really simple, but my error is outside of my expertise (hopefully not for long!). Code: - $this->lVertical = "images/box/".$template."_lVertical.gif"; $borderWidth = imagesx($this->lVertical); - Error: - Fatal error: Call to undefined function imagesx() in c:\web\www\php\classes\Box.class on line 65 --- Am I missing something in the PHP config? What should I be looking for. Oh! I am on PHP5.0 - that should help. Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: delimiter question?
"Steve Buehler" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > How can I make the following work on an apache 2.0.46/php 4.3.2 installation? > > /dist/gogo.php/order-inventory-form.php > > Right now, unless it is a question mark after the gogo.php script, it will > not run. > > Thank You > Steve Hi Steve, try setting the file permissions of gogo.php to 705. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Please do not top post. On Wednesday 25 August 2004 01:31, PHP Junkie wrote: > Ave, > > Nope... Didn't work. Didn't return an error or anything, didn't delete the > folders either! > >> system('rm -rf',$user_dir,$ret_val); That should be: system("rm -rf $user_dir", $ret_val); -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* So much depends upon a red wheel barrow glazed with rain water beside the white chickens. -- William Carlos Williams, "The Red Wheel Barrow" */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Image Width Error
"Jed R. Brubaker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all! > > I am trying to do something really simple, but my error is outside of my > expertise (hopefully not for long!). > > Code: > - > $this->lVertical = "images/box/".$template."_lVertical.gif"; > $borderWidth = imagesx($this->lVertical); > - > Error: > - > Fatal error: Call to undefined function imagesx() in > c:\web\www\php\classes\Box.class on line 65 > --- > > Am I missing something in the PHP config? What should I be looking for. Oh! > I am on PHP5.0 - that should help. > > Thanks in advance! Read the manual: http://de.php.net/manual/en/function.imagesx.php You need an image resource to get the file size. Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Closing my Window after Download
PHP Junkie wrote: Ave, The browser window which launched the Save As window... PHP cannot do this. You'll have to use JavaScript in the browser window. Something like window.close(); -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [OFF] - Fraudulent web orders - any ideas?
On Tue, 24 Aug 2004 09:51:53 +0200, Markus Mayer <[EMAIL PROTECTED]> wrote: > It may well be that they're using anonymous proxies. I know of a couple that > spread the visiting IP addresses over a wide range of IP addresses, although > everything does make it back eventually. Also possible is that they are > using infected Windows machines and proxies. > > In the case of anonymous proxies, it should be possible to get the full range > of IP addresses from somewhere and block all access through anonymous proxies > - serious customers won't wast time going through such proxies, only people > who really have something to hide go through such proxies. In the case of > infected windows machines, you have a different problem because there are > millions of such machines which act as spam relays, virus distributors, ... > > Keeping in mind that you want to make sales on your site as easy as possible, > the best I can think of is to create a session cookie for the visitor which > contains their IP address and check that IP address against one that you have > stored locally for that session. If the IP address differs, blow the whistle > on that visitor. To conceal that you are checking their IP address, call the > cookie something like 'SaleID' or 'ItemID' and run the IP address through > md5sum to get an md5 checksum and use that instead of the IP address itself. > It wont get all of them, but it will make a difference, and make them have to > work harder to get around the security on your site. In a case like this, > you would also have to keep a database entry of what credit card number came > from what IP address. If that card tries and fails more than twice and comes > from different iP addresses every time, block that card number. If you do "store the card number" you may want to store an md5 only. Storing credit card #'s is a huge liability risk. > > Does Amex keep an online database of stolen/disabled credit cards? Maybe > being able to query something like that in real time would be of advantage > (actually I think some idea like this was presented very early in the > thread). > > At the moment I don't have any other ideas. Hopefully what I've suggested > here helps. > > best regards > Markus > > > > On Monday 23 August 2004 23:33, Brian Dunning wrote: > > The plot thickens. I added AVS *and* CVM to the site - and the Amex > > orders are still going through. Amex ignores CVM, and the address was > > correct, so the thieves must have gotten ahold of printed statements > > that show the billing address. Any idea how to combat THAT? They are > > using fake IP addresses now so I can't keep up by blocking IP's. > > > > Your clever ideas appreciated. > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delimiter question?
On Tue, 24 Aug 2004 11:52:21 -0500, Steve Buehler <[EMAIL PROTECTED]> wrote: > How can I make the following work on an apache 2.0.46/php 4.3.2 installation? > > /dist/gogo.php/order-inventory-form.php > mod_rewrite > Right now, unless it is a question mark after the gogo.php script, it will > not run. > > Thank You > Steve > -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Image Width Error
[snip] Fatal error: Call to undefined function imagesx() in c:\web\www\php\classes\Box.class on line 65 Am I missing something in the PHP config? What should I be looking for. Oh! I am on PHP5.0 - that should help. [/snip] Do you have GD compiled with PHP? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Ave, Apache to the best of my knowledge runs as "nobody" by default and since I didn't change any settings, it is probably running as "nobody". This is what I got with ls -al rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls -al total 16 drwxrwxrwx5 nobody nobody170 24 Aug 13:55 . drwxrwxrwx 102 bob unknown 3468 24 Aug 11:23 .. -rw-rw-rw-1 bob unknown 6148 24 Aug 13:57 .DS_Store drwxr-xr-x3 www www 102 24 Aug 11:05 bobkasper drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari Now you see the last 2 folders... "bobkasper" and "rjohari". These are 2 users created by the admin. If I delete a user, their corresponding folder should be deleted as well, which is what I am trying to achieve. But if, let's say, I delete the user "rjohari"... The folder still remains. Thanks for helping... On 8/24/04 1:49 PM, "John Nichel" <[EMAIL PROTECTED]> wrote: > PHP Junkie wrote: >> Ave, >> >> Nope... Didn't work. Didn't return an error or anything, didn't delete the >> folders either! > > If you cannot delete via the php functions or via system calls, then you > have a permission problem. > > What user/group is Apache running as? > > What is the output of 'ls -al' for the files you're looking to delete? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Width Error
On Tue, 2004-08-24 at 12:56, Jed R. Brubaker wrote: Code: > - > $this->lVertical = "images/box/".$template."_lVertical.gif"; > $borderWidth = imagesx($this->lVertical); > - > Error: > - > Fatal error: Call to undefined function imagesx() in > c:\web\www\php\classes\Box.class on line 65 > --- > > Am I missing something in the PHP config? What should I be looking for. Oh! Looks like you currently have no gd support for the PHP image related functions. Try loading the gd extension in your php.ini. -- Greg Donald -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
PHP Junkie wrote: Ave, Apache to the best of my knowledge runs as "nobody" by default and since I didn't change any settings, it is probably running as "nobody". This is what I got with ls -al rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls -al total 16 drwxrwxrwx5 nobody nobody170 24 Aug 13:55 . drwxrwxrwx 102 bob unknown 3468 24 Aug 11:23 .. -rw-rw-rw-1 bob unknown 6148 24 Aug 13:57 .DS_Store drwxr-xr-x3 www www 102 24 Aug 11:05 bobkasper > drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari Now you see the last 2 folders... "bobkasper" and "rjohari". These are 2 users created by the admin. If I delete a user, their corresponding folder should be deleted as well, which is what I am trying to achieve. But if, let's say, I delete the user "rjohari"... The folder still remains. Thanks for helping... If Apache is running as nobody/nobody, it does not have permission to delete these directories. The only users who can delete these directories are the respective users, and root. You need to have write permission to delete... drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari In the above, the 'd' means directory, the next three letter are the user's permissions (full, read/write/execute), next three characters (r-x) are the group's permissions (read/execute), and the last three are other's (world) permission (read/execute). The two 'www' are the owner (user) and group. For the directory rjohari, only root and the user www can delete and/or write to this directory. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Ave, IT WORKS!!! I guess it was the syntax which was the problem! Finally it works!! system("rm -rf $user_dir", $ret_val); Works perfectly... Removes folder! Thanks a TON! On 8/24/04 2:04 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote: > Please do not top post. > > On Wednesday 25 August 2004 01:31, PHP Junkie wrote: >> Ave, >> >> Nope... Didn't work. Didn't return an error or anything, didn't delete the >> folders either! > system('rm -rf',$user_dir,$ret_val); > > That should be: > > system("rm -rf $user_dir", $ret_val); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
Here is what I having working so far: php_value error_reporting 2# Just warnings, which is what I want php_flag log_errors 1 #this turns logging on and off in the syslog php_flag display_errors 1 #this turns error display at client's browser on/off php_value error_log errors.txt#Doesn't work OR php_value error_log /home/jones/public_html/AutoSch/errors.txt #This doesn't work either. Anyone know how to write the errors to a file? The documentation says it should work. Jason Wong wrote: On Tuesday 24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log "./errors.txt"[and the full path string] "... Don't use php_value to set boolean values. ..." And you may have to specify an absolute path.
Re: [PHP] unlink() & rmdir() ... Problems.
Ave, IT WORKS!!! I guess it was the syntax which was the problem! Finally it works!! system("rm -rf $user_dir", $ret_val); Works perfectly... Removes folder! Thanks a TON! On 8/24/04 2:04 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote: > Please do not top post. > > On Wednesday 25 August 2004 01:31, PHP Junkie wrote: >> Ave, >> >> Nope... Didn't work. Didn't return an error or anything, didn't delete the >> folders either! > system('rm -rf',$user_dir,$ret_val); > > That should be: > > system("rm -rf $user_dir", $ret_val); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Image Width Error
Apologies. I need to be using getimagesize(). I thought it was only for file sizes. "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Jed R. Brubaker" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hi all! > > > > I am trying to do something really simple, but my error is outside of my > > expertise (hopefully not for long!). > > > > Code: > > - > > $this->lVertical = "images/box/".$template."_lVertical.gif"; > > $borderWidth = imagesx($this->lVertical); > > - > > Error: > > - > > Fatal error: Call to undefined function imagesx() in > > c:\web\www\php\classes\Box.class on line 65 > > --- > > > > Am I missing something in the PHP config? What should I be looking for. > Oh! > > I am on PHP5.0 - that should help. > > > > Thanks in advance! > > Read the manual: > http://de.php.net/manual/en/function.imagesx.php > > You need an image resource to get the file size. > > Regards, Torsten Roehr -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error settings
Here is what I having working so far: php_value error_reporting 2# Just warnings, which is what I want php_flag log_errors 1 #this turns logging on and off in the syslog php_flag display_errors 1 #this turns error display at client's browser on/off php_value error_log errors.txt#Doesn't work OR php_value error_log /home/jones/public_html/AutoSch/errors.txt #This doesn't work either. Anyone know how to write the errors to a file? The documentation says it should work. Jason Wong wrote: On Tuesday 24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log "./errors.txt"[and the full path string] "... Don't use php_value to set boolean values. ..." And you may have to specify an absolute path.
Re: [PHP] Need help with using htaccess to override php.ini error settings
Here is what I having working so far: php_value error_reporting 2# Just warnings, which is what I want php_flag log_errors 1 #this turns logging on and off in the syslog php_flag display_errors 1 #this turns error display at client's browser on/off php_value error_log errors.txt#Doesn't work OR php_value error_log /home/jones/public_html/AutoSch/errors.txt #This doesn't work either. Anyone know how to write the errors to a file? The documentation says it should work. Jason Wong wrote: On Tuesday 24 August 2004 23:37, Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log "./errors.txt"[and the full path string] "... Don't use php_value to set boolean values. ..." And you may have to specify an absolute path. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need help with using htaccess to override php.ini error
test Al wrote: The php.ini is already set to log errors and it works; but, they are appended to the system log. Just for the heck of it I tried; but it doesn't work. php_value error_reporting 2047 php_value log_errors TRUE php_value error_log "./errors.txt"[and the full path string] John Holmes wrote: From: "Al" <[EMAIL PROTECTED]> Per the documentation, error_reporting must use the bitmask values form. And, that works great. However, I can't get the errors to log in a special file. They insist on being logged in the system's error log file. There is a "log_errors" setting and a "error_log" setting. Try setting the "log_errors" value. http://us3.php.net/manual/en/ref.errorfunc.php#ini.log-errors ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Width Error
On Wednesday 25 August 2004 01:56, Jed R. Brubaker wrote: - > Fatal error: Call to undefined function imagesx() in > c:\web\www\php\classes\Box.class on line 65 > --- > > Am I missing something in the PHP config? What should I be looking for. Oh! > I am on PHP5.0 - that should help. Read the introduction and requirements section of manual > Image Functions. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Elliptic paraboloids for sale. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] delimiter question?
> How can I make the following work on an apache 2.0.46/php 4.3.2 > installation? > > /dist/gogo.php/order-inventory-form.php > > Right now, unless it is a question mark after the gogo.php script, it > will not run. Apache 2.0 differs from 1.3.x in its handling of path info. See: http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Please stop top posting. On Wednesday 25 August 2004 02:20, PHP Junkie wrote: > Apache to the best of my knowledge runs as "nobody" by default and since I > didn't change any settings, it is probably running as "nobody". Instead of speculating, find out for certain by using phpinfo(). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Lonesome? Like a change? Like a new job? Like excitement? Like to meet new and interesting people? JUST SCREW-UP ONE MORE TIME!!! */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] path info question. Was delimiter question?
Thank You. I didn't know where to start looking. Anyway, putting the following lines in an .htaccess file in the directory worked like a charm: AcceptPathInfo On Thanks to all who helped. Steve At 02:02 PM 8/24/2004, you wrote: > How can I make the following work on an apache 2.0.46/php 4.3.2 > installation? > > /dist/gogo.php/order-inventory-form.php > > Right now, unless it is a question mark after the gogo.php script, it > will not run. Apache 2.0 differs from 1.3.x in its handling of path info. See: http://httpd.apache.org/docs-2.0/mod/core.html#acceptpathinfo - michal migurski- contact info and pgp key: sf/cahttp://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
The reason this works is because you are doing a recursive remove of the directory. The PHP rmdir() does not remove a directory with contents in it. If you modify your script so that it walks the users directory and removes each file and subdirectory then it would probally have worked correctly. I would have mentioned this earlier but I have been away from email for the past day or so. -William On Tue, 24 Aug 2004 14:32:43 -0400, PHP Junkie <[EMAIL PROTECTED]> wrote: > Ave, > > IT WORKS!!! > I guess it was the syntax which was the problem! Finally it works!! > > system("rm -rf $user_dir", $ret_val); > > Works perfectly... Removes folder! > > Thanks a TON! > > > > > On 8/24/04 2:04 PM, "Jason Wong" <[EMAIL PROTECTED]> wrote: > > > Please do not top post. > > > > On Wednesday 25 August 2004 01:31, PHP Junkie wrote: > >> Ave, > >> > >> Nope... Didn't work. Didn't return an error or anything, didn't delete the > >> folders either! > > > system('rm -rf',$user_dir,$ret_val); > > > > That should be: > > > > system("rm -rf $user_dir", $ret_val); > > -- > 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] Need help with using htaccess to override php.ini error settings
From: "Al" <[EMAIL PROTECTED]> php_value error_log /home/jones/public_html/AutoSch/errors.txt #This doesn't work either. Anyone know how to write the errors to a file? The documentation says it should work. It should. What are the permissions on the above file? Does the apache/php user have permission to write to it? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: [SPAM] Re: [PHP] Sessions vs. IE security
Thanks for help. I have set up p3p policy to my site.. I passed it trouth validator and IE can find privacy policy but it still doesn't allow me cookies... I can't find information what exactly to specify in privacy policy IE allows me third party cookies... Does somebody idea? tnx. S. -Original Message- From: Chris Shiflett [mailto:[EMAIL PROTECTED] Sent: 24 August 2004 16:46 To: Stanislav Kuhn; [EMAIL PROTECTED] Subject: [SPAM] Re: [PHP] Sessions vs. IE security --- Stanislav Kuhn <[EMAIL PROTECTED]> wrote: > But problem is when I want to include my sctipt to a client > web site. Technically my script is included in frame of html > page on another server. I know, using frames is . but > clients are using them very offten and I can do nothing with > that. Problem with sending session id from IE to server > becoming in MEDIUM level of security (which is normally used) > in this case (included in frame on another server) and cookies > are blocked as well. This is a bit of a guess, but I seem to recall that IE requires a valid P3P policy to be in place before it will include third-party cookies in a request. That's exactly what a URL within a frameset would be considered if the domain is different. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- 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] unlink() & rmdir() ... Problems.
On Wednesday 25 August 2004 02:30, John Nichel wrote: > > This is what I got with ls -al > > > > rahul:/Library/WebServer/Documents/informed-sources.com/imsafm bob$ ls > > -al total 16 > > drwxrwxrwx5 nobody nobody170 24 Aug 13:55 . > > drwxrwxrwx 102 bob unknown 3468 24 Aug 11:23 .. > > -rw-rw-rw-1 bob unknown 6148 24 Aug 13:57 .DS_Store > > drwxr-xr-x3 www www 102 24 Aug 11:05 bobkasper > > > > drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari > > > > Now you see the last 2 folders... "bobkasper" and "rjohari". These are 2 > > users created by the admin. If I delete a user, their corresponding > > folder should be deleted as well, which is what I am trying to achieve. > > But if, let's say, I delete the user "rjohari"... The folder still > > remains. > > > > Thanks for helping... > > If Apache is running as nobody/nobody, it does not have permission to > delete these directories. The only users who can delete these > directories are the respective users, and root. You need to have write > permission to delete... > > drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari > > In the above, the 'd' means directory, the next three letter are the > user's permissions (full, read/write/execute), next three characters > (r-x) are the group's permissions (read/execute), and the last three are > other's (world) permission (read/execute). The two 'www' are the owner > (user) and group. For the directory rjohari, only root and the user www > can delete and/or write to this directory. Actually 'nobody' *can* delete both bobkasper and rjohari (but not .DS_Store). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Thrashing is just virtual crashing. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ftp_ssl_connect()
Does ftp_ssl_connect() support Explicit SSL, Implicit SSL, or both? Thanks, -jess-
[PHP] PHP 4.3.8 + Apache 1.3.31 + Oracle 9.2.0.4 Segmentation Fault
Hi all, I'm trying to get apache + php to work with Oracle on Debian(Woody). I've managed to install Oracle 9.2.0.4 on Debian Woody, it's working fine from the command line. I've compiled Apache/PHP both from the sources with the following parameters. PHP: ./configure --enable-gd-imgstrttf --with-gd --with-jpeg --with-apache=../apache_1.3.31 --with-mysql --with-pspell --with-ttf --with-zlib --enable-bcmath --enable-filepro --enable-ftp --enable-track-vars --enable-calendar --enable-ctype --enable-exif --enable-trans-sid --enable-shmop --enable-sockets --enable-sysvsem --enable-sysvshm --enable-wddx --with-sybase-ct=/opt/sybase-11.9.2 --with-oci8=/ora/9iR2 --enable-sigchild --with-mcrypt Apache: LIBS=-lpthread ./configure --prefix=/usr/local/apache --enable-module=most --enable-module=so --activate-module=src/modules/php4/libphp4.a The installation of went smooth, but when trying to start httpd I get a segmentation fault on the logs: ... [Tue Aug 24 14:18:56 2004] [notice] child pid 21478 exit signal Segmentation fault (11) [Tue Aug 24 14:18:56 2004] [notice] child pid 21477 exit signal Segmentation fault (11) [Tue Aug 24 14:18:56 2004] [notice] child pid 21476 exit signal Segmentation fault (11) [Tue Aug 24 14:18:56 2004] [notice] child pid 21475 exit signal Segmentation fault (11) ... If I remove oracle support (--with-oci8) from PHP it works great with Sybase and MySQL, but I need to get Oracle to work. I've added some oracle environment variables to apachectl: - export ORACLE_SID=ora9 export ORACLE_HOME=/ora/9iR2 (with only this should be enough) export ORA_NLS33=/ora/9iR2/ocommon/nls/admin/data export PATH=$PATH:$ORACLE_HOME/bin: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib export THREAD_FLAG=native export LC_LANG=en_US export CLASSPATH=/ora/9iR2/JRE:/ora/9iR2/jlib:/ora/9iR2/rdbms/jlib:/ora/9iR2/network/jlib --- This is the debug part from apache: ldd /usr/local/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001d000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x40031000) libinsck.so => /opt/sybase-11.9.2/lib/libinsck.so (0x4005f000) libsybtcl.so => /opt/sybase-11.9.2/lib/libsybtcl.so (0x40062000) libintl.so => /opt/sybase-11.9.2/lib/libintl.so (0x40084000) libcomn.so => /opt/sybase-11.9.2/lib/libcomn.so (0x4008c000) libct.so => /opt/sybase-11.9.2/lib/libct.so (0x400e4000) libcs.so => /opt/sybase-11.9.2/lib/libcs.so (0x40141000) libpspell.so.4 => /usr/lib/libpspell.so.4 (0x4014e000) libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0x4016c000) libltdl.so.3 => /usr/lib/libltdl.so.3 (0x40172000) libpng.so.2 => /usr/lib/libpng.so.2 (0x40178000) libz.so.1 => /usr/lib/libz.so.1 (0x401a3000) libresolv.so.2 => /lib/libresolv.so.2 (0x401b1000) libm.so.6 => /lib/libm.so.6 (0x401c1000) libdl.so.2 => /lib/libdl.so.2 (0x401e2000) libnsl.so.1 => /lib/libnsl.so.1 (0x401e5000) libclntsh.so.9.0 => /ora/9iR2/lib/libclntsh.so.9.0 (0x401f9000) libdb.so.2 => /lib/libdb.so.2 (0x40bcb000) libc.so.6 => /lib/libc.so.6 (0x40bd8000) libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3 (0x40cf5000) libpspell-modules.so.1 => /usr/lib/libpspell-modules.so.1 (0x40d3e000) libwtc9.so => /ora/9iR2/lib/libwtc9.so (0x40d4) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000) #gdb httpd GNU gdb 2002-04-01-cvs Copyright 2002 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-linux"... (gdb) b ap_process_request Breakpoint 1 at 0x81cd8aa (gdb) run -X -d /usr/local/apache Starting program: /usr/local/apache/bin/httpd -X -d /usr/local/apache [New Thread 1024 (LWP 21553)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1024 (LWP 21553)] 0x40e8017b in ber_strdup () from /usr/lib/liblber.so.2 I've tried to change all the environment variables with no luck. As stated above, removing oracle support it works great! It's a php problem? it's apache's? oci? Any help will be very very welcome! Francisco
Re: [PHP] Need help with using htaccess to override php.ini error settings
Everything is working, thanks to you and Jason. The key was that I had to provide a seed file since error_log only appends messages to an existing file and doesn't create one if it does not exist. Al John Holmes wrote: From: "Al" <[EMAIL PROTECTED]> php_value error_log /home/jones/public_html/AutoSch/errors.txt #This doesn't work either. Anyone know how to write the errors to a file? The documentation says it should work. It should. What are the permissions on the above file? Does the apache/php user have permission to write to it? ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [SPAM] Re: [PHP] Sessions vs. IE security
Stanislav Kuhn wrote: > Thanks for help. I have set up p3p policy to my site.. I passed it > trouth validator and IE can find privacy policy but it still doesn't > allow me cookies... I can't find information what exactly to specify > in privacy policy IE allows me third party cookies... > Does somebody idea? This archived post may help: http://marc.theaimsgroup.com/?l=php-general&m=108879240230567&w=2 HTH -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] RE: [SPAM] Re: [PHP] Sessions vs. IE security
> -Original Message- > Thanks for help. I have set up p3p policy to my site.. I passed it trouth > validator and IE can find privacy policy but it still doesn't allow me > cookies... I can't find information what exactly to specify in privacy > policy IE allows me third party cookies... > Does somebody idea? I'm not sure, but I don't think this is something that can be specified by the website. The user has to go into their IE settings and toggle whether they want to accept third party cookies. -Ed -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
Jason Wong wrote: If Apache is running as nobody/nobody, it does not have permission to delete these directories. The only users who can delete these directories are the respective users, and root. You need to have write permission to delete... drwxr-xr-x3 www www 102 24 Aug 11:09 rjohari In the above, the 'd' means directory, the next three letter are the user's permissions (full, read/write/execute), next three characters (r-x) are the group's permissions (read/execute), and the last three are other's (world) permission (read/execute). The two 'www' are the owner (user) and group. For the directory rjohari, only root and the user www can delete and/or write to this directory. Actually 'nobody' *can* delete both bobkasper and rjohari (but not .DS_Store). How so? Even if 'nobody' is in the www group, it still wouldn't have the proper permissions. [EMAIL PROTECTED] /]# ls -al bob.txt -rw-r--r-- 1 apache apache 6 Aug 24 17:27 bob.txt [EMAIL PROTECTED] /]# su - nobody -bash-2.05b$ rm -f /bob.txt rm: cannot remove `/bob.txt': Permission denied -bash-2.05b$ -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: [PHP] making sure sendmail function is on and running
--- Begin Message --- Background: Server-Apache 1.3.31 OS-Windows XP PHP-5 Problem-I'm trying to run eFiction, a story/fanfiction archive script. On this, people self register, and they are supposed to get an e-mail with their password. However, I and one other attempted signing up, and neither of us got our password-email. After doing research, I heard I needed to make sure that my sendmail function was activated. How do I make sure that my sendmail function is on and running? I read the documentation and checked my php.ini, but I have some doubts. 1. My php.ini doesn't seem to include everything that should be either. In the documentation, it shows your mail section having four parts: SMTP, SMTP Port, sendmail_from, sendmail_path. However, php.ini looks like this (windows section): [mail function] ; For Win32 only. SMTP = localhost smtp_port = 25 ; For Win32 only. ;sendmail_from = [EMAIL PROTECTED] There is a sendmail_path down below, but it is under the For Linux Only section. What's with that? Also, I have a router. Do I need to port-forward port 25 to get sendmail to work? Thanks in advance. -Andrew --- End Message --- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] unlink() & rmdir() ... Problems.
On Wednesday 25 August 2004 05:31, John Nichel wrote: > How so? Even if 'nobody' is in the www group, it still wouldn't have > the proper permissions. To be able to delete directories, you need: - 'wx' on the parent directory - 'rx' on the target directory To be able to delete files, you need: - 'wx' on the parent directory - doesn't matter who owns the target files or what their permissions are -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Everything bows to success, even grammar. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Server Error : Premature end of script headers: php-engine
Hello, I have a fairly big table of 60K rows with 9 cols. I have a C++ app that connects to a PHP page. This PHP page in turn connects to the above table and outputs all the row in form of XML. I get all this data in my C++ app, parse it with an XML parser and do my work. My PHP source looks something like: $numrows = mysql_num_rows ( $result ); echo ""; while ( $row = mysql_fetch_array ( $result ) ) { $lengths = mysql_fetch_lengths ( $result ); echo ""; for ( $i=0; $i < $fieldcount; $i++ ) { echo ""; if ( !isset($row[$i]) /*== NULL*/ ) { echo "(NULL)"; } else { if ( mysql_field_type ( $result, $i ) == "blob" ) {if ( $lengths[$i] == 0 ) { echo "_";} else{ echo convertxmlchars ( base64_encode ( $row[$i] ) ); } } else {if ( $lengths[$i] == 0 ) { echo "_";} else{ echo convertxmlchars($row[$i]); } } } echo ""; } echo "";} echo ""; Now for this table the server is always throwing up the above error. The server is running 4.1.2 on Linux. Actually its my ISP configuration. I have a replica of the same table in my localhost machine running IIS/PHP 4.1.2. I never get this error. It might because I am in the same machine but why the error throwing up from my ISP machine? I checked the memory_limit value of both my localhost and ISP. They are both 8M, but the dump works from localhost PHP but not ISP. Since I have full control over my localhost PHP settings, i changed the memory_limit to 1M in php.ini and reexecuted the process from my C app. Bingo it still works. But not unde 8m limit of my ISP. Also my ISP had max_execution_time of 30secs and my localhost had 300secs. So I changed my local php.ini and converted the value to 30sec. Still the process gets over in my local machine. So I went ahead and made the value to be 5sec. But now in my local machine the script gets stopped after some time and it echoes half the XML. Since the elements start/end pair are not correct my XML parser throws up the error. Now both the system atleast throws up error but the error are not same. With my ISP i get - Premature end of script headers and on my local the server echoes half the information and dies. Sorry for the long post but I have tried to give as much description as possible. Regards, Karam __ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP returns empty form
Good evening! I am getting an error message that I've never seen before. I am POSTing an HTML form to a PHP script, but when I submit the form, my Safari browser says "can't open the page such-and-such because it could not load any data from this location." Mozilla gives no error message but does not submit the form. This "bad" server is running Mac OS X Server with Apache 1.3. On a different machine (Mac OS X client, also with Apache 1.3) the form works fine. It seems like something is wrong with the PHP installation on the server, but I don't know where to start. Any help? Thanks, Richard Miller -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How do I find out if a string will fit in an area of an image?
Hi All, Let's say I have a string of text. $foo = "I WANT ALot of Text to be diSPLAYed!" I have an area on my image that is around 386 pixels wide. How do I find out if my text will fit in that area using any size font? Thanks, Brent
Re: [PHP] unlink() & rmdir() ... Problems.
* Thus wrote Jason Wong: > Please do not top post. > > On Wednesday 25 August 2004 01:31, PHP Junkie wrote: > > Ave, > > > > Nope... Didn't work. Didn't return an error or anything, didn't delete the > > folders either! > > > >> system('rm -rf',$user_dir,$ret_val); > > That should be: > > system("rm -rf $user_dir", $ret_val); Btw, be extra careful what $user_dir is, if somehow it is / you'll delete any file that nobody has permission to; which isn't a good thing. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] RE: [SPAM] Re: [PHP] Sessions vs. IE security
--- Stanislav Kuhn <[EMAIL PROTECTED]> wrote: > Thanks for help. I have set up p3p policy to my site.. I passed it > trouth validator and IE can find privacy policy but it still doesn't > allow me cookies... I can't find information what exactly to specify > in privacy policy IE allows me third party cookies... Just in case... You do realize that third-party cookies can only be read by those third-party sites, right? For example, if you are at example.org, and there is an embedded resource (whether image, frame, or whatever) from foo.com, then foo.com can set cookies, but example.org can't read them. This may be obvious to you, but I wanted to make sure you weren't making this mistake. If you really want to see if a third-party cookie has been set, you can examine your cookies on the client rather than testing on the server. Hope that helps. Chris = Chris Shiflett - http://shiflett.org/ PHP Security - O'Reilly Coming Fall 2004 HTTP Developer's Handbook - Sams http://httphandbook.org/ PHP Community Site http://phpcommunity.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server Error : Premature end of script headers: php-engine
* Thus wrote Karam Chand: > Hello, > > I have a fairly big table of 60K rows with 9 cols. > > I have a C++ app that connects to a PHP page. This PHP > page in turn connects to the above table and outputs > all the row in form of XML. I get all this data in my > C++ app, parse it with an XML parser and do my work. > My PHP source looks something like: Connection to a PHP page how? The Premature end of script headers error is usually due to a cgi-script not sending the right headers which minimally is: HTTP/1.x 200 OK Content-Type: type/ofcontent ...data If you dont get that first line back (the status line) then you will most likely get that error. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP returns empty form
* Thus wrote Richard Miller: > Good evening! > > I am getting an error message that I've never seen before. I am > POSTing an HTML form to a PHP script, but when I submit the form, my > Safari browser says "can't open the page such-and-such because it could > not load any data from this location." Mozilla gives no error message > but does not submit the form. Several things.. of which a couple are: - is your HTML formated properly. - Does your php script actually output anything? (try echoing something on the first line of the php script) > This "bad" server is running Mac OS X Server with Apache 1.3. On a > different machine (Mac OS X client, also with Apache 1.3) the form > works fine. > > It seems like something is wrong with the PHP installation on the > server, but I don't know where to start. Any help? The first place to start if it appears to be an issue with php is the php.ini file. Do a diff on the two servers. The one option that screams the behaviour you talking about in paticular would be register_globals. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I find out if a string will fit in an area of an image?
On Tue, 24 Aug 2004 21:49:03 -0500, Brent Clements <[EMAIL PROTECTED]> wrote: > Hi All, > > Let's say I have a string of text. > > $foo = "I WANT ALot of Text to be diSPLAYed!" > > I have an area on my image that is around 386 pixels wide. > > How do I find out if my text will fit in that area using any size font? > Are you using PHP to create this image? If what you mean is: Will the text fit withint a certain space on a browser, the answer is that you can't tell. A user can always override the size of your fonts. -- DB_DataObject_FormBuilder - The database at your fingertips http://pear.php.net/package/DB_DataObject_FormBuilder paperCrane --Justin Patrin-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How do I find out if a string will fit in an area of an image?
* Thus wrote Brent Clements: > Hi All, > > > Let's say I have a string of text. > > $foo = "I WANT ALot of Text to be diSPLAYed!" > > I have an area on my image that is around 386 pixels wide. > > How do I find out if my text will fit in that area using any size font? This isn't as simple of a task as it would seem: - screen resolution - font in pixel size or point size - user has custom size fonts - what browser is being used. - how are dimensions define within the paticular font - Is this a TrueType font. If you have gd compiled on your system you might be able to fudge your calculation with: http://php.net/imagettfbbox Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to count objects instances
* Thus wrote [EMAIL PROTECTED]: > Thanks, > But im using php 4.3. Then you'll have to resort to some very unstandard methods: class foo { var $instance_manager; function getInstanceNum() { return $this->instance_manager->instancesOf(__CLASS__); } function getInstanceName() { return __CLASS__; } } class Factory { var $instances; function &create($name) { $this->instances[$name]++; // keep track of instances. $new = new $name(); // create object $new->instance_manager = &this; // tell instance about me return &$new;// return value. } function destroy(&$obj) { $this->instances[$this->getInstanceName()]--; unset($obj); } function instancesOf($name) { return $this->instance[$name]; } } $Factory = new Factory(); $o = &$Factory->Crate('foo'); echo $o->getIntanceNum(); $Factory->destroy($o); btw, totally untested. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to add Zlib support
* Thus wrote Mauricio Pellegrini: > Curt Zirzow wrote: > > Ok, Thanks . > > But should I recompile only php or do I have to recompile > apache,mysql,etcetera,etcetera? Nope, php will be compiled as a shared object so everything else doesn't need to be recompiled. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php