php-general Digest 31 Jul 2010 13:21:18 -0000 Issue 6873

2010-07-31 Thread php-general-digest-help

php-general Digest 31 Jul 2010 13:21:18 - Issue 6873

Topics (messages 307263 through 307266):

Re: [site is acting strange] - blank pages, download index.php, or works fine
307263 by: David Hutto

Re: Trapping for PDF Type and file size in a UPLOAD form...
307264 by: Hans Åhlin

Text  editor for Ubuntu with FTP
307265 by: Jordan Jovanov

Re: How to upload via SFTP with allow_url_open disabled?
307266 by: Thomas Anderson

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On Fri, Jul 30, 2010 at 8:50 PM, David Hutto smokefl...@gmail.com wrote:
 On Fri, Jul 30, 2010 at 8:49 PM, David Hutto smokefl...@gmail.com wrote:
 On Fri, Jul 30, 2010 at 2:50 PM, Ashley Sheridan
 a...@ashleysheridan.co.uk wrote:
 On Fri, 2010-07-30 at 13:38 -0400, Adam Richardson wrote:

 On Fri, Jul 30, 2010 at 11:35 AM, Bill Guion bgu...@comcast.net wrote:

  At 6:45 PM -0600 7/29/10, Tristan wrote:
 
   Yeah like i said site works 95% of the time when navigating. PHP5.2, 
  Mysql
  5. The site is completely dynamic so it wouldn't work at all if that was
  the
  case of it not being installed right.
 
  so the other 5% of the time is blank pages and download index.php files.
  In
  Firefox when you get a blank page, if you click view source it will show
  all
  the code that should be there but, I can't tell if it's requesting the
  page
  again when you do that. It never fails 2 times in a row. A refresh will
  always fix it. When you look in firebug there is no html so it leads me 
  to
  believe FF may be doing just that...going for a second request instead 
  of
  viewing currently opened source? In IE8 I would get something like
 
  diagnose problem button
 
  more information drop down with
 
  this problem can be caused by a variety of issues..this is a completely
  typical M$ error with no valid help
 
 
 
  chrome same thing with
 
  web page cannot be displayed
 
  more information etc...
 
 
 
 
 
  On Thu, Jul 29, 2010 at 6:36 PM, David McGlone da...@dmcentral.net
  wrote:
 
    On Thu, 2010-07-29 at 18:11 -0600, Tristan wrote:
    I have the strangest issue with my host. They can't figure it out 
  and
  I'm
    completely perplexed. We have other sites running on the server just
   fine.
    However, this new site is acting very weird. Sometimes we get blank
   pages,
    sometimes we get a blank page and then a dialog pops up asking if we
  want
   to
    download index.php, and then sometimes the site is working fine. Any
   ideas
    on this?
   
    I'm at ends. Appreciate any advice. For authentication we are using
  mysql
    auth module in apache/linux and proxy pass. We removed proxy pass to
  see
   if
    that was it but, it wasn't. its a members.domain.com subdomain if
  that
    helps.
 
   Do you have php-mysql installed?
 
 
   --
   Blessings,
   David M.
 
 
 
  Does the page validate at http://jigsaw.w3.org/css-validator/?
 
      -= Bill =-
  --
 
  Don't find fault. Find a remedy. - Henry Ford
 
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 Tristan,

 The good news is that you're not crazy.  I've had this exact issue (at 
 least
 in terms of symptoms) when working with one of my client's websites.

 The bad news is that this was long ago, I was using a shared host, and I'm
 not the one who cause or, more importantly, fixed the problem.  That said,
 I've strained my memory to try and recall what might have been said in the
 follow-up from the host, and it seems like there was a mime-type handling
 issue (again, I could be completely wrong, this is just a faint memory.)

 Another faint memory: are you able to see a difference in behavior when you
 view an index file with the file included in the url (
 http://yoursite.com/index.php) as opposed to when you view the page without
 it in the url (http://yoursite.com)?

 Sorry, I wish I still had my email exchange with the company to see what
 information they provided after the fix :(

 Adam


 Actually, you just saying that made me think of a similar problem I had
 once with IIS serving up files. It was XML files rather than PHP, but
 the Mime issue does ring a bell!

 Is the server you're using IIS Tristan?

 Thanks,
 Ash
 http://www.ashleysheridan.co.uk




Forgot to hit reply all:
I'm not sure if this helps, or even relates, but the one time I had a
hosting account for a microsoft app named NopCommerce, when I would
try to visit the page, it seemed to only allow one connection at a
time, because of some MS DB user limitation or something, and I didn't
attempt anymore with it.

Might relate, might not.


---End Message---

[PHP] Text editor for Ubuntu with FTP

2010-07-31 Thread Jordan Jovanov

Hello to All,

I only whant to star discussion for who is the best programm to write 
php and html script. I use dreamweaver, but now I change my OS to ubuntu

and I want some suggestions for some Text editor for FTP for Ubuntu


Thanks A lot
Jordan Jovanov

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] How to upload via SFTP with allow_url_open disabled?

2010-07-31 Thread Thomas Anderson
You might have better luck with phpseclib's Net_SFTP, which uses fsockopen:

http://phpseclib.sourceforge.net/documentation/net.html#net_sftp_example

Good luck!

On Thu, Jul 29, 2010 at 12:13 PM, Scott Teresi scot...@teresi.us wrote:
 I'm attempting to send a file over SFTP in PHP, but all the examples I find
 online do something like this:

   $stream = @fopen(ssh2.sftp://xx;, 'w');
   @fwrite($stream, $data_to_send)

 This requires allow_url_fopen to be enabled on the server, to get a stream
 for the remote file.

 I maintain the server but would like to keep allow_url_fopen disabled. If
 I do that, how can I send a file over SFTP?

 Thanks for any help people can provide!!

 Scott Teresi



 --
 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] Text editor for Ubuntu with FTP

2010-07-31 Thread Ashley Sheridan
On Sat, 2010-07-31 at 13:03 +0200, Jordan Jovanov wrote:

 Hello to All,
 
 I only whant to star discussion for who is the best programm to write 
 php and html script. I use dreamweaver, but now I change my OS to ubuntu
 and I want some suggestions for some Text editor for FTP for Ubuntu
 
 
 Thanks A lot
 Jordan Jovanov
 


If you want a text editor on Linux, then I've found Kate pretty good.
However, if you're looking for something a bit more like Dreamweaver
without the WYSIWG editor, then I strongly recommend Netbeans for PHP. I
use it myself, and it has amazing code hinting features.

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Text editor for Ubuntu with FTP

2010-07-31 Thread Robert Cummings

On 10-07-31 07:03 AM, Jordan Jovanov wrote:

Hello to All,

I only whant to star discussion for who is the best programm to write
php and html script. I use dreamweaver, but now I change my OS to ubuntu
and I want some suggestions for some Text editor for FTP for Ubuntu


Just mount the FTP connection to a local directory and use any text 
editor as if the file was on your local system. Use autofs and the 
connection will mount/unmount as you need it.


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Need help calling multiple functions with if_is

2010-07-31 Thread Vince Leibowitz
Hello,

This is my first time to post to the list. I've been working with PHP
for several years as a WordPress user, but I've come upon a problem I
can't solve.
I am trying to call up a specific php function (a plugin that displays
ads) if the page is the home page, another specific function if the
page is a specific page number, and another specific function if the
page is another page. So far, this is what I have come up with, but it
doesn't work. I suspect it is because I am using the wrong syntax or
something. If anyone can help, it would be appreciated:

?php if (is_home(?php wpads('728leaderboard'); ?)
(is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
wpads('leaderboard5);?) ?

I suspect I am either not using the appropriate number of spaces, or
am not using the right syntax when trying to call different objects or
functions if the page is different. I've manipulated php code before,
but never to this extent.

If anyone can help me out, I'd really appreciate it.

Vince

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need help calling multiple functions with if_is

2010-07-31 Thread Jason Pruim

Hi Vince,


On Jul 31, 2010, at 3:15 PM, Vince Leibowitz wrote:


?php if (is_home(?php wpads('728leaderboard'); ?)
(is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
wpads('leaderboard5);?) ?


Try:



?php



if (is_home(wpads('728leaderboard');)



(is_page(42)( wpads('leaderboard1')



(is_page(10)(wpads('leaderboard5))


?

All I did was pull out all the jumps into PHP since the whole thing is  
a php if statement I didn't see the need to keep opening and closing  
php... Unless I'm not understanding why you are :)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need help calling multiple functions with if_is

2010-07-31 Thread Vince Leibowitz
That looks like it should work, but it doesn't. There isn't a reason
to close the embedded php statements, but I suspect wpads isn't
recognizing the call when it is embedded like this. It just brings up
a blank page in all instances, which is the same issue I was having
with the original code string.

On Sat, Jul 31, 2010 at 2:25 PM, Jason Pruim li...@pruimphotography.com wrote:
 Hi Vince,


 On Jul 31, 2010, at 3:15 PM, Vince Leibowitz wrote:

 ?php if (is_home(?php wpads('728leaderboard'); ?)
 (is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
 wpads('leaderboard5);?) ?

 Try:


 ?php

 if (is_home(wpads('728leaderboard');)

 (is_page(42)( wpads('leaderboard1')

 (is_page(10)(wpads('leaderboard5))

 ?

 All I did was pull out all the jumps into PHP since the whole thing is a php
 if statement I didn't see the need to keep opening and closing php... Unless
 I'm not understanding why you are :)






-- 
~~
Vince Leibowitz
CapitolAnnex.com
twitter.com/CapitolAnnex
myspace.com/capitolannex facebook.com/profile.php?id=501233189
vince.leibow...@gmail.com
AOL, MSN, Yahoo: vpltz || ICQ: 118433437

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need help calling multiple functions with if_is

2010-07-31 Thread Jason Pruim


On Jul 31, 2010, at 3:34 PM, Vince Leibowitz wrote:


That looks like it should work, but it doesn't. There isn't a reason
to close the embedded php statements, but I suspect wpads isn't
recognizing the call when it is embedded like this. It just brings up
a blank page in all instances, which is the same issue I was having
with the original code string.

On Sat, Jul 31, 2010 at 2:25 PM, Jason Pruim li...@pruimphotography.com 
 wrote:

Hi Vince,


On Jul 31, 2010, at 3:15 PM, Vince Leibowitz wrote:


?php if (is_home(?php wpads('728leaderboard'); ?)
(is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
wpads('leaderboard5);?) ?


Try:



?php



if (is_home(wpads('728leaderboard');)



(is_page(42)( wpads('leaderboard1')


I just noticed right here... You're missing a '  which would cause  
problems... Very possibly what would fix it in fact



(is_page(10)(wpads('leaderboard5))


?

All I did was pull out all the jumps into PHP since the whole thing  
is a php
if statement I didn't see the need to keep opening and closing  
php... Unless

I'm not understanding why you are :)







--
~~
Vince Leibowitz
CapitolAnnex.com
twitter.com/CapitolAnnex
myspace.com/capitolannex facebook.com/profile.php?id=501233189
vince.leibow...@gmail.com
AOL, MSN, Yahoo: vpltz || ICQ: 118433437



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Need help calling multiple functions with if_is

2010-07-31 Thread Peter Lind
On 31 July 2010 21:34, Vince Leibowitz vince.leibow...@gmail.com wrote:
 That looks like it should work, but it doesn't. There isn't a reason
 to close the embedded php statements, but I suspect wpads isn't
 recognizing the call when it is embedded like this. It just brings up
 a blank page in all instances, which is the same issue I was having
 with the original code string.

 On Sat, Jul 31, 2010 at 2:25 PM, Jason Pruim li...@pruimphotography.com 
 wrote:
 Hi Vince,


 On Jul 31, 2010, at 3:15 PM, Vince Leibowitz wrote:

 ?php if (is_home(?php wpads('728leaderboard'); ?)
 (is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
 wpads('leaderboard5);?) ?

 Try:


 ?php

 if (is_home(wpads('728leaderboard');)

 (is_page(42)( wpads('leaderboard1')

 (is_page(10)(wpads('leaderboard5))

 ?

 All I did was pull out all the jumps into PHP since the whole thing is a php
 if statement I didn't see the need to keep opening and closing php... Unless
 I'm not understanding why you are :)





?php
if (is_home) wpads('728leaderboard');
elseif (is_page(42)) wpads('leaderboard1');
elseif (is_page(10)) wpads('leaderboard5);
?

That's assuming you just want to call wpads. If you want to output the
return of wpads, stick echos in there.

And might I kindly ask of you to please read
http://dk2.php.net/manual/en/control-structures.if.php and
http://dk2.php.net/manual/en/language.basic-syntax.phpmode.php

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 help calling multiple functions with if_is

2010-07-31 Thread Vince Leibowitz
Peter,

That works like a dream! Thanks very much for your help and pointing
me to those pages. I've already noticed something over there that will
fix another problem I've been having.

You folks are great for offering the assistance. Have a good weekend.

Vince

On Sat, Jul 31, 2010 at 2:50 PM, Peter Lind peter.e.l...@gmail.com wrote:
 On 31 July 2010 21:34, Vince Leibowitz vince.leibow...@gmail.com wrote:
 That looks like it should work, but it doesn't. There isn't a reason
 to close the embedded php statements, but I suspect wpads isn't
 recognizing the call when it is embedded like this. It just brings up
 a blank page in all instances, which is the same issue I was having
 with the original code string.

 On Sat, Jul 31, 2010 at 2:25 PM, Jason Pruim li...@pruimphotography.com 
 wrote:
 Hi Vince,


 On Jul 31, 2010, at 3:15 PM, Vince Leibowitz wrote:

 ?php if (is_home(?php wpads('728leaderboard'); ?)
 (is_page(42)(?php wpads('leaderboard1'); ? (is_page(10)(php?
 wpads('leaderboard5);?) ?

 Try:


 ?php

 if (is_home(wpads('728leaderboard');)

 (is_page(42)( wpads('leaderboard1')

 (is_page(10)(wpads('leaderboard5))

 ?

 All I did was pull out all the jumps into PHP since the whole thing is a php
 if statement I didn't see the need to keep opening and closing php... Unless
 I'm not understanding why you are :)





 ?php
    if (is_home) wpads('728leaderboard');
    elseif (is_page(42)) wpads('leaderboard1');
    elseif (is_page(10)) wpads('leaderboard5);
 ?

 That's assuming you just want to call wpads. If you want to output the
 return of wpads, stick echos in there.

 And might I kindly ask of you to please read
 http://dk2.php.net/manual/en/control-structures.if.php and
 http://dk2.php.net/manual/en/language.basic-syntax.phpmode.php

 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




-- 
~~
Vince Leibowitz
CapitolAnnex.com
twitter.com/CapitolAnnex
myspace.com/capitolannex facebook.com/profile.php?id=501233189
vince.leibow...@gmail.com
AOL, MSN, Yahoo: vpltz || ICQ: 118433437

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Text editor for Ubuntu with FTP

2010-07-31 Thread David Robley
Jordan Jovanov wrote:

 Hello to All,
 
 I only whant to star discussion for who is the best programm to write
 php and html script. I use dreamweaver, but now I change my OS to ubuntu
 and I want some suggestions for some Text editor for FTP for Ubuntu
 
 
 Thanks A lot
 Jordan Jovanov

Ah, it's the time of year for an editor thread again :-) Have a look at
http://www.php-editors.com/ or
http://en.wikipedia.org/wiki/List_of_PHP_editors or even google php
editor

As for best that can be very subjective depending on what _you_ want the
editor to do.


Cheers
-- 
David Robley

System going down at 1:45 p.m. for disk crashing.
Today is Pungenday, the 67th day of Confusion in the YOLD 3176. 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php