Forums

PHP

This topic is locked

Nothing Working!!

Posted 15 Dec 2001 14:33:50
1
has voted
15 Dec 2001 14:33:50 Adam Toohey posted:
hi all, I have got PHAKT working but, when I try a next record or a repeat record or any other sb it doesn't seem to work properly. Why is this, is there something happening with the PHAKT behavior? Why isn't it talking to the database? there must be something happening <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Tim, if you are listening, I am using IIS5 and Access 2000, Any ideas?

Thanks in advance,

Adam Toohey

Replies

Replied 16 Dec 2001 01:26:19
16 Dec 2001 01:26:19 Tim Green replied:
Adam,

What exactly are you getting? Just saying it doesn't work properly doesn't really help us much.

Please give as much detail as possible.

If this is tied into the previous problems you were getting then it could be the SQL. By far the best way to demonstrate what is going on is to upload your database and page etc to your webserver, and post the URL.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 16 Dec 2001 02:13:41
16 Dec 2001 02:13:41 Adam Toohey replied:
Sorry about that, I had a few tooooooo many drinks and can't even remember posting it, but I am glad I did because I was going to post it today anyway when I recovered. <img src=../images/dmxzone/forum/icon_smile_dead.gif border=0 align=middle>

I am not getting any errors.
Whenever I put repeat region on a section the data dissapears!! When I put in RecordsetStatisticsPHP SB it says record 1 to 1 of 1. This is when there is 66 records!! When I put in RecordsetNavigationPHP SB, the next page turns into a blank page with the next and previous buttons sitting there.

These three SB's are the most basic SB's. For these not to be functioning properly is a real problem.

It have tried doing new sites and starting again from scratch, still the same problem.

I am working on php at home on my pws (IIS5). I have a couple of sites to build and I would like to use PHP, so I am trying it out first before I start putting it on the web.

All I am doing is creating a recordset, dragging some fields onto the page in a table, making the table repeat, putting in the other two sb's above and uploading it all then view in browser and the problems then begin. It also does the same thing in show live data view. I have given the site and the database full permissions.

I hope this is enough information for you to know what is going on...

I just downloaded the new version of PHAKT 1.1.0, where they claim alot of problems have been solved. I also downloaded the new version of iis installer. Do you know if anything else has to be updated because I am still getting the same problems and I am receiving this error underneath my data.
Warning: Unknown persistent list entry type in module shutdown (14) in Unknown on line 0


Thanks Tim,

Adam Toohey



Edited by - adam2e on 16 Dec 2001 04:14:57

Edited by - adam2e on 16 Dec 2001 04:17:19
Replied 17 Dec 2001 11:36:41
17 Dec 2001 11:36:41 Tim Green replied:
Adam,

I've been using PHAkT since the very early BETAs, as have many other people. None of the issues that you speak of are known issues (in fact, I can't reproduce any of what you mention, and I use PHAkT daily in production sites.)

Therefore, my only conclusion is that your problems are based on useage, as opposed to PHAkT itself (which, as many people will testify has been very stagble for a long time now). There are one or two issues that still exist, but these are not a problem of PHAkT, but are instead a problem with ADODB, the Database Wrapper Library that PHAkT uses (which is authored by other people. Interakt do NOT develop ADODB).

These issues, though, are based around SQL Server, largely, as there are some problems with Recordset navigation.

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Warning: Unknown persistent list entry type in module shutdown (14) in Unknown on line 0
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
This is a PHP Configuration issue. Open up your PHP.ini and search for 'error_reporting'. Change the value next to it to E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR, then also look for magic_quotes_gpc and make sure it is 'On'.

As you haven't provided a link to a page that demonstrates your problem, I cannot, unfortunately, help you any further. If you do manage to get a demonstration page online, please post the link, and also ensure that you make the source code available via this link (save your page one as pagename.php and once as pagename.txt) so I can see properly what is going on.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 17 Dec 2001 13:08:54
17 Dec 2001 13:08:54 Adam Toohey replied:
Hi Tim,

I thank you heaps for trying to help me. I am going to uninstall iis and see if this is the problem. I have tried uninstalling UltraDev and php and PHAKT, which obviously didn't work. If it isn't the problem I will put it on my server for you to have a look. My ISP is a specialist with PHP, but not with PHP and access on a windows machine. I asked him to have a look today. This is what he said:
G'day Adam,

The code looks ok to me (although nothing like I would have written it myself - I generally echo the HTML rather than echo the values in the HTML), it looks like it should work.

No sorry - haven't seen the error. Plug it into google, you should get some hits.

It is typical that the errors have never been seen before, just my luck <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Thanks again, I will try and reinstall iis and let you know.

Adam Toohey

