Ben Drupal ile oynamak için bir yerel makinede kurulum için küçük bir sandbox çalışıyorum. Birkaç CCK çeşit yarattık; Birkaç düğümleri oluşturmak için ben aşağıdaki senaryoyu yazdı:
chdir('C:\..\drupal');
require_once '.\includes\bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
module_load_include('inc', 'node', 'node.pages');
$node = array('type' => 'my_type');
$link = mysql_connect(..);
mysql_select_db('my_db');
$query_bldg = '
SELECT stuff
FROM table
LIMIT 10
';
$result = mysql_query($query_bldg);
while ($row = mysql_fetch_object($result)) {
$form_state = array();
$form_state['values']['name'] = 'admin';
$form_state['values']['status'] = 1;
$form_state['values']['op'] = t('Save');
$form_state['values']['title'] = $row->val_a;
$form_state['values']['my_field'][0]['value'] = $row->val_b;
## About another dozen or so of similar assignments...
drupal_execute('node_form', $form_state, (object)$node);
}
İşte php_errors.log bir kaç alakalı hatları şunlardır:
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:47] PHP Warning: session_start(): Cannot send session cookie - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 1143
[12-Jun-2010 05:02:47] PHP Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 1143
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 709
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 710
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 711
[12-Jun-2010 05:02:47] PHP Warning: Cannot modify header information - headers already sent by (output started at C:\..\drupal\includes\bootstrap.inc:1299) in C:\..\drupal\includes\bootstrap.inc on line 712
[12-Jun-2010 05:02:47] PHP Notice: Undefined index: REMOTE_ADDR in C:\..\drupal\includes\bootstrap.inc on line 1299
[12-Jun-2010 05:02:48] PHP Fatal error: Allowed memory size of 239075328 bytes exhau sted (tried to allocate 261904 bytes) in C:\..\drupal\includes\form.inc on line 488
[12-Jun-2010 05:03:22] PHP Fatal error: Allowed memory size of 239075328 bytes exhausted (tried to allocate 261904 bytes) in C:\..\drupal\includes\form.inc on line 488
[12-Jun-2010 05:04:34] PHP Fatal error: Allowed memory size of 262144 bytes exhausted (tried to allocate 261904 bytes) in Unknown on line 0
Bu noktada herhangi bir eylem php yukarıda gösterilen son hata sonuçları alır. Açıkçası yardım etmedi nihai Ölümcül hata önce php.ini memory_limit değerini artırmak çalıştı.
Nasıl hata elimine edilebilir? Ben Drupal içine göç veri veya cck tabloları doğrudan opere edilmelidir doğru bir yolda mıyım?
Windows XP
PHP 5.3.2 VC6
Apache 2.2