changed over to linux,apache,mysql but php.ini file......

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

changed over to linux,apache,mysql but php.ini file......

Post by gasoga »

Hi

I was using MS SQl Server and runnin it all on windows but my company has decided to change over to linux as it is cheaper, so i had to change all my code and bring it over to the newly installed linux.

The problem is i can i access the php.ini file in a shell prompt i can edit it and it looks like im saving the changes , but whe in run php_info()
My changes dont take affect!!

Any ideas would be very helpful and much appreciated!
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

You have to restart apache.
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Post by gasoga »

Any ideas on how i do that??
Sorry im just new to this !!
lcidw
Forum Commoner
Posts: 58
Joined: Mon Apr 28, 2003 8:55 am
Location: Netherlands

Post by lcidw »

Code: Select all

apachectl stop
apachectl start
or just

Code: Select all

apachectl restart

[INTERESTED]
Just what i don't understand is.. what i'm reading here is that you admin the server, you company has gone over to linux, but linux is a bit harder to understand and config, it takes time and preferrably an experienced linux user.
Are you the man, who's assigned to learn linux, is there another person in the company with linux experience, or did the company really just decided to use linux, without any experience?
[/INTERESTED]
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Post by gasoga »

They just decided to changeover because it was cheaper, my boss has a bit of linux experience the only problem is he is never around to give me help.

Thank for your help by the way it worked for me!!!

I have one more problem if u wouldnt mind ,

im am getting a cannot redclare function says it was previously declared in functions.php, this is the file that i include on top of each page . The function is no where else.

I never got this error befor eon my other system,could it be to do with the new system??
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

You are not redeclairing it again in the page u call?

Maybe, it's a function name that's allready in use by PHP it self.
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Post by gasoga »

basically what it is is:

I have a a file called functions.php , in this file i have functions like makerandompassword() and viewheader() etc,

In order to call these functions in other files i include the functions.php on top of evry page .

Does that make anymore sense?
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

I bit, :)

Can you give a list of the functions in the include file?
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Post by gasoga »

yeah sure !!!

Code: Select all

<?php

function makeRandomPassword() 
{
code
}
function ViewHeader($SmartID) 
{
code
}

function ViewFooter()
{
code
}


?>
Thats all in the functions.php file

then for example on the top of login.php its like this:

Code: Select all

<?php
include("functions.php");

code 


?>
The error im getting is:
Fatal error: Cannot redeclare makerandompassword() (previously declared in /www/support/public_html/html/functions.php:30) in /www/support/public_html/html/functions.php on line 28
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Could you be including the functions file twice? You may want to start using include_once() for including function files.

Mac
gasoga
Forum Commoner
Posts: 36
Joined: Thu Apr 17, 2003 4:15 am
Location: Ireland

Post by gasoga »

i dont think im am !! This code worked when it was running on windows and mssql sever!!

Im using php 4.2.2 and but it wont let me use that function include_once()!!!
Post Reply