Replied 17 Dec 2001 14:10:58
17 Dec 2001 14:10:58 Tim Green replied:
If it helps any Adam, I would highly recommend using the .msi distribution of PHP to install it on IIS. I've done this quite a few times without any issues at all, though I would still recommend tweaking the PHP.ini as I mentioned earlier <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

Keep me posted as to your progress.

All the best

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 17 Dec 2001 15:51:38
17 Dec 2001 15:51:38 Adam Toohey replied:
Hi Tim,

I had a look in the php.ini file and those changes were already there.

I just uninstalled everything and reinstalled. UltraDev, PHAKT, php 4.1.0 and ADODB. Unfortunately the same thing happened. The sb Statisticsphp worked until I put in the navigationphp sb, then it went back to 1 of 1 of 1 and the next etc buttons dissapeared. Also when I put in repeat region all the data went bye bye <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

I just installed PsqlODBC, the .msi file. I hope that was the right one.

Let me get this right to make sure I am doing it all right. Install PHAKT. Then install PHP on IIS, then install ADODB. I used php410-installer for php. I used PHAKT 1.1.0. I used tgInstallADODB_1. That is all I have to do isn't it? I did all of that then just created a dsn and database connection, then a recordset, then uploaded it all to the server, my site to a folder in IIS and my database to a seperate folder. Gave them all full permissions and that is it. If that is right, I will put it all on the web tomorrow to see if it is my system having problems. Unfortunately my laptop blew up last week so I can't test it on a different computer. (Brand new Laptop, that is the luck I am having lately)

Thanks Tim,

Adam

Replied 17 Dec 2001 16:36:47
17 Dec 2001 16:36:47 Tim Green replied:
Aha!!!!

Your information has given away the problem!

Your issue is being caused because you are actually 'downgrading' your ADODB installation. ADODB is included with PHAkT by default, so there is no longer a need to install my ADODB extension (I keep it alive only to fill in major stopgaps between versions that PHAkT misses).

Uninstall my ADODB extension, and then uninstall PHAkT.

Re-Install PHAkT, and then do nothing else. Once done, go back to your site within UltraDev and modify your database connection (Modify-&gt;Connections) and edit the connection (It is enough to just open it and click OK). Now, all the newer version ADODB files will be transferred to your site, so just upload the adodb folder again, and hopefully (touch wood) this should resolve your issue.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 18 Dec 2001 04:42:49
18 Dec 2001 04:42:49 Adam Toohey replied:
Hi Tim,

Actually, I did try that without and with the ADODB extension.(without first). I also just did it again just to make sure, still no go.

I uploaded a whole new test to my server. This has exactly the same results. I have explained it all on the page which can be found at dev.directingyou.com.au/default.php

Hopefully this will give you all the info so we can put this to bed <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Thanks for all of your help Tim.

Adam Toohey

Replied 18 Dec 2001 12:20:23
18 Dec 2001 12:20:23 Tim Green replied:
Thanks for the detailed info that you have made available. This is going to take me a little while to go through, but at first glance at the source code, everything appears as it should be.

(In fact when I take the source code to the page with the repeat regions, and change only the recordset information to fit in with my DB, which is MySQL, everything works ok....)

The only issue that I think this could possibly be is something to do with the ADODB libraries.

Give me some time to experiment, and I will see what I can come up with....

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 18 Dec 2001 12:53:49
18 Dec 2001 12:53:49 Adam Toohey replied:
Thanks Tim, your a legend <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Hope it isn't too hard to see the problem.

Adam Toohey

Replied 19 Dec 2001 00:33:35
19 Dec 2001 00:33:35 Tim Green replied:
Hi Adam,

Sorry I haven't reported back sooner. At the moment I've got a lot on, and haven't gotten around to going through your code. I will, however, take a good look tomorrow.

Apologies for the delay.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 20 Dec 2001 00:44:38
20 Dec 2001 00:44:38 Tim Green replied:
Adam,

Check out this thread:-

www.udzone.com/forum/topic.asp?TOPIC_ID=13233&FORUM_ID=67&CAT_ID=5&Topic_Title=Ultradev+and+PHP+Phakt+Problem&Forum_Title=PHP

It would appear that there is an issue with the RecordCount function in ADODB which is causing this problem. Basically it affects Access and therefore navigational functions don't work correctly.

You should be able to find more info about this at the ADODB website at php.weblogs.com/ADODB



Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 20 Dec 2001 02:17:16
20 Dec 2001 02:17:16 Adam Toohey replied:
Hi Tim,

