Jump to content

aluminumpork

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

aluminumpork's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Okay, this isn't really a problem, but rather, an annoyance. In Javascript (and other languages), I'm used being able to grab a specific index from a function that returns an array. For example, in Javascript: function makeSomething(){ var arr = new Array(); arr[0] = 'something'; arr[1] = 'something_else'; return arr; } alert(makeSomething()[1]); The above code would pop up a box containing the text 'something_else'; To do the same in PHP, I would have to do: function doSomething(){ $arr[] = 'something'; $arr[] = 'something_else'; return $arr; } $results = doSomething(); echo $results[0]; Sometimes I'll use PHP's reset, but that can get annoying if I want to drill down through a multi-dimensional array "reset(reset(reset(someFunction())));" Does anyone have any tips or magical things that can help? Thanks!
  2. I finally got the SSH2 PHP extension installed and working properly and have played around with some of the functions and also a couple of classes that simply things. However, I guess I'm still a bit confused as to how to connect to your standard fare Linux box and actually get something done. For instance, most of the SSH2 classes wrap the ssh2_connect and ssh2_auth_password functions together, so you can do something like this: $ssh->connect($host, $user, $pass, $port); However, this always fails with an authentication failed message, even though I -know- the information I provided is correct. I'm kind of at a loss as to where to go from here. My ultimate goal is to be able to connect, run a command, retrieve the results of the command and disconnect, which I have been able to do with a telnet class in PHP, without much issue. Due to the insecurity of Telnet however, I do not want to continue using it. Any help is greatly appreciated. Thanks.
  3. I'm using the standard mail function in PHP5, which is working fine. However, my problem is that it seems only a few email providers actually accept email from me. Gmail works the best, Yahoo also works, but marks it as bulk. But a bunch of other ones (ISPs, Charter Communications included) do not receive anything what so ever. Is there anything special about the email I'm sending that could be causing them problems? Am I missing something critical in the header that is completely killing it? I'm basically using it like: mail('to','subject','message','From:someone@somedomain.com'); Should I add anything to the header to ensure it's delivery? I don't think the domain I'm sending from is an issue. It's a brand new domain and hasn't been marked by any spam lists or anything. I was thinking that I could try sending from a known good SMTP server. Thanks
  4. Nevermind, searched the forums and found the thread just below [url=http://www.phpfreaks.com/forums/index.php/topic,91059.0.html]http://www.phpfreaks.com/forums/index.php/topic,91059.0.html[/url] Works great. Thaaaannnkkk yooouu.
  5. Thanks for the tip also. I was stumped.
  6. This question pertains to Debian, and I'm compiling everything from source. So I've got GD compiling just fine, and it seems just fine with PNG and JPEG support. In the beginning of the ./configure script, it states that JPEG support is enabled and PNG support is enabled along with a few other things. The configure, make and make install all go fine. I then compile PHP5 with some like this: ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-jpeg --with-gd --with-zlib It also configures, make and installs perfectly, without warnings, errors etc. The build works great and PHP runs fine. However, when I view phpinfo(), under the GD section, there is no JPEG support. GIF support is enabled along with PNG and others, but no mention of JPEG. I also tried some of the JPEG specific GD functions, none work, all come back undefined. PNG and GIF functions work fine. I did notice that when make installing GD, that there was no mention of any jpeg programs being installed. There were png and gif programs being installed, but again, it stated that JPEG support was there. I've been trying to get GD with JPEG support working for quite some time now. This is the farthest I've gotten. Any tips? Thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.