Danny
|
| Posted: 09/10/2004, 10:00 AM |
|
I'm trying to add an include statemant at the bottom of the common.php file in order to have some of my "common routines" available in all files.
The problem is that although the common.php file in the source code gets changed and saved this is not reflected in the published version of common.php.
I tried deleting the published version and then re-publishing common.php with the same results – it's as if the published files' origin is a completely different file from the file common.php in the source code folder.
I'm running CodeCharge 2.3.2
Can anyone help?
Danny
|
|
|
 |
padutoit
Posts: 9
|
| Posted: 08/11/2005, 6:28 AM |
|
I have this problem two, stupid thing is I have added custom functions to two other projects with out a problem but on the third project if I add any custom code to Common.php and publish the any of the php pages are returned blank remove the custom code republish and hey presto they all work...version 2.3.2.24
Someone help, Yessoftware are any of you there
|
 |
 |
feha
Posts: 712
|
| Posted: 08/11/2005, 8:47 AM |
|
You should add all your custom functions in separate php file
and include that file att the bottom of Common.php
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
feha
Posts: 712
|
| Posted: 08/11/2005, 8:49 AM |
|
When you make changes in common file first save than click on commonfiles at the top of left side directory in css and click generate code.
close whole project
than reopen it and generate the project
_________________
Regards
feha
www.vision.to
feedpixel.com |
 |
 |
padutoit
Posts: 9
|
| Posted: 08/11/2005, 8:54 AM |
|
fair enough but can anyone explain why it has worked in the two projects before this one, shame vesion same setup php/mysql/apache just concerns me that it works willie nellie...
|
 |
 |
peterr
Posts: 5971
|
| Posted: 08/11/2005, 9:46 AM |
|
I suspect that the custom code itself is causing this, or it was put in the wrong place (possibly after "?>").
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
padutoit
Posts: 9
|
| Posted: 08/11/2005, 10:25 AM |
|
nope not in the wrong place that is for sure, prehaps the code but I can't see anything wrong with it, maybe a fresh set of eyes here is the code a short function to update the history table
function UpdateHist($input)
{
$db = new clsDBippatcon();
$SQL = "INSERT INTO phistory (phipadd,usrid,phdesc) VALUES (". $db->ToSQL(getenv("REMOTE_ADDR"),ccsText) . "," $db->ToSQL(CCGetUserID(),ccsInteger) . "," . $db->ToSQL($input, ccsMemo) . ")";
$db->query($SQL);
$db->close();
}
|
 |
 |
peterr
Posts: 5971
|
| Posted: 08/11/2005, 12:20 PM |
|
This function is causing a problem/error for me. Possibly your PHP is just configured not to display errors (or some errors), so it shows blank page instead. The error seems to be due to the lack of concat period (.) in this part: "," $db
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
padutoit
Posts: 9
|
| Posted: 08/11/2005, 2:52 PM |
|
there see a fresh set of eyes and turning errors on and all sorted, sorry to have wasted your time Peter old chap ...but at least we know we can add custom code to Common.php with out "USER" error
|
 |
 |
peterr
Posts: 5971
|
| Posted: 08/11/2005, 3:01 PM |
|
Yeah, this is a classic case of "I've done everything right, have done it many times before, so why doesn't it work now?". But don't worry, it happens to all of us
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |