Got a problem I have not encountered before. Drupal is uploaded to the server and when going to the installer get:

Notice: Trying to get property of non-object in /vservers/bteminis/htdocs/cms/includes/form.inc on line 324

Notice: Undefined variable: redirect in /vservers/bteminis/htdocs/cms/includes/form.inc on line 267

Notice: Undefined variable: base in /vservers/bteminis/htdocs/cms/includes/form.inc on line 460

Notice: Undefined index: #value in /vservers/bteminis/htdocs/cms/includes/form.inc on line 1024

Notice: Undefined index: #value in /vservers/bteminis/htdocs/cms/includes/form.inc on line 1024

Warning: Cannot modify header information - headers already sent by (output started at /vservers/bteminis/htdocs/cms/includes/form.inc:324) in /vservers/bteminis/htdocs/cms/includes/common.inc on line 141

Notice: Undefined variable: no_module_preprocess in /vservers/bteminis/htdocs/cms/includes/common.inc on line 1467

Notice: Undefined variable: no_theme_preprocess in /vservers/bteminis/htdocs/cms/includes/common.inc on line 1488

This is on Linux RH-Ent with PHP5. Anyone out there know a fix or what's going on here?

Comments

mfer’s picture

techmate - Check out this http://drupal.org/node/109529. See if modifying the php.ini file makes a difference.

If you can't directly modify the php.ini file for this you should be able to modify the provided .htaccess file that came with drupal. To the bottom add:

php_value error_reporting E_ALL & ~E_NOTICE

--
Matt
http://www.mattfarina.com

DarrinRich’s picture

I must be blind I cant find a php.ini file anywhere or a .htaccess file. I redownloaded drupal just in case I downloaded something wrong. I cant find it in there also. Whats the location of the php.ini file? Reading a post at the link before, maybe this version of drupal doesnt have a php.ini or .htaccess file?
http://drupal.org/node/101002

mfer’s picture

If you are using shared hosting you most likely can't get to the php.ini file. This is the configuration file for php on your server.

The .htaccess file is in the drupal folder you downloaded. The period (.) at the front makes it a hidden file so you will have to view hidden files to find it. It's at the same directory level as your drupal index.php file. Since it's hidden if you didn't upload the the drupal folder but just it's contents you may have missed it. Or, you may not see it because it's hidden.

--
Matt
http://www.mattfarina.com

DarrinRich’s picture

Im using transmit for ftp. After selecting "show invisibles" I was able to see the .htacess file. Thats what I edited since I do have shared hosting. I opened up that file and on the bottom line pasted "php_value error_reporting E_ALL & ~E_NOTICE" without the "", on the very bottom line of that file. Saved it, then uploaded it. When I try to access the cms folder through the browser I now get the following:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, root@bteministries.org and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.0.52 (Red Hat) mod_fastcgi/2.4.2 DAV/2 FrontPage/5.0.2.2635 mod_ssl/2.0.52 OpenSSL/0.9.7a SVN/1.3.2 Server at bteministries.org Port 80

If I remove the "php_value error_reporting E_ALL & ~E_NOTICE" at the end then Im right back where I started from.

mfer’s picture

Strange. What version of php are you using? Not just PHP5 but what version of it?

If you are unsure in a file somefilename.php put:

<?php
print phpinfo();
?>

This will give you a lot of details about your php setup.

--
Matt
http://www.mattfarina.com

DarrinRich’s picture

Heres the link for the php info
http://bteministries.org/something.php

Heres some other info which is all bla bla to me but maybe someone understands it. I have my own personal domain hosted with the same company. I tried installing drupal on it and has some similar errors. I contacted support and this is what they said

I have edited your permissions in your apache configuration so the commands in your .htaccess file will be parsed. This is what was causing the internal server error. Now your site gives the following error:

Fatal error: Unsupported operand types in /vservers/sid/htdocs/cms/includes/form.inc on line 342

The line that error message refers to is the following: " $form += _element_info('form');". In the code the variable $form is an empty array, you cannot add something to an array like this. I'm not sure what the code is trying to do here but if you comment out that line the page loads fine.

I commented the line he stated "342" out and tried it. It loads just fine now with no notices, warning or erros. It just shows the page awaiting me to input the database info.
I contacted support a few minutes ago to see if this is something they need to do for this server as well and am awaiting a response from them.

Any of this make sense to you?

DarrinRich’s picture

Support just got back to me. They made the same changes to this server and I commented out the line 342 and everything is fine now. Its now showing the database screen as it should be without notices, warnings or errors. Im soo happy now. Thanks a million Matt for sticking it out with me and trying to get this solved. You have been great. :)

mfer’s picture

Does it work with like 324 not commented out. Having that commented out might very well break something.

--
Matt
http://www.mattfarina.com

DarrinRich’s picture

I un-commented line 342 and saved it. It seems to work on this site. At least now it does. Doesnt work on mine. Maybe it something that has to be done and then after entering all the database information it can be undone?

dmarquette’s picture

I add this. The errors go away but I never make it to the Welcome screen.

rogergordon’s picture

Hi.

I'm a Drupal newbie and I like what I see so far except for these error messages!

I think the problem is server/php related. I installed a remote version of Drupal a few days ago (PHP 5.2.3 and MySQL 4.1.22) which seems to work fine. When I try to install it locally using MAMP (running PHP 5.1.6 and MySQL 5.0.19) I get the errors mentioned above. I too am not keen to either repress error messages (why are there errors in the first place?) or comment out code that might break something else in future.

Thanks for any help you can provide!

Update:

Changing the error reporting options in php.ini seemed to work. I wonder why...

kimmeehh’s picture

This error also presents as "Cannot modify header information" depending on PHP version.

In short, it means that somewhere in the code, something was printed to the browser before Drupal had finished preparing the page. This is most often caused by custom or modified code contributed from sources outside Drupal, so inspect your uniquely added code (including themes) first....

More here (http://drupal.org/node/1424)