Forums

PHP

This topic is locked

Problems with PHAkT 1.0.1 on Mac OS

Posted 25 Sep 2001 06:02:28
1
has voted
25 Sep 2001 06:02:28 Martin Lerch posted:
Hello,
First of all I would like to mention that I am completely new with this stuff and don't know much, so please don't laugh <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I seem to have a problem with PHAkT using Dreamweaver UD 4 on a Mac (OS 9.2). Before I start discribing my problems here is my server configuration:
Linux OS, Apache Server v. 1.3.14, PHP v. 4.0.3pl1 and MySQL v.3.22.32. Also I would like to mention that I recently installed phpMyAdmin 2.2.0 and it is working just find and dandy!

Here it goes. I set up a test site with UD 4 (PHAkT). I also set up a test database in MySQL called "testdb". I used phpMyAdmin to create a table inside that database called "test" which has an auto number column, first_name, last_name and e-mail. I created 3 records rows in that table to do a simple test in Ultra Dev.

Ok, so far so good. I created the site in UltraDev, set all the site parameters, then I opened a new document and created a table with two rows and 4 columns. In the first row I wrote "Nr." | "First Name" | "Last Name" | "E-mail" so it can serve as a header row. Then I created a connection which I called "connTest" selected as database type mysql, name of the database "testdb", table "test" etc. I tested the connection to the database and it all appears to work fine. When I clicked on "Test" a window opened in which I found the table "test" with it's three records and the data that I entered.

Now I went ahead and created a record set using the connection "connTest". All fields of the table "test" appeared in the Data Bindings window as they are supposed to. Then I proceeded to drag and drop each item in the second table row in my document. Then I applied a repeat region behavior to the second row of the table in my document.

Hope this all makes sense thus far. When I created the connection the adodb files and the adodb folder were all copied into my local site root directory (the adodb files were not copied into the folder which I know by now is a bug on PHAkT used on the Mac version of DW UD 4) Anyway, I was advised to simply move the adodb files into the adodb folder and then upload the folder to the root directory of my web site (remote). Ok did that. I also uploaded the Connections folder to the root directory of my remote server.

So, now I thought that this should be it. I am assuming that if I would go and click on the Live Data button the 3 records with it's fields should be displayed in that table, one row after the other due to the repeat region behavior that I applied to that row.

Anyway, at first I received an error message when I tried to live preview it in DW UD or when I uploaded it to the web server and tried loading this page:

"An error occured while requesting the document from the app server:"
"P**** error: p**** error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}" in /home/virtual/ld-lerch/home/httpd/html/adodb/adodb.inc.php on line 1"

"Fatal error: Call to undefined function: adoloadcode() in /home/virtual/ld-lerch/home/httpd/html/Connections/connLogin.php on line 1"

Ok, then I was told that php.ini file might not be configured correctly and that I should do following:
This is caused by an improperly configured PHP.ini
To solve this problem change error_reporting to E_ALL & E_NOTICE in your PHP.ini, then restart Apache.

I did exactly that. Before error_reporting was set to E_ALL & ~E_NOTICE, so I deleted the ~ saved the changes and restarted Apache.

phpMyAdmin 2.2.0 is still working just fine and dandy, however now I get a different error message in Ultra Dev when I try to preview the LIve Data. This time a window pops up with the error message:
The app server did not execute any of the scripts in your document. Possible explanations include:
1) The app server is not running.
2) The app server ignores files with the “.php” file extension.
3) Your document does not contain any scripts.

None of the points above seem to apply because phpMyAdmin is working and it’s using PHP, as well as .php file extensions, and my test document with includes the code generated by Ultra Dev and PHAkT.
Ok, so the Ultra Dev PHAkT Live Data preview doesn’t work. So I uploaded the page to the server and accessed it via a web browser. It took forever until the page was displayed only for me to find out that the document was completely blank, like nothing at all in the document. No error, nothing even when I did view source.

So, now I am back to square one. Could it be that PHAkT doesn’t work on a Mac, or is it that my server is not configured correctly ... Or WHAT ??? HELP <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

I would be totally stoked if one of you has a solution for me. Any suggestion is welcome.

Sincerely,

Martin R. Lerch

Replies

Replied 25 Sep 2001 12:55:32
25 Sep 2001 12:55:32 Tim Green replied:
Martin,

Thanks for the full and clear report !

You seem to have approached this problem very analytically, and in the correct order, which by my reckoning makes you much more than a beginner, so I won't laugh ! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

OK, I see you are running a Linux box, with an Apache Server. Did you restart Apache after making the modifications to your PHP.ini ?

It's quite possible that this is where the problem is, as now Apache and PHP aren't in sync. As I don't know which version of Linux you are running on your server you might have to use a different command, but something like :-

service httpd restart

or

/etc/rc.d/init.d/httpd restart

