PDA

View Full Version : newbie setup and web page integration


willis
09-28-2009, 12:52 PM
Hi,
here's what i've done so far,

ran tester script after loading to my server, all passed

downloaded trial calendar auto installer, ran successfully loaded all files on my server, created all directories, no errors.

Can connect to the easy php setup screen, ( having setup my username and password)

I can browse the absolute path to the /calendar/demo.php file (it loads and displays the formatted test calendar)
Same result if I browse to /calendar/index.php

If I try to browse to /calendar/calendar.php I get an internal server error message, I'm fairly certain I need to clear this problem to prior to web page integration. (my next question below) Is this correct?


On the index.html page for my website I've placed the php code inserts per the instructions, i've tried many path combinations following your integration notes without success. The php require statement is located in a table I added at the bottom of the page. Again, having reviewed your forums, haven't solved the path issue.

Thank you for your time!

Brian
09-28-2009, 01:11 PM
You're not supposed to access the calendar.php file directly. It's the file you use to integrate the calendar into your own pages by following the Integration section of the instructions.

Try renaming your file to .php instead of .html. Your server probably doesn't parse html as PHP.

willis
09-28-2009, 01:29 PM
Per your integration instructions, if the page I'm trying to load the calendar on is my index.html file, do you mean change the index.html file to index.php?

Brian
09-28-2009, 02:59 PM
Correct. At least to see if that works. You can make a copy of it first. This is because your server isn't set up to parse html files as PHP (most aren't).

willis
09-28-2009, 03:41 PM
Correct. At least to see if that works. You can make a copy of it first. This is because your server isn't set up to parse html files as PHP (most aren't).

made a copy of index.html, renamed index.html to index.php, refreshed browser, error, missing index.html?

Is this a server setting I'm not familiar with? here is a screen grab of the PHP configuration settings, does this shed any light on the PHP settings currently?

Sub Section Directive Info Value Language Options asp_tags Allow ASP-style <% %> tags. Off File Uploads file_uploads Whether to allow HTTP file uploads. On Paths and Directories include_path Windows: "\path1;\path2" .:/usr/lib/php:/usr/local/lib/php Resource Limits max_execution_time Maximum execution time of each script, in seconds 30 Resource Limits max_input_time Maximum amount of time each script may spend parsing request data 60 Resource Limits memory_limit Maximum amount of memory a script may consume (8MB) 32M Data Handling register_globals You should do your best to write your scripts so that they do not require register_globals to be on; Using form variables as globals can easily lead to possible security problems, if the code is not very well thought of. Off Language Options safe_mode
Off main session.save_path where N is an integer. Instead of storing all the session files in /path, what this will do is use subdirectories N-levels deep, and store the session data in those directories. This is useful if you or your OS have problems with lots of files in one directory, and is a more efficient layout for servers that handle lots of sessions. NOTE 1: PHP will not create this directory structure automatically. You can use the script in the ext/session dir for that purpose. NOTE 2: See the section on garbage collection below if you choose to use subdirectories for session storage N;/path File Uploads upload_max_filesize Maximum allowed size for uploaded files. 50M main zend_optimizer.version
3.3.3

willis
09-28-2009, 04:04 PM
Sorry, table lost it's formatting-
attached is a screen grab

made a copy of index.html, renamed index.html to index.php, refreshed browser, error, missing index.html?

Is this a server setting I'm not familiar with? here is a screen grab of the PHP configuration settings, does this shed any light on the PHP settings currently?

Sub Section Directive Info Value Language Options asp_tags Allow ASP-style <% %> tags. Off File Uploads file_uploads Whether to allow HTTP file uploads. On Paths and Directories include_path Windows: "\path1;\path2" .:/usr/lib/php:/usr/local/lib/php Resource Limits max_execution_time Maximum execution time of each script, in seconds 30 Resource Limits max_input_time Maximum amount of time each script may spend parsing request data 60 Resource Limits memory_limit Maximum amount of memory a script may consume (8MB) 32M Data Handling register_globals You should do your best to write your scripts so that they do not require register_globals to be on; Using form variables as globals can easily lead to possible security problems, if the code is not very well thought of. Off Language Options safe_mode
Off main session.save_path where N is an integer. Instead of storing all the session files in /path, what this will do is use subdirectories N-levels deep, and store the session data in those directories. This is useful if you or your OS have problems with lots of files in one directory, and is a more efficient layout for servers that handle lots of sessions. NOTE 1: PHP will not create this directory structure automatically. You can use the script in the ext/session dir for that purpose. NOTE 2: See the section on garbage collection below if you choose to use subdirectories for session storage N;/path File Uploads upload_max_filesize Maximum allowed size for uploaded files. 50M main zend_optimizer.version
3.3.3

ve9gra
09-28-2009, 06:13 PM
Are you somehow referencing index.html in your file somewhere?

willis
09-28-2009, 10:47 PM
in my index.html, I've added a table at the bottom with the php require line-
<?php require("calendar/calendar.php"); ?>

Will this call the demo calendar script to load in the table?

Brian
09-29-2009, 12:32 AM
Does your server parse html as PHP?

You also need to other two lines of calendar code from the Integration/Important section of the instructions.

willis
09-29-2009, 12:40 PM
Does your server parse html as PHP?

You also need to other two lines of calendar code from the Integration/Important section of the instructions.

according to our hosting provider Hostdime, they parse html as php with suphp (suexec) handlers

currently I have the three file permissions set back to 644 from 646

Brian
09-29-2009, 03:10 PM
You also need to other two lines of calendar code from the Integration/Important section of the instructions.

File permissions should be at default (unless your host says otherwise).

willis
10-14-2009, 02:38 PM
Brian,
Can you look at the source code for the site link below- having trouble getting the calendar to render on the home page. I'm not the original designer of the site, I think the css is a bit clunky,
http://www.phoenixvillehomes.org

I can get to the calendar at http://www.phoenixvillehomes.org/calendar. My goal was to embed the calendar in a table, lower right on the home page as seen in the code.
I purchased the calendar and activated the license key.
Thank you for your time.

Brian
10-14-2009, 05:13 PM
I don't see the calendar at all on the home page link. And I can't see the source code. You would need to attached that original file or do it in a support ticket if you don't want to publish it publicly.

ve9gra
10-14-2009, 06:53 PM
You need to rename your file index.php. Your server does not parse PHP in HTML files.

You can confirm that by viewing the source of the page, and you can clearly see the <?php ?> tags.

willis
10-14-2009, 07:27 PM
Bingo! Gervais! I don't think I refreshed the page after renaming the file index.php earlier in this thread. The calendar now loads on the homepage, I hope to dial in on the details next.
I thank you both for your help!
willis