Forums

PHP

This topic is locked

Phakt

Posted 26 Jul 2001 21:28:19
1
has voted
26 Jul 2001 21:28:19 Keith Slater posted:
Im having some problems getting everything set up. I can get it all ready but when I go to run the script I get this error:

Fatal error: Call to undefined function: adoloadcode() in /usr/local/plesk/apache/vhosts/nothnbut.com/httpdocs/caricature/Connections/caricature.php on line 16

Fatal error: Call to a member function on a non-object in /usr/local/plesk/apache/vhosts/nothnbut.com/httpdocs/caricature/main.php on line 10

I can change stuff around but I always get errors and their mainly that first one. Does anyone have any ideas?

Replies

Replied 26 Jul 2001 23:39:47
26 Jul 2001 23:39:47 Bob Costa replied:
I know so little it is hard to help. I will bow out when someone smarter shows up.

Did you try the TEST button when you defined the connection? What kind of error do you get there ?

What do your connection and site settings look like ? Have you seen my tutorial on PHAkt Connections for Dummies (this is all I really know).

From the looks of the error, your adodb files did not upload into the correct place. But I could be wrong.

Replied 27 Jul 2001 17:34:45
27 Jul 2001 17:34:45 Keith Slater replied:
I read all the tutorials and everything. THe adodb files are in the right place now I get this error
Fatal error: Call to undefined function: odbc_pconnect() in /usr/local/plesk/apache/vhosts/nothnbut.com/httpdocs/caricature/adodb/adodb-odbc.inc.php on line 65
I get this error a lot

Replied 27 Jul 2001 17:43:15
27 Jul 2001 17:43:15 Tim Green replied:
OK, from the error message I can see that you are using Linux and Apache. Your database is ODBC.

The problem you are having is probably because :-

a) You have not compiled php with ODBC support
b) You do not have installed any form of ODBC on your Linux-based server (try using UnixODBC)
or
c) both a and b

I take it you are trying to use an Access database ? Without ODBC installed on the server you can't.

Sorry.

What you can do is to transfer your Access database to MySQL by exporting the tables via the MyODBC driver, but this is really the only way you'll be able to do it without resorting to a commercial solution.


Tim Green
Webmaster
www.rawveg.org (Coming Soon)

Edited by - rawveg on 07/27/2001 17:46:00
Replied 27 Jul 2001 17:49:51
27 Jul 2001 17:49:51 Keith Slater replied:
Thanks for the reply I'll tell the administrator about the ODBC support. On my machine when I try to run it I get a HTTP 500 Internal Server error, it's acting like the file doesn't even exist or sometime it was try to download then if I hit Open file it brings up php.exe and enters some lines then closes it and nothign happens. My php probably isn't configured right but it's hard to do it when theirs about 300 tutorials about how to do it and everyone of them is different. I'm on a windows 98 comp running PWS, would you recomend any tutorials?

Replied 27 Jul 2001 17:59:59
27 Jul 2001 17:59:59 Tim Green replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
HTTP 500 Internal Server error
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

The 500 error says it all. It means 'Method not Allowed', meaning you are trying to use a protocol or process that the server doesn't support.

As for getting PHP up and running on a Windows machine, I wouldn't really worry too much. Go to www.php.net and download the windows binary (full install) of PHP. This uses a windows installer, and can integrate itself nicely (and automagically) with PWS. If used this on a number of occassions to ensure a hassle free installation on a Windows machine, I would recommend you do the same.

Hope this helps

Tim Green
Webmaster
www.rawveg.org (Coming Soon)

Edited by - rawveg on 07/27/2001 18:01:13
Replied 27 Jul 2001 18:05:29
27 Jul 2001 18:05:29 Keith Slater replied:
OK now I'm trying to convert my access files to mysql. Im in access trying to export them and I'm messing around with all of this. Is this the easiest way or is their an easier way to do it? Also is their a tutorial for this?

Thanks for your help

Replied 27 Jul 2001 18:46:22
27 Jul 2001 18:46:22 Tim Green replied:
There's no tutorial that I'm aware of.

