News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Problem with apc

Started by _Ziggy_, August 18, 2011, 01:19:31 PM

Previous topic - Next topic

_Ziggy_

In oktober 2009 I installed apc on my server: http://www.bluesforum.nl/apc.php

I need to install Zend optimizer on the server, but I am having problems with that. There is an error which seems to be caused by apc.

This is the error:


# php -m
PHP:  Error parsing /usr/local/Zend/etc/php.ini on line 1117
[PHP Modules]
apc
bcmath
bz2
calendar
ctype
curl
date
dba
dbase
dom
exif
filter
ftp
gd
gettext
gmp
hash
iconv
imap
ionCube Loader
json
ldap
libxml
mbstring
mcrypt
mhash
mssql
mysql
mysqli
ncurses
odbc
openssl
pcntl
pcre
PDO
pdo_mysql
PDO_ODBC
pdo_pgsql
pdo_sqlite
pgsql
posix
pspell
readline
Reflection
session
shmop
SimpleXML
snmp
soap
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tidy
tokenizer
wddx
xml
xmlreader
xmlrpc
xmlwriter
xsl
zip
zlib

[Zend Modules]
the ionCube PHP Loader





Line 1117 is allmost at the end of php.ini =
"extension=apc.so"

(The "" are included in the php.ini as well. I have tried removing them, but then it returns "Fatal error").

I have included my php.ini as an attachment. I hope someone can help me with this.
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

青山 素子

Try updating APC. There has been a lot of work done since your last update.

Also, try moving the apc extension line up to be with the other standard extensions.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


_Ziggy_

Thanks for your answer!

I have tried updating APC, but it fails. I have included a Notepad file with the Putty output.

Where should I insert the apc extention line?
Before which line should it be inserted?


(To be honest, I have no idea what I am doing  ??? ).
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

dogphilosophy

I'm not sure which OS you are hosted on or the specifics but on my OS;
php makes a folder in /usr/local/etc
you want to look for extensions.ini in  /usr/local/etc/php/
the path would be, for me at least /usr/local/etc/php/extensions.ini
this file is where all your extensions should be. If you have that file, than remove the line from your php.ini file and enter it into the extensions.ini file

青山 素子

Quote from: _Ziggy_ on August 18, 2011, 03:37:32 PM
Thanks for your answer!

I have tried updating APC, but it fails. I have included a Notepad file with the Putty output.

You need to install the PCRE headers.For RPM-based distributions, this package is likely "libpcre-devel".

Quote
/usr/include/php/ext/pcre/php_pcre.h:29:18: error: pcre.h: No such file or directory

Quote from: _Ziggy_ on August 18, 2011, 03:37:32 PM
Where should I insert the apc extention line?
Before which line should it be inserted?

I don't know how PHP is configured on the system, so I cannot give much help here. If you're using a single-file php.ini, there will be a block mid-way in the file with several extensions shown being loaded. You can put the line there.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


_Ziggy_

I have tried this but it didn't work out:

# yum install pcre
Setting up Install Process
Package pcre-6.6-6.el5_6.1.i386 already installed and latest version
Nothing to do

# yum install libpcre-devel
Setting up Install Process
No package libpcre-devel available.
Nothing to do
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

_Ziggy_

I don't think there is an extensions.ini file. I can't find it.
If there was one, it should show up in php.info where it says "additional .ini files parsed"?



Quote from: dogphilosophy on August 18, 2011, 03:44:42 PM
I'm not sure which OS you are hosted on or the specifics but on my OS;
php makes a folder in /usr/local/etc
you want to look for extensions.ini in  /usr/local/etc/php/
the path would be, for me at least /usr/local/etc/php/extensions.ini
this file is where all your extensions should be. If you have that file, than remove the line from your php.ini file and enter it into the extensions.ini file
Bluesforum.com   2.0                     Bluesforum.nl   2.0
Rockabilly-forum.com   2.0              Bluesharp.nl   2.0
Bungalowpark-forum.nl   2.0        Eee pad forum   2.01
Cristiano Ronaldo   2.02              Lockout Tagout   2.02


Looking to buy existing forums, send pm.

dogphilosophy

Quote from: _Ziggy_ on August 18, 2011, 04:31:49 PM
I don't think there is an extensions.ini file. I can't find it.
If there was one, it should show up in hxxp:php.info [nonactive] where it says "additional .ini files parsed"?



Quote from: dogphilosophy on August 18, 2011, 03:44:42 PM
I'm not sure which OS you are hosted on or the specifics but on my OS;
php makes a folder in /usr/local/etc
you want to look for extensions.ini in  /usr/local/etc/php/
the path would be, for me at least /usr/local/etc/php/extensions.ini
this file is where all your extensions should be. If you have that file, than remove the line from your php.ini file and enter it into the extensions.ini file
yes I believe that is correct. If you don't have one, than you have the all in one php.ini file and follow what the other poster suggested.

青山 素子

Quote from: _Ziggy_ on August 18, 2011, 04:12:41 PM
I have tried this but it didn't work out:

Try "pcre-devel". Sorry, I don't have an RHEL/CentOS machine to check the exact name.

On RHEL and similar distributions, extensions are defined in /etc/php.d. That's probably why you don't see an "extensions" section. You could make an "apc.ini" file in /etc/php.d" with the extension lines. Check the other files in there for the syntax.

Honestly, if you're not quite sure of what you're doing, you shouldn't try manually installing APC. Use the version in EPEL or the REMI repository if you're using the distro-provided PHP. (Note: The REMI repository replaces a lot of core web packages. You might not want to use it if you're not comfortable with managing a server.)
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: