Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE » RADICORE Installation Issues » 'Build Directory' is not working!
'Build Directory' is not working! [message #1066] Wed, 29 August 2007 17:06 Go to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
Hi,

I finally set everything right to begin build my application.
But when I try to use 'Build Directory' for my new Subsystem, it doesn't do anything.
I only get the following message at the bottom of the 'List Subsystem' page after clicking the button.
------ "0 records were updated in MNU_SUBSYSTEM"
I guess it means Radicore didn't do anything about it.

I check the directory under radicore, none is created. No Task(menu) is created either.

I'm running:
Ubuntu 6.1
PHP5.1.6
MySql 5
Apache2

The web service user 'www-data' has right to create directory in radicore.

What can make this happen?
How can I troubleshoot this?
Which file is used for 'Build Directory'?
Is there any way to this in manual? If there is what is the procedure?

Thanks.
Re: 'Build Directory' is not working! [message #1067 is a reply to message #1066] Wed, 29 August 2007 18:03 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
I have just tried this procedure on my PC, and it works as advertised. If I ask it to create a new directory it does it and displays the message "Directory X created". If I repeat the operation it displays the message "Directory X already exists".

I am running on Windows, so there might be something peculiar happening on your machine. Can you step through with your debugger to see what is going wrong?


Re: 'Build Directory' is not working! [message #1068 is a reply to message #1067] Wed, 29 August 2007 18:49 Go to previous messageGo to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
Thanks for the fast response!

I have copied the 'Default' directory to 'test', which is my test application for testing purpose and given 777 permission on it.
After importing Tables and Columns, I try 'Export to PHP' but I got the same error "0 records were updated in DICT_TABLE" as well.

Since the two, 'Build Directory' and 'Export to PHP', are about to file/directory management, I'm suspecting that it has something to do with OS level, user or permission.

Can you tell me which files are responsible for these jobs?
How do you debug these?

Thanks.
Re: 'Build Directory' is not working! [message #1069 is a reply to message #1068] Wed, 29 August 2007 19:40 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
I know nothing about the permissions system of Ubuntu, so I cannot offer any advice. All I can say is that whatever user that Apache is running as must be able to create directories and subdirectories, and must be able to delete and create files in any of those directories.

You need an interactive debugger so that you can step through each line of code as it is being executed, then you will be able to see what is going on. Do a google search on "php debugger".


Re: 'Build Directory' is not working! [message #1070 is a reply to message #1069] Wed, 29 August 2007 20:58 Go to previous messageGo to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
I'm looking into PHP/Apache setting on this.
Can you tell me which php file do I need to debug?
Re: 'Build Directory' is not working! [message #1071 is a reply to message #1070] Thu, 30 August 2007 04:38 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
You need to debug the script that is run when you press the "Build Directory" button, which is mnu_subsystem_build.php

Re: 'Build Directory' is not working! [message #1072 is a reply to message #1071] Thu, 30 August 2007 08:49 Go to previous messageGo to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
It looks like 'mnu_subsystem_build.php' calls std.update4.inc, which calls mnu_subsystem_s02.class.inc in turn.
I can see two function in mnu_subsystem_s02.class.inc, _cm_post_getData and _copyDirectory. But I can see no place calling these functions in std.update4.inc.

Can you explain how these method/functions are called and where?
Re: 'Build Directory' is not working! [message #1073 is a reply to message #1072] Thu, 30 August 2007 09:13 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
All the database table classes in Radicore are actually subclasses of std.table.class.inc which contains all the method names which are called from the page controller.

_cm_post_getData() is called from the superclass(std.table.class.inc) immediately after the getData() method.

If you did as I asked and stepped through the code with your debugger instead of simply looking at the code you would see the path taken through the code, and you would see where it was failing.


Re: 'Build Directory' is not working! [message #1074 is a reply to message #1073] Thu, 30 August 2007 17:34 Go to previous messageGo to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
Here is what I have found.

mnu_subsystem_s02 extends mnu_subsystem, which extends std.table.

Both mnu_subsystem_s02 and std.table has _cm_post_getData function as its member. I expect the one in mnu_subsystem_s02 override the one in std.table when the function is called.
But when the function is actually called, it is running the one in std.table class, which is empty.
The _cm_post_getData function in mnu_subsystem_s02 is not called.

Can you guess why?


Thanks
Re: 'Build Directory' is not working! [message #1075 is a reply to message #1074] Thu, 30 August 2007 18:28 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
mnu_subsystem_s02 extends mnu_subsystem, which extends std.table, so when an object is instantiated from class mnu_subsystem_s02 any method in that subclass will override any method with the same name in any superclass. When the getData() method in std.table.class.inc calls _cm_post_getData() it should most definitely use the one in mnu_subsystem_s02. This is how it works on both of my PCs, one which runs PHP 4.4.7 and the other which runs PHP 5.2.3.

If it does not then there is something seriously wrong with your PHP installation, and not any code in the Radicore framework.


Re: 'Build Directory' is not working! [message #1076 is a reply to message #1075] Thu, 30 August 2007 22:07 Go to previous messageGo to next message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
I think I got the bottom of this.
It was Zend Optimizer that cause the behavior.
I found this by turning off Zend and try the same thing, then it calls the correct _cm_post_getData() function.

Do you know how to correct Zend Optimizer not to do this behavior?
Just asking!


Thannks for your support!!!
I love your Radicore a lot!!
Re: 'Build Directory' is not working! [message #1077 is a reply to message #1076] Fri, 31 August 2007 05:17 Go to previous messageGo to next message
AJM is currently offline  AJM
Messages: 2297
Registered: April 2006
Location: Surrey, UK
Senior Member
I'm glad Very Happy you have got the problem sorted out now, and that it wasn't a bug in my code. Embarassed

I do not use Zend Optimiser on any of my PCs, so I have never experienced this. It sounds like a terrible bug which other people should have noticed by now. I suggest you report this to Zend and see what they have to say. Confused


Re: 'Build Directory' is not working! [message #1079 is a reply to message #1077] Sun, 02 September 2007 09:59 Go to previous message
bbkwon is currently offline  bbkwon
Messages: 13
Registered: August 2007
Junior Member
Hi,

The new version of Optimizer 3.3 has fixed the problem.
Now it works as it is supposed to do.

Thanks for your support!!
Previous Topic: Problem with _cm_formatData in v1.27, Detail view
Next Topic: Existing data do not show up in LIST2
Goto Forum:
  


Current Time: Wed May 18 04:51:50 EDT 2022

Total time taken to generate the page: 0.02066 seconds