Jump to content

arfa

Members
  • Posts

    28
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

arfa's Achievements

Member

Member (2/5)

0

Reputation

  1. hey scootstah.! Barely had I found the flash plugin for firefox - I turn around and - presto - the answer to my problem. Totally worked. Many thanks.
  2. Going back to an old script after upgrading to php5... This is not my code - PEAR.PHP - used as part of a backup script I wrote/modded ___________________ The relevant comment in the script * IMPORTANT! To use the emulated destructors you need to create the * objects by reference: $obj =& new PEAR_child; _________________ The error msg in the browser Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3\www\brama\backup\PEAR.php on line 562 Deprecated: Assigning the return value of new by reference is deprecated in C:\Program Files\EasyPHP-5.3\www\brama\backup\PEAR.php on line 565 __________________ The relevant code line in the script. if ($skipmsg) { 562 $a = & new $ec($code, $mode, $options, $userinfo); return $a; } else { 565 $a = & new $ec($message, $code, $mode, $options, $userinfo); return $a; } I have had a few blips going to ver5 but this one I can't seem to rectify. Any leads welcome. Thanks
  3. And on reading the manual (again) more closely I do indeed see: array_push "Returns the new number of elements in the array." Thanks
  4. Adding a value to an array. Why won't this work? $notify_list=file($filename); $notify_list = array_push($notify_list,"$user_em"); foreach($notify_list as $key => $val) { echo "$val<BR>"; } It prints the number of records. the file() is clearly an array and foreach prints as expected. I wonder if it is something to do with the \n at the end of each line? I could easily loop and manually build the new array but.... It seems so simple.
  5. You are right - I no longer seem to have permission. Weird. I am having a look at SSH - quite new to me. Thanks for the lead. I am also downloading a few "unix permissions basics" pages This is really bugging me.
  6. You may find an existing script but your requirements are pretty specific so best have a go at coding it yourself.
  7. You don't make clear what the problem is. What error are you getting? Why not read using file() - this gives you an array by line.
  8. I have a hacker on/in my site and the trick seems to be to change permissions on various files. Obviously I need to fix the hole and eject the hacker but, in the meantime I am having trouble resetting permissions. The file(s)/dirs in question are owner www-data [as opposed to ftpweb or base owner] I have tried resetting perms using: - my ftp client - no! - Using a backdoor chmod app on the same server within the same root - no! - A small php script chmod.php I wrote: <?php echo "<form action=chmod.php method=POST> <input type=text name=path size=50> <input type=submit value=CHMOD>"; if (isset($_POST['path'])) { $path = $_POST['path']; chmod($path,0755); echo $path; unset($_POST['path'],$path); } ?> I have this installed in the dir above the dir I want to change and have tried both absolute and relative paths. No change. Is there something missing in this code or is there an alternative. The directories have been changed to: 40700 - drwx------ GRrrrrrrr..... and other frustrated emoticons. Any suggestions? thanks - arfa
  9. arfa

    ereg_replace

    thanks for the heads up on php6 Generally there seems to be a very slow uptake of php5 And, thanks for the str = str works just fine.
  10. arfa

    ereg_replace

    A simple one? -- for those that know how. I am trying to strip everything from a string that is NOT a-z, 0-9 I started with: ereg_replace("[^a-z0-9]",'',$string); Tried various other permutations. Oh dear... What should I be doing? thanks - arfa
  11. Snow is on the way; wood cut but keys unpoked for a while thanks again - it works just fine - arfa
  12. Great that I am not the only one that sitting for hours poking keys and punching a mouse ) thanks for the quick turnaround. Yes, I can run phpinfo but this just gives me a list of the install. I was wondering if there was an on-the-fly test for curl, as in... if (!file_exist('sdf.txt') {...} else {...} if no curl then I would set size and '0' and bypass the whole routine
  13. cache filesize - hmmmmm? The page build is around a podcast database which will be modified (hopefully) regularly. The testing I have done (on dial-up) seems quick enough for on-the-fly. It does give me the thought to running the curl script when the file is uploaded (by an non-tech volunteer) and writing the value to the database. Is there some way to test if curl is installed. It is not on my local PHP build (EasyPHP 1. and gives a fatal error. I am downloading ver2.0 >> Call to undefined function: curl_init() This is a minor point but I like to cover the bases. >> they have a hidden forward in there I studied the code and, apart from the "FOLLOWLOCATION" line couldn't see the diff. Where is the 'hidden forward'? thanks again - arfa
  14. way cool for curl I see the more I learn the more I see there is to learn. Many thanks rhodesa Stephen: that could work but strlen does not accurately represent filesize. also, this whole thing with remote files means (certainly in this case) file_get_contents returns an error: file not found or some such. thanks to all - yet another case closed
  15. great to hear back from you Yes, the curl code works on the phpfreaks logo I tried this on another server to eliminate that possibility. both returned 43246 but, modify the URL in the same (test) file pointing to www.archive.org and it returns '0' The full URL is: http://www.archive.org/download/ConnectionAndAlienation/20080221AVIRADHAMMO_32kb.mp3 Feed it to a browser and it loads the file -- it *is* there.!!! @$@#$@ readfile() works OK for the download script and, while I don't fully understand wrappers we have "allow_url_fopen" working???? So, what could be missing? this kind of thing is what makes it challenging/fun/... thanks again - arfa
×
×
  • 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.