2 php problems

software development

#1

I’m a professional web developer but new to PHP. I’m trying to move a PHP application from another server to dreamhost but I’ve run into a few problems and am wondering if anyone can help me.

  1. The call to session_start() was making the server return nothing and I got around this by commenting that line out. I don’t know if this is a problem yet because the rest of the application doesn’t work right.
  2. .php and .shtml files don’t seem to be processed properly. The .php files are executing code in the <? and ?> but aren’t getting properly prepended from the “php_value auto_prepend_file” line in the .htaccess file. The .shtml files don’t seem to be getting processed at all. The .html files are being properly processed and handled as PHP.

The phpinfo page is http://axelby.dreamhosters.com/phpinfo.php. I’d really appreciate any help.


#2
  1. You will definately need session_start(). How do you retrieve the session value? It should be something like $_SESSION[“session_name”]

  2. You will need “server side include” to be enabled in apache. You can try to open a .shtml page. If the server does not process shtml page properly, you may need to ask DH support for help. Or you can convert shtml page to php page and use require_once to replace server side include.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#3

You are correct that I need session_start(). A simple test shows my session variables are not being saved between requests. However, there is little doubt that the call to session_start() makes the webserver give no response (0 bytes, so no error) to requests. I had a similar issue before that was solved by granting write permissions on a certain folder, but I have verified that is not the issue here. I verified that I am able to write to /tmp and I also changed the session temp folder to one under my root that had write permissions and I still got a 0 byte response. How can I find out what the error is?

I’m also having a much lower priority problem. In my .htaccess file, I have a auto_prepend_file and auto_append_file set. I also have a line that sets .csv and .html to application/x-httpd-php. These files are being properly processed for .html files but not for .php files. This isn’t as much of a big deal because I can use require_once or rename my .php files to .html.

I really appreciate the response, Patrick. You’ve really helped me.


#4

The key was finding out that the application has an error handler that swallowed errors without showing them to me. Once I turned this off, I was able to figure out just what’s going on and begin fixing the site in earnest.

Thanks for your help, Patrick. You got me over the hump.

Dan


#5

Great! I’m glad you solved the problem.

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here