Re: [PHP] syntax error
On Monday 26 January 2004 07:37, John Taylor-Johnston wrote: Obviously, I'm screwing up my syntax trying to add 2003.php to the end. How should I express this line please :) ? ?php include (/home/users/q/qx04t9mu/www/glq2-test/calendars/+strtolower(date(F))+200 3.htm); ? replace the + symbols with . and also date(F) should be date('F'). If you really want to add 2003.php to the end then you should add it and not 2003.htm. -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] installing php onto xitami, HELP!
On Tuesday 28 October 2003 17:59, Paul Vinten wrote: when trying to access a php file, I just get a 'cannot find server' message from my browser. I don't have Windows or Xitami so I'm far from being an expert, but it sounds like Xitami is not actually running or you have a DNS lookup failure. If you are requesting the web page in the form http://127.0.0.1/myphpfile.php then I guess it must be the former. Can you access a plain html non-php file on the server? -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Going Mad
On Saturday 30 November 2002 5:31 pm, Chris Hewitt wrote: Andy wrote: ?php echo this is a php line; phpinfo(); ? and save it test.php when i look at it in explorer all i see the preceding html code. hat have i done wrong? I am using windows 2000 pro. It seems as though you have not added the AddType line for php in httpd.conf and restarted Apache. If your file is test.php then the .php must be part of the AddType line. ...or you are viewing the page as file://foo.php rather than http://localhost/foo.php Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Going Mad
On Saturday 30 November 2002 5:32 pm, Andy Davey wrote: Hi Phil It took me a while to get the local host to show the apache welcome screen, but now that I have I am still unable to see the page, I have the file saved on my desktop, should I have the test.php file saved anywhere else? I created the file in Dreamweaver MX, and saved it as test.php not sure if this can give you any clues? Andy There's your problem. Assuming you haven't messed about too much with the apache config, your php file needs to live inside apache's htdocs directory. Can't remember exactly where that would be on a windows box - something like c:/program files/apache group/apache/htdocs maybe. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Executing a file with rtf-extension
On Monday 12 August 2002 3:52 pm, Adam Voigt wrote: My guess would be that this is a browser issue, with the browser associating .rtf with a word doc (or Rich Text to be more accurate) and if this is the case, there's not much you can do except not name your PHP files .rtf. Since, each person who comes to your site will most likely have .rtf set as a Rich Text Document and will try and interpret it. There may be an issue about what the browser chooses to do with the .rtf extension, however if the web server was correctly configured, the php source of the .rtf file would not be sent by the server, but would have at least been interpreted by php, which would then have sent out the correct mime type header to give the browser a chance of interpreting the data as html. Maybe the iis script mapping configuration is being overridden somewhere in the tree by a child node? Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Antialiasing with GD..?
On Wednesday 12 December 2001 8:35 am, Jan Maska wrote: Hi, I have the following problem: Using the database, I create a graph like __.--._.--._/\.__ In order to keep exact colors and prevent a JPEG detail distortion, I use PNG format as output. This has one disadvantage: all lines are rough and I don't know how to antialias them. Can anyone help? I've never done this in PHP but clearly writing your own antialiased line drawing algorithm in PHP will most likely produce something which runs too slowly, so you need to do what you can in external libraries. I would draw the line into a bitmap which was exactly twice the size required and then scale the image back to the correct size when you've done with imagecopyresampled. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: PHP 4.1.0 released
On Tuesday 11 December 2001 10:22 am, Richard Black wrote: Um, excuse me for pointing out the obvious, but isn't that the 4.0.6 Windows binaries? And wasn't the question about the 4.1.0 Windows binaries??? The 4.1.0 Windows binaries, and the installer version thereof are currently under preparation and will be posted on the site ASAP. We'll make an announcement on the lists once they are there. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] : IIS server doesn't recognize PHP pages
Even if your code was duff, you wouldn't get the save as if IIS was correctly configured. Get your ISP to check that for your site, IIS has a scriptmap for .php mapped onto php.exe. If he needs more detailed instructions, they are in the online php manual at www.php.net or in the install.txt file supplied with the windows distribution of php. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Error with Netscape 6.2
On Wednesday 14 November 2001 5:10 pm, Michael Stearne wrote: That is not an error you get from a browser, that is an error generated by the server. Netscape or IE are just reporting that. Are you sure the app works in IE (try Shift+Refresh on IE and Shift+Reload on NS). It sounds like there is a problem in your code. ...or, if your platform is windows, php is not installed correctly or your web server is not configured correctly - in which case the install.txt file which comes with the windows distribution will help you out. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php.ini executable
On Sunday 28 October 2001 11:05 pm, jtjohnston wrote: Has anyone made a Windows executable to configure the php.ini? ... just asking, before I find myself doing it myself. The windows installer version of the php distribution configures php.ini, but only deals with the bare minimum settings to get the software working. -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Mirroring Website
On Wednesday 03 October 2001 5:21 am, Jon Shoberg wrote: Nope, teh pages are actually hosted on a (gasp ...) NT machine. I need something that will suck down and write out a pure static .html mirror of an ASP/PHP driven website. WGET will surely mirror everything but not re-structure the internal links within the pages. Might be time to write my own ... Try httrack - think there are versions for multiple platforms. I've used the windows version to great effect. http://httrack.free.fr -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PWS
On Tuesday 28 August 2001 3:27 pm, frank clarke wrote: I have installed PHP CGI 4.0 on my Win 98 machine with PWS and tried this script that I put in the wwwroot directory and called test.php3:... If you view source on the blank page you get, do you see your php sourcecode? If so, maybe it's just that you have not configured the web server to map .php3 extensions. The installer defaults to only mapping .php although you can explicitly enable the deprecated .php and .phtml extensions for backward compatibility if you want. Post again if that's not the problem. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!
On Thursday 16 August 2001 7:35 pm, Elias Santiago wrote: I believe that IIS passes the script name to php.exe with the first %s. I think IIS replaces the first %s with the script name. From the second article, I suppose that if the %s is changed to %S, the name passed to php.exe would be UPPERCASE. Can anyone verify this? I can't verify that, but I can verify that I've had php running without any trouble at all ever on about a dozen NT4 boxes without %s %s anywhere in site without any problems at all :) Maybe the default behaviour of IIS (since it is the sensible behaviour) is to pass the script name to the exe it calls. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: [PHP-WIN] Installation failed ! Please Help!
On Thursday 16 August 2001 4:45 pm, Powell, Jim (EER) wrote: Second, make the application extensions point to php.exe (you don't need the %s %s stuff). This I have to disagree with. Without the %s %s, you are rolling dice as to whether the page will work or not. I never had this problem with Apache under win32, but I have with IIS. I would definitely leave them in there. I'll have to strongly disagree with your disagreement ;) -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] bizarre problems with php_gd.dll and IIS
Usually when PHP brings other IIS services down it is because you are running the ISAPI module version of PHP rather than the CGI. If this is the case, you need to switch to using php.exe. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] [PHP-WIN] Re: installation on windows
On Tuesday 14 August 2001 19:23, Phil Driscoll wrote: as long as phpts.dll is in the same directory as the main php executable or but should have written as long as php4ts.dll is in the same directory as the main php executable or Sorry! -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] [PHP-WIN] Re: installation on windows
I agree with Angie's sentiments. There is no need at all to put the dlls in your system directory (although php will still work if you do) as long as phpts.dll is in the same directory as the main php executable or dll. This means php.exe for cgi, php4apache.dll for Apache module etc. I think that working this way vastly reduces the chances of 'old' php files messing up an installation. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Simple question (what's ISAPI ?)
On Monday 13 August 2001 08:46, Tribun wrote: Hi folks. Can someone tell me what ISAPI is? It's microsoft's API for running software in IIS. I've requested how I could run PHP faster, if 20 USER's access my files at the same time. Using ISAPI means that php stays alive while the server is alive, so there is no overhead in starting and closing down php.exe on each request. There is a perfomance benefit, although once the script is actually going the speed is the same. i.e. the speed benefit is a fixed amount of time per script. This means you'll notice the speedup much more on shorter scripts. Now the bad news. The PHP ISAPI module is not very stable. For me, it won't work for more than a couple of requests without falling over. Others report more success. If you want the speed benefit of a server API version, plus stability, change from IIS to Apache and run the Apache module version of PHP. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI error
On Thursday 09 August 2001 17:21, [EMAIL PROTECTED] wrote: After install PHP when I try to open in a URL the address: http://casa/IISSamples/Default/exemplo.php I receive the following error: Error 403 of HTTP 403.1 Forbided: forbided execution access First experiment: Put a file called test.htm in the same directory which contains any old html. Try to access that as http://casa/IISSamples/Default/test.htm If that works OK, then the configuration of pws is wrong. I don't have PWS so I'm not sure of the user interface to configuring it, although if you installed php using the 'Installer' distribution, it will have configured PWS correctly. Sometimes, PWS seems to get itself into a strage state where you can't get it to work no matter what you try. Some people have had success after reinstalling PWS. Others just dump it and use Xitami or Apache. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI error
On Thursday 09 August 2001 07:47, karthik wrote: Hi, I am running PHP 4.06 on Windows 2000 with IIS 5. I am running PHP in CGI mode. I seem to be getting CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Why is this error happening ? Read, and follow the instructions on this matter as documented towards the end of the install.txt file which came with your distribution. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI error
On Thursday 09 August 2001 09:46, karthik wrote: Hi, In install.txt there seems to be settings on how to install under various web servers. Well what about this bit: You have installed PHP, but when try to access a php script file via your browser, you get the error: cgi error: The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: This error message means that php failed to output anything at all. From the command line hange to the directory containing php.exe. Run php.exe -i If php has any problems running, then a suitable error message will be displayed which will give you a clue as to what needs to be done next. If you get a screen full of html codes (the output of the phpinfo() function) then php is working ok. Once php is working at the command line, try accessing the php script via the browser again. If it still fails then it could be one of the following: file permissions on your php script, php.exe, php4ts.dll, php.ini or any php extensions you are trying to load are such that the anonymous internet user ISUR_machinename cannot access them. The script file does not exist (or possibly isn't where you think it is relative to your web root directory). Note that for IIS you can trap this error by ticking the 'check file exists' box when setting up the script mappings in the Internet Services Manager. If a script file does not exist then the server will return a 404 error instead. There is also the additional benefit that IIS will do any authentication required for you based on the NTLanMan permissions on your script file. -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] warnings in php4
On Wednesday 01 August 2001 09:21, Chris Fry wrote: Just set warnings to off in your php.ini - it's on by default NO NO NO! On your development machine, set your warning levels to E_ALL in php.ini, and then fix your code! Every warning message you get represents an opportunity for a malicious user to find a secutiry hole in your code. As a general and safe rul, any code which reports warnings when error reporting is set to E_ALL is just not good enough! This may mean a lot of work, but it will probably be less than the work involved in fixing up your system after it has been compromised. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] warnings in php4
On Wednesday 01 August 2001 13:29, Phil Driscoll wrote: Every warning message you get represents an opportunity for a malicious user to find a secutiry hole in your code. Oops - I meant to say 'security hole' - I wish both my hands would type at the same speed :) -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Trying to avoid code exploits..
Is this staement safe ? eval('$a = $GLOBALS[pass1]==$GLOBALS[pass2]'); Maybe I'm missing the point, but why not just go: $a = $GLOBALS[pass1]==$GLOBALS[pass2]; -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Trying to avoid code exploits..
On Wednesday 01 August 2001 13:51, Meir Kriheli wrote: I'm writing a form class which can also validate the form and I want to define the rules for validating the forms, so when defining the form I can add... Sorry - I should have read your earlier post :) I suspect that you are probably safe in this instance, however I always play safe on this kind of thing and sacrifice functionality for security. I'm sure you can devise rules which will be be obviously unsafe, but you may also be able to devise rules which look safe on the surface, but may be exploitable after careful study. If it was my project, I think I would devise a system which avoided the use of eval - even if it meant losing some performance and versatility. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Workaround for binary arithmatic
Use the gmp extension. -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Workaround for binary arithmatic
On Tuesday 31 July 2001 15:26, Richard Ellerbrock wrote: I thought about that but that would require almost everybody using my app (OpenSource) requiring a rebuild of php. This would really detract from its usefulness. -- Richard Ellerbrock [EMAIL PROTECTED] Phil Driscoll [EMAIL PROTECTED] 2001/07/31 04:02:50 Use the gmp extension. Ok - then the only other solution I could think of (and for me it was easier just to build php with gmp) was to split all your integers up into 16 bit chunks and do the maths longhand on the 16 bit integers. That way, you'll avoid the top bit set problem. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Attitude of B van Ouwerkerk
I've just looked at his emails for the last week, and he is a helpful guy! Not only is he helpful, I'll wager he's being helpful in a language that's not his native tongue, so it's utterly unreasonable to expect the subtle 'gentle' idioms that you might get from a native speaker who had plenty of time to construct an email, and plenty of patience for someone who should have RTFM. I say, be grateful he is sparing some time to contribute! -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] character conversion - horrible characters from MS Word
One of my applications is being heavily used by people who are cutting and pasting text from MS word into text areas within a form. I dutifully store what they send, and display it later using htmlentities and nl2br to sort out funny characters. Sadly, quite a few oddballs for which there are no html entity equivalents sneak through the system - for example the different width dashes at chr 150 and 151. Does anyone have a comprehensive system for catching such characters, or at least a suitable character mapping so I don't have to do the research to get an exhaustive list :) Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Find and Replace
On Monday 30 July 2001 20:14, [EMAIL PROTECTED] wrote: It's also possible (if you're allowed to change the httpd.conf file) to put in a filesmatch directive, something like FilesMatch \.(htaccess|inc|log)$ Order deny,allow Deny from all /FilesMatch This is also by far the safest technique (other than moving the included files outside your webroot), as it means there is no chance of an included file being parsed without it's normal surrounding code which may provide a security hole in your system. Do it this way -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP_SELF
On Monday 30 July 2001 23:39, Erik H. Mathy wrote: W...besides your everyday, run of the mill geek who hates Javascript pop-ups, who really disables JavaScript? 95% of the users out there don't ever touch the default browser settings. Also, the Javascript 1.0 has been around since, what, Netscape 2? It's all you really need for form validation. Even IE3 supports it pretty well. All the version 5 and 6 browsers support it, and that's 90% + of the market. The biggest issue is the AOL browser, which is rather finicky. It can be done, though. It's all a matter of opinion I guess. :) I don't agree. It's a matter of security. Whatever fancy javascript validation you do client side, you MUST validate everything server side as though you'd done no client validation, since you can't guarantee that your script is being called with sanitised data from on of your own pages. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php3 extension
On Tuesday 24 July 2001 15:53, Phil Spitler wrote: Can anyone tell me how to turn on .php3 extensions in PHP on Win2000? I've looked in the php.ini file and can't seem to find it. In the internet services manager (or whatever it's called in W2K) add a script mapping for .php3 which is the same as the entry you currently have for .php. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI error
On Tuesday 24 July 2001 20:44, Phil Spitler wrote: There must be some sort of bug with IIS and PHP. Everything was set up correctly and I was pointing to the correct the correct path for the cgi .exe file. However it didn't start working for me until checking Check that file exists in the App Mappings. This fixed the problem after HOURS of troubleshooting. I don't think there's a bug here. Ticking that box does two important things. Firstly it stops the 'the specified CGI application misbehaved by not returning a complete set of headers' error message which is often caused by php not finding the script you specified because it is not there. IIS checks whether the script file exists, and if it doesn't, it sends a 404 error rather than running php. Secondly, when it checks the file and finds that the web server does not have permission to read it, it sends authentication headers (or does all that NT authentication unpleasantness if you have it enabled) in order to attempt to get sufficient permission to read the file. Basically, this is just the way IIS works. You'd get exactly the same results with any other cgi script interpreter. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] 4.06 install problem
On Tuesday 24 July 2001 21:10, Jerry Lake wrote: I just tried installing PHP 4.06 for PWS with the installshield installer. I didn't seem to work however. I am getting a 500 Internal server error everytime I try to load a php file. Has anyone else had this problem ? are there any quick remedies ? There are some tips on what to do near the bottom of install.txt Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] CGI error
On Tuesday 24 July 2001 21:34, Phil Spitler wrote: I hear what you are saying. I just don't understand why if php.exe is where I was telling it and permissions were all set up correctly, why it started working after that was checked. I did nothing else but check it and if I understand what you are telling me, it should've given me a 404 error. No - if you didn't get a 404 error then the file was there, but maybe the browser did a secret handshake with IIS to give it permission to load the file. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] String Comparison
On Tuesday 24 July 2001 23:59, Jason Bell wrote: if (image/pjpeg == $type) { print Type is JPG; }; you need to put image/jpeg in quotes. Ideally you would also do a safer string comparison than == eg if(!strcmp('image/jpeg',$type)) -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Strong typing?
On Friday 13 July 2001 01:27, Dr. Evil wrote: If you're doing financial stuff, or anything else that requires bullet-proof security and reliability, strong typing is essential, I would have said that good programming was essential rather than strong typing. If you insist on strong typing, then PHP is not the language for you! -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Security of PHP code
Surely the lesson here is to NEVER NEVER NEVER write PHP code which accepts a filename of any kind as one of its arguments. Yes, it will make some of your code a bit less versatile and more long winded, but you can bet your bottom dollar that someone can find a crafty way around whatever syntax checking you do. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installation PHP on W2K and Apache
On Monday 02 July 2001 18:25, [EMAIL PROTECTED] wrote: Hi, I'am trying to install PHP406 under W2K and Apache132 web server. The installation of Apache was successfull and it works. About PHP I'am trying to install the CGI version but even the installation finishes ok, the PHP looks not working becouse nothing happen when I load some PHP file. I need your help, I spend some time on these and I can not do PHP works. Can you show us the changes you made to your httpd.conf file? -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP crashing IIS 5 on Wnidows 2K
On Tuesday 26 June 2001 21:35, Jason Lustig wrote: I have PHP 4.04pl1 set up on a IIS 5 server on Windows 2k. However, it keeps on crashing the server -- not all the time, but sometimes it does, sometimes it doesn't. And I have no idea whatsoever what is causing it. I *think* that it has to do with my include()s. I end up including all my function and nav libraries into each and every page, which turns out to maybe 10 includes. Theoretically, yes, it would put a hit on the server because PHP uses the file system so much, but it shouldn't crash it. Is this possibly the reason it is crashing? Assuming that you are using the ISAPI version of PHP, it is probably crashing because that version of PHP is not very stable. You should upgrade to 4.0.6 which contains improvements in that area, but it is still not perfect. If you find 4.0.6 unstable either change from ISAPI to CGI or if you can, change from IIS to Apache and use the Apache module version of PHP. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Authentication
If you run PHP as a CGI, or as an ISAPI module *without* installing the ISAPI filter, then IIS will have already dealt with everything to do with headers before PHP gets a look in. Installing PHP in the ISAPI filters list allows it to get at the headers and do authentication, however you may have serious problems with the stability of the ISAPI module version of PHP. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Authentication
On Tuesday 26 June 2001 11:24, Brave Cobra wrote: So, people, when using PHP authentication, please use a Linux box!!! The windows version doesn't really work (at all). ...or the Apache module on NT. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] converting Word documents to something sensible
Thanks to all who replied. I've downloaded all the likely candidates and will have a play with them and report back. So far I've had very good results with wvHtml which has coped admirably with all the word docs I have to hand. If anyone else has already evaluated any of the converters I (and I'm sure others on the list) would be grateful to hear your results. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] converting Word documents to something sensible
I have to build a web site for a local government education authority in the UK which will allow them to make available a large range of documents to schools. They INSIST on submitting documents in Word format. I think it is immoral to make the schools have to accept documents in that format so I am determined to translate them to something sensible (html, rtf or pdf will do) at the server. The server is a Linux box so there's no opportunity to play any tricks with COM. Has anyone come across any tools to do this, using php or otherwise? Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] converting Word documents to something sensible
On Sunday 24 June 2001 15:06, Duncan Hill wrote: Google reveals http://www.logictran.com/ They seem to have an RTF to html utility which will run on multiple platforms, but the thing that converts word documents directly requires a copy of Word on the server :-( Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] converting Word documents to something sensible
On Sunday 24 June 2001 16:32, Justin Farnsworth wrote: Try the latest AbiWord... I've just installed it, but I can't find any obvious way to invoke it at the command line to load a Word file and save out html or rtf. Am I missing something? Also, when I tested the software via its gui and load a Word file from the project I'm working on, the software crashed and exited with a load of panic messages :( Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] what's the diff between if($var1) and if(isset($var1)) and if(!empty($var1))???
On Tuesday 22 May 2001 08:30, Rasmus Lerdorf wrote: if(!empty($var1)) is true if $var1 is set to anything except a null-string I think this should be if(!empty($var1)) is true if $var1 is set to anything except a null string, 0 or the string '0' It would be great, unless I've missed the point somewhere along the line, if empty treated '0' (string) as not empty, then the function could be used for checking user input where the string '0' is perfectly valid. In thousands of lines of PHP code I haven't been able to use empty() once - I always end up going if(isset($var) strcmp($var,''))... Just a dream :) -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] php on PWS
On Tuesday 15 May 2001 16:18, Matt Davis wrote: I am trying to install PHP 4.05 CGI onto my WIN 98 machine which is running PWS once have followed all the instructions but when I try to run a php script I get a HTTP 500 error. I have checked that my registry entry is pointing to the right place. Does anybody have any ideas how to fix this. From the commandline change to the directory containing php.exe and run php.exe -i An error message will tell you what's wrong, a screen ful of html will tell you that PHP is ok, but your PWS configuration is not. If the latter, you can double check the registry settings, try to reinstall PWS, or better yet, install Apache or Xitami. Cheers -- Phil Driscoll -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Re: Reliability of Window-version of PHP
I'm planning to use PHP for Windows on Windows 2000 Advanced Server as CGI. Wondering if Php on Windows is stable/robust enough for a 1 million hits per month site ? Yes it is. Assuming everything is well set up and the crackers don't have a go at your machine you should have no worries on the stability/robustness front. Depending on the complexity of your scripts, you may have some performance issues at times of peak load. Suck it and see if you can. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] bulletin board or forum
www.phorum.org -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Installing PHP 4.0.5 on win 2000 Professional
I have installed everything, but PHP icon or program group never appear. Can we use PHP to develop using Windows o/s or not. When I run php.exe in /php/ it just hangs in DOS mode. PHP is something that plugs into the web server - it's not the sort of thing that gets entered in your start menu. When you run php.exe it runs in interactive mode - hence the apparent hang - it is waiting for you to type some input, although this is not how you would normally drive php. Have you configured IIS as per the installation instructions (or if you used the installer did you tell it to configure IIS for you)? If so, create a file called test.php containing ?php phpinfo(); ? and save it into your web root directory (usually C:\inetpub\wwwroot then from your browser go to http://localhost/test.php and you should be up and running. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP on PWS not working!
What is going wrong is that you are using the ISAPI version of PHP and it is quite unstable on anything lower than W2K. It manifests itself in the server 500 errors you describe and, because it kills bits of the server, ASP dies as well. Just change to the cgi installation and all should become good. If you are using ASP then I think that moving to Xitami is not an option (someone correct me if I'm wrong with that guess). In the same vein, IIS only runs on NT server and W2K so that may not be an option - and in any case that would fall over with the ISAPI module as well. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP on PWS not working!
I dont' have PWS so I#m guessing, but you probably have to remove the PHP ISAPI module from the list of installed ISAPI filters (you do have to do this on IIS so I assume PWS is the same). No idea where the user interface to this might be found though. Failing all else, deleting php4isapi.dll and rebooting will ensure that the module is no longer loaded in the filters list, and as long as PWS still starts then you are on to a winner! Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] ISAPI
As it says in the installation notes, the ISAPI module is not ready for production use - and what you are witnessing is its favourite trick! If you are an IIS wizard and are able to investigate why it goes wrong, your input would be most welcome! Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HELP!! PHP not working Suddenly!!!
If you were replacing an earlier version of php, your registry should already have contained the correct stuff - did you change anything? What does ka-BOom actually mean in terms of error messages etc? From the command line, change to the folder containing php.exe, type php.exe -i and see if you get a page full of html - the output of phpinfo() - or some error messages. If you get the html, then php is working fine but your PWS configuration is not. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP as MODULE CGI Version of PHP
There is an ISAPI module version of PHP but it is very creaky on anything less than Windows 2K, however if you are prepared to change from PWS to Apache, the PHP module for that server API is much more robust. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] About last release
I have PHP 4.0.4 on Win98, PWS PC and I would like to install 4.0.5 but is only for CGI ? I installed PHP 4.0.4 with an exe file...I didn't nothing..only double-click.. I need that file again but with PHP 4.0.5 version..Thanks !!! The installer version you used when you installed 4.0.4 installed the cgi version - the 4.0.5 on does exactly the same. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Loading PHP module on Win98
I downloaded the distribution from www.php.net, so it's from the same distribution but it doesn't work. What should I do? Try again with 4.0.5 when once the binary zip appears on the downloads page. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Loading PHP module on Win98
The dbase module you are trying to install does not match the version of php. If you get the extension from the same distribution as the php modules then it should work. You can get the full distribution zip for 4.0.4pl1 from the downloads page at www.php.net at the moment. You may be able to get 4.0.5 later today if all goes to plan. Cheers PS When you do get it working you still may have problems since you have configured PWS to use the ISAPI module which you may find to be pretty unstable. I would advise use of the CGI version of PHP if things are a bit flakey. -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SVG PHP
I don't know of anything specifically - all the existing java stuff we've played with is very big and very slow. One possible solution might be to write a wrapper for the Adobe SVG browser plugin - it would be a reasonable amount of work though, and of course the plugin would have to be available for your server platform - which it probably isn't if your server is powerful enough for the job :) Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
When I did the windows installer there was some talk of defaulting to install in 'Program files' (I think Zeev suggested it), but there was a significant body of opinion which thought that there would be problems at least with parts of php with respect to the space in the filename. I just listened to the opinion and chickened out defaulting the installation to C:\php (easily overridden by the user). I never did any tests on the space issue, but it may be worth considering here before coming to a conclusion. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re[3]: [PHP-CVS] cvs: php4 /main config.w32.h php_ini.c
If there are we are better off finding them and fixing them instead of Agreed. However the 'Program files' folder is the standard place where applications that the user runs live. Web scripting things seem to live (at least on NT) in SYSTEMROOT\system32\inetsrv - which is more unpleasant than in C:\ IMHO. I don't care too much where things go as long as it works, but certainly, if we want to make things easier for users, we should bear in mind that all the IIS/PWS management tools default to looking in SYSTEMROOT\system32\inetsrv for things when configuring scriptmapping. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Building as an Apache module
Download the larger Windows binary zip from the php downloads page - that includes the Apache module. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Associative arrays in strings
echo Here is a $string, {$myArray[joe]} with $alot of PHP $variables; -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Security
I'd like to know if there is any vulnerability with PHP 4.0.4 pl1 running on IIS servers. None that I'm aware of that are due to php, unless you write silly scripts which allow access to things they shouldn't. There are probably uncountable NT vulnerabilities though. One which recently frightened me was that if you append +.htr to a requested URL (eg www.mydomain.com/myphpfile.php - or indeed myaspfile.asp) on a standard setup you get the script source complete with any passwords you were unwise enough to put in there. Easily fixed by removing the .htr script mapping in the internet service manager, but frightening to find out you've been running your servers for several years whilst unaware of the problem. Cheer -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] temp file help
Instead of: header("Content-disposition: filename=backup.csv"); try header('Content-Disposition: attachment; filename=backup.csv'); Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How do i include ASP script into PHP...??!
Richard wrote: ASP is a pathetic framwork. So it's a good idea to give people ways of migrating from it to PHP :) -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Big sites running PHP
For those who need to convince their bosses that PHP (+mysql +apache) is up to the job, the following (recently slashdotted) link may be useful: http://www.webtechniques.com/archives/2001/05/hong/ Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] strange error
It may not be responsible for the error, but you ought to move your fclose to before your return(true) statement, as it never gets executed at all in your code. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] install question:php and mysql on win NT 4
Except that I get this error: open(/tmp\sess_fdf19ffc4a1192dd55183d067fc765fd, O_RDWR) failed: m (2) in Looks like your session.save_path is set incorrectly - set it to a sensible windows path (eg C:\php\session or similar) Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] windows 2000 install
There are two stages here. Getting PHP installed and working and getting IIS configured. To tackle the first should be easy. If php.exe and phpts.dll are in the same directory as each other (say C:\php) and php.ini is in the WINNT folder AND you haven't done anything silly in php.ini, then PHP should work. Test by opening a command window, changing directory to C:\php and typing php.exe -i. A screenful of html tells you php is working. Alternatively, an error message might tell you what's wrong. If that works, run the Internet service manager and check that for the web site you are playing with, the .php file extension is mapped onto the php.exe. Run a .php file containing just ?php phpinfo();? from your web browser on localhost. If that works, great. If not, tell us exactly what happens. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] String in a string
try preg_match A bit of a big hammer for cracking nuts. strstr and stristr will tax your server much more lightly, and, no doubt, do the job quicker as well. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Cobalt RaQ XTR(slightly OT)
I have a number of php4/mysql sites running from various NT boxes. I have the opportunity to move a lot of stuff across from one of the NT boxes onto a new Cobalt RaQ XTR. This job will have to be done in a hurry. If anyone can prewarn me of any problems, or better still, tell me it will all run like a dream, I'd be most grateful. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] file deletions ....
Steve unlink works fine for me (on my nt boxes) providing the anonymous web user has permission to delete the files. Note that under IIS and possibly PWS, the damn server keeps files open for a few minutes after it has served them up, and consequently nobody can delete or modify the files during this period. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Using php4.02 on IIS5
I guess you have installed the ISAPI module which, as stated in the instructions, is not very stable. Switch to the cgi version and all will come good. Change php4isapi.dll to php.exe in your script mappings, and remove phpp from the filters list. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Benchmarks
Posted in a discussion on Slashdot today was a this link: http://www.perlmonth.com/features/benchmarks/benchmarks.html?issue=4id=9351 4159 A performance comparison of various web scripting languages. PHP does rather well! Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] switch with multiple case
Same as C switch($something) { case "this": do that;break; case "those":case "them": do other; break ... default: print error } Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] SOS !
A few people seem to have this PWS problem - and the only cure seems to be to reinstall PWS. The symptoms seem to be something like PWS is ignoring the scriptmap directive and no end of fiddling around with the registry will make it behave. You could always ditch PWS and use Xitami if you have a simple setup, or Apache if your needs are more complex. Either way you'll have less bother than with PWS. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Multiple Inserts
The trick here is to do some debugging :) Firstly make sure that your error reporting level is set to E_ALL in php.ini - then you've got some chance of seeing error and warning messages. Secondly, while there are probably loads of ways of doing what you are trying to do, all the correct ones will check the return value from ALL the mysql calls. The mysql functions return 0 if something went wrong. There's absolutely no point carrying on to the next stage since when you pass the 0 into the next stage it will just complain (if your error reporting level is set high enough) - it simply can't do the next bit with a connection or result handle of 0. So, for each mysql call do something like: $Thingy = mysql_whatnot(blah) or die('it went wrong doing whatnot, mysql says '.mysql_error()); and if that doesn't give you the clue you need (which it will 99% of the time, echo out the SQL statement and see if that looks silly in any way. Good luck. -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -Original Message- From: [EMAIL PROTECTED] [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, March 09, 2001 12:31 PM Subject: [PHP] Multiple Inserts Hi, I am trying to do some multiple inserts using the following code but it doesn`t seem to work, it inserts the first one but then the second is inserted as blank. Where the value being passed is $Emails="[EMAIL PROTECTED], [EMAIL PROTECTED]"; ? // Get Login info require("blah..."); // Connect to MySQL $connection=mysql_connect($host, $user, $pass); // Format the Emails $Emails1=str_replace(" ","",$Emails); $GetEmails=explode(",",$Emails1); // Insert into Members Database for =0;$acount($GetEmails);$a++){ $SQLStatement = "INSERT INTO Members (Email) VALUES ('".$GetEmails[$a] ."')" or die ("Problem"); $db = mysql_select_db($dbase, $connection); $SQLResult = mysql_query($SQLState ment); } ? Anyone know what might be going wrong, or perhaps I have the wrong method? Thanks Ade -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] [A bit OT but not] Anchors and Query strings
The # goes at the end of the URL after the query string stuff. Once there, it should be easy to strip off the joe by looking for the last # in the string (not that there will be more than 1!). Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Please Help!!!! - Really BASIC stuff!
There are loads of different ways to spit out a text file. The easiest is readfile($Filename) which does exactly what you want, providing that the file already contains sanitised html (eg br instead of newlines etc. If not, you could use fread to get the file contents into a variable and then process them as you wish (eg with nl2br etc). No doubt, you will be told another hundred ways to do it as well :) Cheers PS Interesting postal address - I frequent the Beeswing pub on Hull Rd every Thursday evening with members of the old car club I'm in! -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Problems with IIS4 (Win2k)
Yeah after a net stop and net start I've got the cgi version working, but I still can't seem to get the PHP isapi module up. This could be a permissions issue on any of the php files (php4ts.dll, php4isapi.dll, php.ini or any extension dlls enabled in php.ini). For test purposes, if you give full control for everyone for these files and it starts to work, then it was a permissions problem. What functionality is missing from the CGI version besides http-auth? can it handle uploads? I think that all you miss is some performance and the ability to get at the headers before IIS has already acted on them. This affects authentication and probably some other stuff as well. You will probably also find that the CGI version is much more reliable than the ISAPI module. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP and SVG
Even though the WC3 hasn't fully finalized the spec for SVG, it's still a viable option for doing some dynamic graphics work using the Adobe plugin. Has anybody been messing around with generating dynamic SVG code with PHP? I haven't done so yet but it's certainly on my 'to do' list. We do a simple drawing program for schools which exports SVG, and I had toyed with the idea of generating an SVG extension module for PHP, however I couldn't dream up many functions which you couldn't easily implement in php itself. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] File upload problem on IIS/NT4
Make sure that upload_tmp_dir in your php.ini file is set to something sensible for a windows machine. I have it set to f:\php\temp (and you also need to make sure that the directory specified actually exists). Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to transfer 2.2864849511949E+190 to a normal-human-readable number?
You are working with VERY large numbers here. I would have said that the number is as good as you'll get in terms of human readability unless you want to see nearly 200 zeroes on the screen. That said, I'm not sure how much use such large numbers will be to you, as when represented as floating point, the inaccuracies are phenomenal - you can't really expect to do any useful calculations with the numbers, and you're not too far away from banging into numeric overflows. It would be interesting to know what you are doing! Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] How to transfer 2.2864849511949E+190 to a normal-human-readable number?
Well, the numbers are a bit silly for doing this sort of thing, but the seg fault is clearly a bug! Can you report it please. (bugs.php.net) Thanks -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -Original Message- From: Ben Peter [EMAIL PROTECTED] To: [EMAIL PROTECTED] [EMAIL PROTECTED]; [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, February 16, 2001 12:34 PM Subject: Re: [PHP] How to transfer "2.2864849511949E+190" to a normal-human-readable number? Hi, have to correct that (thanks to Adam Whitehead for pointing out). It should be %f instead of %d. However: '? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%f\n", $foo) ?' | php -q 2286484951194899000 Segmentation fault (core dumped) [ben@home ben]$ This is PHP4.0.4pl1 Ben Ben Peter wrote: Hi, I tried ? $foo = 2.2864849511949E+190; settype($foo,"double"); printf("%d\n", $foo) ? which gave me -2147483648 echo $foo gives 2.2864849511949E+190 - This looks like the number is too large for printf (the 'human readable form' printed by printf is abviously wrong). Does anybody know such of limits to sprintf? Ben SED wrote: Hi, I'm multiplying floating numbers: $result = $foo * $boo; and the result is like this: echo "$result"; And the result is like this: 2.2864849511949E+190 How can I transfer this to normal-human-readable number? Regards, Sumarlidi Einar Dadason SED - Graphic Design -- Phone: (+354) 4615501 Mobile: (+354) 8960376 Fax: (+354) 4615503 E-mail: [EMAIL PROTECTED] Homepage:www.sed.is - New Homepage! -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /sapi/isapi php4isapi.c
-Original Message- From: Zeev Suraski [EMAIL PROTECTED] To: Ben Mansell [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, February 16, 2001 4:49 PM Subject: Re: [PHP-CVS] cvs: php4 /sapi/isapi php4isapi.c Woops :) At 18:01 16/2/2001, Ben Mansell wrote: joostersFri Feb 16 08:01:35 2001 EDT Modified files: /php4/sapi/isapiphp4isapi.c Log: Fixed non-threadsafe code: 'isapi_special_server_variables' was a static buffer, and not allocated per-connection. Bad bad bad! I'm up to my eyeballs in another job at the moment, but if anyone has brewed up a windows binary with this fix in, I'd be happy (even delighted if it works!) to spend 10 minutes testing it on my NT4 box as I have never been able to get the ISAPI module to work reliably on it. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-CVS] cvs: php4 /sapi/isapi php4isapi.c
That's probably not what you were having trouble with, because this entire piece of code didn't really exist until recently... Drat :) -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PWS PHP
How can i make my web server PWS parse html file into PHP? cause it shows nothing when i include php in an html file.However it works when i put it in a php file ! You need to edit your registry (using regedit or a .reg file based on the one shown here). [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\w3svc\parameters\Scrip t Map] ".html"="[PUT PATH HERE]\\php.exe" The registry entry will be the same as the .php one you already have, but will be called .html Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PWS PHP
I think that the registry key you are playing with here just sets what happens when a file is opened (e.g. by double clicking on it). It should have no effect on how PWS deals with the file. You should restore that to it's original setting. When you have had .php files working, I assume that you were accessing them as something like http://localhost/myfile.php With the PWS scriptmap key set for .html, are you saying that accessing a file http://localhost/myfile.html just returns you the unparsed raw php stored in myfile.html Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PWS PHP
First Thanks ! well yes when i call http://localhost/myfile.html it skips the php syntaxes it shows wht is only in the html tags! Can you check that a view source shows all your php code. What OS are you running - 9x or NT WS? Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] OOP in web development
I don't want to start an OOP flame thread here, so I'll shut up after this posting - it's just that nobody is speaking up for not using OOP :) The point needs to be made that code reuse, readability and maintainability do not come from whether or not you choose to use OOP techniques. They come from a combination of careful thought, planning, skill and experience. In almost all cases, whatever you write will be executed by a microprocessor that knows nothing of OOP, but just plods through a sequence of instructions, occasionally shooting off to execute a subroutine or two. What this shows is that whatever fine OOP constructs you devise they can be represented in the plain old procedural world. I'm pretty sure that most of the OOP tricks PHP does are done by pretending that things are objects but really they are arrays, and as you might expect, the procedural way to implement the same functionality is to use arrays! Mark's example comparing: create_table($data,"nowrap","black",null,"white",null,null,null,"Tahoma",12, null,null,null,array(array("bold"))); with: $t = new Table; $t-options = "nowrap"; $t-heading["bgcolor"] = "black"; $t-heading["fontcolor"] = "white"; $t-global["font"] = "tahoma"; $t-global["fontsize"] = 12; $t-column["total"]["format"] = "bold"; could more fairly have used something like: $t=create_table(); $t['options'] = "nowrap"; $t['heading']['bgcolor']= "black"; etc. As you can see, there is hardly any difference at all. My point is really that you can use whatever technique you want, but you can get your code reuse, readability and maintainability from either. As you might have guessed, I favour procedural as I feel that more of the code is visible and in my control. YMMV -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] intput type=\file\ .....
I am trying to get the value for a file input field to have a starting value I can't seem to get it to work when using Value=\"C:\test.gif\" does anyone have any advise? Stop trying! Any browser that would let you do this is opening up a fair old potential security hole. I'm pretty sure it can't be done. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] foo[bar] _or_ foo['bar'] ?
This is the correct format: doWhatSoEver($foo['bar']); If your error reporting level is set high enough, php will complain about $foo[bar] unless you have defined bar as a constant elsewhere. -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] foo[bar] _or_ foo['bar'] ?
Bad practice alert!!! Derek Sivers wrote: I had heard someone on the list say that it's always best to use quotes, for the same reason as XHTML, where every value MUST have quotes. But honestly I've been using only NO-quotes all year and find it much easier to read. And NEVER any problem! Also makes it easier when you need to use an array variable inside a quoted string: print "Hello there $client[name]"; If your php error reporting level is set to show warnings (which it should be on your development machines) then referring to $foo[bar] will give Warning: Use of undefined constant bar - assumed 'bar' in whatever/yourscript.php on line n So php only works in this case because it couldn't find bar in it's list of constants, and guessed at the mistake you made. This just slows things down. I can't see any advantage at all to missing the quotes out. Your example could be written print "Hello there {$client['name']}"; Sorry to sound stroppy :) Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -Original Message- From: Derek Sivers [EMAIL PROTECTED] To: Matthias Krehl [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Tuesday, February 13, 2001 5:34 PM Subject: Re: [PHP] foo[bar] _or_ foo['bar'] ? I'd really appreciate a clear statement whether to use better $foo = array('bar' = 'boing'); doWhatSoEver($foo[bar]); or $foo = array('bar' = 'boing'); doWhatSoEver($foo['bar']); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] building binary data structures
Having written loads of stuff in PHP, I find myself having for the first time to generate binary data in memory - I actually need to build a native file for a drawing program in memory. The data consists mainly of lists of 32bit little endian integers - some signed and some unsigned. I've started the work, and am building the data up in a string variable. I know however that I am about to get bitten by numeric overflows. For example if I have a function create_thingy($param1,$param2) where param1 is an unsigned 32 bit int, and the top bit is set, then I suspect that php will probably represent the number as floating point, and I'll probably lose some precision. Has anybody been here before and found a good mode of working in the unsigned 32bit arena? Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] comparisons
In spite of yor best efforts here, PHP converts the string values to numbers (because the strings look like numbers) before doing the comparison. Force a string comparison by using strcmp and everything will work fine - remember that strcmp returns true if the strings are not equal and false if equal. Cheers Reply Header Subject:[PHP] comparisons Author: "Curtis Maurand" [EMAIL PROTECTED] Date:Sun, 11 Feb 2001 18:47:31 + Hello, I'm having a rather strange problem. I'm trying to compare two values. "01" and "1". The variables names that they are submitted under are pick1 and pick2. i use the following code $mypick1 = strval($pick1); $mypick2 = strval($pick2); I then perform the following comparison: if ($mypick1 == $mypick2) { $error = 1; $errorstring[1] = "Your first pick and second pick are the same."; } However, I get the error that they are equal. If I call the comparison as foloows: if(strval($mypick1) == strval($mypick2) { $error = 1; $errorstring[1] = "Your first pick and second pick are the same."; } I still get the error. Anyone have any ideas? These two valuse mustbe evaluated as different. Thanks in advance Curtis -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: Re: [PHP] comparisons
Can I also write that like the following? if (strcmp($pick1,$pick2) == 0) { perform some action; } that will work, but I prefer Can I also write that like the following? if (!strcmp($pick1,$pick2)) { perform some action; } Cheers Phil -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] uploading file
Everyone say : "Good morning mr. Lynch" ! Hear Hear! I was all overcome with a wave of nostalgia :) Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] I wish: IIS and ISAPI $PHP_AUTH_USER
Did you happen to copy the php4ts.dll into the winnt directory? I am not sure of the error you are getting, but it may help? I have all my dlls in a separate php directory since they are never going to be shared with anything else. I'm sure that this is not the problem, as a simple echo'hello' script will sometimes work, so the dll definitely gets loaded. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]