Jump to content

Viola

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by Viola

  1. Yes, the pear directory allows read access. I assume that this means that apache can read. /usr/share/pear is drwxr-xr-x /usr/share/pear/PEAR is drwxr-xr-x /usr/share/pear/PEAR.php is -rwxr--r--
  2. Hi Thanks for the suggestions. I found the error log under /var/log/httpd/error_log, but it didn't seem to have any relevant errors in it (the only error said [error] (9)Bad file descriptor: apr_socket_accept: (client socket)) -- not sure what this is, but it doesn't look relevant -- please say if you think otherwise). I also added error reporting to a test page: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); require_once 'System.php'; var_dump(class_exists('System')); ?> The errors I got are: Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /earlier_parts_of_path/httpdocs/System.php on line 26 Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.:/usr/share/pear/') in /earlier_parts_of_path/httpdocs/System.php on line 26 This seems to indicate that my include_path is wrong. However, I have tried: /usr/share /usr/share/pear /usr/share/pear/ I don't think that I should have to include my httpdocs path in the include_path directive, should I? However ... Another thing that I have noticed is that I do not have go-pear (used find . -name go-pear). I haven't yet found an explanation of what exactly this does. Looking at what I can find, it seems to be related to using PEAR as part of a website. Do you think that this may have anything to do with it? Viola
  3. My server is with GoDaddy and I asked their support. They said that PEAR is installed. Doing find, finds a PEAR installation in /usr/share/pear. Typing "pear" on the command line causes a list of pear commands to be listed. I did yum list php-gd and found that php-gd.i386 is installed. Thorpe -- thanks. I've already done this. I've tried setting the path to /usr/share and I've tried /usr/share/pear.
  4. Corbin -- Error logging is turned on, but I'm not sure where to look to find the log. Thorpe -- the CAPTCHA worked fine until the server was upgraded. The website has a PEAR directory that contains CAPTCHA. The server has PHP and PEAR installed. I think that I need to somehow link them together (perhaps some sort of paths definition or something?).
  5. Hi Corbin Thanks for replying. I already have php-gd installed (php-gd.i386). Any more ideas? Viola
  6. Hi I have a website that uses PEAR CAPTCHA. Recently, I got a new dedicated server, with Plesk and the CAPTCHA images no longer work. The server has PHP installed and also has PEAR installed. Please can you help me -- perhaps by suggesting a few things that I can check to troubleshoot this issue? Thanks in advance for your help. Viola
  7. If each span area has a name, you can use document.getElementsByName() to get the spans with the code, then iterate each one and select like you would normally.
  8. If a checkbox is checked, the value is posted, otherwise it is not. You would need to say something like if checkbox value is empty then cbxValue = 'n'; else cbxValue = checkbox value; then use cbxValue.
  9. Viola

    Tables

    I agree. It doesn't seem right to use tables to display a list. Cooper94 -- you could try something like this: <div style="width:50%;"> <!-- Outer div --> <div style="float:left;width:50%;"> <!-- left column --> <ul style="list-style:none;padding:2px;margin:2px;"><!-- unordered list --> <!-- list items --> <li>Albany, NY (ALB)</li> <li>Atlanta, GA (ATL)</li> <li>Baltimore, MY (BWI)</li> <li>etc...</li> </ul> </div> <div> <!-- right column --> <ul style="list-style:none;padding:2px;margin:2px;"><!-- unordered list --> <!-- list items --> <li>Raleigh, NC (RDU)</li> <li>Richmond, VA (RIC)</li> <li>Rochester, NY (ROC)</li> <li>etc...</li> </ul> </div> </div> If you're not familiar with styles, take a look at this website: http://w3schools.com/css/
  10. Take a look at [url=http://www.w3schools.com/CSS/pr_text_white-space.asp]http://www.w3schools.com/CSS/pr_text_white-space.asp[/url].
  11. Thanks mikesta707. Unfortunately, I'm already doing that. The rest of the html message displays fine. In case it sheds any more light -- I looked at the message source and that shows the link as <a href="../support/support_downloads.php">Click here to go to our downloads page</a> For some reason, mail() seems to be taking my url and converting it to a relative path. Not sure why or what I need to do to get it to accept my url as-is.
  12. Viola

    Tables

    If all you're wanting to do is show a single list, but are using tables to create a 2-column visual layout, I guess you could create a table with 1 row and 2 columns. Then you wouldn't have to rearrange your lists. <table width="100%" cellpadding="1" cellspacing="1" style="vertical-align: top;"> <tr> <td>Albany, NY (ALB)<br/> Atlanta, GA (ATL)<br/> Baltimore, MY (BWI)<br/> Bangor, MA (BGR)<br/> etc... </td> <td>Raleigh, NC (RDU)<br/> Richmond, VA (RIC)<br/> Rochester, NY (ROC)<br/> San Antonio, TX (SAT)<br/> etc... </td> </tr> </table> I'm not sure what the "good practice" gurus would have to say about this, though.
  13. Hi I'm having a bit of trouble including a link to my website in an email and was wondering if anyone can help? Just before I call the mail function, I put: echo "<pre>"; print_r($msg['body']); echo "</pre>"; so that I can see if the path is being passed into the mail function correctly. The link is passed into mail() as: <a href="http://mydomain.com/support/support_downloads.php">Click here to go to our downloads page</a> However, when I get the email (which for testing purposes I'm sending to myself), it says this: <a href="http://../support/support_downloads.php">Click here to go to our downloads page</a> Please can you can help me with trying to figure out what I'm doing wrong? Thanks in advance. Viola
  14. Viola

    Tables

    Do you mean that you want it in 2 columns? <tr> means "table row", so the way you've done it would display it in two rows (lots of columns). If so, try <table width="100%" cellpadding="1" cellspacing="1"> <tr> <td>Albany, NY (ALB)</td> <td>Raleigh, NC (RDU)</td> </tr> <tr> <td>Atlanta, GA (ATL)</td> <td>Richmond, VA (RIC)</td> </tr> etc... </table> </code] If this isn't what you mean, please can you explain some more?
  15. Does the second drop-down box not show at all, or does it not show the options correctly? What does it show?
  16. Hi Thanks for both your responses -- gave me "food for thought". PFMaBiSmAd -- I thought that you could be right, so I uncommented the natcasesort from my code. The result was that it made no difference to the order that the array was shown in. My local version was still in alphabetical order, and my remote version was not. There must be something, somewhere on my local machine that is sorting the files. I think that this may be external to my code (see below) because there aren't any sort functions in my code the code on both machines (local & remote) is the same severndigital -- thanks for the link. I found that although natcasesort() didn't work on my remote machine, sort() did work, so I implemented the ignorecasesort() function that was posted by "Ulli at Stemmeler dot net" at the bottom of that page. It's still a bit of a mystery to me as to: why the files on my local machine are sorted, even when I'm not using a sort function why natcasesort doesn't seem to work on my remote machine But at least I've done the job at hand. Thanks for your help. Viola /* Return a list of files in a given folder Returns an array of filename strings, or false if there are no files in the folder. The filenames will NOT contain path info. */ function ListFilesInFolder($path) { $result = false; $dir = dir($path); $dir->rewind(); while ($file = $dir->read()) { if (is_file($path . $file)) { $result[] = $file; } } $dir->close(); return $result; } /* Return an array of TSupportFile objects for each file in a given client folder. The filenames will not contain path info. */ function ListFilesInClientFolder( $folder ) { $s = ListFilesInFolder( CLIENT_DIR . "/" . $folder . "/" ); // natcasesort($s); $count = count( $s ); $result = array(); for ($i=0; $i < $count; $i++) { $result[] = new TSupportFile( $s[$i], $folder ); } return $result; } /* Gets a list of files in a directory and displays them in a web page */ function MakeDownloadList( $foldername ) { $files = ListFilesInClientFolder( $foldername ); /* The rest of this function is just outputting html that displays each file's details in turn. I cannot see any calls to any sort functions in here or in any sub-fuctions that are in here. */ }
  17. Hi I have a problem that I was hoping that someone can help me with. I'm trying to use natcasesort() to sort an array. This works fine on my laptop (which I use for testing and which uses php 5.2.6), but doesn't work at all on the server that hosts my website (it's just displayed unsorted; uses php 5.2.4). Both machines run apache. I figure that as it works fine in one place, but not in the other, it is likely that the problem is in the difference between the configurations of these two php installations. Please can you tell me if you have any idea of what could be causing this? In case it helps shed some light, here's my code (in brief): $arr= array(); $arr = ListFilesInFolder( CLIENT_DIR . "/" . $folder . "/" ); $sorted = natcasesort($arr); Thanks for your consideration. Viola
  18. Pretty much as I thought -- I didn't think that there was a php function that does that. If there was, my life would have been much easier. The answer is -- my server is linux. I'll have to look into "exec". I've also come across "touch" as well. This makes things more complicated for what I want to do than it would have been if I could have used php (mainly because I'm more familiar with php than with shell scripting). However, as BASH scripting has very little to do with PHP, I guess that it's not a topic for this forum. Thanks for your help.
  19. Hi I would like to know if it is possible to set a file's timestamps (last modified, last accessed etc.). I know the functions like filectime etc. get the info., but I want to be able to set it. Please can you tell me if you know -- is this possible? Thanks. Viola
×
×
  • 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.