Hi all. I'm creating a little class for interface Drupal to a internal web application (all via php language).
I have created this function (that is a part of a class) and I call it from a file called temp/1.php:
public function shoplastnews() { $this->setDirTheme(); $view = views_get_view('l1'); $view->is_cacheable = 0; views_sanitize_view($view); $tmp2 = views_build_view('items',$view,array(),false,5); $ret = array(); $i = 0; foreach($tmp2['items'] as $key => $data) { //print_r($data); $node = node_load($data->nid); $ret[$i]['nid'] = $node->nid; $ret[$i]['titolo'] = $node->title; $ret[$i]['created'] = $node->created; $ret[$i]['link'] = url("node/".$node->nid); //$ret[$i]['link'] = l("nnn","node/".$node->nid); //this does not works, too $i++; } $this->resetWd(); return $ret; }
The function works in right way but not for url() (or the link) function where before the right url is prepend "temp/" that is the directory where my script is running. Where is my error ?
M.
-- Michel 'ZioBudda' Morelli michel@ziobudda.net Consulenza sistemistica in ambito OpenSource. Sviluppo applicazioni web dinamiche (LAMP+Ajax) Telefono: 0200619074 Telefono Cell: +39-3939890025 -- Fax: +39-0291390660
http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: michel@ziobuddalabs.it JABBER: michel@gmail.com
Hi,
i am trying to setup a fresh drupal 6.3 installation. My host is godaddy which has its databases served from a different host than the drupal folder is on. Anyway, i created a new database and made sure to get the correct username, passwd, database path and name.
When i get to the drupal installation page it prompts me for the database name for which i type: dbServerPath/dbName then also the username and passwd. It tells me it cannot connect to the database.
Then i tried to manually set the db_url in settings.php. But that doesn't work since it doesn't create the necessary tables.
I am sure this is a trivial issue for most people. But i googled it and either the posts were old or did not work for me.
I hope someone can point in the right direction.
thanks matt
On Thu, 7 Aug 2008 11:37:31 -0600 Matt Funk matze999@gmx.net wrote:
Hi,
i am trying to setup a fresh drupal 6.3 installation. My host is godaddy which has its databases served from a different host than the drupal folder is on. Anyway, i created a new database and made sure to get the correct username, passwd, database path and name.
When i get to the drupal installation page it prompts me for the database name for which i type: dbServerPath/dbName then also the username and passwd. It tells me it cannot connect to the database.
Advanced options. Put the DB server in Database host:
mmmhh,
well, i cannot access the advanced options since it is simply a line (i.e. not a link or a any action associated with it).
java and javascript are enabled. What am i missing?
thanks matt
On Thursday 07 August 2008 11:55, Ivan Sergio Borgonovo wrote:
On Thu, 7 Aug 2008 11:37:31 -0600
Matt Funk matze999@gmx.net wrote:
Hi,
i am trying to setup a fresh drupal 6.3 installation. My host is godaddy which has its databases served from a different host than the drupal folder is on. Anyway, i created a new database and made sure to get the correct username, passwd, database path and name.
When i get to the drupal installation page it prompts me for the database name for which i type: dbServerPath/dbName then also the username and passwd. It tells me it cannot connect to the database.
Advanced options. Put the DB server in Database host:
-- Ivan Sergio Borgonovo http://www.webthatworks.it
I was using Firefox (3). Then i tried IE. Same thing.
On Thursday 07 August 2008 12:14, Fred Jones wrote:
well, i cannot access the advanced options since it is simply a line (i.e. not a link or a any action associated with it).
java and javascript are enabled. What am i missing?
Can you try another browser? Like Firefox?
Well,
i will have to make it live first. I am using it within the godaddy preview mode. I have a working drupal 6.2 install on the same account. But that was setup by godaddy's automated setup. Unfortunately the customer service dude had no idea how to setup drupal in the first place.
Anyway, let me check that one in preview mode and see if i see similar issues. (should have done that earlier i suppose).
matt
On Thursday 07 August 2008 12:25, Fred Jones wrote:
I was using Firefox (3). Then i tried IE. Same thing.
Hmm, you got me. Do you have firebug? Are there any JS errors? If you want, send me the URL and I can look at it.
You might try setting the base_url in the settings.php file. It's normally commented out, but it still can change the way js files and images get loaded. It's possible that the Jscripts are having trouble loading. Fred's advice about downloading firebug is sound. Check the network tab to see if the java scripts are loading properly.
Dave
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Matt Funk Sent: Thursday, August 07, 2008 11:39 AM To: support@drupal.org Subject: Re: [support] remote database issue
Well,
i will have to make it live first. I am using it within the godaddy preview mode. I have a working drupal 6.2 install on the same account. But that was setup by godaddy's automated setup. Unfortunately the customer service dude had no idea how to setup drupal in the first place.
Anyway, let me check that one in preview mode and see if i see similar issues. (should have done that earlier i suppose).
matt
On Thursday 07 August 2008 12:25, Fred Jones wrote:
I was using Firefox (3). Then i tried IE. Same thing.
Hmm, you got me. Do you have firebug? Are there any JS errors? If you want, send me the URL and I can look at it.
-- [ Drupal support list | http://lists.drupal.org/ ]
Looks like it was the go daddy preview thing. With it live things look ok. sorry for the confustion.
matt
On Thursday 07 August 2008 14:14, Metzler, David wrote:
You might try setting the base_url in the settings.php file. It's normally commented out, but it still can change the way js files and images get loaded. It's possible that the Jscripts are having trouble loading. Fred's advice about downloading firebug is sound. Check the network tab to see if the java scripts are loading properly.
Dave
-----Original Message----- From: support-bounces@drupal.org [mailto:support-bounces@drupal.org] On Behalf Of Matt Funk Sent: Thursday, August 07, 2008 11:39 AM To: support@drupal.org Subject: Re: [support] remote database issue
Well,
i will have to make it live first. I am using it within the godaddy preview mode. I have a working drupal 6.2 install on the same account. But that was setup by godaddy's automated setup. Unfortunately the customer service dude had no idea how to setup drupal in the first place.
Anyway, let me check that one in preview mode and see if i see similar issues. (should have done that earlier i suppose).
matt
On Thursday 07 August 2008 12:25, Fred Jones wrote:
I was using Firefox (3). Then i tried IE. Same thing.
Hmm, you got me. Do you have firebug? Are there any JS errors? If you want, send me the URL and I can look at it.
-- [ Drupal support list | http://lists.drupal.org/ ]
same crap,
when i click on the modules section in the drupal 6.2 section there is nothing listed under the Core-required section.
Am i correct in assuming that somehow somewhere javascript is not working (at least within this preview mode)?
thanks matt
ps: I'll try to change my dns info and put the thing live and see if things change or not.
On Thursday 07 August 2008 12:25, Fred Jones wrote:
I was using Firefox (3). Then i tried IE. Same thing.
Hmm, you got me. Do you have firebug? Are there any JS errors? If you want, send me the URL and I can look at it.
when i click on the modules section in the drupal 6.2 section there is nothing listed under the Core-required section.
Am i correct in assuming that somehow somewhere javascript is not working (at least within this preview mode)?
Could be JS issue or CSS or both.
ps: I'll try to change my dns info and put the thing live and see if things change or not.
Good idea.
Unfortunately, GoDaddy is actually one of the worst hosts known to man. In my experience.
On Thu, 7 Aug 2008 20:46:42 +0200 "Fred Jones" fredthejonester@gmail.com wrote:
when i click on the modules section in the drupal 6.2 section there is nothing listed under the Core-required section.
Am i correct in assuming that somehow somewhere javascript is not working (at least within this preview mode)?
Could be JS issue or CSS or both.
Problem with access permission to js and css? Check if you can find those file in your cache... if they are actually requested/downloaded with firebug.
As soon as I finish with some mmm weired awk behaviour I could borrow you my magic wand.
Well, there is a bug that firebig reports:
$("table.sticky-enabled thead:not(.tableHeader-processed)", context).each is not a function http://xpdtek.com.previewdns.com/drupal-6.2/misc/tableheader.js?d Line 18
i have no idea how to track it back to the source though. Also, i don't know whether this is a the main problem.
So, should i try to cancel my account with godaddy and try to get my money back?
matt
On Thursday 07 August 2008 13:25, Ivan Sergio Borgonovo wrote:
On Thu, 7 Aug 2008 20:46:42 +0200
"Fred Jones" fredthejonester@gmail.com wrote:
when i click on the modules section in the drupal 6.2 section there is nothing listed under the Core-required section.
Am i correct in assuming that somehow somewhere javascript is not working (at least within this preview mode)?
Could be JS issue or CSS or both.
Problem with access permission to js and css? Check if you can find those file in your cache... if they are actually requested/downloaded with firebug.
As soon as I finish with some mmm weired awk behaviour I could borrow you my magic wand.
-- Ivan Sergio Borgonovo http://www.webthatworks.it
"is not a function" would indicate that the js file has not been loaded
On Thu, Aug 7, 2008 at 4:55 PM, Matt Funk matze999@gmx.net wrote:
Well, there is a bug that firebig reports:
$("table.sticky-enabled thead:not(.tableHeader-processed)", context).each is not a function http://xpdtek.com.previewdns.com/drupal-6.2/misc/tableheader.js?d Line 18
i have no idea how to track it back to the source though. Also, i don't know whether this is a the main problem.
So, should i try to cancel my account with godaddy and try to get my money back?
matt
On Thursday 07 August 2008 13:25, Ivan Sergio Borgonovo wrote:
On Thu, 7 Aug 2008 20:46:42 +0200
"Fred Jones" fredthejonester@gmail.com wrote:
when i click on the modules section in the drupal 6.2 section there is nothing listed under the Core-required section.
Am i correct in assuming that somehow somewhere javascript is not working (at least within this preview mode)?
Could be JS issue or CSS or both.
Problem with access permission to js and css? Check if you can find those file in your cache... if they are actually requested/downloaded with firebug.
As soon as I finish with some mmm weired awk behaviour I could borrow you my magic wand.
-- Ivan Sergio Borgonovo http://www.webthatworks.it
-- [ Drupal support list | http://lists.drupal.org/ ]
i have no idea how to track it back to the source though. Also, i don't know whether this is a the main problem.
Certainly seems to be anyhow.
So, should i try to cancel my account with godaddy and try to get my money back?
If you had asked me that even before this problem, I would have said YES.
"is not a function" would indicate that the js file has not been loaded
Victor is of course correct--seems that the references are not working--using a odd preview URL can sometimes do this.