Board index   FAQ   Search  
Register  Login
Board index PHP PHP Installation

php.ini problems. (Moving script from one server to another)

Forum for you who has PHP installation issues

Moderators: macek, egami, gesf

php.ini problems. (Moving script from one server to another)

Postby Fat » Mon Feb 10, 2003 9:56 am

Hello,

I developed some software on my own (well rented) server space. It is a unix/linux server and the php software is complete, bug free, and ready for the client.

When I went to install the software on the client's server, there were a number of bugs. Looking more closely it turned out this is because on the client's server, the php.ini file had a single line:
register_globals = on

I have spent a couple days now reading php.net and searching google. I've been able to fix most of the problems by adding to the php.ini file. What I can't figure out for the life of me is this:

MY SUPER IRRITATING PHP.INI PROBLEM :P
There seems to be very limited memory for my scripts on the client's server. All of my for statements or while loops that are in excess of 10 items hang indefinitely or take a very very long time to load. On my own rented server the given php file will load in milliseconds. I do not unfortunately have access to the php.ini file on my rented server yet. (I have contacted them and I am waiting for a reply).

I have tried installing the standard release of the php.ini file from php.net . I guess I can go back to trying to work with this but on installation my sessions didn't work properly anymore.

Sorry for the long read, can someone please help?
Thanks,
Chris
Fat
New php-forum User
New php-forum User
 
Posts: 3
Joined: Mon Feb 10, 2003 9:45 am

Re: php.ini problems. (Moving script from one server to anot

Postby WiZARD » Mon Feb 10, 2003 11:31 pm

Hi Chris!
If you tired to wait while some hoster answered at you question try do next in your script:
Code: Select all
set_time_limit (15000);

If you interesting what is it mean, try search in PHP manual.... :wink:
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby Fat » Tue Feb 11, 2003 2:44 pm

Heya Wizard,

Thanks for the advice. Through this process I've acutally gotten quite familiar with the php.ini file now. Unfortunately I never did manage to get the problem fixed and I'm a little baffled as to why.

I checked the script with about 15 different people and it loaded fine for them. Sometimes it loads properly now on my computer, other times it hangs or reaches the time limit. Noone else has been able to replicate the problem for me, I've tried it on 4 computers now behind the same router. 1 invariably hangs (i've cleared the cache/history to no avail), 2 hang sometimes, and the last one works fine every single time.

I've further installed the script on 3 different servers, it works perfectly every time on 2/3, all of which are using the identicle .ini file. The last server, and only that server, causes the mentioned problems.

At anyrate, I've given up and because everything else is installed and working, I should be wiping my hands clean of this server and this project within the hour :)
Fat
New php-forum User
New php-forum User
 
Posts: 3
Joined: Mon Feb 10, 2003 9:45 am

Postby WiZARD » Tue Feb 11, 2003 11:06 pm

Give me a code of youre greate script, maby i say to you what wrong....
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Postby Fat » Tue Feb 11, 2003 11:55 pm

Well the test script I installed was just a simple for loop.

<select>
<?
$start = 2003;
$total = 200;
for ($i = $start; $i <= $total; $i++):
print "<option value='$x'>$x</option>";
endfor;
?>
</select>

I tried rewriting it so that i was a while loop instead but had the same problem. The other thing to note is that if I did a simple for loop to print "$x" instead, the script works fine.
Fat
New php-forum User
New php-forum User
 
Posts: 3
Joined: Mon Feb 10, 2003 9:45 am

Postby WiZARD » Wed Feb 12, 2003 2:35 am

Did you trying use echo not print as i know work faster....
and what is $x? form SQL library?
in a future try use ob function (cashing), - generate all html and after that printing....
User avatar
WiZARD
Moderator
Moderator
 
Posts: 1257
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol


Return to PHP Installation

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron