PDA

View Full Version : Installation problerm and php vs Apache


jar_uk1
26th of March 2003 (Wed), 08:10
Hi - I wonder if anyone can give me some advice.

I Installed EE and it all seems OK till I get to the setup.php stage, then I get the "SCROLL DOWN THE PAGE UNTIL YOU SEE A CONFIRMATION BOX" Unfortunately there is nothing else on the page.

Looking through the posts, it could be my version of apache and php to blame.

System
Red Hat Linux 8
Apache 2.0.40
php 4.2.2

I guess my question is, if the versions above won't work, then what would be the preferred combination of php and Apache?

Looking through the posts I also tried the "Database command" test and that gave me a blank page, as did the "non backquote setup" test, my connect.php is below.

I am a little stuck...

//EEconnect v.1.22

//----------------------------------

$servername = "localhost";
$databasename = "photos";
$username = "root";
$password = "";

//----------------------------------

Regards
John R

PS phpinfo works.

Pekka
26th of March 2003 (Wed), 12:25
Yes, PHP's Apache 2 support is to be considered "experimental" so functionality can not be quaranteed at all.

There may be hacks and settings for Apache 2 to make it behave better with PHP, search PHP site http://www.php.net for details.

defucius
16th of April 2003 (Wed), 14:12
Hi, I tried to installed EE on a solaris box and had the same problem.

my solaris has apache 2.0, php 4.3 and mysql 3.23


I actually found out it was the paths problems. For some reason, all the "include" in the php pages does not work. I have to modify them to use a full path from "/".

I modified setup.php and index.php, and the setup is fine now, and index sort of works. none of the other pages works yet because I did not have time to change all of them.

Would some body have a better fix?

Thank.

defucius
16th of April 2003 (Wed), 14:24
I just did a rough search, and there are 399 includes in all php files :) There has to be a better way...

Pekka
16th of April 2003 (Wed), 14:35
See beginning of fecthsettings.php, there is unactive include path. Uncomment it (remove // ) and edit it to have full server path to EE base folder.

ini_set ("include_path",".:/home/pathtosites/mysite/mywebroot/mygallery/myfolder/");

Let me know if this did the trick.

defucius
16th of April 2003 (Wed), 22:10
Pekka wrote:
See beginning of fecthsettings.php, there is unactive include path. Uncomment it (remove // ) and edit it to have full server path to EE base folder.



Thanks Pekka for the reply. I did not find the comment you referred to in fetchsettings.php. Maybe it was deleted in your final verions?

I added a .htaccess file in my gallery directory with the following setting:
php_value include_path /home/defucius/mysite/gallery/

I also had to changed the toroot.php to $toroot.php="";

That seemed to have moved me forward a couple of steps. However, I could not find the Microsthumb path editor or the thumb path editor in multieditor page. something else went wrong?

defucius
17th of April 2003 (Thu), 09:43
Ok, did a little more experiment. Here is what I found out:

1) include_path can be set either by .htaccess, or by ini_set, but only the first value works. Anything after a ":" is ignored. "./" and "../" do not work, either.

2) In order for the sub-directories to work, I had to put a .htaccess file in each of them, with the value set to that directory. In addition, all the toroot.php files had to be changed to a full path starting with "/".

Pekka, did the Mircothumb editor and Thumb editor get moved to under Path editor? If so, you might want to update the installation instruction, and the editor page with new screen shots.

Thanks.

jar_uk1
17th of April 2003 (Thu), 09:53
Pekka

In my installation, in the end, I could have gone down to Apache 1.3 but instead I formatted my machine and loaded .net server 2003 rc2.

I then loaded sokkit (includes apache1.3) and perl/mysql. It all works really well.

Now I know it works, all I have to do is upload my pictures.

(I run a machine on my LAN to run ee, and to serve my moveable type installation)

Regards
John R

defucius
20th of April 2003 (Sun), 09:18
After more digging, I was told that "./" and "../" are actually intentially diabled in "safe_mode" of php so that include does not work with them. And adding .htaccess and changing $toroot to absolute path does seem to get EE up and running. However, I run into this error when I try to edit the photos of the example D30 exhibition:


Database Retrieve Error

An error in retrieving data from database was reported by EE
(query code: resultcount)

If this problem persists, please contact .

SQL ERROR:
You have an error in your SQL syntax near 'LIKE '%%' AND ee_photo.ee_lens_id = ee_lens.ee_lens_id AND ee_' at line 20
(from query resultcount )

The thumbs and microthumbs appear on the exhibition editor page, but when I click "pick a photo to edit", the above error apears. I peeked into list.php, and it seems that $search_row turns out to be NULL and causing the error.

Any ideas? thanks.

Pekka
20th of April 2003 (Sun), 13:14
defucius wrote:
After more digging, I was told that "./" and "../" are actually intentially diabled in "safe_mode" of php so that include does not work with them. And adding .htaccess and changing $toroot to absolute path does seem to get EE up and running.

Well ./ and ../ are not disabled in safe mode, as all my servers use them happily. Must be some Solaris PHP tweak.


However, I run into this error when I try to edit the photos of the example D30 exhibition:


Database Retrieve Error

An error in retrieving data from database was reported by EE
(query code: resultcount)

If this problem persists, please contact .

SQL ERROR:
You have an error in your SQL syntax near 'LIKE '%%' AND ee_photo.ee_lens_id = ee_lens.ee_lens_id AND ee_' at line 20
(from query resultcount )

The thumbs and microthumbs appear on the exhibition editor page, but when I click "pick a photo to edit", the above error apears. I peeked into list.php, and it seems that $search_row turns out to be NULL and causing the error.

Any ideas? thanks.

Keyword can be "" and it is not same as NULL, NULL is "nothing", "" is empty string.

As default search row is assigned to $q0 which is defined in fetchsettings.php, it may be so that fetchsettings.php is not included.

What was the version you were running? If you can't see a line

// ini_set ("include_path",".:/home/pathtosites/mysite/mywebroot/mygallery/myfolder/");

in fetchsettings.php then you should update to 1.22 and then to 1.3RC - all your problems may go away :)

defucius
20th of April 2003 (Sun), 21:09
Thanks again, Pekka.

The problem was "fetchsettings.php" did not get included, because the include line used "../". I changed it to $toroot, and it seems to work now.

The ./ and ../ are disabled on my servers which is a Solaris box. I guess it must be a Solaris specific PHP tweak.

I am running 1.22. I just checked again and still don't see the line

// ini_set ("include_path",".:/home/pathtosites/mysite/mywebroot/mygallery/myfolder/");

in fetchsettings.php. This was actually downloaded just last week, and was my first try with EE, although I have been admiring your photos for quite a while. :)

Pekka
21st of April 2003 (Mon), 05:36
Goot to hear it works. The ini_set is in 1.3RC, but you can add it to fetchsettings - although in your "hack" it as a global path does not help because you need a different path for input folder if ../'s are prohibited.

I still recommend an update to 1.3RC, because it contains a lot of bugfixes and it is much easier to use.

defucius
21st of April 2003 (Mon), 21:04
Yes, my "hack" made it not easy to use the "ini_set" any more. I will keep the .htaccess for now. I will upgrade to 1.3 as soon as I get a little more familiar with EE. I went for 1.22 because I could follow the installation guide better with 1.22, especially when it did not work :)

thanks again.