drupal-7

Drupal Installation can't connect to MySQL server but it's there

家住魔仙堡 提交于 2019-12-25 06:21:12
问题 I'm getting the following error installing drupal 7: Failed to connect to your database server. The server reports the following message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on 'myservername' (13). I am running MySQL on one windows server and httpd on another linux. MySQL is running just fine and on the httpd server I can connect just fine to the MySQL, as follows: mysql -h dbserver -p --port=3001 -u drupal Similarly I can run mysqli and pdo and it connection just fine too

Drupal 7 date popup default value is blank

左心房为你撑大大i 提交于 2019-12-25 05:28:31
问题 I am trying to get a default value in for the default value of a date_popup that exists within a fieldset and I have followed the other suggestions here but the value is always blank. $format = 'm/d/Y'; $primary_start1 = null; if(isset($vals["primary_start"])){ if("-1" != $vals["primary_start"]){ $primary_start1 = (int)$vals["primary_start"]; } } $form['dates']['primary']['primary_start'] = array( '#title' => t('Start date'), '#name' => 'primary_start', '#type' => 'date_popup', '#date

Drupal 7 Views: Which type of output to use for re-render of link

余生颓废 提交于 2019-12-25 05:28:17
问题 When selecting theming information in views what type of output will enable me to re-render the links? The links require title attributes and the views gui is not an option. Display Style Row Field 回答1: Resolved: Used 'Row output' as the theme suggestion and manipulated the $fields variable before looping its properties. 来源: https://stackoverflow.com/questions/10105740/drupal-7-views-which-type-of-output-to-use-for-re-render-of-link

Some fields are not sorting properly in view

三世轮回 提交于 2019-12-25 04:52:16
问题 I'm trying to create a directory list in view. But some of the fields are not properly sorting. See the below image for my view configuration. And the output of the view. Please anyone help me to get the correct output. 回答1: you likely have a space (i.e. " ") at the beginning of your titles, or some other character that isn't displaying. 来源: https://stackoverflow.com/questions/27520119/some-fields-are-not-sorting-properly-in-view

Creating Drupal Multisite with Subdirectory from different Domain

混江龙づ霸主 提交于 2019-12-25 04:29:15
问题 I'm attempting to create Drupal Multisite. Currently lets say we have below Live Sites in the form abc.example.com def.example.com xyz.example.com All the Sites are present on the Same server (Nginx Server) in the directories /var/www/vhosts/abc.example.com/httpdocs /var/www/vhosts/def.example.com/httpdocs /var/www/vhosts/xyz.example.com/httpdocs Now we have to create Blogs for each Live Site, we are looking into Drupal Mutlisite Architecture for the same, so all Sites should point to same

Drupal - How to add simple jQuery and jQuery UI to head tag?

ⅰ亾dé卋堺 提交于 2019-12-25 04:19:41
问题 Personally, I don't like using jQuery Update module, 1. Seems like a lot of unnecessary overhead, and 2. It only allows to update up to jQuery 1.8, which is old and personally this module needs to be updated itself if you ask me! So I need to add the following URLS to my head tag in Drupal 7, before any other js files get loaded. Google CDN jQuery URL: //ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js Google CDN jQuery UI URL: //ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui

Drupal site received url request embedding suspicious codes presuming attempt of hacking

情到浓时终转凉″ 提交于 2019-12-25 04:11:50
问题 I found a url request having suspicious code to one of my Drupal site. Will someone explain what will be the depth of this code and advise any precautions to be taken. Code: function (){try{var _0x5757=["/x6C/x65/x6E/x67/x74/x68","/x72/x61/x6E/x64/x6F/x6D","/x66/x6C/x6F/x6F/x72"],_0xa438x1=this[_0x5757[0]],_0xa438x2,_0xa438x3;if(_0xa438x1==0){return};while(--_0xa438x1){_0xa438x2=Math[_0x5757[2]](Math[_0x5757[1]]()*(_0xa438x1 1));_0xa438x3=this[_0xa438x1];this[_0xa438x1]=this[_0xa438x2];this[

Drupal 7 issue with programmatically set user picture

偶尔善良 提交于 2019-12-25 04:08:58
问题 I am using a script to programmatically set the user picture in Drupal 7. The script is depicted here: Drupal 7 save user picture programmatically. The script works fine, but once the user picture has been set for a specific user, and if I try to delete that picture (as an admin or as the user himself) the server returns: Warning: unlink(/home/hkdepot/public_html/drupal_dev_4/sites/default/files/avatars/upload/b8f1e69e83aa12cdd3d2babfbcd1fe27_101.jpg): Permission denied in drupal_unlink()

Drupal: slow and modules don't work

南笙酒味 提交于 2019-12-25 03:56:08
问题 I try to work with Durpal as first time, I'm installing all the basic recommended modules but now the site is very slow (very very in particular in the admin panel) and lot of models are not enabled even if I enable them. For example I installed the Admin menu and if I open a new window I can see it but whenever I do some operation (go in blocks or go in configuration for examples) the bar disappear! And won't come back till i open a new window. I enable View module and view UI module but I

implementing user has password in hook menu

与世无争的帅哥 提交于 2019-12-25 03:41:19
问题 we are implementing a web service for a Drupal 7 site (the web service code is not part of drupal installation folder). one of the web services needs to sign up the user on the site. the main hurdle was getting a hashed password that Drupal will also recognize. for that , am following a suggestion made on stack overflow to Implement a REST service inside drupal and call that from the outside service code . (that part also seems possible and achieveable). have implemented a password hashing