Re: [PHP] forcing pfds to download
On Wednesday 26 June 2002 14:12, Peter wrote: I know tis a pain in the butt to do .. but wouldn't it be easier if you wanted to force a down load to zip the file(s) first? that way making them down load the gipped file? That's still no guarantee as some browsers are able to open zip files as well and may offer to do so. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* We are experiencing system trouble -- do not adjust your terminal. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Testing PHP on a local machine
Thanks for pointing me in the right direction However, just have a few other questions:- Do i need to install apache if i use the windows self extracting version? Can all this be also done on a laptop? Thanks for all the advice Craig Craig [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] forcing pfds to download
Thanx, but I don't have a choice, The client uploads them as a pdf and I need to keep it simple for end users. Plus I'd still love to know how it's done. Peter wrote: I know tis a pain in the butt to do .. but wouldn't it be easier if you wanted to force a down load to zip the file(s) first? that way making them down load the gipped file? -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 26 June 2002 1:42 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] forcing pfds to download On Tuesday 25 June 2002 23:58, Christian wrote: Hi all, I'd like to be able for force all browsers to prompt to save a pdf file (not just display it) Can this be done? Yes, but does not work with 100% of browsers. At least some versions of IE won't play ball and try to display your file regardless of what you tell it to do. I'm sure there's some headers I can send to force the browser to treat the pdf file this way but I've searched without any luck. Search archives. Probably for force downloads. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL query time
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] mysql Query time
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Weird error!!
Bad file descriptor is generally when there is a fault with the disk... try on some other server... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Easy Date MySQL Question...
John Holmes wrote: I have searched the php.net and don't know where to look for the code Yes? - but you did not try searching with the keyword date or how? Even a search in Google with php date returns the manual's page with date() as first response... BUT the mysql-manual: http://www.mysql.com/doc/D/a/Date_and_time_functions.html is often a good thing to know when matters concern queryes... Do the formatting in your query. Use the MySQL function DATE_FORMAT(). Look it up in the MySQL manual, chapter 6: Date and Time Functions... ---John Holmes... Regards Jesper Brunholm -- Phønix - Danish folk music from young musicians - http://www.phonixfolk.dk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] MySQL Problem with PHP
I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box I have a piece of SQL INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah character 39 is a single speach mark '+CHAR(39)+' blah blah blah') Instead of inserting: 'blah blah blah character 39 is a single speach mark ' blah blah blah It inserts 0 All variations work fine when there is no single speachies help? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL Problem with PHP
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box I have a piece of SQL INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah character 39 is a single speach mark '+CHAR(39)+' blah blah blah') Instead of inserting: 'blah blah blah character 39 is a single speach mark ' blah blah blah It inserts 0 All variations work fine when there is no single speachies help? Look into addslashes and the various magic_quotes settings in you r php.ini. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: MySQL Problem with PHP
I just preg_replace(/\'/,\',$text) and all was good :o) David Robley [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... I am using PHP and MySQL on a 2k dev box to be uploaded to a linux box I have a piece of SQL INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah character 39 is a single speach mark '+CHAR(39)+' blah blah blah') Instead of inserting: 'blah blah blah character 39 is a single speach mark ' blah blah blah It inserts 0 All variations work fine when there is no single speachies help? Look into addslashes and the various magic_quotes settings in you r php.ini. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Deleting a read-only file (Windows)
Hi there, I'm trying to delete a file using PHP's unlink() function (on Windows). This works fine on writable files but fails when trying to delete read-only files. How can I delete read-only files? Is there a function available to change the permissions? Any help greatly appreciated. Neil -- Work: [EMAIL PROTECTED] Home: [EMAIL PROTECTED] Web: www.curvedvision.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Weird error!!
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Bad file descriptor is generally when there is a fault with the disk... try on some other server... Bad file descriptor might well mean that a file that doesn't exist has been requested; this is more likely the problem -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Testing PHP on a local machine
In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... Thanks for pointing me in the right direction However, just have a few other questions:- Do i need to install apache if i use the windows self extracting version? I assume you are talking about php self extracting? If so, you will also need some sort of web server to be able ot develop php web based stuff. Can all this be also done on a laptop? Works on mine. -- David Robley Temporary Kiwi! Quod subigo farinam -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Changing Session ID
Hi there I've got the following cenario. I got a general user page with a Login button next to each user. This button only opens a new browser window by setting the target in the form tag and submits the username, password, button value, and a newsess flag to the login page in the new browser window. The login page checks to see if the newsess flag is set. If it is, it creates a new session id like this: if ( isset( $newsess ) ) { session_id( uniqid( mysess, false ) ); } I can now test anywhere on this page what the session id is, and it gives me the new one. The page now evaluates the values submitted to it and then log the user in, if possible. After the login it registeres some session variables and even creates the file containing the session variables (all is fine in the file) and then directs the user to the index page for his user type, like this: header( Location: ./c_index.php ); But here is my problem now. On this page where it is directed to the session id is not the new one, but still the old one, and thus does not allow the user on this page. What can I do to ensure that the new browser window uses the newly created session id. Any help is welcome Thanx Riaan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Seperating presentation from logic
personnaly, I agree with you, and I would really like to see more PHP frameworks (or template systems) rely on XML/XSLT. you can have a look at : http://www.interakt.ro/products/Krysalis/ it's a sort of rewrite of cocoon in PHP ... I had a look to the code, but never used it yet on a real project. looks interesting ... -Original Message- From: Jerome Houston [mailto:[EMAIL PROTECTED]] Sent: mardi 25 juin 2002 20:51 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP] Seperating presentation from logic Is there a particular reason everyone is skipping over the idea of using XML/XSLT? What you're talking about is EXACTLY what XSLT was designed for. You can write scripts that access the DB, and output XML. Then you just use XSL files written by your designers to translate your XML into HTML. they get to choose EVERYTHING about what the page looks like. Granted, your designers need to learn a little XSL, but it sounds like, for what you're doing, they wouldn't need to learn much. If you're going to teach them to use something proprietary like pattemplate (as mentioned below), why not spend that time teaching them to use XSL, which is easy to use and isn't proprietary, it's actually W3 specified. for info on how to get it working with php, go to: http://www.webmasterbase.com/article/602 some people may disagree. -jerome Basically, like someone else said, you teach your HTML designers to use custom tags that your template engine will recognize and place the correct values for. To make a loop, you'd tell your designers to do something like this table pattemplate:loop trtda href='{download_link}'{filename}/a/td/tr /pattemplate:loop It's not exactly like that, mind you, but you get the idea. You can't ever completely separate you designers and programmers. What you do is provide an easy to understand way for your designers to include the programming elements. What's easier, teaching them to put ?=$_POST['name']? or {name} in the document??? _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Email
You would have to reconfigure the smtp outgoing server in your php.ini file in the mail function as follows: SMTP=smtp.myHost.whatever I believe the php.ini file in Linux uses sendmail... In the php.ini simply search for [mail function] and make the necessary changes as above... Spike... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] trouble with my PHP4.2.1 running as SAPI module for Apache1.3.26 on W2K
I have trouble with my PHP4.2.1 running as SAPI module for Apache1.3.26 on W2K Every request to .php produces: Warning: Failed opening '/path/to/script.php' for inclusion (include_path='.;include/paths') in Unknown on line 0 No matter if I use php4apache.dll php4ts.dll distributed or self builded... If I set auto_prepend_file in php.ini to something (e.g.the same script as requested one) it will execute prepended script correctly but the main script produces the same: Warning: .. If I make the same with PHP4.2.1 running as SAPI module for Apache2.0.39 on W2K it causes no problem. I can use php4apache2.dll distributed or self builded... What I have to do if I need to use Apache1.3.26 with PHP? Anyone know? Caff!!! Mirec -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Deleting a read-only file (Windows)
From: Neil Freeman [EMAIL PROTECTED] I'm trying to delete a file using PHP's unlink() function (on Windows). This works fine on writable files but fails when trying to delete read-only files. How can I delete read-only files? Is there a function available to change the permissions? I thought unlink() did not work on Windows. Notes in the manual suggest this for Windows: system(del name.ext); -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Seperating presentation from logic
? // general_config.php $siteTitle $colBg = #FF; $colText = #FFCC99; $colLink = #EE; $colComplimentary = #CC6600; $fontHeading = FONT class=\heading\ face=\verdana, arial\ size=\3\; Wouldn't you ultimately be better off moving most of this sort of thing into style sheets and then have the designers play with the style sheets instead? What I tend to do is define style classes for various functional areas in my web sites and then my designer can figure out the design aspects based on those constraints. When you get down to it style sheets help you to stay consistent in your layouts - after all, you do want all your body text to be the same don't you? So if you define a bodytext class and then code that into your back-end it is always going to be that way. If the designer then decides that they want Times New Roman instead of Comic Sans as the body font they can change it in the style sheet and everything else changes accordingly. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP not working on Apache at XP Pro.
I've got Windows XP Pro OS. I installed and am running mySQL on that. However, PHP is not getting configured with Apache on it. I got the latest Apache, 1.3.24 or something, not the Version 2. Anyway, Apache runs perfectly on it. However, when i put in the required PHP lines in httpd.conf and install PHP otherwise on the system. What happens is that i get an error stating that : mod_c.php already exists, skipping Now when i remove that line, PHP does not work with Apache. If i insert that line, APACHE itself doesn't work at all. What is wrong with it? I've just recently done pretty much exactly that on my XP Pro Laptop. I must admit that I found the install.txt text file in the php zip archive that I downloaded from php.net to be just fine for getting it all working. In the end it took me something less than 20 mins to install and test the whole thing once I had all the archives downloaded. If you are getting errors I'd suggest going back and reading the install.txt again and checking that you followed the steps in it exactly - I did and it works. As the install file suggests, start more simply by excluding the extra modules until you're sure the base install is working - I did this and I suspect it helped. CYA, Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] problems compiling php-4.2.1 / solaris 2.6
problems compiling php-4.2.1 / solaris 2.6 -- [root@sunnsr02] 240 /tmp cd /export/php-4.2.1 [root@sunnsr02] 241 /export/php-4.2.1 make Making all in Zend /bin/sh ../libtool --silent --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../main-D_POSIX_PTHREAD_SEMANTICS -I../TSRM -g -O2 -prefer-non-pic -static -c -o zend_language_parser.lo `test -f zend_language_parser.c || echo './'`zend_language_parser.c In file included from zend_compile.h:24, from zend_language_parser.c:147: zend.h:55: unix.h: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `zend_language_parser.lo' Current working directory /export/php-4.2.1/Zend *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Any comments suggestions appreciated Neil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] New installation on Windows 98 (problem)
I just installed the InstallShield installer version of PHP on a windows 98 machine (to run with MS PWS), and am getting the message: This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive. when I try to open a php page. Please help a newbie. thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sendmail doesn't send...
Hi, that's my configuration: I've Mdk 8.2 Today I've installed sendmail for 1st time... I tryed to use mail() function, but effectively works only when I send mail to [EMAIL PROTECTED] no mails go to the other local user, and specially to external user: i.e. mail([EMAIL PROTECTED],$subj,$msg); Any idea? tnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file_exists()
I have a question about the PHP function file_exists(): This is taken from a textbook entitled PHP Professional Projects by Wilfred, Gupta, Bhatnagar (Premier Press 2002 - ISBN1-931841-53-5) on page 261 under the chapter titled Handling Files. The authors write... Consider the following code to understand the file_exists() function. ? if (!(file_exists(data.dat))) { echo The file exists; } else { echo The file does not exist.; } In the above code, the existence of the file data.dat is being verified with the help of the statement if (file_exists(data.dat)). [End of quote] . What I don't understand is why the author(s) have put the negation symbol of ! in the preceding code. It would seem to follow that in plain English that the above code statement would read as... If the file data.dat does *not* exist - then execute the following condition which will print to the browser: The File exists. Huh? Please advise. Thank you. Tony Ritter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Deleting a read-only file (Windows)
unlink() works fine apart from when trying to delete read-only files. Thanks for the suggestion anyway. Neil Lowell Allen wrote: ** This Message Was Virus Checked With : SAVI 3.58 May 2002 Last Updated 14th June 2002 ** From: Neil Freeman [EMAIL PROTECTED] I'm trying to delete a file using PHP's unlink() function (on Windows). This works fine on writable files but fails when trying to delete read-only files. How can I delete read-only files? Is there a function available to change the permissions? I thought unlink() did not work on Windows. Notes in the manual suggest this for Windows: system(del name.ext); -- Lowell Allen -- Work: [EMAIL PROTECTED] Home: [EMAIL PROTECTED] Web: www.curvedvision.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] file_exists()
You're right - the example is wrong. Neil Anthony Ritter wrote: ** This Message Was Virus Checked With : SAVI 3.58 May 2002 Last Updated 14th June 2002 ** I have a question about the PHP function file_exists(): This is taken from a textbook entitled PHP Professional Projects by Wilfred, Gupta, Bhatnagar (Premier Press 2002 - ISBN1-931841-53-5) on page 261 under the chapter titled Handling Files. The authors write... Consider the following code to understand the file_exists() function. ? if (!(file_exists(data.dat))) { echo The file exists; } else { echo The file does not exist.; } In the above code, the existence of the file data.dat is being verified with the help of the statement if (file_exists(data.dat)). [End of quote] . What I don't understand is why the author(s) have put the negation symbol of ! in the preceding code. It would seem to follow that in plain English that the above code statement would read as... If the file data.dat does *not* exist - then execute the following condition which will print to the browser: The File exists. Huh? Please advise. Thank you. Tony Ritter -- Work: [EMAIL PROTECTED] Home: [EMAIL PROTECTED] Web: www.curvedvision.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Require()
I want to use require to send some post information to a page. Code: if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); I've tried what it says in the online documentation, but it doesn't work, Tried: $Str = d:\htdocs\somewhere\editexemptfiles.php?every = 1; getting the following error: Fatal error: Failed opening required 'd:/htdocs/somewhere/anotherpage.php?every = 1' (include_path='.;d:\php\includes') in d:\htdocs\somewhere\thispage.php on line 48 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Require()
No spaces. Instead of every = 1 Use: every=1 Adam Voigt [EMAIL PROTECTED] On Wed, 2002-06-26 at 08:37, Andy Whittlestone wrote: I want to use require to send some post information to a page. Code: if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); I've tried what it says in the online documentation, but it doesn't work, Tried: $Str = d:\htdocs\somewhere\editexemptfiles.php?every = 1; getting the following error: Fatal error: Failed opening required 'd:/htdocs/somewhere/anotherpage.php?every = 1' (include_path='.;d:\php\includes') in d:\htdocs\somewhere\thispage.php on line 48 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail doesn't send...
Look in var/log/maillog or similar for errors - Original Message - From: Nightshade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 3:18 PM Subject: [PHP] Sendmail doesn't send... Hi, that's my configuration: I've Mdk 8.2 Today I've installed sendmail for 1st time... I tryed to use mail() function, but effectively works only when I send mail to [EMAIL PROTECTED] no mails go to the other local user, and specially to external user: i.e. mail([EMAIL PROTECTED],$subj,$msg); Any idea? tnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: MySQL Problem with PHP
I just preg_replace(/\'/,\',$text) and all was good :o) That's what addslashes() is for. It handles single and double quotes, backslashes, and nulls, so you won't have any problems... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Seperating presentation from logic
personnaly, I agree with you, and I would really like to see more PHP frameworks (or template systems) rely on XML/XSLT. you can have a look at : http://www.interakt.ro/products/Krysalis/ I disagree. Maybe I'm just not getting it, or understanding the FULL POWER of xml/xslt. It just seems like it's adding in an additional layer that you don't need. It seems so dependent on browser versions, and parser versions, etc. Just make a plain HTML template and a small template parsing script to insert the variables you need. Pattemplate is pretty close to XSL, but I haven't seen any speed comparisons on it. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: One more 'Headers Already Sent' error. :-(
On Tuesday, June 25, 2002, at 06:07 PM, Brad Melendy wrote: Well, I have traced this down to line 4 in the following code 'include(header.html);' which just includes my navigation bar. If I comment it out, everything works great, if I leave it in, I get the error Headers Already Sent. The file it purely html. What could be the problem?? Thanks in advance! You want this script to redirect twice? Or do you just want it to redirect the first time, but have the second header() function be called if the first one doesn't? Then you should call exit() after the first header() function to keep the rest of the script from executing. This is also generally a good practice after a header('Location: ') call because the user-agent doesn't HAVE to respect the header and redirect, so it protects your stuff. Always feature an exit() with a header-based redirect. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Require()
I'm afraid it don't ork. Thanks Anyway. Anyone ? Adam Voigt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... No spaces. Instead of every = 1 Use: every=1 Adam Voigt [EMAIL PROTECTED] On Wed, 2002-06-26 at 08:37, Andy Whittlestone wrote: I want to use require to send some post information to a page. Code: if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); I've tried what it says in the online documentation, but it doesn't work, Tried: $Str = d:\htdocs\somewhere\editexemptfiles.php?every = 1; getting the following error: Fatal error: Failed opening required 'd:/htdocs/somewhere/anotherpage.php?every = 1' (include_path='.;d:\php\includes') in d:\htdocs\somewhere\thispage.php on line 48 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Require()
if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); You don't pass variables to a require()'d file. Any variable in the current scope is available in the included()'d, require()'d file. So just require($editexemptfiles.php); and in that file, $every will be available, automatically. Think of include() and require() as a cut and paste operation. When you use either function, it's just like taking that file and copying it into the code at that point. So anything available to the main script at that point is available to the included/required file. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Require()
Try this: ? if ($viewsystem == 1) $Str = d:\\htdocs\\somewhere\\editexemptfiles.php?every=1; require($Str); ? Niklas -Original Message- From: Andy Whittlestone [mailto:[EMAIL PROTECTED]] Sent: 26. kesäkuuta 2002 15:37 To: [EMAIL PROTECTED] Subject: [PHP] Require() I want to use require to send some post information to a page. Code: if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); I've tried what it says in the online documentation, but it doesn't work, Tried: $Str = d:\htdocs\somewhere\editexemptfiles.php?every = 1; getting the following error: Fatal error: Failed opening required 'd:/htdocs/somewhere/anotherpage.php?every = 1' (include_path='.;d:\php\includes') in d:\htdocs\somewhere\thispage.php on line 48 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ ### This message has been scanned by F-Secure Anti-Virus for Internet Mail. For more information, connect to http://www.F-Secure.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] ODBC driver 4 MS access
does anyone know of any ODBC driver for access that allows me to use odbc_num_rows. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Seperating presentation from logic
Wouldn't you ultimately be better off moving most of this sort of thing into style sheets and then have the designers play with the style sheets instead? Sure, if all they are doing is playing with fonts, colors, sizes, etc... What if your designer wants to change from a two column table to a four column table. Or change the menu from a vertical column on the left to a horizontal row on the bottom that's run by images instead of text. Do you trust your designer to do all that and not mess up any of your PHP code that's thrown in with the HTML? That's why you use templates... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Passing Form Values
On Tuesday, June 25, 2002, at 06:56 PM, Phillip S. Baker wrote: When the form is submitted I want to values passed to a pop-up window. I am aware of the need for Javascript for the pop-up window, but how do I get the values from the form passed to the new window so I can use them in further scripts. I can write the javascript to do the popup window and use the onSubmit command, but I cannot figure out how to pass the values with a regular submit button. Thanks Pass them along the querystring, so that when the JavaScript popup window opens and it goes to a certain page, those values are part of that URL. As GET variables. // Your PHP vars: $var1 = 'Metroid'; $var2 = 'Metal Gear'; // Create a querystring: $PHPqueryString = var1= . $var1 . var2= . $var2; // echo the browser string for the popup: print a href=\\ onclick=\openPopup( . $PHPqueryString . \Popup!/a\n; // here's your JavaScript function function openPopup(queryString) { var detailwindow = window.open('./target.php?' + queryString, 'windowname', 'toolbar=no,directories=no, status=no,menubar=no,resizable=yes, copyhistory=no,scrollbars=yes, width=500,height=300'); detailwindow.moveTo('150', '150'); } Now in your new script you can access these GET vars from PHP or from JS! Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gradients in PHP GD
I wrote a Color gradient in GD it is actually very simple. Though you need GD 2.x and mine is designed to go from left to right changing the color to the center line then changing it back to the edge. If your interested let me know and I'll send you a code snippet. Though I would like to see someone who can show me how to do a gradient oval, I can do it in my image editing software so there must be a formula to do it I just need to know what it is. -Jim Exactly! Of course the change can be only across a part of an image. Ville What do you mean by gradients? Is it something like a gradual change across an image, say from black to white? Hugh - Original Message - From: Ville Mattila [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 25, 2002 10:38 AM Subject: [PHP] Gradients in PHP GD Hello, Does anybody have an idea where could I find a code library or code snippet to create gradients to images with PHP and GD? Thank you, Ville Mattila Ikaalinen, Finland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Security problem?
On Tuesday, June 25, 2002, at 08:26 PM, Analysis Solutions wrote: I usually run PHP as CGI. My secure files are kept in a directory that's not under the */docroot. Thus, they can't be gotten to through the web server at all. Plus, the secure files are chmoded 600 (which means they can be read/written only by the owner). Thereby, the only user on the server who can read them is me. Tradeoff, huh? If I understand it correctly, you can't keep the files outside the docroot if you're using mod_php b/c the web server itself is what fetches the file (therefore it needs to be in the docroot). But mod_php is faster than CGI PHP and can handle more simultaneous requests. Right? Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] issues with PHP 4.1.2 / solaris 2.6 / gcc 3.1
After replacing hard drives and reinstalling solaris 2.6 onto my Sparc 20, I'm getting the following error when starting up Apache 1.3.26 and PHP 4.1.2 Syntax error on line 205 of /export/home/eugenem/apache/conf/httpd.conf: /export/home/eugenem/apache/bin/httpd: fatal: relocation error: file /export/home/eugenem/apache/libexec/libphp4.so: symbol ap_block_alarms: referenced symbol not found I've also been having problems building mod_perl into Apache, but that's a question for another list. Aside from a new version of Apache, this combination was working quite well on my system before having to redo everything. I'm starting to suspect gcc (3.1), but everything (Apache, PHP, MySQL) compiles without complaint. that said, everything on the old system was built using gcc 3.0.4 or 2.96.3 instead of gcc 3.1. i may end up going back to gcc 3.0.4 to see if i can get things working again. when compiling php 4.2.1 on solaris 2.6/gcc 3.1, i also get an error about not finding unix.h. Can anybody offer any suggestions? thanks eugene -- - Eugene Mah, M.Sc., DABR [EMAIL PROTECTED] Medical Physicist/Misplaced Canuck[EMAIL PROTECTED] Department of Radiology For I am a Bear of Very Little Medical University of South Carolina Brain, and long words Bother Charleston, South Carolina me. Winnie the Pooh http://home.netcom.com/~eugenem/ PGP KeyID = 0x1F9779FD, 0x319393F4 PGP keys available on request ICQ 3113529 O- - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Require()
Thanks, that worked, and made it alot clearer. Andy John Holmes [EMAIL PROTECTED] wrote in message 000501c21d12$f4907580$b402a8c0@mango">news:000501c21d12$f4907580$b402a8c0@mango... if ($viewsystem = = 1) $Str = editexemptfiles.php?every = 1; require($Str); You don't pass variables to a require()'d file. Any variable in the current scope is available in the included()'d, require()'d file. So just require($editexemptfiles.php); and in that file, $every will be available, automatically. Think of include() and require() as a cut and paste operation. When you use either function, it's just like taking that file and copying it into the code at that point. So anything available to the main script at that point is available to the included/required file. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] appending to XML file before closing tag
On Tuesday, June 25, 2002, at 08:42 PM, Brian White wrote: I was actually thinking about this the other day - every now and again I find my self yearning for SGML, where you could have just declared the wrapping element end tag omissable, and then you would never have to worry about it - basically the end of the file would imply the existence of the end tag (sigh ) Yes, but that makes parsing very difficult -- if you're expecting to find a closing tag, it should be there. You'd have to write a special set of XML-handling functions or a special library to cover this unique breach of the XML rules, since most XML modules (for Perl, PHP, Python, Java, whatever) expect well-formed documents. XML is pretty verbose, yes, but the rewards of this are consistency -- as long as the document is well-formed, it should be pretty easy to extract the data from it without writing special code to handle these kinds of exceptions. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL Problem with PHP
INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah character 39 is a single speach mark '+CHAR(39)+' blah blah blah') That's because you are adding strings together, not concatenating them (this isn't javascript!) Use CONCAT() in MySQL to join strings together. mysql select 'this'+char(39)+'that'; ++ | 'this'+char(39)+'that' | ++ | 0 | ++ 1 row in set (0.03 sec) mysql select concat('this',char(39),'that'); ++ | concat('this',char(39),'that') | ++ | this'that | ++ 1 row in set (0.01 sec) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] MySQL query time
Is there a way to find the time that mySQL took to perform a query. like the one shown when you perform it on the console mode(0.09 sec or so) No. You can use microtime() to get the time before and after the query, subtract smaller from larger, and that's your time. It's not the actual time of the query, but it's the best you can get. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Security problem?
On Tuesday, June 25, 2002, at 08:26 PM, Analysis Solutions wrote: I usually run PHP as CGI. My secure files are kept in a directory that's not under the */docroot. Thus, they can't be gotten to through the web server at all. Plus, the secure files are chmoded 600 (which means they can be read/written only by the owner). Thereby, the only user on the server who can read them is me. Tradeoff, huh? If I understand it correctly, you can't keep the files outside the docroot if you're using mod_php b/c the web server itself is what fetches the file (therefore it needs to be in the docroot). But mod_php is faster than CGI PHP and can handle more simultaneous requests. Right? Yes you can. Apache can read any file it has access to. Include('/home/user/includes/myfile.php'); Works just as well as Include('/home/user/www/includes/myfile.php'); Where /home/user/www is your web root. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] MySQL Problem with PHP
I understand about the concat function, but that doesn't really fit into my scheme of things I run all text for the web through a function SafeSQL so that values from the web don't make SQL error or potential hacks occur. All SafeSQL was doing (for mssql, access and just about any other db) was $text = preg_replace(/\'/,' + CHAR(39) + ',$text) so when SQL added the rows with a value of 0 instead of the string I was baffled. Shame mysql doesn't support inline concatenation John Holmes [EMAIL PROTECTED] wrote in message 000701c21d14$fc054370$b402a8c0@mango">news:000701c21d14$fc054370$b402a8c0@mango... INSERT INTO `contracts` (`key`, `content`) VALUES (1,'blah blah blah character 39 is a single speach mark '+CHAR(39)+' blah blah blah') That's because you are adding strings together, not concatenating them (this isn't javascript!) Use CONCAT() in MySQL to join strings together. mysql select 'this'+char(39)+'that'; ++ | 'this'+char(39)+'that' | ++ | 0 | ++ 1 row in set (0.03 sec) mysql select concat('this',char(39),'that'); ++ | concat('this',char(39),'that') | ++ | this'that | ++ 1 row in set (0.01 sec) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Gradients in PHP GD
Yes please, I would appreciate if you send the code snippet. In fact I have rather same kind of demand for the code. My script should change the color in more than one place and the distance between the key points varies. But I'm sure I can modify the code to meet my needs. Ville Lainaus Anzak Wolf [EMAIL PROTECTED]: I wrote a Color gradient in GD it is actually very simple. Though you need GD 2.x and mine is designed to go from left to right changing the color to the center line then changing it back to the edge. If your interested let me know and I'll send you a code snippet. Though I would like to see someone who can show me how to do a gradient oval, I can do it in my image editing software so there must be a formula to do it I just need to know what it is. -Jim Exactly! Of course the change can be only across a part of an image. Ville What do you mean by gradients? Is it something like a gradual change across an image, say from black to white? Hugh - Original Message - From: Ville Mattila [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 25, 2002 10:38 AM Subject: [PHP] Gradients in PHP GD Hello, Does anybody have an idea where could I find a code library or code snippet to create gradients to images with PHP and GD? Thank you, Ville Mattila Ikaalinen, Finland -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Seperating presentation from logic
John Holmes wrote: Wouldn't you ultimately be better off moving most of this sort of thing into style sheets and then have the designers play with the style sheets instead? Sure, if all they are doing is playing with fonts, colors, sizes, etc... What if your designer wants to change from a two column table to a four column table. Or change the menu from a vertical column on the left to a horizontal row on the bottom that's run by images instead of text. Theoretically this could still be done only with editing of the stylesheet. Of course, it's not that simple - Mozilla comes closest to decent browser support for that sort of radical change, and even it's not there yet. Do you trust your designer to do all that and not mess up any of your PHP code that's thrown in with the HTML? That's why you use templates... Actually, I think the idea behind what the previous poster was saying is that: a) with stylesheets they don't need to touch the HTML once they've finished with it (and handed it over to you for PHP work) b) you therefore won't need templates -- Mark Gallagher http://cyberfuddle.com/infinitebabble/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: MySQL Problem with PHP
On Wednesday, June 26, 2002, at 08:58 AM, John Holmes wrote: I just preg_replace(/\'/,\',$text) and all was good :o) That's what addslashes() is for. It handles single and double quotes, backslashes, and nulls, so you won't have any problems... Plus IIRC it's a C extension so it'll run faster anyway. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail doesn't send...
Adi wrote: Look in var/log/maillog or similar for errors - Original Message - From: Nightshade [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 3:18 PM Subject: [PHP] Sendmail doesn't send... [mail function] SMTP= localhost ;for win32 only sendmail_from = [EMAIL PROTECTED];for win32 only sendmail_path = /usr/sbin/ ;for unix only, may supply arguments as well (default is sendmail -t) what's wrong on my config? tnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Seperating presentation from logic
On Wednesday, June 26, 2002, at 09:05 AM, John Holmes wrote: I disagree. Maybe I'm just not getting it, or understanding the FULL POWER of xml/xslt. It just seems like it's adding in an additional layer that you don't need. It seems so dependent on browser versions, and parser versions, etc. Just make a plain HTML template and a small template parsing script to insert the variables you need. Pattemplate is pretty close to XSL, but I haven't seen any speed comparisons on it. Yeah, but what if you want to output to a format other than HTML? For instance you want to generate a PDF invoice, which is emailed to the user, but you also want to display that invoice to the user? Should you have two separate files/sources of data? You could have one XML file, and use XSL to make an HTML document which appears in the user's browser and a PDF which is emailed to them. The point of XML is to look beyond the web browser as a point where the user needs data. PDAs would benefit from non-HTML formatted stuff (too small a screen for most web pages), cell phones have their hardly-used WML, there are tons of different print formats like PDF or PostScript, plus alternative formats like troff (for man pages) and POD (for Perl manpages) and others. XSLT lets you output from one source file to any desired format. If you need versatility in the output of your data, XML can really help you. Plus, it doesn't depend on browser version if that's what you're worried about -- it can be done server-side: use PHP to perform the transformation before it gets to the user if it's going to their browser. That's why some XML-based sites let you choose whether to view the page in HTML or XML (so that if you want to use a spider or script to parse the data on the web page instead of looking at it in a browser, you can do that much more easily with the XML formatted output than the HTML formatted output). Later on down the road, when (hopefully) all browsers incorporate an XSLT processor, the burden of performing the transformation can be handled by the client. Not that client-side technology has been very successful at standardizing, in consideration of different JavaScript implementations, CSS implementations, and even Java Virtual Machines (witness Microsoft consistently refuse to ship a decent JVM with their OS, even though they are freely available from the Sun web site). That's why server side stuff like PHP will probably always be invaluable. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Web Services
Hi the ML I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If yes do you have some examples ? regards Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail doesn't send...
I don't have the /usr/sbin in mine (I left it at the default blank) and it works. Can an ordinary user send emails to the destinations you are trying to get to with PHP? If not, then you have a sendmail configuration issue. HTH Chris Nightshade wrote: [mail function] SMTP= localhost ;for win32 only sendmail_from = [EMAIL PROTECTED];for win32 only sendmail_path = /usr/sbin/ ;for unix only, may supply arguments as well (default is sendmail -t) what's wrong on my config? tnx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail doesn't send...
On Wed, Jun 26, 2002 at 03:52:48PM +0200, Nightshade wrote: SMTP= localhost ;for win32 sendmail_from = [EMAIL PROTECTED];for win32 only sendmail_path = /usr/sbin/ ;for unix Try commenting out the sendmail_path line with a ; at the beginning of the line. Also, mail() only works for me when I'm connected to the internet. Are you? --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Deleting a read-only file (Windows)
On Wed, Jun 26, 2002 at 11:34:10AM +0100, Neil Freeman wrote: I'm trying to delete a file using PHP's unlink() function (on Windows). This works fine on writable files but fails when trying to delete read-only files. How can I delete read-only files? Is there a function available to change the permissions? Untested, but try setting permissions on the file via chmod('name', 0777). --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution sqlsolution.info | layoutsolution.info | formsolution.info T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y 4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] More on removing item from cart
Dan: Thanks very much for the detailed reply. I took most of this code from Welling and Thomson's book PHP and MySQL Development, (chpt. 25) but I'm trying to modify it to fit my purposes. The html is mostly theirs, and it's not the way I would write it, but it's working on my test machine. I plan to clean it up and do cross-browser testing once the scripts work. I agree completely that the problem is most likely in the foreach line of the following code. if($save) { foreach($cart as $artID = $value) { if(empty($value)) unset($cart[$artID]); else $cart[$artID] = $$artID; } You asked about the structure of the cart, and here's another problem area. One of the greatest difficulties I've had learning PHP (my first attempt at any scripting/programming language, in case you hadn't noticed), is understanding array structures. The cart is created by the show_cart page when items are added to it. Here's the relevant code (which immediately precedes the if($save) snippet sent in the previous message: ?php include ('article_sc_fns.php'); session_start(); if($new) { //new item selected if(!session_is_registered(cart)) { $cart = array(); session_register(cart); $article_qty = 0; session_register(article_qty); $total_words = 0; session_register(total_words); } if($cart[$new]) $cart[$new]++; else $cart[$new] = 1; When the article is added to the shopping cart the variable is passed to the show_cart page through the URL (show_cart.php?new=$artID) The original code was written to allow for changing quantities of items in the cart, which is irrelevant for me, but I've left the code as is because it doesn't seem to interfere with any other code and is necessary for adding items to the cart. I'm checking the cart structure by printing the following code inserted right after the if($save); line (is this the best way to check on the contents of an array?) while (list($key,$value) = each($cart)) { print Cart = $key: $valueBR; } This returns article ID number (an integer) : 1 when new and article ID : yes after the save button has been clicked. I tried naming the checkbox want[$artID] but as far as I can tell the $want array and the $cart array are two separate entities and none of the code I've tried seems to work on both, even when they have the same key ($artID). For example, when I revised the code you sent earlier to while (list($artID,) = each ($_POST['want'])) $cart[$artID]; it didn't work. Obviously, something else could be interfering. Re: the line of code you thought odd and asked about: else $cart[$artID] = $$artID; I thought it was odd too, and since this is acquired code, I can't explain it. I assumed that it just resets the artID to its original value. I'm afraid this message is way too long, and I apologize if it's too much. I hesitated posting questions in the first place because the interaction of the code seemed fairly complex, but I'm also quite desperate. Once again, many thanks for your patience and attention. Vicki -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Services
On Wednesday, June 26, 2002, at 10:49 AM, Laurent Drouet wrote: I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If you know the web services API, you just send your request. It shouldn't matter whether you're using Java, PHP, Python, even VB or even Telnet to generate your request -- most web services accept an HTTP POST message consisting of XML code which is used to perform some kind of action. There are two things you can do -- either use the cURL functions (your PHP binary must be compiled with cURL enabled to do this), which give you an advanced set of URL accesses, or open a socket to the remote machine with the web service and send a stream of POST data that way. You can use Rasmus Lerdorf's postToHost function (this may as well just become a PHP function, it gets referenced so much), which I have appended to this message. Either way, just generate your XML string and fire it at the remote machine. You will need to write code to handle the response, obviously. # === # PostToHost($host, $path, $data_to_send) # --- # It is a trivial little function. # -Rasmus # === function PostToHost($host, $path, $data_to_send) { $fp = fsockopen($host,80); fputs($fp, POST $path HTTP/1.0\n); fputs($fp, Host: $host\n); fputs($fp, Content-type: application/x-www-form-urlencoded\n); fputs($fp, Content-length: . strlen($data_to_send) . \n); fputs($fp, Connection: close\n\n); fputs($fp, $data_to_send); while(!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Deleting a read-only file (Windows)
According to the manual This function is not implemented on Windows platforms. Gave it a go though and it works! Cheers Dan, Neil Analysis Solutions wrote: ** This Message Was Virus Checked With : SAVI 3.58 May 2002 Last Updated 14th June 2002 ** On Wed, Jun 26, 2002 at 11:34:10AM +0100, Neil Freeman wrote: I'm trying to delete a file using PHP's unlink() function (on Windows). This works fine on writable files but fails when trying to delete read-only files. How can I delete read-only files? Is there a function available to change the permissions? Untested, but try setting permissions on the file via chmod('name', 0777). --Dan -- Work: [EMAIL PROTECTED] Home: [EMAIL PROTECTED] Web: www.curvedvision.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Services
I've used Dietrich's SOAP implementation for PHP and have been able to use only with specific type of webservices (soap:binding style=rpc... and soap:body use=encoded...). Unfortunately your service has style=document and use=literal, so I'm not sure about it. It can be found at: http://dietrich.ganx4.com/nusoap/index.php cheers, thalis On Wed, 26 Jun 2002, Laurent Drouet wrote: Hi the ML I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If yes do you have some examples ? regards Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Sendmail doesn't send...
On Wednesday 26 June 2002 21:52, Nightshade wrote: [mail function] SMTP= localhost ;for win32 only sendmail_from = [EMAIL PROTECTED];for win32 only sendmail_path = /usr/sbin/ ;for unix only, may supply arguments as well (default is sendmail -t) what's wrong on my config? Are you using unix/linux? If so, then IIRC the sendmail_path is misleading, it actually wants the path and file. Thus: sendmail_path = /usr/sbin/sendmail Usually if your sendmail is in the standard place then leaving sendmail_path empty is fine. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Only a fool fights in a burning house. -- Kank the Klingon, Day of the Dove, stardate unknown */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Web Services
you should use PEAR-SOAP ... there is also a php mailing list dedicated to the soap extension development ([EMAIL PROTECTED]) -Original Message- From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] Sent: mercredi 26 juin 2002 17:11 To: Laurent Drouet Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Web Services I've used Dietrich's SOAP implementation for PHP and have been able to use only with specific type of webservices (soap:binding style=rpc... and soap:body use=encoded...). Unfortunately your service has style=document and use=literal, so I'm not sure about it. It can be found at: http://dietrich.ganx4.com/nusoap/index.php cheers, thalis On Wed, 26 Jun 2002, Laurent Drouet wrote: Hi the ML I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If yes do you have some examples ? regards Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] sessions are remembered for one page, then forgotten
Do you have session_start() on each page? ---John Holmes... - Original Message - From: Phil Schwarzmann [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 26, 2002 11:31 AM Subject: [PHP] sessions are remembered for one page, then forgotten I'm still having a little trouble with my PHP Server (win98)... When a session is started, it only remembers it for the initial page. As soon as another is loaded, it quickly forgets it. Although, maybe it never started it at all... I changed my session.save_path to equal c:\tmp- and there is a tmp directory on my C-Drive. But I haven't done anything else to the php.ini file. Should I change session.auto-start to 1? Or will this start up a session every single time, even if there was no call for it. Thanks for your help!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OOP assistance request
Hi, I'm making this request for help because my experience with object oriented programming is very limited. I'd like to describe my situation and then ask a question at the end of it, any comments or input are very appreciated. My application needs to keep track of different kinds of projects, and display different attributes depending on what kind of project it is. Therefore, I have written a base class called Project. The four kinds of projects are PrintProjects, DesignProjects, WebProjects, and PhotoProjects. Each of these extend the Project class, so they are child classes. I intend to write my code to use polymorphism so that a single method call, $object-display(), will generate the appropriate output depending on which child class it is being called upon. So really, the Project class is just an abstract class and is not really intended to be instantiated, but PHP doesn't really enforce a difference between abstract classes and true classes. And each project has a corresponding record in a MySQL database, so I have a convenient primary key for every Project object (regardless of what kind of project it is). HOWEVER -- Because this is PHP/HTTP and not Java, there is no true state. So the way that I instantiate a Project is by passing the primary key of the object as an argument to the constructor of the Project. The constructor can then flesh out the object as needed, and ideally there will be different flesh out code depending on the type of object. My problem is that I have no way to know which type of object to instantiate in advance -- all I have is this primary key. Using the primary key to instantiate an object, I can extract the ProjectType primary key, and then I could instantiate a new object of the appropriate type, but then I'd have two objects (and that seems like a lot of overhead). I'd rather just have the client code instantiate the right type of object from the beginning. Is there a way to convert a Project object into a PrintProject object -- such as casting it? In other words, I'd like my client code to look like: $obj = new Project('87633'); $type = $obj-getProjectType(); if ($type == '1') { $obj = (PrintProject)$obj; // re-cast the Project into a PrintProject } elseif ($type == '2') { $obj = (DesignProject)$obj; // re-cast the Project into a DesignProject // etc } $obj-display();// now the object will call the appropriate // overriding method because the object is // now of the appropriate subtype Is that possible in PHP Namely, the casting above? Or does my client code need to be able to figure out which type of project it is (say, from the DB) and then use this to determine which object type to instantiate? Thanks very much, Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: One more 'Headers Already Sent' error. :-(
No Worries, I know when people post the same questions over and over again, it pisses a lot of the folks here off. I really do read other messages first and then post only when I can't figure out the answer from other posts. I appreciate your input. It makes more sense when you explain what the browser sees as output. Thanks again. ...Brad John Holmes [EMAIL PROTECTED] wrote in message news:000f01c21cbd$7f49e0e0$b402a8c0@mango... Sorry if I was a little rude. The thing to remember that anything outside of a ? And ? is considered output, even if it's in an include. So if I have an include that does ? $var = 'value'; ?, then I'm fine. But if I have an include that does pHip, or html, or even just a space within it outside of a ? And ?, it's going to be considered output. and any output before a header() call is going to break it (unless output buffering is on). ---John Holmes... -Original Message- From: Brad Melendy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 10:39 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Re: One more 'Headers Already Sent' error. :-( Oh I read all the error messages, I just don't understand them. ;-) I'm working through a book Teach Yourself PHP4 in 24 Hours so much of this is new to me. I think I understand now and it makes sense that by putting the include statement farther down in the page so that it wasn't being executed until after the header function in the fist portion of code. Thanks for your help. Brad John Holmes [EMAIL PROTECTED] wrote in message news:000101c21ca8$5040e970$b402a8c0@mango... If header.html has HTML in it, THEN THAT IS OUTPUT! You can't send a header after output. Do you even read the error message? It says OUTPUT STARTED AT /home/bmelendy/websites/www.e-learn.net/quizD/header.html:3. THAT MEANS LINE 3 STARTED OUTPUT... ---John been a long day, deal with it! Holmes... -Original Message- From: Brad Melendy [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 25, 2002 6:08 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: One more 'Headers Already Sent' error. :-( Well, I have traced this down to line 4 in the following code 'include(header.html);' which just includes my navigation bar. If I comment it out, everything works great, if I leave it in, I get the error Headers Already Sent. The file it purely html. What could be the problem?? Thanks in advance! ?php error_reporting(2039); include(dblib.inc); include(userlib.inc); include(header.html); $message=; if ( isset( $actionflag ) $actionflag == login ) { if ( empty( $form[login] ) || empty( $form[password] ) ) $message .= You must fill in all fieldsbr\n; if ( ! ( $row_array = checkPass( $form[login], $form[password] ) ) ) $message .= Incorrect password. Please try againbr\n; if ( $message == ) // we found no errors { LastLogin($row_array[login]); cleanSession( $row_array[id], $row_array[login], $row_array[password] ); header( Location: index.php?.SID ); } } ? Brad Melendy [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi All, I know this has come up before and I've read some posts so far, but this is still eluding me. I have come to understand that typically, if you are getting an error message about your headers having already been sent to the browser, you are writing bad code. Now, I want to right good code so I really want to figure this out the right way and stay away from doing stuff like setting Output Buffering to ON in the php.ini file, (which I can do in my case). So, basically, I get the error message: Warning: Cannot add header information - headers already sent by (output started at /home/bmelendy/websites/www.e-learn.net/quizD/header.html:3) in /home/bmelendy/websites/www.e-learn.net/quizD/login.php on line 17 Now, I can see right on line 17 that I'm outputting a header with the following line: header( Location: index.php?.SID ); This is part of an if/then statement that is supposed to redirect the user to index.php upon login. The conflict occurs because I have an include file with a function checkUser() that also redirects the user to the login.php page if they fail the the check with a line: header( Location: /main/login.php ); So, is there no way for me to redirect a user from both a function under certain circumstances and also from withing a page that calls that function? I don't completely understand when exactly the headers are being sent and this does all work properly if I turn the Output Buffering to 'ON'
RE: [PHP] Web Services
you can get the entire php code with examples from the pear cvs repository -Original Message- From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] Sent: mercredi 26 juin 2002 17:35 To: phpsurf Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Web Services I looked in pear.php.net and I couldn't find it. Also http://www.soapware.org/directory/4/implementations links PEAR-SOAP to http://pear.php.net There is only a m-list? On Wed, 26 Jun 2002, phpsurf wrote: you should use PEAR-SOAP ... there is also a php mailing list dedicated to the soap extension development ([EMAIL PROTECTED]) -Original Message- From: Thalis A. Kalfigopoulos [mailto:[EMAIL PROTECTED]] Sent: mercredi 26 juin 2002 17:11 To: Laurent Drouet Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Web Services I've used Dietrich's SOAP implementation for PHP and have been able to use only with specific type of webservices (soap:binding style=rpc... and soap:body use=encoded...). Unfortunately your service has style=document and use=literal, so I'm not sure about it. It can be found at: http://dietrich.ganx4.com/nusoap/index.php cheers, thalis On Wed, 26 Jun 2002, Laurent Drouet wrote: Hi the ML I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If yes do you have some examples ? regards Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ ifrance.com, l'email gratuit le plus complet de l'Internet ! vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP... http://www.ifrance.com/_reloc/email.emailif -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: One more 'Headers Already Sent' error. :-(
I wanted the script to redirect to different locations based on what conditions were being met. My problem turned out that I had an include statement including an html file prior to the header function on line 17. If I understand this correctly, the include statement was providing 'output' and then it was trying to output again later in the header() function. By moving my include statement outside the ?php .? in the intial section of code, it wasn't providing the output until after my header() function had completed and there wasn't an issue anymore. Thanks for your help. ...Brad Erik Price [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tuesday, June 25, 2002, at 06:07 PM, Brad Melendy wrote: Well, I have traced this down to line 4 in the following code 'include(header.html);' which just includes my navigation bar. If I comment it out, everything works great, if I leave it in, I get the error Headers Already Sent. The file it purely html. What could be the problem?? Thanks in advance! You want this script to redirect twice? Or do you just want it to redirect the first time, but have the second header() function be called if the first one doesn't? Then you should call exit() after the first header() function to keep the rest of the script from executing. This is also generally a good practice after a header('Location: ') call because the user-agent doesn't HAVE to respect the header and redirect, so it protects your stuff. Always feature an exit() with a header-based redirect. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Compiling PHP with XML????
I looked in the ./configure --help for the xml support. It didn't say but show some options such as disabling xml, using xml with different stuffs. Nothing is being mentioned about enabling xml or something. So, is xml in php supported automatically? Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] logging onto phpmyadmin
now that I put a root password on mysql, I can no longer log onto phpmyadmin. It mentions something about the lib.inc file, it looks like I need to edit the file and add in my new username/password. But when I open lib.inc, it looks like a bunch of garbage on the screen, it's not normal text. What am I doing wrong. Also, I want to allow other users to connect to phpmyadmin from remote locations. Is there a way to do this or do I need to write a little PHP script that allows them to log on? Thanks!!!
[PHP] 4.2.1 installation under WIN2k with IIS - Extensions just won't work
All I installed the 4.2.1 release over my 4.0.6 release (and had major fun getting all of my variables working again!) BUT I can't get php_gd.dll to load as an extension. I have added every combination in the extensions_dir line, including the 4.0.6 entry which worked fine. All I get is an nable to load module error on the client browser and on the systems console. I've copied dll's 'til I'm blue in the face but am getting no-where fast. any thoughts would be gratefully appreciated. Best Wishes, John Brown. Host Europe System Administration. Host Europe PLC [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling PHP with XML????
On Wednesday, June 26, 2002, at 11:57 AM, Scott Fletcher wrote: I looked in the ./configure --help for the xml support. It didn't say but show some options such as disabling xml, using xml with different stuffs. Nothing is being mentioned about enabling xml or something. So, is xml in php supported automatically? Yes. Since 4.1.x at least. But for XSLT you need to get expat and Sablotron and link them into the compile (with the appropriate ./configure options). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] OSCON: anybody interested in my Oracle talk?
hi, seems like oreilley will cancel my tutorial about PHP and Oracle at OSCON in san diego as there are not enough ppls interested. so - if you go to oscon, and if you are interested in that subject _and_ if you have not decided to sign up for my tutorial - hurry up and register (deadline is friday), elsewise it'll be cancelled:-( hoping for the best... tc PS: i was going to do some intersting new stuff for OSCON (scollable cursors etc) - so if you use oracle with PHP this is a *must*:-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Microsoft Bug come back to haunt?
Ok I posted a mail a couple of days ago about downloading files within PHP. Heres the code I'm using: Header(Content-Type: application/x-tar); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Anyway the problem is, that if you use IE6 click on the download it pops the box up, do you want to save or open it works ok if you click save put if you try open it doesnt open the file properly it adds [1] or [2] etc at the end of the filename. Now I know there was a bug with the attachment part of the Content-Disposition in IE5 but this was fixed with SP1. Is there any way of getting around this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Help with e-mail form with server-side written in php?
I seem to be having an issue with an e-mail form that I have created for registration purposes with the server-side being written in PHP! I've tested the e-mail form using numerous browsers and operating systems including Microsoft, Netscape, Unix, and Linux! Everytime I test the form, it works just fine. I have even had other individuals located in different geographical locations register using my form and it works just fine. However, I do receive totally blank forms from time to time and I have no idea why. Even the javascript that I have written to fill in fields automatically such as a date field and a registration fee field are coming back blank. These are two fields that even the the user can't erase. The form is hosted on a unix server and everytime I test it, it works just fine. I've tested the form on a IIS server and an apache server and it works just fine. I just can't figure out why I get back some blank registration forms. Maybe it has something to do with the user's side! Any help or better direction for my message would be much appreciated! Thanks, Chris Hounsell -- - Chris Hounsell Memorial University Career Fair 2002 Co-ordinator Co-operative Education Services Centre, B1015 Memorial University of Newfoundland Telephone: (709) 737-4825 Fax: (709) 737-8960 E-mail: [EMAIL PROTECTED] Web: www.mun.ca/ccd/careerfair/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Compiling PHP with XML????
Cool! Just finished compiling PHP before I read your post. :-) I took the risk and include hte --enable-xml option even though it is not included and it compiled successfully. But with a lot of warning though. Thanks! Scott Erik Price [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Wednesday, June 26, 2002, at 11:57 AM, Scott Fletcher wrote: I looked in the ./configure --help for the xml support. It didn't say but show some options such as disabling xml, using xml with different stuffs. Nothing is being mentioned about enabling xml or something. So, is xml in php supported automatically? Yes. Since 4.1.x at least. But for XSLT you need to get expat and Sablotron and link them into the compile (with the appropriate ./configure options). Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Microsoft Bug come back to haunt?
I've had luck making the url look something like... http://server/path/to/dl.php?filename=filename.tar or http://server/path/to/dl.php/filename.tar (works with apache) The latter seems to work better for me. On Wed, 26 Jun 2002, Francis wrote: Ok I posted a mail a couple of days ago about downloading files within PHP. Heres the code I'm using: Header(Content-Type: application/x-tar); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Anyway the problem is, that if you use IE6 click on the download it pops the box up, do you want to save or open it works ok if you click save put if you try open it doesnt open the file properly it adds [1] or [2] etc at the end of the filename. Now I know there was a bug with the attachment part of the Content-Disposition in IE5 but this was fixed with SP1. Is there any way of getting around this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Web Services
Thanks for the test . I succeed in retrieving a number. I had to add $soapclient-setHTTPProxy to connect. I don't know anything about webservices and I wonder if you know what I can put in place of $soapclient = new soapclient ('http://www.edelphi.com/scripts/KzAnyWho.exe/soap/IAnyWho'); $result=$soapclient-call ('AnyWho',$parameters,urn:AnyWhoIntf-IAnyWho,urn:AnyWhoIntf-IAnyWho#AnyWho); to connect to the webservice http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx I didn't find anything in the declaration satarting with urn; Regards. Laurent Drouet Thalis A. Kalfigopoulos To: Laurent Drouet [EMAIL PROTECTED] [EMAIL PROTECTED] cc: t.edu Subject: Re: [PHP] Web Services 26/06/02 17:23 You'll find sample code for both server and client in the README file of the package. I've written this client: html body ?php require_once('nusoap.php'); if(!empty($areacode) !empty($phonenum)){ $parameters = array('AreaCode'=$areacode,'PhoneNumber' =$phonenum); $soapclient = new soapclient ('http://www.edelphi.com/scripts/KzAnyWho.exe/soap/IAnyWho'); $result=$soapclient-call ('AnyWho',$parameters,urn:AnyWhoIntf-IAnyWho,urn:AnyWhoIntf-IAnyWho#AnyWho); echo(RESULTS for ($areacode) $phonenumbr\n); if(is_array($result)){ foreach($result as $key=$val){ echo($key - $valbr\n); } } } ? form action=?=$PHP_SELF? method=post table border=0 trtdPhone Number: tdinput name=areacode type=text size=3 maxlength=3 - input name=phonenum type=text size=7 maxlength =7br trtd colspan=2input type=submit value=Lookup /table /form /body /html It is a client for this service: http://www.edelphi.com/scripts/KzAnyWho.exe/ cheers, thalis On Wed, 26 Jun 2002, Laurent Drouet wrote: Do you have an URL of a web service and a PHP script from wich I can start my tests ? Regards Laurent Thalis A. Kalfigopoulos To: Laurent Drouet [EMAIL PROTECTED] [EMAIL PROTECTED] cc: [EMAIL PROTECTED] t.edu Subject: Re: [PHP] Web Services 26/06/02 17:10 I've used Dietrich's SOAP implementation for PHP and have been able to use only with specific type of webservices (soap:binding style=rpc... and soap:body use=encoded...). Unfortunately your service has style =document and use=literal, so I'm not sure about it. It can be found at: http://dietrich.ganx4.com/nusoap/index.php cheers, thalis On Wed, 26 Jun 2002, Laurent Drouet wrote: Hi the ML I would like to know if there is a way to request data from a web services for example http://glkev.net.innerhost.com/glkev_ws/Currencyws.asmx using php without java ? If yes do you have some examples ? regards Laurent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Microsoft Bug come back to haunt?
But when you save the file it keeps the filename so in my example if: $filename = newfile.xls; then if you click the save button ie saves it as newfile.xls but if you click open excel or word etc trys to open it was newfile.xls[1] and just cant find the cached file. Philip Hallstrom [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I've had luck making the url look something like... http://server/path/to/dl.php?filename=filename.tar or http://server/path/to/dl.php/filename.tar (works with apache) The latter seems to work better for me. On Wed, 26 Jun 2002, Francis wrote: Ok I posted a mail a couple of days ago about downloading files within PHP. Heres the code I'm using: Header(Content-Type: application/x-tar); Header(Content-Transfer-Encoding: binary); Header(File-Length: $fileSize); Header(Content-Disposition: attachment; filename=$filename); Anyway the problem is, that if you use IE6 click on the download it pops the box up, do you want to save or open it works ok if you click save put if you try open it doesnt open the file properly it adds [1] or [2] etc at the end of the filename. Now I know there was a bug with the attachment part of the Content-Disposition in IE5 but this was fixed with SP1. Is there any way of getting around this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Help with e-mail form with server-side written in php?
you should consider that not everybody has enabled JS. Always double check with php before you add data or send it via mail. Maybe some people just hit the send button without filling in anything. Andy -- http://www.globosapiens.net Global Travellers Network! Chris Hounsell [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I seem to be having an issue with an e-mail form that I have created for registration purposes with the server-side being written in PHP! I've tested the e-mail form using numerous browsers and operating systems including Microsoft, Netscape, Unix, and Linux! Everytime I test the form, it works just fine. I have even had other individuals located in different geographical locations register using my form and it works just fine. However, I do receive totally blank forms from time to time and I have no idea why. Even the javascript that I have written to fill in fields automatically such as a date field and a registration fee field are coming back blank. These are two fields that even the the user can't erase. The form is hosted on a unix server and everytime I test it, it works just fine. I've tested the form on a IIS server and an apache server and it works just fine. I just can't figure out why I get back some blank registration forms. Maybe it has something to do with the user's side! Any help or better direction for my message would be much appreciated! Thanks, Chris Hounsell -- - Chris Hounsell Memorial University Career Fair 2002 Co-ordinator Co-operative Education Services Centre, B1015 Memorial University of Newfoundland Telephone: (709) 737-4825 Fax: (709) 737-8960 E-mail: [EMAIL PROTECTED] Web: www.mun.ca/ccd/careerfair/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-DB] OSCON: anybody interested in my Oracle talk?
Hello, I m sure I will not be in OSCON, but if there is a possibily for you to go to International PHP Conf, you will make certainly a very good session there, not lost your job and certainly see me ;)). International PHP Conference 2002 call for papers : http://www.phpconference.de/2002/kt/input/ Calling for sessions : http://php.weblogs.com/ (certainly others sites with the call) hth pa -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: logging onto phpmyadmin
Hello Phil, you have to change the file config.inc (or similar name) and change your password there. Check the docu for phpmyadmin. Of course other people can access this webinterface as long as you give them the password and they have netaccess. you might want to give them different rights. This can be easily done with this programm. Again.. check the docs which come with it. Andy -- http://www.globosapiens.net Global Travellers Network! Phil Schwarzmann [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... now that I put a root password on mysql, I can no longer log onto phpmyadmin. It mentions something about the lib.inc file, it looks like I need to edit the file and add in my new username/password. But when I open lib.inc, it looks like a bunch of garbage on the screen, it's not normal text. What am I doing wrong. Also, I want to allow other users to connect to phpmyadmin from remote locations. Is there a way to do this or do I need to write a little PHP script that allows them to log on? Thanks!!! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] rar error in session management
Hi there, I have written an own session management. Workes fine, but recently after more people signed up there has appeared an error. In some cases when people submit reports the userID cant be filtered out of the database (there is a special table handliing the sessions) There session seems still to be valid, just the user id is lost. The session id is stored in a cookie and the cookie expires after the user is closing the browser. Session life time is handeled server site. It always works for me and the rest of the community. There are just a few folkes who are able to submit a report without their user id. Has anybody an idea how I can track this error? I tryed to reproduce it and did try it on several systems, but I have not been successfull so far. Thank you for any help on that, Andy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dynamically creating variable names
Hi, Can someone tell me if it's possible to create variable names from varaible names? I could work around this problem using some if/else statements, but I'm interested to see if there's another solution. I have 20 associative arrays all named compA, compB, compF, etc. The user supplies a string e.g. YB... // one of the 20 arrays $compY = array ( // Y Tyr Tyrosine H = 9 ,X = 2 ,C = 9 ,N = 1 ,O = 2 ,S = 0 ); $sequence = YB; $sequence = strtoupper ($sequence); for ($i = strlen($sequence)-1; $i = 0; $i--) { // create a temp variable called comp + $i // e.g. on first iteration access the array, $compB // and on the second, access $compY } Thanks very much in advance. - Best regards, Lee Reilly -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: dynamically creating variable names
No reply neccessary. A list minute search on google proved helpful... [http://216.239.35.100/search?q=cache:hLxGJH-pFeYC:www2.themanualpage.org/php/php_syntax.php3+PHP+dynamic+variable+nameshl=enie=UTF-8] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] dynamically creating variable names
I think so. Try using double dollar signs. $name = food; $$name = pizza; print $food; -Original Message- Can someone tell me if it's possible to create variable names from varaible names? This message is intended for the sole use of the individual and entity to whom it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended addressee, nor authorized to receive for the intended addressee, you are hereby notified that you may not use, copy, disclose or distribute to anyone the message or any information contained in the message. If you have received this message in error, please immediately advise the sender by reply email and delete the message. Thank you very much. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically creating variable names
On Wednesday, June 26, 2002, at 01:04 PM, Lee P Reilly wrote: Can someone tell me if it's possible to create variable names from varaible names? I could work around this problem using some if/else statements, but I'm interested to see if there's another solution. Just try it. for ($i = 0; $i 10; $i++) { $var{$i} = $i + 6; echo \$var$i == . $var$i . \n; } $var0 = 6 $var1 = 7 $var2 = 8 $var3 = 9 $var4 = 10 $var5 = 11 $var6 = 12 $var7 = 13 $var8 = 14 $var9 = 15 Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP does not work??
Hi! I downloaded the newer version of PHP and compiled it. The php is working great! But there is one problem. When I use the hyperlink, test.php?data=yes and I go to this page, test.php but there is no data in this variable, $data. So, the web page I have, most of them are all thrown off becuase of this. I use PHP version 4.2.1. Is there a bug in this PHP version??? Or some changes in PHP that I'm not aware of? Let me know! Thanks, Scott -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP does not work??
On Wednesday, June 26, 2002, at 01:20 PM, Scott Fletcher wrote: When I use the hyperlink, test.php?data=yes and I go to this page, test.php but there is no data in this variable, $data. So, the web page I have, most of them are all thrown off becuase of this. I use PHP version 4.2.1. Is there a bug in this PHP version??? Or some changes in PHP that I'm not aware of? Let me know! Use $_GET['data'], not $data. Or turn register_globals = on in your php.ini. Get to know your php.ini, and read the release notes for any software you upgrade -- this is mentioned in the PHP 4.1.x release notes if you want to read them for yourself. Erik Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP does not work??
[snip] When I use the hyperlink, test.php?data=yes and I go to this page, test.php but there is no data in this variable, $data. So, the web page I have, most of them are all thrown off becuase of this. I use PHP version 4.2.1. Is there a bug in this PHP version??? Or some changes in PHP that I'm not aware of? Let me know! [/snip] Did you RTF release notes? Did you search the list archives? Did you check to make sure that register_globals is 'ON'? Accck ;-( -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically creating variable names
Thanks for the replies. I'm still having a litte trouble though... Say I have an array called $compX, and given the letter 'X'... how can I access the variable $compX using these methods? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] dynamically creating variable names
http://www.php.net/manual/en/language.variables.variable.php On Wed, 26 Jun 2002, Lee P Reilly wrote: Thanks for the replies. I'm still having a litte trouble though... Say I have an array called $compX, and given the letter 'X'... how can I access the variable $compX using these methods? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] variable statements
Question: Variable variables and variable functions work great, but how can you execute arbitrary code statements using php code stored inside variables? // Example function stuff() { echo 'pStuff/p'; } // end stuff() $function = 'stuff'; $function(); // works /* Given the above, I would like and had expected the below to be interpreted by the parser and executed as if it were regular static php code. */ // Should interpret: stuff(); $lucid = stuff(); $lucid; // doesn't work, but doesn't show an error // Should interpret: if (1) { echo $function; } $lucid = if (1) { echo $function; }; $lucid; // doesn't work, but doesn't show an error Thanks for any help, Henning Sittler www.inscriber.com
[PHP] problem proccessing SSI...
Hi everyone... I keep getting an [an error occurred while processing this directive] in my shtml page when I try to use !--#include virtual=news.txt -- I tried all the path/url variants in vain. Anyone can help please? I have win2k/Apache/php4. thanks gabi... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Synchronize FTP sites with PHP?
We're using a FTP Control program here but it's very old and I'm wondering if anyone has used PHP to sync up FTP sites, to connect to a remote server and check if there is anything new... Not quite sure where to start with it though... Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] server security
Okay, so with the help of all you, I have successfully set up a php server with apache/mysql on windows 98. THANK YOU!! What else can I do to make this server secure? What is this SSL business all about? Any extra programs I should add that might help? Thanks!!
[PHP] PHP sockets/daemon problem
I'm trying to write a simple PHP script that communicates with a daemon running on the same server. Basically, the daemon just accepts an integer and returns an integer: [josh@jlevine-research josh]$ telnet 127.0.0.1 60324 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 9 25Connection closed by foreign host. When I try doing this with PHP, however, the output is 2[]5 (where [] == a small square symbol). Here is the script: ?php $fp = fsockopen(127.0.0.1, 60324, $errno, $errstr); if (!$fp) { echo ERROR: $errno - $errstrbr\n; } else { socket_set_blocking ($fp, 1); socket_set_timeout($fp, 200); fwrite($fp,9\n); $return = fread($fp,4); echo $return; fclose($fp); } ? I've tried various string format and type-casting functions with no results (usually just returns nothing after formatted). Any ideas? Thanks in advance, Josh Levine -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] problem proccessing SSI...
On Thursday 27 June 2002 01:35, The Gabster wrote: Hi everyone... I keep getting an [an error occurred while processing this directive] in my shtml page when I try to use !--#include virtual=news.txt -- I tried all the path/url variants in vain. Anyone can help please? I have win2k/Apache/php4. This looks like an apache issue and has nothing to do with php. -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Murder is always a mistake -- one should never do anything one cannot talk about after dinner. -- Oscar Wilde, The Picture of Dorian Gray */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] variable statements
On Thursday 27 June 2002 01:34, Henning Sittler wrote: Question: Variable variables and variable functions work great, but how can you execute arbitrary code statements using php code stored inside variables? eval() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Speak softly and own a big, mean Doberman. -- Dave Millman */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] server security
On Wednesday, June 26, 2002, at 01:33 PM, Phil Schwarzmann wrote: What else can I do to make this server secure? What is this SSL business all about? Any extra programs I should add that might help? Read this from beginning to end. Then you will know what questions you need to ask to make yours system more secure. http://www.w3.org/Security/Faq/ Erik Price Web Developer Temp Media Lab, H.H. Brown [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] variable statements
Perfect. Thank you Jason. Henning Sittler www.inscriber.com -Original Message- From: Jason Wong [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 26, 2002 1:44 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] variable statements On Thursday 27 June 2002 01:34, Henning Sittler wrote: Question: Variable variables and variable functions work great, but how can you execute arbitrary code statements using php code stored inside variables? eval() -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* Speak softly and own a big, mean Doberman. -- Dave Millman */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php