[PHP] PHP Reference
Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP] PHP Reference
On 14 August 2010 08:08, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, No, you can't. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Reference
That is what I thought. Thank you for confirming. Karl On Aug 14, 2010, at 1:54 AM, Peter Lind wrote: On 14 August 2010 08:08, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, No, you can't. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Reference
Hello Karl, If I understood you properly, try this: ?SomeFunction();? -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion - Original message - From: Karl DeSaulniers k...@designdrumm.com To: php-general php-general@lists.php.net Date: Saturday, August 14, 2010, 9:08:20 AM Subject: [PHP] PHP Reference Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Reference
Thank you Andre. Yes, I had been doing it that way, but was just wondering if PHP had a reference like that of javascript with the colin : in it. Best, Karl On Aug 14, 2010, at 3:50 AM, Andre Polykanine wrote: Hello Karl, If I understood you properly, try this: ?SomeFunction();? -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion - Original message - From: Karl DeSaulniers k...@designdrumm.com To: php-general php-general@lists.php.net Date: Saturday, August 14, 2010, 9:08:20 AM Subject: [PHP] PHP Reference Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, Karl DeSaulniers Design Drumm http://designdrumm.com Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Reference
On Sat, 2010-08-14 at 01:57 -0500, Karl DeSaulniers wrote: That is what I thought. Thank you for confirming. Karl On Aug 14, 2010, at 1:54 AM, Peter Lind wrote: On 14 August 2010 08:08, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, No, you can't. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype Karl DeSaulniers Design Drumm http://designdrumm.com The reason you can't is because PHP is on the server and Javascript is local (e.g. the browser). Even if the PHP code you're executing is through localhost, because PHP needs the server to run, it has to be run on the server, and exposing functions directly like this would expose all sorts of security issues (imagine calling up a getUserDetails() on a website you're not logged into for example, which would mean every function of a system would need some sort of user auth check and would slow the whole thing to a crawl) Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP Reference
On Aug 14, 2010, at 5:19 AM, Ashley Sheridan wrote: On Sat, 2010-08-14 at 01:57 -0500, Karl DeSaulniers wrote: That is what I thought. Thank you for confirming. Karl On Aug 14, 2010, at 1:54 AM, Peter Lind wrote: On 14 August 2010 08:08, Karl DeSaulniers k...@designdrumm.com wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, No, you can't. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype Karl DeSaulniers Design Drumm http://designdrumm.com The reason you can't is because PHP is on the server and Javascript is local (e.g. the browser). Even if the PHP code you're executing is through localhost, because PHP needs the server to run, it has to be run on the server, and exposing functions directly like this would expose all sorts of security issues (imagine calling up a getUserDetails() on a website you're not logged into for example, which would mean every function of a system would need some sort of user auth check and would slow the whole thing to a crawl) Thanks, Ash http://www.ashleysheridan.co.uk I see. Very good point. Thanks Ash. I figured it was because of the whole pre-processing part of PHP. Thanks for the explination. Best, Karl DeSaulniers Design Drumm http://designdrumm.com
Re: [PHP] PHP Reference
At 1:08 AM -0500 8/14/10, Karl DeSaulniers wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, Karl: As others have answered, no php doesn't work that way. However, you can still send/receive strings through a url via a $_GET) and direct the actions of a receiving php script and you can do the same thing via a $_POST. As such, a php:someFunction() could be a: url?php=someFunction Where the receiving script takes the command and runs someFunction(). However, I would shorten it a bit and say url?php=18 Where php would be the command to run a function and 18 would be the function you want to run. So, while you can't use the same syntax as javascript, you can get the same performance. Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] It's Friday (a MySQL Question)
At 6:53 PM -0400 8/13/10, chris h wrote: Tedd I don't know if this will resolve your issue or not, but have you looked into using mysqldump? http://dev.mysql.com/doc/refman/5.1/en/mysqldump.htmlhttp://dev.mysql.com/doc/refman/5.1/en/mysqldump.html That's what I use for my backups. Chris. Chris: I would like to do that, but I simply don't know how. I think the reason for that is that I usually work on shared hosted accounts and the hosts don't permit command line stuff -- so I think, but I could be wrong. Plus, I stopped doing command line stuff back in the Apple ][ days. Granted this is another hole in my knowledge, but I think that even if I knew how, I don't think it would solve my current problem. Am I wrong? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] It's Friday (a MySQL Question)
Well you certainly can not use this without the command line, however some hosts restrict you from the command line but still allow you to run commands via php's exec() function (Rackspace Sites is an example of this). pseudo code example: exec('mysqldump [options] --all-databases ... '); Of course this is only if your hoster supports it, and if the user has proper mysql privileges (which I think are SELECT, LOCK TABLES, and SHOW VIEW). mysqldump is a great program with many options so you can dump your db just the way you want it ;) If it's something you can and choose to use I would suggest reading over the link I sent you so you can customize it's output. Chris. On Sat, Aug 14, 2010 at 8:51 AM, tedd t...@sperling.com wrote: At 6:53 PM -0400 8/13/10, chris h wrote: Tedd I don't know if this will resolve your issue or not, but have you looked into using mysqldump? http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html That's what I use for my backups. Chris. Chris: I would like to do that, but I simply don't know how. I think the reason for that is that I usually work on shared hosted accounts and the hosts don't permit command line stuff -- so I think, but I could be wrong. Plus, I stopped doing command line stuff back in the Apple ][ days. Granted this is another hole in my knowledge, but I think that even if I knew how, I don't think it would solve my current problem. Am I wrong? Cheers, tedd -- --- http://sperling.com/
[PHP] PHP upload hangs on Safari
Hi, I have a page that has 9 form actions which upload individual files one at a time. On my own server, it runs fine and there are no hangs. But when I install on my clients server. I creased their upload_max_filesize to 100MB. Still I get random hanging. Is there any thing else that I should be looking at to remedy this hanging? Don Wieland D W D a t a C o n c e p t s ~ d...@dwdataconcepts.com Direct Line - (949) 305-2771 Integrated data solutions to fit your business needs. Need assistance in dialing in your FileMaker solution? Check out our Developer Support Plan at: http://www.dwdataconcepts.com/DevSup.html Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or higher http://www.appointment10.com For a quick overview - http://www.appointment10.com/Appt10_Promo/Overview.html
Re: [PHP] PHP upload hangs on Safari
On Sat, 2010-08-14 at 08:08 -0700, Don Wieland wrote: Hi, I have a page that has 9 form actions which upload individual files one at a time. On my own server, it runs fine and there are no hangs. But when I install on my clients server. I creased their upload_max_filesize to 100MB. Still I get random hanging. Is there any thing else that I should be looking at to remedy this hanging? Don Wieland D W D a t a C o n c e p t s ~ d...@dwdataconcepts.com Direct Line - (949) 305-2771 Integrated data solutions to fit your business needs. Need assistance in dialing in your FileMaker solution? Check out our Developer Support Plan at: http://www.dwdataconcepts.com/DevSup.html Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or higher http://www.appointment10.com For a quick overview - http://www.appointment10.com/Appt10_Promo/Overview.html So, is it one form with 9 input type=file/ elements, or 9 forms, as I was a little unsure from your email. Are you sure it's hanging? Have you given enough time for the files to transfer over the Internet? Is it only Safari that it appears to hang with? Try using Firefox with Firebug installed to see what client-server communication is actually going on, as that might show you where any problem is. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Need to check pdf for xss
Hi, before I allow to upload images I read them and check for several html tags. If they exist I don't allow the upload. Is their any need to check pdf files, too? At the time I'm doing this, but the result is that many files are denied because of unallowed html tags. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to check pdf for xss
On 14 August 2010 22:36, Sebastian Ewert seb2...@yahoo.de wrote: Hi, before I allow to upload images I read them and check for several html tags. If they exist I don't allow the upload. Is their any need to check pdf files, too? At the time I'm doing this, but the result is that many files are denied because of unallowed html tags. Reading and checking for html tags seems rather excessive - I would rather use image extensions/pdf extensions and tools to verify that the uploaded data was in fact one or the other. If someone uploads an image and you cannot get the image dimensions from the file, for instance, then it's likely not an image. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to check pdf for xss
Peter Lind wrote: On 14 August 2010 22:36, Sebastian Ewert seb2...@yahoo.de wrote: Hi, before I allow to upload images I read them and check for several html tags. If they exist I don't allow the upload. Is their any need to check pdf files, too? At the time I'm doing this, but the result is that many files are denied because of unallowed html tags. Reading and checking for html tags seems rather excessive - I would rather use image extensions/pdf extensions and tools to verify that the uploaded data was in fact one or the other. If someone uploads an image and you cannot get the image dimensions from the file, for instance, then it's likely not an image. Regards Peter So if imagick sais its an image/pdf there is no need to check for html tags? My upload class first checks the mime type with imagick. Do you know other tools? I think I can remember of a xss tutorial where the js code was included to an image. But I haven't tried it so I couldn't test the result. He used a programm to combine images with text. Perhaps I have undestood something wrong. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to check pdf for xss
I'm guessing you may have been referring to something like: http://kestas.kuliukas.com/JavaScriptImage/ - this actually does seem to be a valid threat to IE6 and would go undetected by the measures proposed. Checking an image for script tags seems to the only way to check if IE6 will render it as html and whether or not it will cause problems. I don't know if the same vulnerability exists for pdfs - you'd have to check security sources for it. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Reference
Thanks tedd. On Aug 14, 2010, at 7:45 AM, tedd wrote: At 1:08 AM -0500 8/14/10, Karl DeSaulniers wrote: Hello all, I was wondering, can you reference php in a url string like you can javascript. EG: javascript:someFunction() Can you do something similar in php like php:someFunction() I am thinking that you can not do this, but was wondering if there was something like that. Thanks, Karl: As others have answered, no php doesn't work that way. However, you can still send/receive strings through a url via a $_GET) and direct the actions of a receiving php script and you can do the same thing via a $_POST. As such, a php:someFunction() could be a: url?php=someFunction Where the receiving script takes the command and runs someFunction(). However, I would shorten it a bit and say url?php=18 Where php would be the command to run a function and 18 would be the function you want to run. So, while you can't use the same syntax as javascript, you can get the same performance. Cheers, tedd -- --- http://sperling.com/ Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need to check pdf for xss
On Sat, Aug 14, 2010 at 10:36:07PM +0200, Sebastian Ewert wrote: Hi, before I allow to upload images I read them and check for several html tags. If they exist I don't allow the upload. Is their any need to check pdf files, too? At the time I'm doing this, but the result is that many files are denied because of unallowed html tags. If I'm not mistaken, more recent versions of the PDF spec allow for embedded javascript. If so, it might be worthwhile to check for javascript in PDFs. (Whoever first thought of embedding *code* in documents should be shot.) Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php