By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,719 Members | 1,036 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,719 IT Pros & Developers. It's quick & easy.

Need help, PHP5 no errors show and server will not parse php code.

P: n/a
I jsut installed a new PHP 5 server as I wanted to keep the php4
version server running until I change over all the code to work with
5.

Here is the problem and for the life of me I cannot figure it out.

If I create a file and put it in the root of apache 2.2 on the php 5
server with the command php_info() it displays the php information.

Now if I copy a file from the php4 server into the php5 root and call
the file it display the php code and not the php_info information.
A step forward. I copy my entire website from the php 4 to php 5 and
http://blahblah.index.php and it show the php code it will not parse
it.

I create a new file and place it in a new directory on the php 5
server and everything works fine. I am so frustrated as I do not know
what is wrong. I really need help here.

Apache 2.0.5.9
PHP 5.2.4
Win 20036 SP 1

Anyone have any idea as to why this is not working? If I create a new
folder and a new file it works. If I copy the project from another
server to this one and then create a new file in that directory I
copied over, it will not work.

I am stumped.

Thanks,

Kev

Oct 4 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Oct 4, 8:28 am, kjsph...@gmail.com wrote:
I jsut installed a newPHP5 server as I wanted to keep the php4
version server running until I change over all the code to work with
5.

Here is the problem and for the life of me I cannot figure it out.

If I create a file and put it in the root of apache 2.2 on thephp5
server with the command php_info() it displays thephpinformation.

Now if I copy a file from the php4 server into the php5 root and call
the file it display thephpcode andnotthe php_info information.

A step forward. I copy my entire website from thephp4 tophp5 andhttp://blahblah.index.phpand it show thephpcode it willnotparse
it.

I create a new file and place it in a new directory on thephp5
server and everything works fine. I am so frustrated as I donotknow
what is wrong. I really need help here.

Apache 2.0.5.9PHP5.2.4
Win 20036 SP 1

Anyone have any idea as to why this isnotworking? If I create a new
folder and a new file it works. If I copy the project from another
server to this one and then create a new file in that directory I
copied over, it willnotwork.

I am stumped.

Thanks,

Kev
I have run into the same issue as well, and as you suggested, this is
a very unusual bug, which should not be happening. I wish I could
help, but I cannot explain why the bug is happening. I think that
this one might need to be filed under a bug in Apache 2 or PHP
4.4.0 .

~Huck

Oct 22 '07 #2

P: n/a
kj******@gmail.com wrote:
I jsut installed a new PHP 5 server as I wanted to keep the php4
version server running until I change over all the code to work with
5.

Here is the problem and for the life of me I cannot figure it out.

If I create a file and put it in the root of apache 2.2 on the php 5
server with the command php_info() it displays the php information.

Now if I copy a file from the php4 server into the php5 root and call
the file it display the php code and not the php_info information.
A step forward. I copy my entire website from the php 4 to php 5 and
http://blahblah.index.php and it show the php code it will not parse
it.

I create a new file and place it in a new directory on the php 5
server and everything works fine. I am so frustrated as I do not know
what is wrong. I really need help here.

Apache 2.0.5.9
PHP 5.2.4
Win 20036 SP 1

Anyone have any idea as to why this is not working? If I create a new
folder and a new file it works. If I copy the project from another
server to this one and then create a new file in that directory I
copied over, it will not work.

I am stumped.

Thanks,

Kev

It could be a lot of things - file ownership, for instance. File
permissions may be different.

I doubt this is a PHP bug, though. There is something different between
the files. It's obviously not content; from what you're saying it's not
the filenames/extensions. So look at your file properties on the
scripts to see what they have. And check your Apache configuration for
any differences between the two systems (although I doubt that's the case).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Oct 22 '07 #3

P: n/a
On Oct 4, 8:28 am, kjsph...@gmail.com wrote:
I jsut installed a new PHP 5 server as I wanted to keep the php4
version server running until I change over all the code to work with
5.

Here is the problem and for the life of me I cannot figure it out.

If I create a file and put it in the root of apache 2.2 on the php 5
server with the command php_info() it displays the php information.

Now if I copy a file from the php4 server into the php5 root and call
the file it display the php code and not the php_info information.

A step forward. I copy my entire website from the php 4 to php 5 andhttp://blahblah.index.phpand it show the php code it will not parse
it.

I create a new file and place it in a new directory on the php 5
server and everything works fine. I am so frustrated as I do not know
what is wrong. I really need help here.

Apache 2.0.5.9
PHP 5.2.4
Win 20036 SP 1

Anyone have any idea as to why this is not working? If I create a new
folder and a new file it works. If I copy the project from another
server to this one and then create a new file in that directory I
copied over, it will not work.

I am stumped.

Thanks,

Kev
My guess with the way it sounds would be a file ownership/permission
problem, like Jerry had mentioned. when the files are copied to the
new server, they will by default be created as the user doing the
copying being the owner, where they should be setup to have the
correct permissions for the web server user. That would be what I
would check first at least.

Oct 22 '07 #4

P: n/a
On 4 Oct, 14:28, kjsph...@gmail.com wrote:
I jsut installed a new PHP 5 server as I wanted to keep the php4
version server running until I change over all the code to work with
5.

Here is the problem and for the life of me I cannot figure it out.

If I create a file and put it in the root of apache 2.2 on the php 5
server with the command php_info() it displays the php information.

Now if I copy a file from the php4 server into the php5 root and call
the file it display the php code and not the php_info information.

A step forward. I copy my entire website from the php 4 to php 5 andhttp://blahblah.index.phpand it show the php code it will not parse
it.

I create a new file and place it in a new directory on the php 5
server and everything works fine. I am so frustrated as I do not know
what is wrong. I really need help here.

Apache 2.0.5.9
PHP 5.2.4
Win 20036 SP 1

Anyone have any idea as to why this is not working? If I create a new
folder and a new file it works. If I copy the project from another
server to this one and then create a new file in that directory I
copied over, it will not work.

I am stumped.

Thanks,

Kev
Are you using short tags in your old files?

Oct 23 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.