From what I have gathered, these extensions will not work with Access. I found a thread saying that the Access odbc driver doesn't return the recordcount. Does this mean that if I want to continue using PHAKT I should think seriously about changing databases? I hate to have to go to these extremes as I have just learnt all about Access <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle> Does this mean that all the people saying that they are using Access and PHAKT are saying that they never use these extensions?

What do you think I should do from here Tim?

regards,

Adam Toohey

Replied 20 Dec 2001 10:33:17
20 Dec 2001 10:33:17 Tim Green replied:
I appreciate your frustration Adam, indeed it is possible to work with these extensions but you will need to do a little extra hand-coding to make sure values work.

To be perfectly honest with you, you would be far better off working on a more suitable database than Access. I know this means even more learning, but in the long run it will only make you a better developer.

Access is great for small sites, or for situations where you need to maintain an online and offline version of your database. However, Access does have a lot of limitations in this field (number of concurrent connections immediately springs to mind. Which is no good on a high traffic site).

However, unlike many, I'm not willing to bad mouth Access too much, as I too derived my first database experiences from that very software.

My personal opinion Adam would be to start using MySQL, which may not be as full-featured as some other databases, but is likely to be easier for you to pick up than say SQL Server.

Having said all this, I think I have come up with a fix for this issue.

After your Recordset enter the following code block (you'll need to change values accordingly):-

$rsFix=$connectionName-&gt;Execute("SELECT COUNT(*) AS CNTFIX FROM tablename" or DIE($connectionName-&gt;ErrorMsg());
$recordsetName__totalRows = $rsFix-&gt;Fields("CNTFIX";
$recordsetName-&gt;_numOfRows = $rsFix-&gt;Fields("CNTFIX";

In the above code block ensure that $connectionName is changed to reflect the name of your connection, and that $recordsetName is changed to reflect the name of the recordset you are using with navigational features.

Most importantly, if your original recordset has a WHERE clause, you need to add that clause to the SQL in the above example. This will ensure that you get the right amount of records.

Hopefully this should resolve the problem. Try it and let me know how you get on.

All the best

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 20 Dec 2001 13:18:48
20 Dec 2001 13:18:48 Adam Toohey replied:
Hi Tim,

I don't know how to thank you for your persistance in helping me solve this problem. The reason for me changing to PHP is because of the issues in finding free or cheap scripts in asp (Like banner rotators, etc) Also alot of scripts and extensions have security issues because of the permissions that have to be set to work on Access. My ISP is a specialist in PHP and doesn't know anything about ASP and also doesn't like turning permissions up too high. This is the only reason for turning to PHP. The code is a lot easier too <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Just wanted to tell you the reason behind me changing to PHP.

Would you believe it, the last post you sent with a block of code fixed the next, prev, etc and the repeat region SB's. It didn't help the StatisticsPHP SB. I was always optimistic that it was just a simple problem that could be fixed with a block of code or some editing of the original code. Most problems with these bloody computers in the end are a simple solution like this one. The problem is that the majority of developers don't have the help from someone as patient and supportive as you <img src=../images/dmxzone/forum/icon_smile_approve.gif border=0 align=middle> Thank you heaps, I hope Santa brings you an extra couple of pressies, or a good looking woman to play with for a while <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>

I hope in future releases of ADODB and whatever causes these problems, there is fixes that support IIS and Access as for now I am not prepared to start learning new databases. I have spent hours with this PHP only to be dissapointed in the end and I have made a decision today to stick with ASP until these issues are dealt with. Unless other people would spend time like you obviously do trying to help people like me who don't spend the time learning the code to help others.

Anyway, I hope others find this whole post helpful, because we sure found some problems with ADODB and Access, didn't we?

I wish you the Merriest Christmas and a very Happy New Year Tim.

Rgeards,

Adam Toohey

PS - Just thought I would let you know that when I put in the block of code although it fixed the problem it put the little red ! next to the SB's in the pallet window.



Edited by - adam2e on 20 Dec 2001 13:22:03

Edited by - adam2e on 20 Dec 2001 13:26:26
Replied 21 Dec 2001 11:36:40
21 Dec 2001 11:36:40 Tim Green replied:
I'm sorry that you've decided to stick with ASP until this issue is sorted out with ADODB, but I can totally sympathise.

Indeed, if PHAkT doesn't do everything you need to do at this moment in time, then I can't blame you.

I think the reason that PHAkT is so popular though, is that it works with so many database systems, so much so that soon after starting to use PHAkT people realise just how detrimental the use of a file based db like access can be.

Anyway, I will keep working on this, as I'm sure that given a little time I can come up with a total fix that can be packaged as an extension. As I am currently involved with heavy development cycles in other projects though, I can't guarantee how soon I can get this done.

None the less, when it is done I will post to the forum, so don't leave us completely!

Wishing you and yours all the very best for Xmas.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic