Re: [PHP-DB] Interbase + PHP
On Monday 26 February 2001 04:08, Duky wrote: > I am using a Unix/Linux server. How can I recompile my php to use > interbase?? Where can I find that, to recompile? what do I need to > recompile and what do I have to include into that file? I am new to > this. so if somebody can help me out.. really thanks. > > Duky If you're on linux you should configure php with --with-interbase=/path/to/your/interbase/install.dir and then compile it. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Interbase + PHP Error
On Thursday 01 March 2001 16:19, W. Yuen wrote: Hi Wicky To start with, never store the database file under your http document root, it is a big security risk. Can you connect to the databse with isql, using the same connection string ? If so, examine the log file to see what's going on (interbase.log in interbase's installation directory). If you're using the superserver version you shuold add localhost to /etc/hosts.equiv. p.s $ibname in your script seems to be CV.gdb (it's not set in the script you've posted). if the file is name cv.gdb it will not work. HTH -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd > I am getting this error, but I don't know what the reason is for this > error. can somebody help me out? > > Warning: InterBase: Unable to complete network request to host > "localhost". Failed to establish a connection. Connection refused in > /home/httpd/html/test/php-test/ibconnect.php on line 12 > Can't connect to CV.gdb with SYSDBA user. > > Ibconnect.php look likes this: > > > > InterBase ISQL > > $ibdir="/home/http/html/test/php-test/"; > ?> >face="arial,verdana,helvetica" size=3> > InterBase Connect > > $ibfullname="localhost:" . $ibdir . $ibname; > $conn=ibase_connect($ibfullname,$login,$password); > if (!$conn) { > echo "Can't connect to $ibname with $login user."; > } else { > echo "$ibname connected by $login user."; > ibase_close($conn); > } > ?> > > > > > Enter your > query: > > > > > "; ?> > > "; > ?> > > "; > ?> > > > > > > > > > > Thnx for the help. > > Wicky -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Create view and Select in Interbase
On Thursday 01 March 2001 17:37, job sm wrote: > To all good people, > > I've got troubles with the following code: > > $dbh = DbGet(); /*fce na ibase_connect*/ > $stmt1="create view vserv0 as select distinct > product_id from product where podminka;"; > $sth = ibase_query ($dbh, $stmt1); > $stmt2="select * from vserv0;"; > $sth = ibase_query ($dbh, $stmt2); > ?> > > It should create a view vserv0 and make a selection > (select * from ...}. For some reason it process always > just the first query (create). The second one gives me > a message "table vserv0 doesn't exist". When I create > view vserv0 manualy (IB console) it works without any > problems. > please help. > > Thanks Stephano PHP's Interbase driver prepares the query even when it's not needed, may create views queries can't be prepared, I don't now. Try to check to ibase_errmsg() after the first query to see what's happening. Usually views should be created outside the scripts. Don't use DDL in scripts, it's not necessary, and will slow your scripts down. Create the view using isql or your favorite management tool and then acesss it in your script. -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Interbase
On Thursday 08 March 2001 23:05, you wrote: > I am trying to connect to local Interbase server, folowing exactly PHP > online documentation. But I always get a warning: > "InterBase: unavailable database in d:\program files\apache > group\apache\htdocs\\tabulka.php on line 22" > > my script is: > $db=ibase_connect('D:\Program > Files\Borland\Interbase\Examples\Databse\employee.gdb', $username, > $password); > > and I am using Apache under Windows NT 4. > > Does anybody see a mistake? Thank you for your help > > Martin You've misspelled your db path, you've wrote ...\Examples\Databse instead of ...\Examples\Database BTW, the coreect connection string for interbase (using tcp/ip) is : HTH -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] column names
On Tuesday 03 April 2001 23:10, Mauricio Junqueira wrote: > HI, > > does anyone knows how to retrive information about the columns names of a > table? > I know that is possible to use show table mytable using isql but > I need to get information about the columns using sql. > that information is to be accessed with a php script. so, I'm looking > for something resembling "select info from table" > > How may I supposed to do that? Hi Mauricio, I guess you're using Interbase (isql). The system table your looking for is named RDB$RELATION_FIELDS Your select should be something like: select RDB$FIELD_NAME from RDB$RELATION_FIELDS where RDB$RELATION_NAME = 'your_table_name' I'm building a new system, and I don't have an installation of Interbase I can check this on. I've got it from the Interbase documentation (the LANGREF.pdf file). HTH -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] interbase (?) field contents does not show
On Sunday 29 April 2001 19:00, GMansky wrote: > I followed the documentation on interbase. I have the following code: > > $rowcount = 0;$dbh = ibase_connect ($host, $username, $password); > $stmt = 'SELECT * FROM contact'; > $sth = ibase_query ($dbh, $stmt); > while ($row = ibase_fetch_object ($sth)) { > print $row->lastname . "\n";$rowcount = $rowcount+1; > } > echo $rowcount;ibase_close ($dbh); > ?> > $rowcount gave me the correct number of rows but referenceto any field name > does not show anything. I tried uppercaseand it still does not show > anything. Anything that I am missing? > Thanks in advance, > George Hi George Try using uppercase, ibase_fetch_object will return fields as uppercase. So: print $row->LASTNAME; You can see this info in the user contributed notes in the on line manual. goto: http://www.php.net/manual/en/function.ibase-fetch-object.php -- Meir Kriheli There's someone in my head, but it's not me - Pink Floyd -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] RE: Probably a stupid home server question ........
On Thursday 19 July 2001 19:25, Andrew Chase wrote: > Make sure ahead of time whether the cable ISP gives you a static IP address > or a dynamic one... Most of them in the US only give you dynamic IP's. > They don't change all that often, but it does make it tough to host a > domain name if your IP address is liable to change at any given moment. You can always use dynamic dns for this. See http://www.dyndns.org. -- Kriheli Meir -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP linux interbase Apache
On Thursday 06 September 2001 13:31, Stephane MOREL wrote: > Hi all > I'm new on PHP. I've installed PHP interbase Apache correctly. But I > would like to connect Interbase database through PHP. So I enable > interbase support for php by doing this : > ./configure --with-interbase --with-apache --enabled-track-vars if you compile with --with-apache, you'll have to recompile apache too. You can compile it as a shared module --with-apxs=. Note: you'll need Apache development stuff (Depends on your distro). Any way after running make install make sure you've restarted Apache. > make > make install > Evreything works fine > When I do this : > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.gdb", > "SYSDBA", "masterkey"); > if (!$conn) > { echo "Access Denied!"; > exit; } > ?> > my browser say :Call to undifined function :ibase_connect. > I understood that I must enable the extension in php.ini. I think the > extension was automatically added to my php.ini but I can not find any > entry in php.ini for interbase. > If someone could help > TIA > > Steph -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP linux interbase Apache
On Thursday 06 September 2001 18:47, Stephane MOREL wrote: > Thank you for your answer > Interbase is installed in /opt/interbase. I don't use --with-apxs. > What I need now is to eanble connection to interbase through PHP. > It seems to me I only need to compile PHP with the > --with-interbase=/opt/interbase to create the file interbase.so.But I guess > I'm wrong > Thank you for your help It all depends on how you install PHP (assuming you're using Apache) --with-apache : static PHP compiled into apache (needs to cmpile Apache) --with-apxs: dynamic apache module (no need to compile Apache) without any of them : compiled as a standalone cgi executable As for compiling with interbase: --with-interbase=/opt/interbase won't create the interbase.so file, but rather compile PHP with interbase support built into it. If you want the shared interbase module (.so) you should compile with: --with-interbase=shared,/opt/interbase and modify your php.ini I suggest you read the relevant pages in the manual. Find them at http://www.php.net/manual/en/install.unix.php http://www.php.net/manual/en/install.configure.php -- Meir Kriheli > > steph > > Paul Cooper a écrit : > > On Thu, Sep 06, 2001 at 03:38:18PM +0100, Stephane MOREL wrote: > > > Thank you for your answer > > > after a glance on the net I have found I need interbase.so. This is not > > > present on my disk do you how can I retrieve it > > > steph > > > > How and where did you intsall interbase - it's been a while so I forget. > > I think the rpm version installs itself in /opt/interbase (you can check > > with rpm -ql interbase). If that is the case then you need to configure > > with > > > > ./configure --with-apxs=/path/to/apxs --with-interbase=/opt/interbase > > --enable-track-vars > > > > Paul > > > > > Meir Kriheli a écrit : > > > > On Thursday 06 September 2001 13:31, Stephane MOREL wrote: > > > > > Hi all > > > > > I'm new on PHP. I've installed PHP interbase Apache correctly. But > > > > > I would like to connect Interbase database through PHP. So I enable > > > > > interbase support for php by doing this : > > > > > ./configure --with-interbase --with-apache --enabled-track-vars > > > > > > > > if you compile with --with-apache, you'll have to recompile apache > > > > too. You can compile it as a shared module --with-apxs= > > > apxs>. > > > > > > > > Note: you'll need Apache development stuff (Depends on your distro). > > > > > > > > Any way after running make install make sure you've restarted Apache. > > > > > > > > > make > > > > > make install > > > > > Evreything works fine > > > > > When I do this : > > > > > > > > > $conn=ibase_connect("192.168.2.2:/opt/interbase/examples/employee.g > > > > >db", "SYSDBA", "masterkey"); > > > > > if (!$conn) > > > > > { echo "Access Denied!"; > > > > > exit; } > > > > > ?> > > > > > my browser say :Call to undifined function :ibase_connect. > > > > > I understood that I must enable the extension in php.ini. I think > > > > > the extension was automatically added to my php.ini but I can not > > > > > find any entry in php.ini for interbase. > > > > > If someone could help > > > > > TIA > > > > > > > > > > Steph > > > > > > -- > > > PHP Database Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: > > > [EMAIL PROTECTED] > > > > -- > > - > > Paul Cooper | Tel: 0121 331 7858 > > Senior Programmer and Database Engineer | Fax: 0121 331 7859 > > UCEcom | mailto:[EMAIL PROTECTED] > > University of Central England | http://www.ucecom.com > > Birmingham, B4 7DX | > > - -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] How to do this with PHP
On Friday 21 September 2001 21:47, Rick Emery wrote: > SELECT * FROM mytable LIMIT 0,5 > SELECT * FROM mytable LIMIT 6,5 > SELECT * FROM mytable LIMIT 11,5 > SELECT * FROM mytable LIMIT 16,5 It is advised to add ORDER BY _col_name_here_ to guarantee the order of rows retrieved (otherwise, you can't be sure about the order of rows returned - it could work but you shouldn't take a chance). For more info on this check PHP builder: http://www.phpbuilder.com/columns/rod20001214.php3 -- Meir Kriheli > -Original Message- > From: Alawi Albaity [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 21, 2001 1:44 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] How to do this with PHP > > > I have a table .. > this table have 20 record.. > I want to view this record in the 4 pages (5 record by > page).. > how can I do that !! > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Hmmm? PHP+PostgreSQL
On Wednesday 24 October 2001 23:21, Alexey Prohorenko wrote: > I've installed PostgreSQL into /usr/local/pgsql, then I tried > to include into my PHP support for PostgreSQL and made next: > (I had pre-compiled support for mySQL before that) > > make clean > ./configure --with-apxs=/usr/local/apache/bin/apxs --enable-versioning > --enable-track-vars --with-pgsql --with-mysql make > make install Did you restart apache after the installation ? You can also try to compile with --with-pgsql=/usr/local/pgsql -- Meir Kriheli > (I have mySQL, too) > Compilation process was great, no errors. > Nevertheless, next little PHP script: > > > > testing needed functions of current-gtlg with PHP+PostgreSQL > > > $conn = pg_connect ("host=localhost port=5432 dbname=test user=postgres"); > ?> > > > > still says: > Fatal error: Call to undefined function: pg_connect() in > /usr/local/apache/htdocs/pg-php/index.php on line 7 > > What I did wrong, guys? > > Will be looking forward your answer, > please, CC: to [EMAIL PROTECTED] > > Thanks. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] php + interbase
On Thursday 01 November 2001 20:34, Jacek Krywult wrote: > I have an error messagge when try to configure php.ini to use > php_interbase.dll. > FoxServ, php ver. 4.0.6 ( I tried also 4.0.4 ), win 98. interbase local > from Delphi 5. I think that local interbase installed with delphi is pre version 6.0, and the dll you're using is compiled against version > What is the way to use interbase with php ? > greetings, > Jacek Krywult PHP works best with interbase 6.0 (or firebird) and up, so i suggest removing local interbase and installing the newer one. -- Meir Kriheli -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Thanks for answer jjeffman, but...
Hi, Have you tried Interbase 6 ? It's possible that the module your working for was compiled with IB6's headers and libraries. Meir Kriheli MKsoft computer systems 'There's someone in my head but it's not me" - Pink Floyd - Original Message - From: "Kyoungsub, Wee" <[EMAIL PROTECTED]> To: "PHP DB Mailing" <[EMAIL PROTECTED]> Sent: Thursday, January 18, 2001 3:29 AM Subject: [PHP-DB] Thanks for answer jjeffman, but... > Thanks jjeffman, > > but I already checked php_interbase.dll location, > > C:\php\extensions\php_interbase.dll > > ... T.T > > help.. > > > > previous message > -- > Hi, > > My Server is Windows 2000 ( Advanced Server ). > > I use Apache WebServer(1.3.12) and PHP 4.0.2 > > I use Interbase 5.6 Server, PHP module (extension) not loading problem. > > My PHP root is "c:\php" > > My PHP.INI, this > > extension_dir="C:\php\extensions" > > > extension=php_interbase.dll > > > - > > when I Start Apache Service, Appear this message > > 'Unable to load dynamic library 'php_interbase.dll' > > but any PHP function execute good. > > I execute sample php code, this > -- > phpinfo(); > $dbh = ibase_connect ("d:\project\klpg\database\tank.gdb", "sysdba", "masterkey"); > $stmt = 'SELECT * FROM customer'; > $sth = ibase_query ($dbh, $stmt); > while ($row = ibase_fetch_object ($sth)) > { > print $row->email . "\n"; > } > ibase_close ($dbh); > ?> > -- > result is > > Fatal error: Call to undefined function: ibase_connect() in d:/webroot/index.php3 on line 36 > > I don't know this..help...please > > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] PHP + interbase connection problem
Looks like your PHP installation is not compiled with interbase support. Can you guve us some more details ? What is the OS you're using and the code the caused you problems. Meir Kriheli MKsoft computer systems 'There's someone in my head but it's not me" - Pink Floyd - Original Message - From: "Duky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, February 23, 2001 7:53 PM Subject: [PHP-DB] PHP + interbase connection problem > Can somebody help me out? I have some problems with connecting my gdb > file with PHP. it is giving me this error: > > Fatal error: Call to undefined function: () in > /home/sites/site156/web/columbus/ibconnect.php on line 9 > > What can I do now? > > Thnx, > > Duky > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]