What you need to do is ensure that you have MyODBC installed, and configured to connect to your MySQL server.

When you have done that, go into access, select a table (you have to do them individually unfortunately) and do a File-&gt;Export (or similar), in the next dialogue select 'External File or Database'.

In the Save As dialogue, change the 'Files of type' to ODBC Datasource, and then select your MySQL DSN.

Click OK (or Save) and Presto! it's transferred. Some things will be slightly different from version to version in Access, but this should get you up and running.

Tim Green
Webmaster
www.rawveg.org (Coming Soon)
Replied 27 Jul 2001 20:22:35
27 Jul 2001 20:22:35 Keith Slater replied:
ok I can actually view what Im doing now but at the top above my page is says this:

Warning: Undefined variable: QUERY_STRING in C:\Inetpub\wwwroot\caricaturePHP\main2.php on line 14

Warning: Undefined variable: textfield in C:\Inetpub\wwwroot\caricaturePHP\main2.php on line 15


Thanks


Replied 27 Jul 2001 20:54:37
27 Jul 2001 20:54:37 Tim Green replied:
OK. Open your php.ini and do the following :-

Find the line :-

error_reporting = E_ALL; display all errors, warnings and notices

and put a semi-colon in front of it.

Find the line :-

;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR

(it's just above the previous line) and remove the semi-colon.

Now find the line :-

magic_quotes_gpc = Off

and change it to :-

magic_quotes_gpc = On

(this may already be set correctly)

Save the file, and (hopefully) it should work.

Tim Green
Webmaster
www.rawveg.org (Coming Soon)

Edited by - rawveg on 07/27/2001 20:58:01
Replied 27 Jul 2001 20:57:55
27 Jul 2001 20:57:55 Keith Slater replied:
THANKS a lot!! It worked!! If I have anymore problems you know I'll be back

keith
www.wordprosys.com

Replied 27 Jul 2001 21:00:01
27 Jul 2001 21:00:01 Tim Green replied:
Excellent ! I'm glad I could help <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Tim Green
Webmaster
www.rawveg.org (Coming Soon)
Replied 27 Jul 2001 21:15:28
27 Jul 2001 21:15:28 Keith Slater replied:
Well Im back.. new problem.. I'm making a record update field when I do it this is what I get..

USER_NAME: &lt;input type="text" name="USER_NAME" value="
Fatal error: Call to a member function on a non-object in C:\Inetpub\wwwroot\caricaturePHP\profile.php on line 326

This is the part of the script it messed up on..
&lt;input type="text" name="USER_NAME" value="&lt;?php echo $Recordset1-&gt;Fields("USER_NAME"?&gt;" size="32" readonly="true"&gt;

ultradev made it for me so I dont know why it would be wrong...

Keith Slater
Word Pro Systems
www.wordprosys.com
Replied 27 Jul 2001 21:19:24
27 Jul 2001 21:19:24 Tim Green replied:
In this instance the 'call to a member function on a non-object' must be referring to the $Recordset1-&gt;Fields("USER_NAME" section of your code.

Did you rename the recordset (or even delete it) ?

Tim Green
Webmaster
www.rawveg.org (Coming Soon)
Replied 27 Jul 2001 22:18:20
27 Jul 2001 22:18:20 Keith Slater replied:
ok I got that now, thanks... on to a new quetsion, in ASP you could do the session variables and all of that. In PHP how do you create a session varaible so when some one logs in you can say Welcome, &lt;Session Variable.Username&gt;. I know its probably easy...

Keith Slater
Word Pro Systems
www.wordprosys.com
Replied 28 Jul 2001 19:00:57
28 Jul 2001 19:00:57 Tim Green replied:
It is very easy. Use :-

session_register(variablename);

Please, in the future, post new questions as a different thread so that other people can easily benefit.

I would also recommend that you get the PHP Manual extension from the Macromedia Exchange. It is an ideal source of reference.

Tim Green
Webmaster
www.rawveg.org (Coming Soon)

Reply to this topic