Jump to content

PirateNinjaNala

New Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

PirateNinjaNala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. OS: ubuntu Edgy Eft PHP version: 5 PostgreSQL version: 8 I installed Postgres through apt-get. Whenever I launch pgAdmin I get an error that tells me that the server lacks instrumentation functions. I have checked Synaptic and I cannot find anything meeting this description. I am also having trouble getting PHP to play nicely with it. The printout from phpinfo() says absolutely nothing about Postgres or its existence on this machine. I am sure that it is installed and running (minus the aforementioned instrumentation functions.) How would I fix these problems? Google and the forum search button have both failed me. Thank you all for your time.
  2. I tried this, but no luck. I really don't know what I'm doing wrong. $directory = "\\\zim\\Bionutrition\\Data" . " " . "Transfer\\ESHA\\";
  3. I've tried it without the extra slashes, but it still doesn't work. I've tried it with two and I've tried it with none.
  4. I want to write a program that will upload data from files into a database. The files are on a different server than the web server. This is what I am currently doing: $directory = "file://///zim/Bionutrition/Data" . " " . "Transfer/ESHA/"; $scandir = scandir($directory); This is the error message that I get. Warning: scandir(file://///zim/Bionutrition/Data Transfer/ESHA/) [function.scandir]: failed to open dir: No such file or directory in /home/web/gcrcstaff.crc.medctr.ohio-state.edu/bionutrition/data_mgt/ESHA/index.php on line 8 Warning: scandir() [function.scandir]: (errno 2): No such file or directory in /home/web/gcrcstaff.crc.medctr.ohio-state.edu/bionutrition/data_mgt/ESHA/index.php on line 8 I am absolutely sure that the path exists. I have copied and pasted that url into Firefox without a problem. I have tried accessing that directory by using the machine's IP address instead of its name, but I get an error that says "failed to open dir: not implemented".
  5. I played with it a bit and it's working now. Thanks for your help!
  6. I tried what you suggested, but I am still getting the same error. It is very frustrating. Is this just a limitation of the language?
  7. Thank you! I am at work right now, so I will try that and let you know how it works out.
  8. I am running into problems accessing objects that I have nested within other objects. I am using PHP 5. My workstation is Windows XP, but I'm not sure about the details of the webserver where I work. It might be linux, it might be some version of windows, or some combination. I'm pretty sure the webserver runs Apache. (If the answers to those questions are critical, I will ask my boss whenever he comes back from sick leave.) Anyway, this is my problem. I first tried using subclasses but discovered that PHP does not allow this, so I included the files for the subclasses into the main class. That little workaround has allowed me to put objects within other objects, but now I can't get them back out! How do I access nested objects? I have tried searching Google and this site's archive, but I'm having trouble finding anything. I am currently trying something like this. I cannot get this approach to work. What am I doing wrong? file1.php <?php include_once( "file2.php" ); class SuperClass {     $this->nestedObjects = array();     function addObject( $object )     {           array_push( $this->nestedObjects, $object );     }     function getObjectNumber( $n )     {           return $this->nestedObjects[ $n ];     } } ?> file2.php <?php class SubClass {     function __construct( $name )     {           $this->name = $name;     }     function getName()     {           return $this->name;     } } ?> file3.php <?php include_once( "file1.php"); $a = new SuperClass(); $b = new SubClass( "example" ); $a->addObject( $b ); $c = $a->getObjectNumber( 0 ); $c->getName(); ?> Basically, my problem is that the last line of code in file3, $c->getName(), does not work. I keep getting an error message like this one: [b]Fatal error: Call to a member function getName() on a non-object in file3.php on line 7[/b] I absolutely cannot figure out how to access the nested object! Please help. Is my approach wrong? Does PHP just not support this? Is there a workaround? Thank you all for your time.
×
×
  • 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.