Jump to content

davemere

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

davemere's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks both of you, I know that was an easy one, but was having problems there...Sunday evenings... print_r($array); is really useful as well. I put applied it to the main content variable and it's showing everything that is returned. thanks!
  2. Hi there I'm building anl app where I'm passing a number of different variables to my pages. The one I'm interested in right now is an array, which itself contains what I think is another array. I need to split out one particular field so I can change the way it is processed by the front end. Problem is that I've been unable to find the syntax to help me do this! ??? I've found a function that lets me display what the variables looks like: array(1) { [0]=> array(3) { ["value"]=> string(14) "string content" } } I need to extract the string "string content". I think what I'm looking at here is an array of an array. Could anyone suggest what code I can use to split out this string? I'm very new to php, so please excuse this basic question!
  3. odbc_error returns this message: [sybase][ODBC Driver]Optional feature not implemented Sure. Does the following line not provide a test of the resource? How else might I do it if necessary? $result = odbc_exec($conn, $qry) Yes. It's the name of a ODBC data source, tested it with MS Access and it works ?????? I think I'm going to try java instead. PHP/Sybase is beginning to frustrate...
  4. Ummm thanks, but I want to remove the error rather than hide it! Besides which, the code isn't working. All that's returned is the error message, not the data I requested. I wonder now if it really is connecting at all to be honest.
  5. bbbbbump! Excuse the bad form, but this one is really frying me! Has anyone out there managed to successfully work with Sybase and PHP? I just can't imagine this isn't possible!
  6. Hi y'all I'll keep this simple! Here's my code: $conn = odbc_pconnect("conn", "id", "pwd"); if (odbc_error()) { echo "Connection failed <br>"; exit; } else { echo "Connection successful"; }; $qry = "SELECT count(*) FROM <table>"; $result = odbc_exec($conn, $qry); echo odbc_result($result,1); Here's the result! This should be so simple!! It can't be a code problem. Can anyone offer a hint as to what feature I'm missing? thanks!
  7. Eventually I connected through ODBC instead. This worked. I still have no idea how to connect using sybase_connect. Still, a solution is a solution. thanks to those who replied. Please check out my next question, just above . . .
  8. Ok . . . returning to this problem, I've discovered a few threads around that state I need Sybase Client Libraries to connect to sybase, either directly or through ODBC. To be honest I wouldn't care which one as long as I can do it. Compiling a definite list of these .dlls has been tricky. I know they at least contain: libcs.dll libct.dll apphelp.dll If anyone is successfully using php with Sybase, could you please take a look at the .dlls you use (they should be in the php folder or php/ext folder) and see if you have these? Someone must be having more luck than me here! Many thanks, please contact me if I can give any more info!
  9. Bit of an update...found a thread mentioning some companion DLLs required by php_sybase_ct.dll These files are called libeay32 and ssleay32. Unfortunately the thread descends into a bit of an argument so isn't very helpful! http://groups.google.co.uk/group/comp.lang.php/browse_thread/thread/c102172dfb353c78/2833e9b9121d7199?hl=en&lnk=st&q=%2Bphp_sybase_ct.dll#2833e9b9121d7199 tsk tsk. Perhaps if I put it another way. Is or has anyone used php successully with Sybase? If so, what did you do to install that I haven't? Cheers, Dave
  10. Ok here we go . .. php.ini is indeed C:\Program Files\PHP\php.ini extension_dir is indeed C:\Program Files\PHP\ext as for sybase extension I'm not entirely sure. I can't see a seperate table for sybase, unlike mysql In the environment table we do have: SCROOT = C:\sybase\Shared\Sybase Central 4.3 and a few other sybase related variables which are correct as far as I know. I can check with our DBA. Ah ha, this looks like the one. Error message created on Apache startup is: PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\Program Files\\PHP\\ext\\php_sybase_ct.dll' - The specified module could not be found.\r\n in Unknown on line 0 I confess I don't entirely understand this error. That file is definitely there, and named as listed above. Opening the dll just gives me machine code type stuff. Does this shed any light?
  11. Hi there guys, thanks for answering php.ini is in Program Files/PHP. There are no other installations as far as I know! I found an old php-ini file in my profile and deleted it, restarted Apache, same result! How can I check that this is the file is being used? php.ini contains this line extension_dir="C:\Program Files\PHP\ext" - seems to be doing the job Ugh is that reinstalling Sybase? Don't fancy that much. What does this actually mean? Install Sybase to c:program files/php? Is there a config file I could change instead?
  12. Hello phpfreaks, I'm trying to use a sybase database with php-5 and am having a few problems with simply connecting. Here is what I've done so far: 1) Copied php_sybase_ct.dll to PHP/ext 2) Added [php_SYBASE] extension=php_sybase_ct.dll to php.ini 3) Restarted Apache and still I get this . . . Fatal error: Call to undefined function sybase_connect() in C:\www\sybase.php on line 9 So, can anyone suggest what I'm missing? Thanks, Dave
×
×
  • 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.