[PHP] Re: Premature end of script

2013-07-17 Thread Jim Giner
On 7/17/2013 11:22 AM, R B wrote: Hello, 5 years ago, y developed a php system and was working fine. But 20 days ago, when y try to access to some pages (not all the pages), in the log appears this message and the page is not displayed: == /usr/local/apache/logs/error_log == [Wed Jul 3

Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Hello Thomas. The if are being evaluated in all iterations of the while, the problem is you didn't stop the loop when it finds what it's searching for. Try putting a break in the end of the if, them, when the condition match, the while will stop. And hey! You're using a lot of legacy code for

Re: [PHP] problem with my login script

2012-10-02 Thread Bálint Horváth
The problem was already solved. I forgot to send a copy to the list... Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT use break at all (in a loop)... (switch is an exception) In the other hand Thomas, you should use while and count the lines and u need to test if username

Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Better solution than mine (that don't even make a code) As a Oo developer, a run away from using switch, so I should never use break too... Good to know. By the way, what's the problem with it? Enviado por Samsung Mobile Bálint Horváth hbal...@gmail.com escreveu: The problem was already

Re: [PHP] problem with my login script

2012-10-02 Thread Bálint Horváth
As a Oo developer, a run away from using switch - I don't understand this: OOP and switch could be good together and I also prefer switch eg. at action or page selection... break is an old stuff and not a nice solution (like goto)... killing a procedure!? -means wrong planning of an app! (and

Re: [PHP] problem with my login script

2012-10-02 Thread Rodrigo Silva dos Santos
Make sense, I haven't ever realizad how old the code appears like when it haves a break. Fell like C. Livin' n' learnin'. Thanks! Enviado por Samsung Mobile Bálint Horváth hbal...@gmail.com escreveu: As a Oo developer, a run away from using switch - I don't understand this: OOP and switch

Re: [PHP] problem with my login script

2012-10-02 Thread Maciek Sokolewicz
On 02-10-2012 11:59, Bálint Horváth wrote: The problem was already solved. I forgot to send a copy to the list... Rodrigo, break!? Ohh man, it's a crazy idea... A developer DOES NOT use break at all (in a loop)... (switch is an exception) I personally find this statement to be utter bullshit.

[PHP] Images can execute php script?

2012-09-23 Thread admin
Today I seen a hack into php that has rocked me to my foundation. I seen a picture uploaded onto a server using php and when php displayed the image, phpinfo() was executed and displayed. Does this problem exist in PHP 5.2.17 +? How do you stop it? Sorry, I have never known of this before today.

Re: [PHP] Images can execute php script?

2012-09-23 Thread Bastien
Bastien Koert On 2012-09-23, at 11:57 AM, admin ad...@buskirkgraphics.com wrote: Today I seen a hack into php that has rocked me to my foundation. I seen a picture uploaded onto a server using php and when php displayed the image, phpinfo() was executed and displayed. Does this problem

Re: [PHP] Images can execute php script?

2012-09-23 Thread shiplu
On Sun, Sep 23, 2012 at 9:57 PM, admin ad...@buskirkgraphics.com wrote: Today I seen a hack into php that has rocked me to my foundation. I seen a picture uploaded onto a server using php and when php displayed the image, phpinfo() was executed and displayed. Does this problem exist in PHP

RE: [PHP] Images can execute php script?

2012-09-23 Thread admin
Jpgs can hold other data rather than image data One thing to try is to run strip_tags($image) to remove any php code http://stackoverflow.com/questions/3499173/my-php-site-was-hacked-by-codes-u ploaded-as-image http://josephkeeler.com/2009/04/php-upload-security-the-1x1-jpeg-hack/ Bastien

Re: [PHP] Images can execute php script?

2012-09-23 Thread Maciek Sokolewicz
is set up / configured PHP scripts are executed using the PHP interpreter. This means, that for a PHP script to be executed, the server needs to: 1. assume the requested file is a PHP script 2. run the PHP interpreter, and provide it the requested file 3. return the output from the PHP

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Tim Streater
On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't figured out why yet. The test

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Curtis Maurand
Make sure IIS is not running. That'll cause all kinds of trouble. Tim Streater wrote: On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I

Re: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread Curtis Maurand
Tim Streater wrote: On 13 Jan 2012 at 15:05, David Savage dsav...@cytelcom.com wrote: I open the html file up from a windows explorer window (Q:\asterisk\), and so IE opens it up, but the problem lies in the fact that I cannot find apache service running in the background...haven't

RE: RE: RE: [PHP] passing variables to php script

2012-01-13 Thread David Savage
thanks for your assistance. From: Tim Streater [mailto:t...@clothears.org.uk] Sent: Fri 1/13/2012 9:37 AM To: David Savage Cc: PHP General List Subject: Re: RE: RE: [PHP] passing variables to php script On 13 Jan 2012 at 15:05, David Savage dsav

RE: [PHP] passing variables to php script

2012-01-12 Thread David Savage
. The php statements I posted were the first few statements in the script, so apparently the script didn't see the variables, so I'll have to review the httpd.conf and php.ini files to find whatever settings is preventing the acctnum, year, and month from being passed to the php script. Thanks

Re: [PHP] passing variables to php script

2012-01-12 Thread Matijn Woudt
is preventing the acctnum, year, and month from being passed to the php script. No, Don't open the html file from the drive! If you have installed apache, you can open IE and go to http://localhost, this will show your web site running. If you put the files from Q:\ASTERISK in the folder where the website

Re: RE: [PHP] passing variables to php script

2012-01-12 Thread Tim Streater
the acctnum, year, and month from being passed to the php script. You say: I opened the html file using IE 6.0 I don't like the sound of that. Do you mean you double-clicked the file and it opened in IE or do you mean you put Q:\... into the IE address bar or what? What you should be doing

Re: [PHP] passing variables to php script

2012-01-10 Thread Donovan Brooke
David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post pAccount Number:input type=text name=acctnum/p pYear (4 digit):input

Re: [PHP] passing variables to php script

2012-01-10 Thread Marco Behnke
. where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form

Re: [PHP] passing variables to php script

2012-01-10 Thread Mike Mackintosh
action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line

Re: [PHP] passing variables to php script

2012-01-10 Thread Marco Behnke
, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post Stupid question . where have you copied your script? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which

Re: [PHP] passing variables to php script

2012-01-10 Thread Ashley Sheridan
on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply callrecs.php and see if that works. Q: would be referencing a filesystem path, rather

Re: [PHP] passing variables to php script

2012-01-10 Thread Matijn Woudt
? Is it lying on a webserver? Then I would guess that you are submitting the form on your webserver which hits the PHP script on your Desktop PC which in tunr invokes the PHP command line interpreter who has no idea what you mean by $_POST. Try changing the form action to simply

Re: [PHP] passing variables to php script

2012-01-10 Thread Marco Behnke
within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless. Indeed. But isn't that the point? We are trying

Re: [PHP] passing variables to php script

2012-01-10 Thread Ashley Sheridan
is within a PHP supported web space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context

Re: [PHP] passing variables to php script

2012-01-10 Thread Ellis Antaya
space. If a default application is set within windows for php, the script submitting to Q will be executed. But wouldn't Windows attempt to execute the PHP script as if it were a CLI script, not as if it were within a web server context? That would make posting a form pretty pointless

[PHP] passing variables to php script

2012-01-06 Thread David Savage
OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post pAccount Number: input type=text name=acctnum /p pYear (4 digit): input type=text

Re: [PHP] passing variables to php script

2012-01-06 Thread Ashley Sheridan
On Fri, 2012-01-06 at 11:53 -0600, David Savage wrote: OK...I admit I'm new at thisI have this html file: html head titleGenerate pdf file of LD, Toll Free, and Directory Assistance calls/titl /head body form action=Q:\ASTERISK\callrecs.php method=post pAccount Number: input

[PHP] PHP Ad or Image Rotator Script

2011-09-20 Thread Kim Briggs
Hi List, This is a bit of an advertisement, I know, but I'm truly pleased with my new PHP script and I want to share it with the list (I do not sell any products on my website). http://kimbriggs.com/computers/computer-software/php-ad-image-rotator-script.file Any questions or improvements

Re: [PHP] Dreaded Premature end of script headers

2011-08-29 Thread Steve Staples
On Sat, 2011-08-27 at 17:55 -0400, Daniel P. Brown wrote: On Sat, Aug 27, 2011 at 01:01, Jim Lucas li...@cmsws.com wrote: Well, you might have to go about this the long way. I suggest you cut larger sections of code out until you get a working script. Then start putting it back together.

Re: [PHP] Dreaded Premature end of script headers

2011-08-27 Thread Daniel P. Brown
On Sat, Aug 27, 2011 at 01:01, Jim Lucas li...@cmsws.com wrote: Well, you might have to go about this the long way. I suggest you cut larger sections of code out until you get a working script.  Then start putting it back together. If possible, I'd also try running it from the production

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread Stuart Dallas
On 26 Aug 2011, at 06:56, tamouse mailing lists wrote: I'm encountering this on a script, but I can't figure out where it's actually failing. How do I debug this problem??? Make sure you have error_reporting set to E_ALL and display_errors on in your php.ini. A script that stops unexpectedly

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread John Black
On 26.08.2011 07:56, tamouse mailing lists wrote: I'm encountering this on a script, but I can't figure out where it's actually failing. How do I debug this problem??? What does you log say? Make sure that you turn error reporting on and crank up the info it spits out. I always develop

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread tamouse mailing lists
outputs a couple of lines to show status. This script is run as a cron job nightly and the output is just appended to a log. What's getting appended instead is a 500 error message. If i run the script with debugging enabled (which will emit a whole lot of output), the premature end of script headers

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread tamouse mailing lists
, then the script works perfectly. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread tamouse mailing lists
On Fri, Aug 26, 2011 at 8:06 AM, John Black s...@network-technologies.org wrote: On 26.08.2011 07:56, tamouse mailing lists wrote: I'm encountering this on a script, but I can't figure out where it's actually failing. How do I debug this problem??? What does you log say? The log says what

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread Geoff Shang
are calling this cron job with some process which runs the PHP script through a URL on your webserver. To fix this, I'd suggest one of the following. Either: 1. Modify the script so that it does actually output something, thereby making the error go away. or 2. Run the script directly with PHP

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread tamouse mailing lists
figure out where the problem is without inserting print statements. Presumably, you are calling this cron job with some process which runs the PHP script through a URL on your webserver. Yes, that is correct. Using curl to launch the script via the web server. 1.  Modify the script so

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread tamouse mailing lists
#premature Yeah, I saw that too. I do know the mechanism that is happening. I just can't figure out where the problem is without inserting print statements. Presumably, you are calling this cron job with some process which runs the PHP script through a URL on your webserver. Yes, that is correct

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread Camilo Sperberg
inserting print statements. Presumably, you are calling this cron job with some process which runs the PHP script through a URL on your webserver. Yes, that is correct. Using curl to launch the script via the web server. 1. Modify the script so that it does actually output something, thereby

Re: [PHP] Dreaded Premature end of script headers

2011-08-26 Thread Jim Lucas
/tutorial_Common_Web_dev_error_messages_and_what_they_mean.php#premature Yeah, I saw that too. I do know the mechanism that is happening. I just can't figure out where the problem is without inserting print statements. Presumably, you are calling this cron job with some process which runs the PHP script

[PHP] Dreaded Premature end of script headers

2011-08-25 Thread tamouse mailing lists
I'm encountering this on a script, but I can't figure out where it's actually failing. How do I debug this problem??? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] asynchronous launch of a script

2011-06-28 Thread David Harkness
On Sun, Jun 26, 2011 at 7:42 PM, Tamara Temple tamouse.li...@gmail.comwrote: How do I launch a php script from another running php script asynchronously? You can perform the long-running job in the same process that handles the request by sending appropriate headers. We use this to run

Re: [PHP] asynchronous launch of a script

2011-06-28 Thread Stuart Dallas
On Tue, Jun 28, 2011 at 8:16 PM, David Harkness davi...@highgearmedia.comwrote: On Sun, Jun 26, 2011 at 7:42 PM, Tamara Temple tamouse.li...@gmail.com wrote: How do I launch a php script from another running php script asynchronously? You can perform the long-running job in the same

Re: [PHP] asynchronous launch of a script

2011-06-28 Thread David Harkness
other shell to spawn a background job, and I suppose you could create a wrapper shell script that does that calls php in the background. But there must be a direct way using an alternate to exec(). David

Re: [PHP] asynchronous launch of a script

2011-06-27 Thread Richard Quadling
On 27 June 2011 03:42, Tamara Temple tamouse.li...@gmail.com wrote: How do I launch a php script from another running php script asynchronously? I'm a windows user. One of the things I wanted to to was to create non-blocking process which I could communicate with using PHP. I use pecl/wincache

[PHP] asynchronous launch of a script

2011-06-26 Thread Tamara Temple
How do I launch a php script from another running php script asynchronously? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Suggestion needed: Internet store script

2011-06-13 Thread Andre Polykanine
Hi everyone, I'm making a website for a small company. The site itself is quite easy to accomplish, but there are two problems: i18n and the store. So I would like to have your suggestions about the store. Here are the requirements: 1. Basic functionality (possibility to purchase without

Re: [PHP] creating a PHP wrapper script?

2010-04-25 Thread Nathan Rixham
Peter Lind wrote: php.net/curl should be able to do what you want. +1 file_get_contents with a proper stream context should also work (have a look at functions like http://dk.php.net/manual/en/context.http.php ) very important to note that file_get_contents uses HTTP 1.0 not 1.1 by default.

Re: [PHP] creating a PHP wrapper script?

2010-04-25 Thread Danilo Moncastro Sabbagh
Even tho most of the servers uses 1.1 they have compliant configurations. or at least they should. things like mod_gzip and deflate are usually only used if the request is 1.1 to be honest.. if i understood you correctly the curl solution or even a wrapper for another downloader like wget

[PHP] creating a PHP wrapper script?

2010-04-23 Thread Robert P. J. Day
i'm sure this isn't hard to do, but i'm having end-of-week brain cramps. just now, i installed a PHP package that lets me download thumbnails of image files stored on a server -- the URL to generate and download a thumbnail is, say:

Re: [PHP] creating a PHP wrapper script?

2010-04-23 Thread Peter Lind
php.net/curl should be able to do what you want. file_get_contents with a proper stream context should also work (have a look at functions like http://dk.php.net/manual/en/context.http.php ) Regards Peter On 23 April 2010 17:18, Robert P. J. Day rpj...@crashcourse.ca wrote:  i'm sure this

Re: [PHP] PHP to access shell script to print barcodes

2010-03-24 Thread Peter Lind
the postscript as-is and the browser sends it to Preview which interprets it. I basically want to replicate the functionality found here: http://blog.maniac.nl/webbased-pdf-lto-barcode-generator/ On Mar 23, 2010, at 5:37 PM, Peter Lind wrote: You can create a .php script that sets a proper

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Richard Quadling
$ver moveto $FNR (includetext height=0.55) code39 barcode” let ver=$ver-70 let NR=NR+1 done done I need to somehow create a PHP script that executes this shell script.   And after doing some research, it sounds like I need to use the PHP exec command, so I do that with the following file

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Rob Gould
I need to somehow create a PHP script that executes this shell script. And after doing some research, it sounds like I need to use the PHP exec command, so I do that with the following file: http://www.winecarepro.com/kiosk/fast/shell/printbarcodes.php Which has the following script

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Peter Lind
You can create a .php script that sets a proper header to make the browser download the file rather than display it. That also allows you to set the filename for the download. What you'd need to do is include something like: header(Content-Disposition: attachment; filename: 'barcodemerge.ps

Re: [PHP] PHP to access shell script to print barcodes

2010-03-23 Thread Rob Gould
create a PHP script that executes this shell script. And after doing some research, it sounds like I need to use the PHP exec command, so I do that with the following file: http://www.winecarepro.com/kiosk/fast/shell/printbarcodes.php Which has the following script: ?php $command=http

Re: [PHP] PHP to access shell script to print barcodes

2010-03-22 Thread Jochem Maas
barcode” let ver=$ver-70 let NR=NR+1 done done I need to somehow create a PHP script that executes this shell script. And after doing some research, it sounds like I need to use the PHP exec command, so I do that with the following file: http://www.winecarepro.com/kiosk/fast/shell

[PHP] about to run PHP script when POST data.

2009-08-21 Thread Jacky
Hi guys, As I know When we POST a big data(e.g. 500M) to a php script, the php script only can run after the big data finished POST. for example: a.php ?php die(''); ? and I post 500m data to a.php, after that a.php cannot be died immediately. only when the data finished post. How can

RE: [PHP] about to run PHP script when POST data.

2009-08-21 Thread Arno Kuhl
-Original Message- From: Jacky [mailto:newbde...@gmail.com] Sent: 21 August 2009 03:12 PM To: php-general@lists.php.net Subject: [PHP] about to run PHP script when POST data. Hi guys, As I know When we POST a big data(e.g. 500M) to a php script, the php script only can run after the big

[PHP] file_get_contents works in base script but not in an included script

2009-05-18 Thread LinuxManMikeC
In PHP4, I am using file_get_contents('file.sql',true) to bring in SQL queries from files who's directory is on the include path. It works fine in the main php scripts (ones accessible through URLs), but when done in a php script that is included by one of the main scripts I just get false

Re: [PHP] file_get_contents works in base script but not in an included script

2009-05-18 Thread Paul M Foster
On Mon, May 18, 2009 at 03:54:31PM -0600, LinuxManMikeC wrote: In PHP4, I am using file_get_contents('file.sql',true) to bring in SQL queries from files who's directory is on the include path. It works fine in the main php scripts (ones accessible through URLs), but when done in a php script

[PHP] Re: Nasty hacker spammer script

2009-05-12 Thread Nathan Rixham
The Doctor wrote: Has anyone seen this before? if (trim($_GET['x'])!=''){...@include($_GET['x']);exit();} lol - that's really bad if you're going to waste your time exploiting peoples stuff at least: make it so it'll actually run something don't include your personal email in the script

[PHP] Re: Form To Mail script generators for Linux

2009-03-24 Thread Manuel Lemos
on 03/23/2009 08:39 AM Linda Stark said the following: Hi, I am trying to find out if there are any “form to mail” php script generators that run on Linux available - that would generate the script needed to profess web mail forms such as a “contact us” page or a “mail us” page on a web

[PHP] Re: How can a script tell if there's a MySQL problem?

2009-01-09 Thread Nathan Rixham
, but no matter what I try the PHP script stops whenever it encounters this and just displays Too many connections. Anyone know if there's a way for PHP to gracefully detect this and resume operation without choking? why not simply increase the max_connections mysql variable to something a bit

[PHP] Re: Send file from script but with name... [fails]

2009-01-04 Thread Michelle Konzack
REVISION 0.0.1 Am 2009-01-04 18:36:46, schrieb Michelle Konzack: Hello, for some weeks I have accidently deleted some line of code and replaced it with: header(Content-Disposition: attachment; filename=\somestuff.foo\); but any programs (mozilla, iceape, wgwet, curl) do not more

[PHP] Re: [PHP-INSTALL] Executing a python script from within perl

2008-07-22 Thread Daniel Brown
, I'm new to PHP and just installed apache2 with php support. I'm trying to execute a Python script (from within php), which does take a good amount of time and am waiting for it to terminate so that I can process the output and print that out in HTML. The problem I'm having is that I can't get

[PHP] Re: [PHP-INSTALL] Executing a python script from within perl

2008-07-22 Thread Daniel Brown
On Tue, Jul 22, 2008 at 11:27 PM, Daniel Brown [EMAIL PROTECTED] wrote: If all else fails, and you're aware of the side-effects, go fork() yourself. ;-P For posterity: http://php.net/pcntl [See: pcntl_fork(), et al.] -- /Daniel P. Brown Better prices on dedicated servers:

[PHP] Re: [PHP-INSTALL] Executing a python script from within perl

2008-07-22 Thread Anuj Bhatt
On Tue, 2008-07-22 at 23:27 -0400, Daniel Brown wrote: Try this to see if your script is outputting any errors: ?php exec('/path/to/python your-script.py 21',$ret); print_r($ret); ? This worked, was opening a file for which permission was denied. Python didn't show me anything

[PHP] calling rsync from php script

2008-05-13 Thread Jean-Christophe Roux
Hello, I have a bash script update.sh that contains: rsync -- delete -avz -e ssh ${files} [EMAIL PROTECTED]:/red when I use that script ./update.sh as root, it works like a charm as I set up the private/public key properly. When run from a php script through the apache webserver ?php exec

Re: [PHP] Permissions set on php script question

2008-05-13 Thread Bojan Tesanovic
If your web-server is setup to read files with .php extension through PHP engine (it is I guess) than no body from outside (using HTTP) can't read content of original PHP file only the output of that particular script. The only concern you may have is that somebody else on that server

Re: [PHP] calling rsync from php script

2008-05-13 Thread Daniel Brown
key properly. When run from a php script through the apache webserver ?php exec(update.sh); ? The rsync line is ignored. You could use a combination of BASh and Expect shell code here, but it wouldn't be very secure, because that would automate the root login. I understand

[PHP] Permissions set on php script question

2008-05-12 Thread David Jourard
Hi, I'm very new to php. One thing I noticed in order to run the php program (on a linux server) I need to set the read permission for Other. In this program I'll have the MySQL credentials defined. Are there are any security concerns when the read permission is set like this. Wouldn't it be

Re: [PHP] Permissions set on php script question

2008-05-12 Thread Bojan Tesanovic
Heh you are really new to Linux permissions on linux are set per user/group/other bases so for most secure set permissions to read only for web-server user so chown 'webserveruser' file.php chmod 400 file.php make sure you have root access at server so you can change that file or make a group

Re: [PHP] Permissions set on php script question

2008-05-12 Thread David Jourard
Bojan Tesanovic wrote: Heh you are really new to Linux permissions on linux are set per user/group/other bases so for most secure set permissions to read only for web-server user so chown 'webserveruser' file.php chmod 400 file.php make sure you have root access at server so you can

[PHP] Securing your sites against Script Kiddies

2008-04-22 Thread Wolf
For all of you with an upload/access page to your site that is world-viewable I have made available copies of scripts that kiddies have tried to use to take over my own server. As my upload page has yet to be broken nor my site taken over, I wanted to share them with everyone as a way to

Re: [PHP] Securing your sites against Script Kiddies

2008-04-22 Thread paragasu
http://ambiguous.dnsalias.net/ what a nice collection you have. i also have some of this files on my server. i don't know how the files end up on my web page directory. That time i am using a shared server with 300+ website hosted on the same host. i do not have ssh or telnet access (ftp and

Re: [PHP] output buffering in CLI script.

2008-02-29 Thread Greg Donald
On 2/28/08, Casey [EMAIL PROTECTED] wrote: #!/usr/bin/php Or the entirely more portable version: #!/usr/bin/env php ?php -- Greg Donald http://destiney.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering in CLI script.

2008-02-29 Thread Jochem Maas
Greg Donald schreef: On 2/28/08, Casey [EMAIL PROTECTED] wrote: #!/usr/bin/php Or the entirely more portable version: #!/usr/bin/env php ?php thanks for the tip :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
('%^#!\/%', $output[0])) unset($output[0]); } ini_set('implicit_flush', $oldIFvalue); the reason I'm wanting to do this is, primarily, in order to stop the shebang line that *may* be present in the included script from being output to stdout

RE: [PHP] output buffering in CLI script.

2008-02-28 Thread Andrés Robinet
-Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 6:39 AM To: [php] PHP General List Subject: [PHP] output buffering in CLI script. hi there, I can't seem to manage to buffer output (of an included file) in a CLI script

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stut
On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from the output we log)

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stuart Dallas
On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Andrés Robinet schreef: -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Thursday, February 28, 2008 6:39 AM To: [php] PHP General List Subject: [PHP] output buffering in CLI script. hi there, I can't seem to manage to buffer output (of an included file) in a CLI

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stut schreef: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it from the output we log)

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
tried: eval(ltrim(file_get_contents($script),$shebang)); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Stuart Dallas
On 28 Feb 2008, at 12:29, Jochem Maas wrote: Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Aschwin Wesselius
Jochem Maas wrote: I mean that the shebang line at the top of the included file is output to stdout even when I turn on output buffering on prior to including the file. nothing else is output but that's because the script doesn't generate any further output - it logs everything instead - and

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Nathan Rixham schreef: Jochem Maas wrote: ... -Stut bit of false logic here but have you tried: eval(ltrim(file_get_contents($script),$shebang)); haven't tried it, did consider it. I hate eval() :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Stuart Dallas schreef: On 28 Feb 2008, at 12:29, Jochem Maas wrote: Stuart Dallas schreef: On 28 Feb 2008, at 11:52, Stut wrote: On 28 Feb 2008, at 11:39, Jochem Maas wrote: I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work:

[PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
how's this? #!/usr/bin/php ?php class trimshebang { function filter($in, $out, $consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket-data = ltrim($bucket-data,#!/usr/bin/php\n); $consumed += $bucket-datalen; stream_bucket_append($out,

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Aschwin Wesselius
Nathan Rixham wrote: how's this? #!/usr/bin/php ?php class trimshebang { function filter($in, $out, $consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket-data = ltrim($bucket-data,#!/usr/bin/php\n); $consumed += $bucket-datalen;

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Nathan Rixham
Aschwin Wesselius wrote: Me thinks that when shebang doesn't fit /usr/bin/php (which happens sometimes) you're doomed. [snip] good point.. modified to use BINDIR: #!/usr/bin/php ?php class trimshebang { function filter($in, $out, $consumed, $closing) { while ($bucket =

Re: [PHP] [NOT SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Jochem Maas schreef: ... indeed ... I tested it and it works on my server too. my code is no different to yours with regard to the context of the problem. so what's going on. I think (I know) I forgot to mention one tiny little detail. the whole 'include' code occurs in a script that forks

Re: [PHP] Re: [SOLVEDish] Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jochem Maas
Nathan Rixham schreef: how's this? #!/usr/bin/php ?php class trimshebang { function filter($in, $out, $consumed, $closing) { while ($bucket = stream_bucket_make_writeable($in)) { $bucket-data = ltrim($bucket-data,#!/usr/bin/php\n); $consumed += $bucket-datalen;

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Casey
On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas [EMAIL PROTECTED] wrote: hi there, I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and strip it

Re: [PHP] output buffering in CLI script.

2008-02-28 Thread Jim Lucas
Casey wrote: On Thu, Feb 28, 2008 at 3:39 AM, Jochem Maas [EMAIL PROTECTED] wrote: hi there, I can't seem to manage to buffer output (of an included file) in a CLI script, the following does not work: // buffer output so we can avoid the shebang line being output (and

  1   2   3   4   5   6   7   >