will restart the apache service for you.

As I said though, this is only one possibility. It's quite likely that this isn't the case because you can view your pages (but it's worth a try anyway).

I would recommend too that you put the tilde (~) symbol back to where you had it in your PHP.ini, though it seems obvious that the problem is something else. Try looking at the register_globals entry in your PHP.ini. It should be set to 'on', so make that change if it isn't.

I think probably the problem is with the register_globals entry to be honest. As everything else seems to work just fine.

Let me know how you get 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 25 Sep 2001 16:04:33
25 Sep 2001 16:04:33 Martin Lerch replied:
Hello Tim,

Thank you for your swift reply. Yes, I guess I am not a beginner with the whole web and multimedia thingy. Glad you noticed. And if you should ever need help when it comes to wired QuickTime or compression and such just feel free to ask <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Oh yes, you wanted to know the version of Linux that I am running. It's RedHat Linux, but I am unable to determine which version it is (don't know the shell command to find out <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
I did as you told me and put the ~ back infront of the parameter where it was before. Next I checked the register_globals if it is set to on ... and it is.
So, then I verified in the logs if I indeed restarted the Apache server yesterday when I made the first modifications, and I actually did. So, after I changed the php.ini file back the way it was before I made sure that I restared the Apache server.
I tried loading the page in my web browser again, and the same error notice with the p a r s e error came up again. I tried viewing the live data within DW UD 4 and the same error notice came up as well as it did before:

"P**** error: p**** error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}" in /home/virtual/ld-lerch/home/httpd/html/adodb/adodb.inc.php on line 1"

"Fatal error: Call to undefined function: adoloadcode() in /home/virtual/ld-lerch/home/httpd/html/Connections/connLogin.php on line 1"

If you want to, I could e-mail you the contents of the php.ini file, the code of my display.php page that I created, as well as the file in the Connections folder if this would be of any help to solve this pesty problem.

Please let me know if you have another idea why it's working for others but not for me <img src=../images/dmxzone/forum/icon_smile_sad.gif border=0 align=middle>

Thanks,
Martin



Edited by - mlerch on 09/25/2001 16:26:17
Replied 25 Sep 2001 20:57:48
25 Sep 2001 20:57:48 Tim Green replied:
Martin,

The version of RedHat isn't a major necessity, so don't worry about that. If you feel it would help mailing me the code and the php.ini file, then please feel free to send them to me, and I can have a real look at what is going on.

At the moment I can't think where the problem could be, but perhaps the code itself will shed more light.

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 25 Sep 2001 22:52:57
25 Sep 2001 22:52:57 Martin Lerch replied:
Hi Tim,

I attached the php.ini file as well as the display.php document that I set up as a test to an e-mail and sent it off to your e-mail addy. Let me know if you don't get it. Again, thank you for taking the time to look into my problems. Hope I can make it up to you one of these days.

Sincerely,

Martin

PS: Can hardly wait for your answer. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

Replied 30 Sep 2001 17:20:12
30 Sep 2001 17:20:12 Pier pierh replied:
Hello,
I have _exactly_ the problem as you, I double check all the php.ini following your investigation, nothing work. When I said we're in the same situation I'm also using a G4 running macos 9.2 with UD 4.

Also when I'm coding by hand and make access to the data in the Bd table, i can get all I want. very stange behavior.

I tried phpMyAdmin and It also work fine.

i'm still trying to get it work.

Pier-Hugues

Replied 30 Sep 2001 18:58:07
30 Sep 2001 18:58:07 Martin Lerch replied:
Hello Pier-Hugues,

Here is what I did to get it to work:
1. copy the adodb folder in Applications-&gt;UltraDev-&gt;Configurations-&gt;Shared-&gt;PHAkT-&gt;adodb to the root directory of your web server. It seems like the adodb folder and files that are created when you try to setup your connection in your site is corrupted.

2. Then be sure that your Connections folder with the connections .php file has been copied up to the root director of your web server as well.

3. Then use FETCH or an SSH command line client to log into your remote server, and set the permissions of the Connections folder and the file(s) inside it to 777 (chmod 777), and the adodb folder and it's files inside that folder also to chmod 777.

(I am not quite sure if setting those files to chmod 777 did the trick or the next steps. You will have to try it.)

The other thing that was weird on my server was that myPHPadmin showed a path the the php.ini file which was incorrect. My php.ini file was actually located in a different directory on my web server (don't ask me why that is.. no clue). Anyway, once I found the php.ini file on the server I double checked that I have the full path starting with the root / to the extesions (modules) directory in the php.ini file. If you don't (which most likely might be the case) then modify the php.ini file with the correct file path to your php extensions directory (modules - it should be in the same folder as the php.ini file, or perhaps one or two levels down).

Now give it a shot. Let me know if it worked. It sure worked for me.

M. Lerch

Reply to this topic