[PHP] Urgent: PHP4 security (ISP setup)
Hi all Sorry to bother you, but this problem is getting really urgent for us (ISP). We are trying to setup PHP in a secure way but without restricting the users too much, and up to now we didn't come to an acceptable solution. We are running PHP 4.0.3pl1 with Apache 1.3.12 on a Linux/Suse6.4 platform, apache and php were installed directly from RPM archives, we didn't compile them ourselves. PHP is running as an apache module, and safe mode is turned on. Our main problem is, that no PHP script is able to write any file in the default setup, because safe mode doesn't allow PHP scripts to access any file which isn't owned by the same user the script also belongs to. Chowning the target directory to the apache user does not solve the problem, the write operation works but the written file can't be read anymore, because it has a different uid than all other PHP scripts, which were uploaded by the FTP user. Chowning everything to the webuser is no option, because we can't afford to do this for every single user wanting to write files additionally as soon as the FTP user updates his scripts the permissions are set to the FTP user again. Running PHP as a CGI binary also doesn't seem to be a good solution, as far as I can see it isn't possible to pass URL parameters in this setup, and this feature is already used. Disabling safe mode seems to be a very insecure option, because as far as I remember this would allow an FTP user to upload an executable and run it through PHP and thus access any file on the web server which is world-readable (please correct me if I'm wrong). What I really love to see would be a safe mode, which has the restriction of not allowing the PHP scripts to run executables (except in a specified directory) but without having the restriction of not beeing able to access any file not belonging to the FTP user (with the open_basedir variable, file access can anyway be restricted to the FTP users home directory). Is there any way to achieve this? It would also be nice if apache was able to run the PHP scripts with the userid of the FTP user, when PHP is configured as apache module. Can anyone tell me how to setup PHP in a secure way without getting these restrictions concerning file writing? Thank you very much for your feedback, and please CC your answer to [EMAIL PROTECTED]! Sam Jordan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Upload from a Mac
Has anyone any idea why I can not upload a gif file from a Mac ? I can upload the file, but it is not a gif when I receive it. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Logout Problem auf .htaccess-Login
Hello List! Is it possible to unset $PHP_AUTH_USER and $PHP_AUTH_PW after a successfull '.htaccess-login'? I wan't to give all users the possibility to 'logout'. I will destroy all sessions and unset $PHP_AUTH_USER, but Apache still knows that there was a successfull login a few minutes before. Thanx -- phpArbeitsgruppe in Gruendung - Jochen Kaechelin Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95 94, Fax 07161-92 95 98 http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] String Type Unknown
Hi Nathan, It's a hex dump and it reads: ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $` ¦ÆöDf7F÷$ -F?&W6?öÆG??@ w t imaget Jhttp://mediabank.edventures.com/edventures/labs/bricks_web.jpg";>t texttIt is important to emphasize that a facilitator does not need to be an expert in the various subject areas, but should become familiar with the projects and materials that students will be doing, and be aware of how to get help or look up terms and answers. In particular, familiarity with the LEGO® elements is highly recommended. PCS has developed a separate course focusing on the use of the LEGO® materials. All facilitators should schedule time to take this additional course.xp Rudolf Visagie QEDI -Original Message- From: Nathan Cook [mailto:[EMAIL PROTECTED]] Sent: 30 April 2001 10:31 To: Php List Subject: [PHP] String Type Unknown I have this string: 0ffac0ffed0005737200146a6176612e7574696c2e50726f7065727469657339120f fd07a70363e0ff980200014c000864656661756c74737400164c6a6176612f7574696c2f 5072 6f706572746965733b787200136a6176612e7574696c2e486173687461626c65130ffbb0 f252 14a0ffe40ffb803000246000a6c6f6164466163746f724900097468726573686f6c6 4787 03f48770800030002740005696d61676574004a3c494d47205352433 d226 87474703a2f2f6d6564696162616e6b2e656476656e74757265732e636f6d2f656476656e747 5726 5732f6c6162732f627269636b735f7765622e6a7067223e74000474657874740202497420697 3206 96d706f7274616e7420746f20656d70686173697a652074686174206120666163696c6974617 46f7 220646f6573206e6f74206e65656420746f20626520616e2065787065727420696e207468652 0766 172696f7573207375626a6563742061726561732c206275742073686f756c64206265636f6d6 5206 6616d696c6961722077697468207468652070726f6a6563747320616e64206d6174657269616 c732 0746861742073747564656e74732077696c6c20626520646f696e672c20616e6420626520617 7617 265206f6620686f7720746f206765742068656c70206f72206c6f6f6b207570207465726d732 0616 e6420616e73776572732e2020496e20706172746963756c61722c2066616d696c69617269747 9207 769746820746865204c45474f3c7375703e267265673b3c2f7375703e20656c656d656e74732 0697 320686967686c79207265636f6d6d656e6465642e20205043532068617320646576656c6f706 5642 06120736570617261746520636f7572736520666f637573696e67206f6e20746865207573652 06f6 620746865204c45474f3c7375703e267265673b3c2f7375703e206d6174657269616c732e202 0416 c6c20666163696c697461746f72732073686f756c64207363686564756c652074696d6520746 f207 4616b652074686973206164646974696f6e616c20636f757273652e7870 And I don't know what type it is. It is it a binary string? Can I convert it to text and if so, how? Thank You, Nathan Cook [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Logout Problem auf .htaccess-Login
Don't quote me on this, but I think if you send the user a header saying he's unauthorized then apache will remove the PHP_AUTH_* information. Mike -Original Message- From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 4:30 AM To: PHP General Subject: [PHP] Logout Problem auf .htaccess-Login Hello List! Is it possible to unset $PHP_AUTH_USER and $PHP_AUTH_PW after a successfull '.htaccess-login'? I wan't to give all users the possibility to 'logout'. I will destroy all sessions and unset $PHP_AUTH_USER, but Apache still knows that there was a successfull login a few minutes before. Thanx -- phpArbeitsgruppe in Gruendung - Jochen Kaechelin Stuttgarter Str.3, D-73033 Goeppingen Tel. 07161-92 95 94, Fax 07161-92 95 98 http://www.php-arbeitsgruppe.de, mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general Digest 1 May 2001 16:06:58 -0000 Issue 660
php-general Digest 1 May 2001 16:06:58 - Issue 660 Topics (messages 50944 through 50952): Trouble loading Extensions in PHP 4.0.5 50944 by: John Monfort Re: template solutions? 50945 by: Christian Reiniger Re: why isn't get_browser() not working? 50946 by: Chris Adams Post XML to PHP via XMLHTTP VB Object 50947 by: PHP Urgent: PHP4 security (ISP setup) 50948 by: Sam Jordan Upload from a Mac 50949 by: JFL Logout Problem auf .htaccess-Login 50950 by: Jochen Kaechelin 50952 by: Krznaric Michael Re: String Type Unknown 50951 by: Rudolf Visagie Administrivia: To subscribe to the digest, e-mail: [EMAIL PROTECTED] To unsubscribe from the digest, e-mail: [EMAIL PROTECTED] To post to the list, e-mail: [EMAIL PROTECTED] -- Hello everyone, Is anyone else having this problem? My PHP+ Apache system was working fine, before I upgraded to PHP 4.0.5. Since then, my server crashes, everytime I try to enable my extensions. I have the following configuratioin: 1) extension_dir= "C:/PHP/extensions" [both C:/PHP/extensions and C:\PHP\extensions failed!] extension=php_db.dll extension=php_gd.dll ... The dll files are inside C:\PHP\exntesions, as listed. All system paths are correctly set. 2) Also, before PHP 4.0.5, I had ZEND configured as zend_optimizer.optimization_level=15; zend_extension_ts="C:\PHP\zend\ZendOptimizer.dll"; Tough this does not report an error, phpinfo() DOES NOT report the Zend variables, and other setup information. PHP 4.0pl1 did. Am I missing something, or is this bug? Note: I installed 4.0.5 over 4.0.pl1, assuming it would overwrite the necessary files. Does this have anything to do with my issues? I don't think it should matter, but I could be wrong. I used the Win 32 installer [from php.net] for my installtion. Please help! -John __John Monfort_ _+---+_ P E P I E D E S I G N S www.pepiedesigns.com "The world is waiting, are you ready?" -+___+- On Tue, 1 May 2001, Michael Hall wrote: > > Use include(); > > Mick > > On Mon, 30 Apr 2001, Andreas Pucko wrote: > > > Hello, > > > > I am a newi in PHP. Currently I am creating my first site. > > > > I would like to programm it modularly. I tryed it, but I came to the point, > > that I have everything in one file with a huge amount of tables. > > > > What would be the best way to build a site with a navigation on the left and > > content on the right. > > > > The question is.. what is the proper syntax to open the next content from > > the menu. Open it in > > the same file, or open a new one?? > > > > Thanks > > > > Andy > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > On Monday 30 April 2001 21:02, Steven Haryanto wrote: > At 5/1/2001 01:43 AM, Michael Kimsal wrote: > >I understand completely what you're getting at already, but PHP is > >designed to do what you're asking to do. > > > >I know there are valid reaons for stripped down implementations, but > > can't think of too many. > > Clean separation of content and presentation? That is one strong > point (for some people anyway). Well, whether you write Hello , how are you? or Hello {{ USER }}, how are you? doesn't really matter I'd say. > Ease of use? I want to let *other people* customize the web page to > some extent, but surely do not want to require them to learn PHP. Also in this regard. -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) CPU not found. retry, abort, ignore? On 30 Apr 2001 00:51:13 -0700, elias <[EMAIL PROTECTED]> wrote: > hello. > i'm trying to detect what browser version is there...i'm using get_browser() > as it was documented: > Check to see if your browscap file is being picked up - try something like this: echo count(file(ini_get("browscap")); If that works, you're probably the latest victim of the way get_browser() has been fixed and rebroken in various versions and ports. Hi, I'm trying to the MSXML DOM 3 from Visual Basic and send XML to a PHP page that sits on my Apache web server on SCO Unix. This is my VB Code: Dim xmlstr As New XMLHTTP30 Dim sXML As String sXML = "Content-Type: text/xml;" sXML = sXML & "" sXML = sXML & "Initialize" sXML = sXML & "True" sXML = sXML & "" xmlstr.open "POST", "http://mywebserver/somepage.php";, False xmlstr.send sXML Set xmlstr = Nothin
RE: [PHP] Best Practice-HTML In Database
> -Original Message- > From: John Monfort [mailto:[EMAIL PROTECTED]] > Sent: Monday, April 30, 2001 5:08 PM > To: Mark Roedel > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Best Practice-HTML In Database > > > Yes, I will need to provide searching capabilities. > > Basically, I'm creating an online referencing system with a > db backend. A user will be able to search for a manual, > and/or browse to a particular section of the manual. > > It's similar to the online PHP manual...at least, in concept. > > > So, in the long run, which will be more beneficial: > 1) HTML code inside the db fields? >or > 2) HTML URL inside the field? Well, I know I'm going against most of the rest of the responses you've gotten, but if you think you're going to need to do databasey things with the material, it makes sense to me to put it in a database. Having said that, I do agree with a lot of what the other posters have said regarding things like the impact on ease of maintenance, waste of storage space, etc. If it were me, I think I'd be looking for a way to only store the actual text in the database, with some PHP scripting to apply whatever formatting/template is needed to generate the page you want to present. --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] .htaccess
can you guys give me some good things to put into my .htaccess file for my highest directory in a PHP/MySQL/Apache project? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] template solutions?
The 'security' angle is the only one I consider terribly valid, an was what I had in mind when I said I can't think of too many reasons why a packaged' template' solution is in order. Obviously it is for you. I still believe that in most cases it doesn't make much sense to use one, for most people, because it's limiting you to a subset of a powerful language, and the implementation can be slower. Smarty is on the right track by compiling the templates to PHP and cacheing them. What I'd *love* to see is a template system which is portable between various platforms (JSP, CF, PHP, Perl, VBScript). That would, imo, make it worhtwhile for people to learn *one* templating system that would be cross-platform. On Tue, 1 May 2001, Christian Reiniger wrote: > On Monday 30 April 2001 21:02, Steven Haryanto wrote: > > At 5/1/2001 01:43 AM, Michael Kimsal wrote: > > >I understand completely what you're getting at already, but PHP is > > >designed to do what you're asking to do. > > > > > >I know there are valid reaons for stripped down implementations, but > > > can't think of too many. > > > > Clean separation of content and presentation? That is one strong > > point (for some people anyway). > > Well, whether you write > Hello , how are you? > or > Hello {{ USER }}, how are you? > > doesn't really matter I'd say. > > > Ease of use? I want to let *other people* customize the web page to > > some extent, but surely do not want to require them to learn PHP. > > Also in this regard. > > -- > Christian Reiniger > LGDC Webmaster (http://sunsite.dk/lgdc/) > > CPU not found. retry, abort, ignore? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Get the string between custom delimiters
On Mon, Apr 30, 2001 at 02:06:50PM +0100, Matthew Ralston wrote: > Is there a nice easy function that could be used to get a sub string that > lies in between two other sub strings in one big string. > > For example... get the text that lies in between "" and "" > (without the quotes) in the code of a web page. > > I'm after a function like: > > string getstring_between_customdelimiters(string source, string > open_delimiter, sting close_delimiter) Regular Expressions are you friends http://www.php.net/manual/en/ref.regex.php blabla blabla yada"; eregi("(.*)",$string,$result); echo "Before:\"$string\", after \"$result[1]\""; ?> -- Daniel Tryba -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] template solutions?
Nope, it doesn't support nested loops (or dynamic blocks, as it's called now). But PHPLib templates supports this. PHPlib covers a lot of other stuff as well, but I haven't bothered to take a look at that yet, as Fasttemplate is good enough for my use ;-) http://phplib.netuse.de is their URL. Regards, -- Henning Kilset Pedersen Anarchy Online Server Operations Oracle, PHP, e-Commerce etc. Funcom Oslo AS phone + 47 22 92 58 40 cell + 47 91 66 40 30 email [EMAIL PROTECTED] -Original Message- From: Steven Haryanto [mailto:[EMAIL PROTECTED]] Sent: 1. mai 2001 17:50 To: Henning Kilset Pedersen; 'Fabian Raygosa'; [EMAIL PROTECTED] Subject: RE: [PHP] template solutions? Cool. I didn't know that. Does FastTemplate support nested loop and ifs? Steve At 5/1/2001 10:33 PM, Henning Kilset Pedersen wrote: >Fasttemplate supports loops and if's. > >You set a dynamic block like so: > > > > {ROWCONTENT} > > > >And then in the PHP code that parses this html template (.tpl, for example) >file, you do a $tpl->assign (.ROWCONTENT, "rowdata"); > >and loop over that. the .ROWCONTENT means that you're ADDING data to a >variable that already exists. Replace "rowdata" with the data for the row in >question. > >Isn't this what you want?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] template solutions?
Fasttemplate supports loops and if's. You set a dynamic block like so: {ROWCONTENT} And then in the PHP code that parses this html template (.tpl, for example) file, you do a $tpl->assign (.ROWCONTENT, "rowdata"); and loop over that. the .ROWCONTENT means that you're ADDING data to a variable that already exists. Replace "rowdata" with the data for the row in question. Isn't this what you want?? Regards, -- Henning Kilset Pedersen Anarchy Online Server Operations Oracle, PHP, e-Commerce etc. Funcom Oslo AS -Original Message- From: Steven Haryanto [mailto:[EMAIL PROTECTED]] Sent: 30. april 2001 21:09 To: Fabian Raygosa; [EMAIL PROTECTED] Subject: Re: [PHP] template solutions? At 5/1/2001 01:43 AM, Fabian Raygosa wrote: >Maybe this is what you are looking for >http://www.thewebmasters.net/php/FastTemplate.phtml Nope. I was looking for a template that supports loops and IFs. Someone pointed me to php dreamtime: http://www.phptemplates.org/ which is a cool project, by the way. Btw, I think I might need some extra "tags" to my template "language" so I'm going to hack this on by myself at the time being. Thanks, Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] template solutions?
Cool. I didn't know that. Does FastTemplate support nested loop and ifs? Steve At 5/1/2001 10:33 PM, Henning Kilset Pedersen wrote: >Fasttemplate supports loops and if's. > >You set a dynamic block like so: > > > > {ROWCONTENT} > > > >And then in the PHP code that parses this html template (.tpl, for example) >file, you do a $tpl->assign (.ROWCONTENT, "rowdata"); > >and loop over that. the .ROWCONTENT means that you're ADDING data to a >variable that already exists. Replace "rowdata" with the data for the row in >question. > >Isn't this what you want?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] is CURL right for SSL post to payment processing Authenticate.net
I'm wondering if anyone has experience using CURL and could advise if it's the best direction for creating a SSL to a payment processing service. I'm trying to connect an existing PHP form to a payment processing service called Authorize.net. Using there direct response method requires a Secure Socket which a thought meant to send from a secure form to their secure script which didn't work. Here's what I got from their tech support. "The problem is that you can't send an HTML form POST when using Direct Response. You must write a script that creates an SSL connection directly with our server (port 443) and send the information to us through that connection. I do not know if this is possible through PHP but usually this is done with PERL, CGI, or ColdFusion. Please refer to the Developer's guide for more information: https://secure.authorize.net/docs Thank you for contacting our customer service group." I found some info about CURL, http://curl.haxx.se/, and it seems like it might do the trick. I was wondering if anyone has experience with this a can confirm that this is the best approach or give me some other direction. Thanks, Tom >>.>>.>>>.>.>. Tom Beidler Orbit Tech Services 805.682.8972 (phone) 805.682.5833 (fax) [EMAIL PROTECTED] http://www.orbittechservices.com/ >>.>>.>>>.>.>. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] timezones
If you want to do it correctly it is much more difficult to calculate the TZ than you think. The problem is that different time zones shift to daylight savings at different times and some do not shift at all. Therefore simply adding the offset will work for a while and then you will get problems in places like Arizona and parts of Indiana and you will shift to daylight savings time a full week after your European users. The way I did this was to parse the time zone data available at ftp://elsie.nci.nih.gov/pub/ and store it in a database. I then built some functions that would calculate the correct offset depending on the date (and time) passed in and another function that would apply the offset. They have some tools to do this in C and perl but I don't speak either of them so I did it myself (unfortunately for you I didn't use PHP either because the project I did this for is written in Progress 4GL.) At an application level I determined that it is easier to convert everything done on the server to GMT and store that and then to convert from GMT to the user's local time zone for display. It becomes much easier to calculate the offset because GMT never shifts to daylight savings plus you only take a small performance hit every time instead of the double conversion hit on display which may become significant for something like a report. It took about a weekend of work to set this up and then a couple of hours here and there to tweak it so there is some significant work involved but it is worth it. BTW: Based on the look and feel of worldtimeserver.com (and many others like this) I would say that they are using the perl version of this data. Also: For some reason I am unable to bring up the FTP server I referenced above. I was there the other day to get fresh data so I know it is still valid. Try again later if you can't get to it. Zane Appel On Mon, 30 Apr 2001 14:24:20 -0500, Joe Stump <[EMAIL PROTECTED]> wrote: >Thanks to everyone who sent in the info. The problem is as follows: > >1.) the mktime()'s are stored as PST in the DB. >2.) we have users ALL OVER the world - is there a place to find all of the >timezones at? > >--Joe > >On Mon, Apr 30, 2001 at 12:11:55PM -0700, Mark Maggelet wrote: >> On Mon, 30 Apr 2001 13:56:20 -0500, Joe Stump ([EMAIL PROTECTED]) >> wrote: >> >I have a quick question regarding timezones ... >> > >> >On the local side a record is inserted into the DB by someone in >> >Michigan, while >> >the server rests in CA. Thus a three hour difference. The local >> >mktime() will >> >create a timestamp for say 9:00am when in reality it was entered at >> >12:00noon >> >in MI. I have 2 character timezones for all my users so it should be >> >easy to >> >convert the two. >> >> you could use gmmktime() instead and add or subtract the offset. >> >> $offsets=array(" >> "PST"=>1000, // not actual values >> "EST"=>-2000, >> "); >> >> $localtime=gmmktime()+$offsets[$timezone]; >> >> >putenv() won't work because of the fact that the timestamp created >> >will be >> >9:00 no matter what timezone you put it in. So what needs to be done >> >is some >> >recognition that 10800 seconds needs to be added to adjust the PST >> >timestamp >> >to an EST timestamp. Are there any functions out ther that do this? >> > >> >--Joe >> > >> >Joe Stump <[EMAIL PROTECTED]> >> >- >> >> >--- >> >One is taught by experience to put a premium on those >> >few people who can appreciate you for what you are. >> > >> > >> >-- >> >PHP General Mailing List (http://www.php.net/) >> >To unsubscribe, e-mail: [EMAIL PROTECTED] >> >For additional commands, e-mail: [EMAIL PROTECTED] >> >To contact the list administrators, e-mail: php-list- >> >[EMAIL PROTECTED] >> > >Joe Stump <[EMAIL PROTECTED]> > >Dyslexics of the world -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] test - pls ignore.
Michael Geier CDM Sports Systems Administration EMail: [EMAIL PROTECTED] Phone: 314.991.1511 x 6505 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problems after reversing a guestbook
On Sun, Apr 29, 2001 at 01:03:15AM +0200, Mogens Nielsen wrote: > Now the problem: If I post a message with a line of text, a newline (as in > hitting the return-key), some more text and newlines, these > newline-separated text-lines show before the posting itself after reversing > because they are independent elements in the array. > How can I fix this The short answer is use a database. The long answer is to write your function to reverse the array. You could have the original array passed to the function and your function return a reversed one. In your function, you would have to do some checking. If the index is a new entry into your guestbook, then create a new index in the new array. If not, just prepend the text to the last index of the array. I'm imaging that your text file is delimited by something. You may want to explode each line so you can tell if it belongs together or not. -- Jason Stechschulte [EMAIL PROTECTED] -- double value;/* or your money back! */ short changed; /* so triple your money back! */ -- Larry Wall in cons.c from the perl source code -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Your opinion on security issue: file extension
I would like opinions on a security question. A co-worker suggested we rename our application files to some extension other than .php (for example, .htm). The reasoning being that the .php extension tells a cracker that we are using PHP, and not ASP, or ColdFusion, etc. The cracker can focus immediately on vulnerabilities of PHP. So, is there something to be gained by masking our server setup by changing our filename extension? TIA Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Content_Type is included in uploaded file!
On Sat, Apr 28, 2001 at 05:58:45PM -0500, Siamak Amirghodsi wrote: > When I upload a file with php 4 and apache using the > call move_upload_file(-,-); > > the file gets uploaded, but the file ( which is just a text file ) at > the server side contains > some extra lines at the top : >Content-Type: text/plain >blankline >blankline > > Does anybody know how to suppress this? > This also happens with images! Sorry if this is wrong info Rasmus, but I was told this is a bug in some version(s) of apache. Someone I know ran into this probelem and said he found it was a bug, so he upgraded apache, reinstalled php and everything works fine. -- Jason Stechschulte [EMAIL PROTECTED] -- Almost nothing in Perl serves a single purpose. -- Larry Wall in <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Your opinion on security issue: file extension
Not really, I mean it may deter a very novice hacker. But, if the people want in, they can very easily find out what server and server software you are running. For example, goto www.netcraft.com and click on 'What's that site running?' and put in your www.domain.com address. It will tell ou everything about the server, even uptime. So, if they want to know, they can find out, file extensions just make it a bit easier... - Original Message - From: "Johnson, Kirk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 12:08 PM Subject: [PHP] Your opinion on security issue: file extension > I would like opinions on a security question. > > A co-worker suggested we rename our application files to some extension > other than .php (for example, .htm). The reasoning being that the .php > extension tells a cracker that we are using PHP, and not ASP, or ColdFusion, > etc. The cracker can focus immediately on vulnerabilities of PHP. > > So, is there something to be gained by masking our server setup by changing > our filename extension? > > TIA > > Kirk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Please review our coding standards [ ideas ]
What I always do would probably fill both needs. My filenames usually look like this: URL Files - can be accessed directly through the browser filename.php -> Normal PHP files Non-URL Files - are hidden from the browser either by means of .htaccess or by being moved outside of the root web directory filename.inc.php -> PHP Include files (these are all files containing content to be included in Normal files) filename.class.php -> PHP Class files (these are my class files) filename.lib.php -> PHP Library files (these are function libraries) This allows PHPDoc to pick up the correct files as well as prevents people from viewing the source code of my files. The only files that print content directly to STDOUT are filename.php and filename.inc.php. The other two file extensions, filename.class.php and filename.lib.php, only contain functions, classes, variable declarations, etc. --Toby - Original Message - From: "Johnson, Kirk" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 30, 2001 6:22 PM Subject: RE: [PHP] Please review our coding standards [ ideas ] > Steve, I am wondering what your reason is for item 4.2. Security, or > otherwise? Personally, I like having various file extensions, for sorting > files by content type. > > Thanks for putting this up here. > > Kirk > > > -Original Message- > > From: Steven Haryanto [mailto:[EMAIL PROTECTED]] > > Subject: [PHP] Please review our coding standards [ ideas ] > > > 4. File organization > > > > > 4.2 All PHP libraries and include files, is named with '.php' > > extension (ie. > > no '.lib', '.inc', etc.). Test scripts is named with > > '.phpt' extension. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Logout Problem auf .htaccess-Login
$PHP_AUTH_USER="" ought to do it. > From: Jochen Kaechelin [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 4:30 AM > Is it possible to unset $PHP_AUTH_USER and $PHP_AUTH_PW after > a successfull '.htaccess-login'? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] About MySQL
Hello to all: I installed mySQL in my PC running Win98, PHP and PWS..I ran an example and all Ok!!! But I have not still been able to run MS SQL'S example, I didn't understand very well that I should make..in spite of the help that friends of the list have offered me. Thanks again !!! -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to unsubscribe from the list???
Hi there, I would like to unsubscribe from the phplist and it doesn't work. How do I do that? I already sended a mail to unsubscribe. Any sugestions? Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Loading PHP module on Win98
>I downloaded the distribution from www.php.net, so it's from the same >distribution but it doesn't work. What should I do? Try again with 4.0.5 when once the binary zip appears on the downloads page. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] replace functions add \
On Mon, Apr 30, 2001 at 10:16:13AM -0700, Kasten, Holger wrote: > I have a strange problem. > I tried ereg_rplace and str_replace: > > $to_test = 'This is a test'; > $to_test = str_replace ("test","little test",$to_test); > echo $to_test; > > the result is: "This is a \little test" > Why does this happen? I have no idea. I copied your code and it works as expected. "This is a little test" is printed out. -- Jason Stechschulte [EMAIL PROTECTED] -- : - cut in regexps I don't think we reached consensus on that. We're still backtracking... -- Larry Wall in <[EMAIL PROTECTED]> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File upload form
Below is the (very) simple form that I'm using to allow users to upload files to my site: --- Upload Attachment Upload File You are uploading from an unsecure server. Close Window --- The problem that I'm experiencing using the above form is that when some users (and the problem is consistent for those users) submit the above form, *none* of the POST variables are getting passed to the receiving page. None of the hidden variables, not the "input type = file" variable, _nothing_. However, the majority of my users have absolutely no problem using this form. Just those very few. Now, when I change this line: to this: (ie, remove the ENCTYPE="multipart/form-data"), all of the POST data gets sent to the receiving page for those users. What is going on? Why is the POST data not getting sent to the server when theENCTYPE="multipart/form-data"is included in the form definition? And why only for a very small subset of users? Thanks for any insight you can give! Chris
Re: [PHP] is CURL right for SSL post to payment processing Authenticate.net
Hi Tom Yep, php_curl is the way to go. I have used exactly the same method to connect to WorldPay. Check out php_curl on php.net. Cheers Peter "Tom Beidler" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I'm wondering if anyone has experience using CURL and could advise if it's > the best direction for creating a SSL to a payment processing service. > > I'm trying to connect an existing PHP form to a payment processing service > called Authorize.net. Using there direct response method requires a Secure > Socket which a thought meant to send from a secure form to their secure > script which didn't work. Here's what I got from their tech support. > > "The problem is that you can't send an HTML form POST when using Direct > Response. You must write a script that creates an SSL connection directly > with our server (port 443) and send the information to us through that > connection. I do not know if this is possible through PHP but usually this > is done with PERL, CGI, or ColdFusion. Please refer to the Developer's guide > for more information: > > https://secure.authorize.net/docs > > Thank you for contacting our customer service group." > > I found some info about CURL, http://curl.haxx.se/, and it seems like it > might do the trick. I was wondering if anyone has experience with this a can > confirm that this is the best approach or give me some other direction. > > Thanks, > Tom > > >>.>>.>>>.>.>. > Tom Beidler > Orbit Tech Services > 805.682.8972 (phone) > 805.682.5833 (fax) > [EMAIL PROTECTED] > http://www.orbittechservices.com/ > >>.>>.>>>.>.>. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Re:lex error in make of PHP_4.0.2/Zend
Hi all, I got php_4.0.2 build went smooth on my Solaris8/SPARC. It required a few GNU utilities that i got ready made from sunfreeware.com. It is hosting most of the binaries of GNU utilities for Solaris. Thus time saving and cleaner install using solaris packages avilable there. If you want to be at bleeding edge of technology and don't like a few weeks old utility ( not always ) gnu.org is there! or if enjoy building;) a) download from www.sunfreeware.com b) mv .gz ( sometimes the file is not saved with .gz as it is shown on the web page ) c) gunzip .gz will get you as a Solaris package here d) pkgadd -d ./ ( you need to be su to do this ) e) add /usr/local/bin to your path if it is not there followings were required: GNU m4 GNU autoconf GNU automake GNU bison ( replacement of yacc ) GNU flex ( replcaement of lex ) In the rush I also installed( and not sure if they were required): GNU libtool GNU gawk All the GNU software went to /usr/local/ so there were no conflicts with normal Solaris software. I got gcc also but it was not must required as requiement was just for an ANSI C compiler. It compiled with /usr/dist/share/devpro,v4.0/5.x/SC4.0/bin/cc though gcc is recommended. I was earlier getting error for compiling source for m4 and autoconf that I earlier got from gnu.org even with gcc as compiler ( due to me being new to these things, Ofcourse!! ) but quiting it here only as am happy with ready made m4 and autoconf. Thanks all for your support. Cheers! - Surinder Check out the FREE cell phone packages complete with accessories at Lycos Wireless Marketplace http://www.inphonic.lycos.com/redirect.asp?referringpage=www.lycosad129 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] template solutions?
At 5/1/2001 06:49 PM, Michael Kimsal wrote: >The 'security' angle is the only one I consider terribly valid, an was >what I had in mind when I said I can't think of too many reasons why a >packaged' template' solution is in order. Obviously it is for you. > >I still believe that in most cases it doesn't make much sense to use one, >for most people, because it's limiting you to a subset of a powerful >language, and the implementation can be slower. Smarty is on the right >track by compiling the templates to PHP and cacheing them. > >What I'd *love* to see is a template system which is portable between >various platforms (JSP, CF, PHP, Perl, VBScript). That would, imo, make >it worhtwhile for people to learn *one* templating system that would be >cross-platform. That is where a template system like HTML::Template excels, actually. It is very simple to implement it in Perl, PHP, Tcl, etc etc. Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Creating Graphs
phpBarGraph is a bargraphing class for PHP. It allows one to have an arbitrary number of bargraphs. phpBarGraph scales the bars to fit the area you set. It is possible to cycle through colors for each bar. Each bar can be its own color or they can all be the same color. Multiple bar graphs can be placed on one image and the inter-bar spacing is configurable. URL: http://phpclasses.upperdesign.com/browse.html/package/181 -Original Message- From: Mike Mike [mailto:[EMAIL PROTECTED]] Sent: Monday, April 30, 2001 10:39 AM To: [EMAIL PROTECTED] Subject: [PHP] Creating Graphs Hello, I was wonder if anyone knows of a place where I can get a good tutorial about making graphs for beginners using php. If so please let me know. Thank you --Mike __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] compare PHP with C for apache modules
Hi, What are benefits and losses of having a PHP module for apache instead of of a C module if PHP modules are without xml and mysql support. Opinions! - Surinder Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File upload form
> The problem that I'm experiencing using the above form is that when > some users (and the problem is consistent for those users) submit the > above form, *none* of the POST variables are getting passed to the > receiving page. None of the hidden variables, not the "input > type = file" variable, _nothing_. However, the majority of my users > have absolutely no problem using this form. Just those very few. > Now, when I change this line: > METHOD=POST name="uploadForm"> > to this: > > (ie, remove the ENCTYPE="multipart/form-data"), > all of the POST data gets sent to the receiving page for those users. > What is going on? Why is the POST data not getting sent to the server > when theENCTYPE="multipart/form-data"is included in the form > definition? And why only for a very small subset of users? > Thanks for any insight you can give! Another thing of note: These same users that are having problems with my file upload form are not having problems with Yahoo!'s email attachment form (a file upload form as well). So I copied all the same HTML code from that form and put it on my site to test. The only thing I changed was the ACTION field and I modified their "Done" button to be a submit button. When they submitted that form, the POST vars didn't come through either. The only thing I can think of is that there is an issue with our Apache or, more likely, our PHP configuration. However, I'm not sure of where to even start looking. Again, any help would be greatly appreciated! Chris
Re: [PHP] variables within variables
On Sat, Apr 28, 2001 at 07:12:15PM +0100, Robert Morrissey wrote: > I have a form on one page with a text box called 'emailtext'. This gets > passed to a php script that gets info from a database (such as $name, > $email, etc) and mails selected email addresses; my problem is this: > > Say, the form passes $emailtext as "Hello $name, how're you?", and this is > passed to mail() in the php form, rather than emailing "Hello Bob, how're > you?" it prints "$name" literally. > > Seeing as $name isn't pulled from the database till the php script is it > possible to get it to print the value? or do I have to pull $name from the > database in the original form? (which'll is going to be a lot more > complicated). > > Does this make sense? No, not really. What is the value of $name when the form passes $emailtext? That is the value that will be in $name. If it is actually printing $name and not an empty string, then the '$' must be getting escaped somewhere along the line, or you are using ' instead of " around the variable. http://www.php.net/manual/en/function.echo.php -- Jason Stechschulte [EMAIL PROTECTED] -- I'll say it again for the logic impaired. -- Larry Wall -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] HELP !!!!
Hi all !!! I need URL to download some visual tool to create Databases, tables, etc..for mySQL Thanks -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HELP !!!!
http://www.scibit.com Mascon - it's great for MySQL, but doesn't support any other databases. If you want for other DB's as well, use something like Embarcadero ER/Studio at http://www.embarcadero.com - that's horrendously expensive, though. -- Henning Kilset Pedersen Anarchy Online Server Operations Oracle, PHP, e-Commerce etc. Funcom Oslo AS -Original Message- From: Hassan Arteaga [mailto:[EMAIL PROTECTED]] Sent: 1. mai 2001 19:59 To: Php (E-mail) Subject: [PHP] HELP Hi all !!! I need URL to download some visual tool to create Databases, tables, etc..for mySQL Thanks -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HELP !!!!
Try this if you are using Windows. http://www.anse.de/mysqlfront/ This is a Windows GUI for MySQL. It is very well done but it still has some issues. I don't think you will have a problem if all you'll be doing is creating tables , databases etc. You can also try installing phpMyAdmin on the server side and working on a web browser. phpMyAdmin is also a very nice tool. There are a lot more interfaces to mysql, but I haven't had a pleasent experience with the others. Oktay -Original Message- From: Hassan Arteaga [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 1:59 PM To: Php (E-mail) Subject: [PHP] HELP Hi all !!! I need URL to download some visual tool to create Databases, tables, etc..for mySQL Thanks -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP Graph class/library anywhere?
Hi, is there a PHP class/library available anywhere, that supports dynamic creation of different graphs? I need 2D bar graph and pie graph support. i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm), but they want $100 for their 2.x version. i'd prefer a free one (i'm sure there must be a couple floating around) :) Rgds, Tfr --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] split and array logic
I can't quite get the logic to create my own associative arrays: if: $stuff[0]="165.33.114.63 anonymous Mozilla/4.0" $stuff[1]="213.35.354.93 anonymous Mozilla/4.0" how do I end up with: $stuff[0][user]="165.33.114.63" $stuff[0][browser]="Mozilla/4.0" $stuff[1][user]="213.35.354.93" $stuff[1][browser]="Mozilla/4.0" I am hacking away at: foreach( $stuff as $cFile ) { list ($user, $junk, $browser) = split (' ', $cFile); } and it hurts.any hints ? TIA, Matthew Luchak Webmaster Kaydara Inc. [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] HELP !!!!
Thanks to Oktay and Henning !!! -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -Original Message- From: Altunergil, Oktay [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 3:03 PM To: 'Hassan Arteaga'; Php (E-mail) Subject: RE: [PHP] HELP Try this if you are using Windows. http://www.anse.de/mysqlfront/ This is a Windows GUI for MySQL. It is very well done but it still has some issues. I don't think you will have a problem if all you'll be doing is creating tables , databases etc. You can also try installing phpMyAdmin on the server side and working on a web browser. phpMyAdmin is also a very nice tool. There are a lot more interfaces to mysql, but I haven't had a pleasent experience with the others. Oktay -Original Message- From: Hassan Arteaga [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 1:59 PM To: Php (E-mail) Subject: [PHP] HELP Hi all !!! I need URL to download some visual tool to create Databases, tables, etc..for mySQL Thanks -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP Graph class/library anywhere?
> is there a PHP class/library available anywhere, that supports > dynamic creation of different graphs? I need 2D bar graph and > pie graph support. > i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm), > but they want $100 for their 2.x version. i'd prefer a free one > (i'm sure there must be a couple floating around) :) Funny enough, I just got an email from the PHP Classes site about a new class that does that. Try this URL http://phpclasses.upperdesign.com/browse.html/package/226 That might do what you need. Chris
RE: [PHP] PHP Graph class/library anywhere?
http://www.zend.com --> Resources --> Code Gallery --> Look Around ;-) There's tons of them in there. -- Henning Kilset Pedersen Anarchy Online Server Operations Oracle, PHP, e-Commerce etc. Funcom Oslo AS -Original Message- From: indrek siitan [mailto:[EMAIL PROTECTED]] Sent: 1. mai 2001 20:08 To: [EMAIL PROTECTED] Subject: [PHP] PHP Graph class/library anywhere? Hi, is there a PHP class/library available anywhere, that supports dynamic creation of different graphs? I need 2D bar graph and pie graph support. i found the VH Graph (http://www.vhconsultants.com/graph/graph.htm), but they want $100 for their 2.x version. i'd prefer a free one (i'm sure there must be a couple floating around) :) Rgds, Tfr --==< [EMAIL PROTECTED] >==< http://tfr.cafe.ee/ >==< +372-50-17621 >==-- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Great for all software !!!!
thanks again !!! -- M. Sc. Hassan Arteaga Rodríguez Microsoft Certified System Engineer Network Admin, WEB Programmer FUNDYCS, Ltd [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] File upload form
> > Again, any help would be greatly appreciated! > could be a browser specific issue. have you checked into the > possibility that people having problems are all using the same > browser? I don't know what all of them are using, but most are using IE. I don't know how feasable it would be to get them to all change browsers, especially when they are not having this problem on other sites (Yahoo, for example). The problem is originating from my server. There is some combination of the ENCTYPE of the form and some setting on our server that is causing the POST vars not to get sent. Chris
[PHP] Going crazy again ...
Going grey haired again. In this code only the first case is working (adding stuff to tables). The second and third are producing - Warning: Supplied argument is not a valid MySQL-Link resource in /chroot/htdocs/diarium/settings.php on line 31 (which is $query_res /ms) error: I've even copied and pasted the also clause which works from sendaction to recaction but I get the same result. Anyone sees what going on? I don't. And my deadline is tomorrow (or thursday). M. switch ($sendaction) { case "Lägg till": $query="INSERT INTO employees (login, name)"; $query .= "VALUES('$txtSend', '')"; $query_res =mysql_query($query, $mysql_link) or die('error: ' . mysql_error()); if ($also=="Rec"){ $query="INSERT INTO contacts (id, name)"; $query .= "VALUES('$txtSend', '')"; $query_res =mysql_query($query, $mysql_link) or die('error: ' . mysql_error()); } break; } switch ($recaction) { case "Lägg till": $query="INSERT INTO contacts (id, name)"; $query .= "VALUES('$txtRec', '')"; $query_res =mysql_query($query, $mysql_link) or die('error: ' . mysql_error()); break; } switch ($archaction) { case "Lägg till": $query="INSERT INTO archive (s_name, name) VALUES('$txtArch', '')"; $query_res =mysql_query($query, $mysql_link) or die('error: ' . mysql_error()); break; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Going crazy again ...
Hej, jag hade nog inte använt åäö i case men det är bara en vana, kanske du kan använda en dold variabel via html-formuläret istället och använda den i case satsen? Men det svarar ju inte på din fråga men lycka till. / iImmy Martin Skjöldebrand wrote: > Going grey haired again. In this code only the first case is working > (adding stuff to tables). The second and third are producing - Warning: > Supplied argument is not a valid MySQL-Link resource in > /chroot/htdocs/diarium/settings.php on line 31 (which is $query_res /ms) > error: > > I've even copied and pasted the also clause which works from sendaction to > recaction but I get the same result. Anyone sees what going on? I don't. > And my deadline is tomorrow (or thursday). > > M. > > switch ($sendaction) { > case "Lägg till": > > $query="INSERT INTO employees (login, name)"; > $query .= "VALUES('$txtSend', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: >' . > mysql_error()); > if ($also=="Rec"){ > $query="INSERT INTO contacts (id, name)"; > $query .= "VALUES('$txtSend', '')"; > $query_res =mysql_query($query, $mysql_link) or >die('error: ' . > mysql_error()); > } > break; > } > > switch ($recaction) { > case "Lägg till": > $query="INSERT INTO contacts (id, name)"; > $query .= "VALUES('$txtRec', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: >' . > mysql_error()); > break; > } > > switch ($archaction) { > case "Lägg till": > $query="INSERT INTO archive (s_name, name) VALUES('$txtArch', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: >' . > mysql_error()); > > > break; > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Going crazy again ...
I was actually interested in the answer to this. I believe one can write in English if one can read English. (PS: It's not my first language either) oktay -Original Message- From: Jimmy Lantz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 3:14 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Going crazy again ... Hej, jag hade nog inte använt åäö i case men det är bara en vana, kanske du kan använda en dold variabel via html-formuläret istället och använda den i case satsen? Men det svarar ju inte på din fråga men lycka till. / iImmy Martin Skjöldebrand wrote: > Going grey haired again. In this code only the first case is working > (adding stuff to tables). The second and third are producing - Warning: > Supplied argument is not a valid MySQL-Link resource in > /chroot/htdocs/diarium/settings.php on line 31 (which is $query_res /ms) > error: > > I've even copied and pasted the also clause which works from sendaction to > recaction but I get the same result. Anyone sees what going on? I don't. > And my deadline is tomorrow (or thursday). > > M. > > switch ($sendaction) { > case "Lägg till": > > $query="INSERT INTO employees (login, name)"; > $query .= "VALUES('$txtSend', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: ' . > mysql_error()); > if ($also=="Rec"){ > $query="INSERT INTO contacts (id, name)"; > $query .= "VALUES('$txtSend', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: ' . > mysql_error()); > } > break; > } > > switch ($recaction) { > case "Lägg till": > $query="INSERT INTO contacts (id, name)"; > $query .= "VALUES('$txtRec', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: ' . > mysql_error()); > break; > } > > switch ($archaction) { > case "Lägg till": > $query="INSERT INTO archive (s_name, name) VALUES('$txtArch', '')"; > $query_res =mysql_query($query, $mysql_link) or die('error: ' . > mysql_error()); > > > break; > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] How to build PHP4 shared object extensions?
Hello all! I try to build additional extension modules for PHP4 (4.0.5RC6) on Debian Linux 2.2r3 for connecting to commercial databases like Sybase, Oracle8, and IBM DB/2. But all what I get is a big PHP4 module with all additional interfaces linked in (I use APXS from Apache 1.3.19). Can anybody tell me how to build a separate .so PHP module especially for Sybase-CT (this I need most urgently). If you can give me a pointer to an URL or a FAQ, this would be also fine. Thank you very much. Guenter -- Dipl.-Ing. Guenter Millahn Brandenburg University of Technology Systems, Network & DB AdminCS Dept / DB & IS Research Group Voice: +49 (355) 69-2272/2700 P.O. Box: 10 13 44 Fax: +49 (355) 69-2766 D-03013 Cottbus GERMANY "The real world is still far away from be led ad absurdum by the virtual one."(Hal Faber, newsreel "What happened, what will be", 08/13/2000) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
php-general@lists.php.net
$B!z!z!z!z!z!z!z!!(BJust in Mail $B!z!z!z!z!z!z!z(B $B>pJsDs6!4k6HL>(B : G-Spot.com $B"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!!~"!(B $B:#=5$N$*>)$a%5%$%H$r$*CN$i$;$$$?$7$^$9(B http://sv.g-spot.to/check/mail.html $B(B $B!#(B $B!z!z!z!z!z!z!z!!(BJust in Mail $B!z!z!z!z!z!z!z(B -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] subtracting Dates
Hello, I am trying to make a hit counter graph that will have 7 days to it. Monday thru Friday. I'm having problems getting the last 7 days. For instance today is 05-01-2001 I would like to determan the previous 7 days from that date. In VB Date - 7 = 04-24-2001 I would like this to work for any date using php. Here is what I have so far... $t = (date ("m-d-Y")); echo $t; // output 05-01-2001 echo ""; $r = $t - 7; echo $r; //output -2 but now $r returns -2 How do I get $r to yesterdays date in this format. 04-30-2001 Thank you --Mike __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] String delimeters, arg!
Hello PHP'ers I am having a problem with string delimiters. For some reason no matter what I do I can not get them to process correctly!! For example, "; ?> That outputs: yes no What am I doing wrong?! Is there something I need to set in the php.ini file? I would like to be able to type \n instead of repeatidly! Also, when working with cookies, if I have a cookie that is set by, if (!isset($cookies)) { //Set Cookies $cookie_user = setcookie ("username", $row["user"], time()+86400, "/", "localhost"); $cookie_pass = setcookie ("password", $row["pass"], time()+86400, "/", "localhost"); $cookie_step = setcookie ("step", "1", time()+86400, "/", "localhost"); $cookies_set = setcookie ("cookies", "y", time()+86400, "/", "localhost"); } Is there a way to unset the cookie? Perhaps by, $cookie_set = setcookie ("cookies",""); ? Thanks for your time, Nick
Re: [PHP] upload/download of files (This is LONG)
H- Some things to consider. You might want to do a search and replace for any spaces and special characters and replace them with the underscore for all files. This way you won't get the Netscape error messages and it also might be affecting IE. For instance. Provoke - Quick Blast.mp3 would be converted to Provoke___Quick_Blast.mp3 Or just remove white spaces. The reason I mention this is because in your last paragraph you mention using the name in a web link. If it's not encoded correctly (meaning, has whitespace) netscape will choke. Don't know why IE is freaking on the name. Is it being saved correctly in the directory? What is the DB filename? As far as the file itself not playing. Sounds like you're not saving the file out correctly. Might want to check for bin types or some such thing for saving binary files. I know if you don't have the correct header and save out code your images will be screwy. Perhaps it's related. Sorry I can't be more helpful. Well that's all I can think of right now. Hope it helps some or gives a direction. -Sterling Tyler Longren wrote: > > Hello everyone, > > Here's my problem: > I need to be able to upload some info about an mp3 to a database (name, > filename, size, and file_type). I can do this already, and it works just > fine. After the info is added to the database, the mp3 is uploaded to > music/$binFile_name. > > Here's the code I have to put info into the db and upload the file to the > music directory: > $data = addslashes(fread(fopen($binFile, "r"), filesize($binFile))); > $strDescription = addslashes(nl2br($txtDescription)); > $album_sql = mysql_query("SELECT * FROM albums WHERE id = '$album_id' > AND artist_id = '$artist_id'"); > $album = mysql_fetch_object($album_sql); > $sql = "INSERT INTO music > (artist_id, artist, album_id, album_title, track_name, track_number, > mp3_type, description, filename, filesize, filetype) VALUES ('$artist_id', > '$artist', '$album_id', '$album->album_title', '$track_name', > '$track_number', '$mp3_type', '$strDescription', '$binFile_name', > '$binFile_size', '$binFile_type')"; > $result = mysql_query($sql, $db); > mysql_free_result($result); > $len = strlen($data); > if ($fp = fopen("../../music/$binFile_name", "wb")) { > if ($size = fwrite($fp, $data, $len)) { > print "Thanks, $binFile_name has been added >to > our database."; > fclose ($fp); > } > else { > print "$binFile_name couldn't be written to, > perhaps some permissions are wrong?"; > } > } > else { > print "$binFile_name couldn't be opened (or > created), please try again."; > } > > One problem begins when trying to play that MP3. When I try to play the > MP3, it NEVER plays. Is there some headers that need to be sent while > uploading the file? > > Here's the code I use to let users download the mp3: > while ($row = mysql_fetch_array($sql)) { > $artist = $row["artist"]; > $artist_id = $row["artist_id"]; > $id = $row["id"]; > $track_name = $row["track_name"]; > $type = $row["mp3_type"]; > $filename = $row["filename"]; > if ($alternate == "1") { > $color = "#ff"; > $alternate = "2"; > } > else { > $color = "$color1"; > $alternate = "1"; > } > print " href=bands.php?option=View%20Band&id=$artist_id> color=#00>$artist href='music/$filename'> color=#00>$track_name$type"; > } > > So the final dl link ends up being: Track > Name > I can download this in IE, but it still won't play, and when I do a "Save > Target As" the file name is all screwed up. > If the link was this: http://localhost/sweetleaf/music/Provoke - > Quick Blast.mp3>Quick Blast you'd think the filename I'd download would > be "Provoke - Quick Blast.mp3". When doing a Save Link As, this is the > filename: ProvokQuicBlast.mp3. Any ideas why? > > Also, when downloading in NS, I get this: The parameter is incorrect. > Any idea what that means? > > thanks for sitting through all of this. I hope you can offer me some help. > :) > > Regards, > Tyler Longren > > P.S. > If you'd like more of my code to look @, just let me know. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] opening files
How do you open a text file and put all the contents into a variable like $filecontent? Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Going crazy again ...
Jimmy Lantz wrote: > > Hej, jag hade nog inte använt åäö i case men det är bara en vana, kanske > du kan använda en dold variabel via html-formuläret istället och använda > den i case satsen? Men det svarar ju inte på din fråga men lycka till. > / iImmy Fixat! Problemet låg någon annanstans, vilket jag upptäckte när jag plötsligt fick ett annat fel i scriptet. Ändrade dessutom "Lägg till" till "Skapa" vilket ju inte innehåller våra tecken. Verkade ju funka ändå men för säkerhetesskull så. M. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] String delimeters, arg!
> I am having a problem with string delimiters. For some reason > no matter what I do I can not get them to process correctly!! > For example, > > $area_entered = "yes"; > $date_entered = "no"; > echo "$area_entered\t\t\t$date_entered"; > ?> > > That outputs: > yes no > > What am I doing wrong?! The \n and \t control the layout of the source code, but it is still the HTML that determines what the browser renders. Do a View Source when you display the page above, and you will see yes no as the source which outputs yes no Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] opening files
> -Original Message- > From: Joseph Bannon [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 2:33 PM > To: PHP (E-mail) > Subject: [PHP] opening files > > > How do you open a text file and put all the contents into a > variable like $filecontent? You use some combination of the commands presented at http://www.php.net/manual/en/ref.filesystem.php If you're just wanting something quick and simple, you might find the file() function particularly useful. --- Mark Roedel ([EMAIL PROTECTED]) || "There cannot be a crisis next week. Systems Programmer / WebMaster || My schedule is already full." LeTourneau University ||-- Henry Kissinger -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] LDAP support for 4.0.5
Can anyone direct me as to what source is needed to compile ldap support into php ? I get the error ldap.h not found when performing a configure *options on php4.0.5. The server does not have an LDAP directory installed which makes perfect sense. I need to find an opensource solution that works well with php. Thanks in advance for any assistance !! David
[PHP] restrict access of Copy command
I am running an apache server with virtual hosts and need to prevent the php Copy command from being able to copy from one virtual host dir to another. The server is in php safe mode and the doc_root, and basedir are set correctly, at least they prevent "includes" and "opendir" and such from working, but "copy" still works. I sure would appreciate any suggestions. Pan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Is PHP code software?
I read about a PHP compiler for windows some time back - that qualifies PHP as software, or actually code analogous to C/++ right? "Kath" <[EMAIL PROTECTED]> wrote in message 002201c0cf58$c26d7980$[EMAIL PROTECTED]">news:002201c0cf58$c26d7980$[EMAIL PROTECTED]... > Food for thought: Is PHP code software? > > - Kath > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] File upload
>From the manual: "Handling file uploads Uploading multiple files Common Pitfalls Not validating which file you operate on may mean that users can access sensitive information in other directories. " What is meant by the above? How would you "validate" that you weren't operating on the wrong file? As far as I know, PHP puts the file in whatever directory you specify and that is where you would access the file... how could someone make it so they access information elsewhere? Chris
Re: [PHP] include whole directories?
you could create a common include file for each directory, for e.g. functions/auth.inc.php would contain: include ("auth/auth1.php"); include ("auth/auth2.php"); ... later you could just include() the auth.inc.php file, and all the rest qould get included as well "andrew" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Is there any way to include whole directories? > I have my function declarations in many small, easily maintainable > files, but it's a pain to include/require them all individually...I > would like to just split them into directories by common purpose, e.g > > functions/auth > functions/content > functions/modules > > and then include a directory at once - any ideas? > > cheers! > andrew > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mailing list
Hello people, I came with this problem to the group a while back, got some suggestions, and have been working on them since then. I know post the query again from a new perspective I have a mysql database, which contains a lot of email addresses and various other fields. My PHP code generates a list of email addresses based on certain criteria, and I have to send a fixed text body to each of these email addresses. This is my mailing list server. The idea was to be able to send out multiple mailing lists using the same database The mail is sent using fsockopen and SMTP commands, I loop over each email address: The problem was the users were getting multiple copies of the email. After much frustration, I found that what was happening was that the script would start sending email (this process would take many minutes). However before this script finished, another copy of the same script started, and this new copy was sending emails to the same users again. The original script continued. Result: duplicate emails I tried setting the script timeout to a large value, but no effect. I have managed to catch (and stop) the execution of the second copy, and hence prevent duplicate mails, but I have no idea _why_ this copy was being spawned... Can anybody help me out here? I would really appreaciate any help! N -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] xmlHTTP.send equiv?
Does anyone know of an equivilent for ASP's xmlHTTP.send command for PHP? i need to send a XML string out to an HTTP server without using user interaction (from the inside of a script). please respond via email at [EMAIL PROTECTED] thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Easiest Way to Upgrade PHP
Hello all, Quick question. I'm wondering what the easiest way to upgrade PHP is? For instance, right now I have PHP 3 installed on a RH6.1 box and would like to upgrade to the latest version. Even though it was installed using RPMs can I use the tar.gz and build it to apply the upgrade? And then for each release after that just build it manually (I assume it will overwrite whatever needs to be "upgraded")? Red Hat is very slow about getting RPMs out and I wanted to stay on top of everything. Thanks Kevin _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP + javascript
Hi - I want to use javascript to validate some fields on a form. The javascript code will take the value the user typed into the form and search for it in an array. If the value is found in the array, then the value is ok, otherwise an alert() message will be displayed. The amount of data in the array is quite large. The data in the array rarely changes. I want to avoid transferring the array from the web server to the client's web browser every time the user loads the form. I put the array in a file called "myarray.js": $ cat myarray.js var MyArray = new Array( "value 1", "value 2", "value 789", "value 790" ); $ Then, I put the following line in the php script that generates the form: By examining Apache's access_log, I see that "myarray.js" is transferred to the user's web browser once when the form is first displayed, and for subsequent uses of the form, the web browser uses the myarray.js that is cached, so that the array does not have to be transferred from the web server to the client computer every time the user uses the form. So, if the data in the array contained in myarray.js _does_ need to be changed, I need some way of signaling the user's web browser that it needs to transfer the updated myarray.js file from the web server. How do I do this? The only way I know to do this is to instruct the users to clear their web browser cache, which will force the web browser to transfer the updated myarray.js from the web server to the web browser. Is there another way? Is there some kind of "expire" mechanism that will tell the web browser that it needs to get the updated myarray.js file? Thanks - Jim Ide -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] split and array logic
I can't quite get the logic to create my own associative arrays: if: $stuff[0]="165.33.114.63 anonymous Mozilla/4.0" $stuff[1]="213.35.354.93 anonymous Mozilla/4.0" how do I end up with: $stuff[0][user]="165.33.114.63" $stuff[0][browser]="Mozilla/4.0" $stuff[1][user]="213.35.354.93" $stuff[1][browser]="Mozilla/4.0" what about : $stuff[0] = array('user' => '156.33.114.63', 'browser' => 'Mozilla/4.0'); and so on -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Post XML to PHP via XMLHTTP VB Object
Try using the $HTTP_RAW_POST_DATA array. -- Steve Meyers [EMAIL PROTECTED] ""PHP"" <[EMAIL PROTECTED]> wrote in message 9clmgq$2fc$[EMAIL PROTECTED]">news:9clmgq$2fc$[EMAIL PROTECTED]... > Hi, > > I'm trying to the MSXML DOM 3 from Visual Basic and send XML to a PHP page > that sits on my Apache web server on SCO Unix. > > This is my VB Code: > > Dim xmlstr As New XMLHTTP30 > Dim sXML As String > sXML = "Content-Type: text/xml;" > sXML = sXML & "" > sXML = sXML & "Initialize" > sXML = sXML & "True" > sXML = sXML & "" > > xmlstr.open "POST", "http://mywebserver/somepage.php";, False > xmlstr.send sXML > Set xmlstr = Nothing > > Pretty basic stuff. This succeeds, and at the Apache server level, in the > logs I can see the POST request go through. In the file "somepage.php" - all > I'm doing is running phpinfo() to see what the server thinks it's receiving. > > phpinfo(); > ?> > > Back at the VB level, I can see xmlstr.responseText which is the output from > phpinfo(); > > I am not getting any HTTP_POST_VARS like I expected to receive. > > Has anyone done anything like this before? Is this mainly an issue with > Apache rather than PHP? > > Thanks, > Sam > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Do You Like This Book?
Yah I got it. I thought it was excellent. Goes into quite a lot of detail and pretty advanced php programs with good descriptions of how to implement it. Don't look to this book if you want a howto on how to set up mysql etc.. I thought it was a great book otherwise. Great for edpereince programmers Sono On Sat, 28 Apr 2001, Jeff Oien wrote: > Has anyone read this new book yet? > > PHP and MySQL Web Development > by Luke Welling, Laura Thomson > > http://www.amazon.com/exec/obidos/ASIN/0672317842/ref=ase_hotscrcomyourgui/1 > 07-0943347-2161363 > Would be interested in hearing opinions. > > Jeff Oien > > > -- Sono -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] subtracting Dates
> Hello, > For instance today is 05-01-2001 I would like to > determan the previous 7 days from that date. In VB > Date - 7 = 04-24-2001 I would like this to work for > any date using php. > Here is what I have so far... > $t = (date ("m-d-Y")); > echo $t; // output 05-01-2001 > echo ""; > $r = $t - 7; > echo $r; //output -2 > but now $r returns -2 > How do I get $r to yesterdays date in this format. > 04-30-2001 see the php manual: (Function Reference / XV. Date and Time functions) a piece of description & examples about date() function: $tomorrow = mktime (0,0,0,date("m") ,date("d")+1,date("Y")); $lastmonth = mktime (0,0,0,date("m")-1,date("d"), date("Y")); $nextyear = mktime (0,0,0,date("m"), date("d"), date("Y")+1); date() with mktime() is more than perfect. After subtracting date parts with the help of date() you pass them to mktime... and you can deal with its arguments as integers.(see ie: $tomorrow). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] xmlHTTP.send equiv?
I was also going to post this question from below, if anyone has an answer please reply to me as well. Thanks - Original Message - From: "Todd Kennedy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 1:37 PM Subject: [PHP] xmlHTTP.send equiv? > Does anyone know of an equivilent for ASP's xmlHTTP.send command for > PHP? > > i need to send a XML string out to an HTTP server without using user > interaction (from the inside of a script). > > please respond via email at [EMAIL PROTECTED] > > thanks > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] adding text to a variable name
Hi, Is it possible to add text onto the end of a variable name? e.g. to add the word 'code' onto the variable $field so it would be $fieldcode Thanks Jamie Saunders Mail: [EMAIL PROTECTED] Web: http://jamie-s.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] is CURL right for SSL post to payment processing Authenticate.net
Apologies if this went through twice. The original got bounced back. I'm wondering if anyone has experience using CURL and could advise if it's the best direction for creating a SSL to a payment processing service. I'm trying to connect an existing PHP form to a payment processing service called Authorize.net. Using there direct response method requires a Secure Socket which a thought meant to send from a secure form to their secure script which didn't work. Here's what I got from their tech support. "The problem is that you can't send an HTML form POST when using Direct Response. You must write a script that creates an SSL connection directly with our server (port 443) and send the information to us through that connection. I do not know if this is possible through PHP but usually this is done with PERL, CGI, or ColdFusion. Please refer to the Developer's guide for more information: https://secure.authorize.net/docs Thank you for contacting our customer service group." I found some info about CURL, http://curl.haxx.se/, and it seems like it might do the trick. I was wondering if anyone has experience with this a can confirm that this is the best approach or give me some other direction. Thanks, Tom >>.>>.>>>.>.>. Tom Beidler Orbit Tech Services 805.682.8972 (phone) 805.682.5833 (fax) [EMAIL PROTECTED] http://www.orbittechservices.com/ >>.>>.>>>.>.>. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] String delimeters, arg!
Hello PHP'ers I am having a problem with string delimiters. For some reason no matter what I do I can not get them to process correctly!! For example, "; ?> That outputs: yes no What am I doing wrong?! Is there something I need to set in the php.ini file? I would like to be able to type \n instead of repeatidly! Do you see this output in a browser window? If you does, then never mind. Browsers are allowed to change the look of your HTML source in a way that replacing multiple whitespaces with a single space (i really don't know they are allowed to...) So it's a HTML stuff. maybe you can nest your output into a . This tag handles \n \t and other HTML tags also. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] adding text to a variable name
Just do this: $fieldcode = field; Brandon -Original Message- From: Jamie Saunders [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 6:46 AM To: [EMAIL PROTECTED] Subject: [PHP] adding text to a variable name Hi, Is it possible to add text onto the end of a variable name? e.g. to add the word 'code' onto the variable $field so it would be $fieldcode Thanks Jamie Saunders Mail: [EMAIL PROTECTED] Web: http://jamie-s.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Easiest Way to Upgrade PHP
"K Old" <[EMAIL PROTECTED]> wrote: > Hello all, > > Quick question. I'm wondering what the easiest way to upgrade PHP is? > For instance, right now I have PHP 3 installed on a RH6.1 box and > would like to upgrade to the latest version. Even though it was > installed using RPMs can I use the tar.gz and build it to apply the > upgrade? And then for each release after that just build it manually > (I assume it will overwrite whatever needs to be "upgraded")? I dont think you can mix rpms and tgz's, for example if you use an apache rpm you need some header files to get php going (if you want to compile php as an apache module). It might be better to remove the old rpm first and then install the new php from tgz where the old rpm places it's files (don't know where that is on redhat maybe /usr/local) so you dont break something, but it might be better to change all rpms connected to php to tgzs. Yes after that you will be able to overwrite exsisting php versions. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] restrict access of Copy command
Hi, There is a section in the php.ini where you can specified the function you don't whant to use : disable_functions : copy; ... I never used it, but I think it's what you are looking for. Regards, Sebastien Roy [EMAIL PROTECTED] PanDragon wrote: > I am running an apache server with virtual hosts and need to prevent the php > Copy command from being able to copy from one virtual host dir to another. > > The server is in php safe mode and the doc_root, and basedir are set > correctly, at least they prevent "includes" and "opendir" and such from > working, but "copy" still works. > > I sure would appreciate any suggestions. > > Pan > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP + javascript
This is usually handled by the browser automatically. (Nobody likes to see out of date content when browsing the web). Users can set their browser settings to check for new things once per session, every time, or never (or some variation of these). Most users use once per session. Otherwise, a complete reload can be forced on many browsers (NS and IE at least) by holding shift and clicking reload. Joseph > -Original Message- > From: Ide, Jim [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 4:36 PM > To: '[EMAIL PROTECTED]' > Subject: [PHP] PHP + javascript > > > > Hi - > > I want to use javascript to validate some fields on a form. > The javascript code will take the value the user typed > into the form and search for it in an array. If the value > is found in the array, then the value is ok, otherwise > an alert() message will be displayed. > > The amount of data in the array is quite large. > > The data in the array rarely changes. > > I want to avoid transferring the array from the web server > to the client's web browser every time the user loads the > form. I put the array in a file called "myarray.js": > > $ cat myarray.js > var MyArray = new Array( > "value 1", > "value 2", > > "value 789", > "value 790" > ); > $ > > Then, I put the following line in the php script that generates the form: > > > > By examining Apache's access_log, I see that "myarray.js" is > transferred to the user's web browser once when the form is first > displayed, and for subsequent uses of the form, the web browser > uses the myarray.js that is cached, so that the array does not > have to be transferred from the web server to the client computer > every time the user uses the form. > > So, if the data in the array contained in myarray.js _does_ need > to be changed, I need some way of signaling the user's web browser > that it needs to transfer the updated myarray.js file from the web > server. How do I do this? > > The only way I know to do this is to instruct the users to clear their > web browser cache, which will force the web browser to transfer > the updated myarray.js from the web server to the web browser. > > Is there another way? Is there some kind of "expire" mechanism > that will tell the web browser that it needs to get the updated > myarray.js file? > > Thanks - > Jim Ide > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Urgent: PHP4 security (ISP setup)
On Tue, 01 May 2001, you wrote: My ftp server saves uploaded files as the uid that was logged in at the time. It is proftpd. If I log in as user/pass and then do a mput and upload files it saves them as user.user. This is confirmed by an ls -la on the user's home dir. The other alternative is to change the user the ftp deamon runs as. My proftpd runs as ftp.ftp but it could just as easily run as nobody.somebody or nobody.www or whatever. -- Lewis Bergman Texas Communications 4309 Maple St. Abilene, TX 79602 915-695-6962 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
FW: [PHP] adding text to a variable name
Sorry Syntax error. Correct: $fieldcode = $field; -Original Message- From: Brandon Orther [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 2:06 PM To: PHP User Group; Jamie Saunders Subject: RE: [PHP] adding text to a variable name Just do this: $fieldcode = field; Brandon -Original Message- From: Jamie Saunders [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 01, 2001 6:46 AM To: [EMAIL PROTECTED] Subject: [PHP] adding text to a variable name Hi, Is it possible to add text onto the end of a variable name? e.g. to add the word 'code' onto the variable $field so it would be $fieldcode Thanks Jamie Saunders Mail: [EMAIL PROTECTED] Web: http://jamie-s.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Problems compiling with PDF support
Hello, I've been scouring the archives, but none of the solutions presented are helping me... I've got php 4.0.5 and am trying to compile support for pdflib-4.0.0. Here's how I compiled pdflib: ./configure make make install Looks successful, right? ldconfig -v | grep libpdf libpdf.so.1 => libpdf.so.1.1.0 ls -1 /usr/local/lib/libpdf* /usr/local/lib/libpdf.a /usr/local/lib/libpdf.la /usr/local/lib/libpdf.so@ /usr/local/lib/libpdf.so.1@ /usr/local/lib/libpdf.so.1.1.0 And here's how I'm compiling PHP: ./configure \ --enable-versioning \ --enable-track-vars \ --with-mysql=/usr/local/mysql \ --with-imap=/var/src/imap-4.5 \ --with-curl=/var/src/curl-7.5.1 \ --enable-gd-imgstrttf \ --with-gd=../gd-1.8.3 \ --with-ttf \ --with-tiff-dir=/usr \ --with-jpeg-dir=/usr \ --with-zlib-dir=/usr \ --with-png-dir=/usr/local \ --with-pdflib=/usr/local/lib (I'm now building CGI mode for testing so I don't have to keep restarting my production web server) The only mention of pdflib from ./configure is this: checking whether to include PDFlib support... yes I've also tried: --with-pdflib=/var/src/libpdf-4.0.0 (src directory) --with-pdflib=/usr/local/lib/libpdf.so (directly to the lib itself) And cp ../pdflib-4.0.0/bind/php/ext/pdf/* ext/pdf/ ... Same results. php -i does NOT mention anything about PDF, and the pdfclock example fails with: "Fatal error: Call to undefined function: pdf_new()" NOTE: I've been doing (make clean ; rm config.cache config.status) between each ./configure. I've also started with clean source a few times. I've been working on this for a few days now, and am out of ideas. I'd appreciate any and all suggestions! Thanks, Bill Shupp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] is CURL right for SSL post to payment processing Authenticate.net
I was doing this a while back with Authorize.net and using cURL with PHP let me ditch the C CGI I had been using to accomplish this. Not quite as clear-cut a solution as something like the PayFlow extension, but it's quite doable. Main gotcha is having to compile cURL against the same SSL libs as were linked into the webserver (Stronghold in this case) if you're not using PHP as a CGI. Tom Beidler wrote: > > I'm wondering if anyone has experience using CURL and could advise if it's > the best direction for creating a SSL to a payment processing service. > > I'm trying to connect an existing PHP form to a payment processing service > called Authorize.net. Using there direct response method requires a Secure > Socket which a thought meant to send from a secure form to their secure > script which didn't work. Here's what I got from their tech support. > > "The problem is that you can't send an HTML form POST when using Direct > Response. You must write a script that creates an SSL connection directly > with our server (port 443) and send the information to us through that > connection. I do not know if this is possible through PHP but usually this > is done with PERL, CGI, or ColdFusion. Please refer to the Developer's guide > for more information: > > https://secure.authorize.net/docs > > Thank you for contacting our customer service group." > > I found some info about CURL, http://curl.haxx.se/, and it seems like it > might do the trick. I was wondering if anyone has experience with this a can > confirm that this is the best approach or give me some other direction. > > Thanks, > Tom -- - Kelly Cochran <[EMAIL PROTECTED]> Technical Staff - funschool.com Corporation -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] adding text to a variable name
Jamie Saunders <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to add text onto the end of a variable name? > e.g. to add the word 'code' onto the variable $field so it would be $fieldcode Look variable variables up in the manual, I think that would solve your problem. example: $var = "fieldcode"; $$var = "the value"; echo $fieldcode; more information here: http://www.php.net/manual/en/language.variables.variable.php -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] adding text to a variable name
From: "Jamie Saunders" <[EMAIL PROTECTED]> Subject: [PHP] adding text to a variable name > Is it possible to add text onto the end of a variable name? > e.g. to add the word 'code' onto the variable $field so it would be $fieldcode I think you want to do it in an automatic way for each variable which satisfies a prescribed condition, so you may use a for / while statement for ( ; ; ) { GLOBALS[$old_name . "_put_your_own_postfix_here"] = GLOBALS[$old_name]; } or with variable variables: for ( ; ; ) { $new_name = $old_name . "_put_your_own_postfix_here"; $$new_name = $$old_name; } but if you know the name of variables exactly, the simplest solution is already posted. $var_code = $var; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] restrict access of Copy command
Thanks for the suggestion, but I need to be able to use the copy command, I just do not want it to be able to read from one virtual host to another. I would imagine that lots of web hosters running php with virtual hosts would have the same problem. Sebastien Roy <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > Hi, > > There is a section in the php.ini where you can specified the function you > don't whant to use : > > disable_functions : copy; ... > > I never used it, but I think it's what you are looking for. > > > Regards, > > Sebastien Roy > [EMAIL PROTECTED] > > > PanDragon wrote: > > > I am running an apache server with virtual hosts and need to prevent the php > > Copy command from being able to copy from one virtual host dir to another. > > > > The server is in php safe mode and the doc_root, and basedir are set > > correctly, at least they prevent "includes" and "opendir" and such from > > working, but "copy" still works. > > > > I sure would appreciate any suggestions. > > > > Pan > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > Sebastien Roy <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi, > > There is a section in the php.ini where you can specified the function you > don't whant to use : > > disable_functions : copy; ... > > I never used it, but I think it's what you are looking for. > > > Regards, > > Sebastien Roy > [EMAIL PROTECTED] > > > PanDragon wrote: > > > I am running an apache server with virtual hosts and need to prevent the php > > Copy command from being able to copy from one virtual host dir to another. > > > > The server is in php safe mode and the doc_root, and basedir are set > > correctly, at least they prevent "includes" and "opendir" and such from > > working, but "copy" still works. > > > > I sure would appreciate any suggestions. > > > > Pan > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] FTP function in php
Hello, I am making a script that makes .htaccess files for websites. When I use ftp_nlist(); It doesn't show the files with a . in front of them. Does anyone know how to show hidden files when listing a directory? Thanks Brandon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] String delimeters, arg!
Hi Nick, to delete a cookie, simply use set_cookie("cookie_name"); without appending any values. Possible solutions for the \t and \n : For \n to , use: $string = nl2br($string); Not sure whether or not there a similar function for \t, though you could perhaps use some method to replace \t with * 4. I'm not sure something like: $string = ereg_replace("\t", "", $string); would be too clever, just in case someone typed \t rather than ereg_replace / preg_replace recognising it as a Tab. It's getting too late to do any serious thinking. :) James. ""Nick"" <[EMAIL PROTECTED]> wrote in message 005601c0d275$bfc88510$4c8d7018@cr279859a">news:005601c0d275$bfc88510$4c8d7018@cr279859a... Hello PHP'ers I am having a problem with string delimiters. For some reason no matter what I do I can not get them to process correctly!! For example, "; ?> That outputs: yes no What am I doing wrong?! Is there something I need to set in the php.ini file? I would like to be able to type \n instead of repeatidly! Also, when working with cookies, if I have a cookie that is set by, if (!isset($cookies)) { //Set Cookies $cookie_user = setcookie ("username", $row["user"], time()+86400, "/", "localhost"); $cookie_pass = setcookie ("password", $row["pass"], time()+86400, "/", "localhost"); $cookie_step = setcookie ("step", "1", time()+86400, "/", "localhost"); $cookies_set = setcookie ("cookies", "y", time()+86400, "/", "localhost"); } Is there a way to unset the cookie? Perhaps by, $cookie_set = setcookie ("cookies",""); ? Thanks for your time, Nick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] FTP function in php
"Brandon Orther" <[EMAIL PROTECTED]> wrote: > Hello, > > I am making a script that makes .htaccess files for websites. When I use > ftp_nlist(); It doesn't show the files with a . in front of them. Does > anyone know how to show hidden files when listing a directory? Maybe use ftp_rawlist(); instead -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] session_destroy()
Just curious if anyone knows how to properly destroy a session. I tried doing this, session_start(); session_unregister("logged_in"); session_unregister("username"); session_unregister("password"); session_unregister("accesslevel"); session_unregister("emailaddress"); session_unregister("last_login"); session_destroy(); However that doesn't work, the session isn't terminated and the session variables are still available. Help anyone? :-)
RE: [PHP] session_destroy()
> -Original Message- > From: Nick Adams [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 01, 2001 3:47 PM > To: [EMAIL PROTECTED] > Subject: [PHP] session_destroy() > > > Just curious if anyone knows how to properly destroy a session. As I understand it, session_unregister() removes a variable from the list of session variables. session_destroy removes the session's content from wherever it is being stored (e.g., a file in /tmp). To delete the *values* of the variables immediately, use session_unset(). Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] session_destroy()
"Nick Adams" <[EMAIL PROTECTED]> wrote: > 1. (*) text/plain > > Just curious if anyone knows how to properly destroy a session. > I tried doing this, > > session_start(); > > session_unregister("logged_in"); > session_unregister("username"); > session_unregister("password"); > session_unregister("accesslevel"); > session_unregister("emailaddress"); > session_unregister("last_login"); > > session_destroy(); hmm i guess session_destroy() should unregister all variables too, try echo session_destroy() to see if it returns 1. -- Henrik Hansen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] What's wrong?
What's wrong with my php file? File --- --- [ r a f a e l f a r i a] _ [EMAIL PROTECTED] WebMaster Universo Online - http://www.uol.com.br Phone # +55 11 3038-8665 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] What's wrong?
Don't you need a $ before acao on the line: if (acao == 1) { ? - Kath - Original Message - From: "Rafael Faria" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 01, 2001 6:08 PM Subject: [PHP] What's wrong? > > > What's wrong with my php file? > > if (acao == 1) { > if (!copy($MyFile,"c:\\temp\\$MyFile_name")) { > echo "can't copy"; > exit; > } > } > ?> > > > > > > > marginwidth=10 marginheight=10 topmargin=10 leftmargin=10> > > > > > >File > > > > > > > > > -- - > --- > > [ r a f a e l f a r i a] _ > [EMAIL PROTECTED] > WebMaster Universo Online - http://www.uol.com.br > Phone # +55 11 3038-8665 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Quoting an unknown string for database insert
Is there a function that I can call that is similar to perl's DBI::quote function that will take arbitrary text and quote it so that it is safe to insert into a database? I'm using PHP 4.0.4pl1 on Apache 1.3.14 with postgresql 7.0.2 Joseph -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Fw: Netscape 4.0 "Double Loads" my Page
Originally posted at an HTML newsgroup, but no response : ( Anyone here have any suggestions on the following problem? > Hello All, > > Anyone have any ideas why Netscape 4.0 would be double refreshing my pages? > This also occurs, this double refresh, when the page loads for the first > time. It almost appears as if it: "loads the page", then "refreshes". > > ...oh, and then all of my awesome Java Script is disabled! > (no problems in IE though) > > Help Plz! > > Karl > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] zlib.output_compression - how to turn it on
Hi, after downloading and compiling php4.0.6dev (from cvs) I've decided to try the new "much improved" zlib output support (already enabled in 4.0.5). The announcement from the changelog says check the zlib.output_compression ini. I've searched the php.net site as well as the mailing lists but could not find a reference for it. I've tried to put zlib.output_compression=on (or yes) in my /usr/local/etc/php.ini and even tough I've restarted the server, phpInfo() shows me no difference. The php was compiled with zlib support. How can I turn it on ? thanks. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP.ini
Is there a way for each user on a server to have their own php.ini settings? If so...how? Thanks Chris Anderson aka "Null" PHP Developer / Nulltech PHP-GTK Grunt / gtk.php.net STA-DoD, TO and DDay Administrator / www.stronger.org DOD Co-Owner / www.dayofdefeat.com Zeroping Staff Member / www.zeroping.com Volition Programmer / www.Volition-net.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] mod_php with Apache 2.0.16 beta?
Greetings, Just a general question, I am experimenting with Apache 2.0.16 beta. Reading the manual that comes installed from the source, it seems that third party modules like PHP will not work. Is there a development version of PHP designed to work with Apache 2.0? Thanks in advance, Will -- --- From David Touretzky's DeCSS Gallery --- - http://www.cs.cmu.edu/~dst/DeCSS/Gallery/index.html --- #!/usr/bin/perl -w # 526-byte qrpff, Keith Winstein and Marc Horowitz <[EMAIL PROTECTED]> # MPEG 2 PS VOB file on stdin -> descrambled output on stdout # arguments: title key bytes in least to most-significant order $_='while(read+STDIN,$_,2048){$a=29;$c=142;if((@a=unx"C*",$_)[20]&48){$h=5; $_=unxb24,join"",@b=map{xB8,unxb8,chr($_^$a[--$h+84])}@ARGV;s/...$/1$&/;$d= unxV,xb25,$_;$b=73;$e=256|(ord$b[4])<<9|ord$b[3];$d=$d>>8^($f=($t=255)&($d >>12^$d>>4^$d^$d/8))<<17,$e=$e>>8^($t&($g=($q=$e>>14&7^$e)^$q*8^$q<<6))<<9 ,$_=(map{$_%16or$t^=$c^=($m=(11,10,116,100,11,122,20,100)[$_/16%8])&110;$t ^=(72,@z=(64,72,$a^=12*($_%16-2?0:$m&17)),$b^=$_%64?12:0,@z)[$_%8]}(16..271)) [$_]^(($h>>=8)+=$f+(~$g&$t))for@a[128..$#a]}print+x"C*",@a}';s/x/pack+/g;eval - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] reverse array for mysql data
I'm new at programing and not getting very far with this. I've looked at "array_revers" and "array_multisort" and can't get anything to work. What I have is a mysql table laid out like: item number | title | body text | subject heading What I want to do is pull the top 7 entries off and display them on a web page. I have written some code that will do this but when it prints to the web page the first item is printed at the top and I would like it on the bottom with later entries successively on top. How can I do this? Hear is the code I have so far: $result = mysql_query ("SELECT title, body FROM junkyard LIMIT 0, 7"); $i = '0'; while ($i < 7) { if ($row = mysql_fetch_array ($result)) { echo "$row[0] $row[1]"; ++$i; } } Thanks, kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Quoting an unknown string for database insert
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Joseph Tate") wrote: > Is there a function that I can call that is similar to perl's DBI::quote > function that will take arbitrary text and quote it so that it is safe to > insert into a database? http://php.net/addslashes -- CC -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP.ini
> -Original Message- > Is there a way for each user on a server to have their own php.ini > settings? If so...how? Thanks > > Chris Anderson aka "Null" If you are using Apache, see the documentation for .htaccess files. These files allow you to set individual php.ini settings on a per directory basis. Kirk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]