Error on one server but another

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Error on one server but another

Post by pinehead18 »

Fatal error: Call to undefined function: stripos()

Any reason this would give me an error on my server but not on any other box i put it on?

I know its not the code since it works on 2 other servers.

Thanks for the advice.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Could it have something to do with the following quote from the manual?
stripos() wrote:stripos

(PHP 5)

stripos — Find position of first occurrence of a case-insensitive string
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Well according to debian i have php5 installed.

But not according to phpinfo

Suggestions on that/
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

Install PHP 5 or use a different method.
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

Sorry let mereword this.

Everythign was working fine. Except i needed php5.
I do a apt-get isntall libapache2-php5

Only problem is i only have apache1.

Now all my domains stoped pointing to the right spot and now point to "it works"

I checked the config files but they are all the same.

Any suggestions?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

I'm guessing that your httpd.conf file was overwritten. There should be an auto generated backup. See if you can find httpd.conf.bak

If you find that, rename the current httpd.conf to httpd.conf.new and rename httpd.conf.bak to httpd.conf and restart apache.

I have no clue if that will restore things or not, and even if it does the file may require some modifications to get it working with the new version of PHP.

That's about all the advice I can give you.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Is there a reason you didn't use the following?

Code: Select all

apt-get install php5 libapache-mod-php5
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

I did, the first time i accidently did libapache2 which messed it all up since i have apache 1.

But i think i fixed it. And did libapache says its installed but it wont add the mods to httpd.conf so it wont work on my site.

Any ideas how to get it working?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Manually modify your httpd.conf.
pinehead18
Forum Contributor
Posts: 329
Joined: Thu Jul 31, 2003 9:20 pm

Post by pinehead18 »

I did that.

When i added the libphp5.c or whatever the whoel thing stopped working and just add module did not fix the problem
Post Reply