[PHP] include/require vs performance
i am designing a small app that obviuosly works best when I have a lot of global files with functions, which cut down on editing. I will likely have a main page that will contain modules and also load all of the required includes like config etc. in total some 10 files will be reqested. Is there, was there ever issue around including a lot files via include(). I am running things on a local server so it's hard to gauge. Thansk in advance. R> ___ Radoslaw Zajkowski http://www.finalbanana.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] test for rtf
IF this data is being uploaded via form you should look into $_FILES array, in particular $_FILES["userfilename"]["type"]; R> On 3/7/03 11:33 AM, "Andrew Brampton" <[EMAIL PROTECTED]> wrote: > Not to sure on the RTF file format, but checking the first few letters might > help > Quickly opening a RTF file I see that they start with {\rtf > Maybe look for that. > > Andrew > - Original Message - > From: "bill" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, March 07, 2003 4:22 PM > Subject: [PHP] test for rtf > > >> Is there any way to test a file to confirm it is an RTF file? >> >> I'm thinking along the lines of how we can test for an image with >> getimagesize(). >> >> kind regards, >> >> bill >> >> >> -- >> 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] Mail parse
I am curious if there is a better documentation of Mail Parse functions than the one provided on the php.net site. Any help is appreciated, R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Script Execution Time
Could someone pass on a snippet, a function or a technique for measuring script times. It appears the host I am with is having some PHP engine performance problems and I need to send them the figures. Thanks in advance R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Dealing with session expiry
I have some pages that use sessions to call out certain elements in the layouts. It allows user to decide how should their pages look for the duration of their visit. Unfortunately whenever a user leaves their browser idle past the expity time of the session on their next click pages fall apart and all styles etc. are lost. I understand that I can detect or at least anticipate expiry of the session and renew it before it does. The question is how? Thanks in advance R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Dealing with session expiry
I use it with skins on a web page, users coming in can pick a theme and for the duration of their visit they have the theme(it's an illustrator website) the problem that I having is that session expiry will cause that site to fall apart after idle time. I notice sites using login detect expiry automatically and refrest the pages + session, I just don't quite know how to apprach it. R> > -Original Message- > From: Zilvinas [mailto:[EMAIL PROTECTED] > Sent: October 18, 2003 3:04 PM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] Dealing with session expiry > > > Hello, > > Why are you saving such information into a session? Sessions are > for temporary information. Use cookies or database, if you are > doing what you are saying :) There should be no harm. > > Bye. > > > I have some pages that use sessions to call out certain elements in the > > layouts. It allows user to decide how should their pages look for the > > duration of their visit. > > > > Unfortunately whenever a user leaves their browser idle past > the expity time > > of the session on their next click pages fall apart and all > styles etc. are > > lost. > > > > I understand that I can detect or at least anticipate expiry of > the session > > and renew it before it does. The question is how? > > > > Thanks in advance > > > > R> > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Session hijacking
> off. Likewise though, you might start looking for replacements for those > scripts as it takes time to make the changes, but it has been a year since > register_globals were turned off by default and mentioned that they were > going away in the future. That is a sound advice, some time ago a lot of my scripts were using globals on and as painful as it was I made the switch. In the long run it pays off. It makes your programming more secure by default. One quick way to globals is to simply find/replace in multiple files. Or declare the values at the beginning of your scripts Eg. $foo = $_POST["foo"]; it does not fully utilise the globals off style of coding, but offers a quick fix during transition period, especially if you're paranoid about automatic find/replace R> > -Original Message- > From: news [mailto:[EMAIL PROTECTED] Behalf Of J. Cox > Sent: October 19, 2003 5:30 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Session hijacking > > > > "Ryan A" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > NO! Globals are on > > And asking the others they tell me that around 20% of the > scripts (around > > 300 scripts) wont function with globals off :-( > > > > What to do? > > Use an ini_set in your sessions script (I am assuming that you are using a > seperate script to manage your sessions) to turn your registered globals > off. Likewise though, you might start looking for replacements for those > scripts as it takes time to make the changes, but it has been a year since > register_globals were turned off by default and mentioned that they were > going away in the future. > > In addition, take a look at some of the other suggestions that were made, > beyond this one. > > J. Cox > http://www.xaraya.com > > -- > 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] Apache 2 and PHP
A few months back the official PHP website still warned againts PHP and Apache 2. I am wondering about the current status of these two technologies when used together. I am about to configure a web server and was going to use Apache 1.3 with PHP4+ as opposed to Apache 2 with PHP4+. What are your opinions, thoughts and experiences. Thanks in advance. R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Migrating from SSI and Perl
Check out shell_exec() and its siblings. I'd likely use it like so $output = shell_exec("perl myscript.pl"); and then do something with the $output variable R> > -Original Message- > From: Philip Pawley [mailto:[EMAIL PROTECTED] > Sent: December 26, 2003 12:07 PM > To: php-general > Subject: [PHP] Migrating from SSI and Perl > > > I am new to php. > > My site, at the moment, uses SSI to call a Perl browser-sniffing script. > > I would like to: > 1. use php to call the Perl script. > 2. then save the values the Perl script outputs as php variables. > > Can this be done? If so, how? > > Thanks, > > Philip Pawley > > -- > 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] what do '?' and ':' do?
Here's a code snippet // call gui object method $method = $cmd."Object"; $class_name = $objDefinition->getClassName($obj_type); $module = $objDefinition->getModule($obj_type); $module_dir = ($module == "") ? "" : $module."/"; what does the semicolon and the question mark do? TIA R> - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Receiving an associative array from Flash
Hey what would the syntax look like if I was receiving an array from flash. Assume that it is inside a class with a proper contructor class receiveRemoting{ function receiveRemoting{ //ALL THE CONFIG STUFF } function receiveArrayFromFlash($arrayFromFlash){ //THIS IS WHERE I NEED HELP } } I am not sure that whould got inside receiveArrayFromFlash() so I cound manipulate the array values. You can assume that they all will be strings integer ordered TIA R> - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PDOStatement - dump params to log after binding
Hi all, is there a way to access parameters in the PDOStatement object after they have been bound? it would be very useful for my debug logging. Thanks, Radek. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to recognize .mov .mp3 file types
getimagesize() takes care of determining whether an image is GIF, JPEG SWF etc. but how do I determine if a file is a .mov or .mp3? R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to recognize .mov .mp3 file types
This is extremly swell: http://getid3.sourceforge.net/ Radek Zajkowski wrote: getimagesize() takes care of determining whether an image is GIF, JPEG SWF etc. but how do I determine if a file is a .mov or .mp3? R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to detect session expiry
How do I tell if session has expired? It would help me with providing the user with a comment such as: "your session has expired please login in again" Thanks R> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php