In unknown on line 0

I installed apache2 and php 5.4.5.

When you start apache this error:

PHP Warning: PHP Startup: in Unknown on line 0

The extension does not work:

Extensin dir: extension_dir = "C :/ dev/prog/php5/ext /"

ssleay32.dll php5ts.dll and is copied to C: WINDOWS system32

Please simple instructions.

10 Answers 10

upgrade those modules using pecl command

Also, Check extension_dir directive in php.ini

I had the same problem. The issue is, that these lines are by default in php.ini

I assumed, that only an uncomment of the second line and Apache restart solves this problem. But it isn’t!

I had to type a full path to the ext folder, such as below:

After this action, and restart of the Apache web server, the problem was solved.

You should check you php.ini file to make sure the extension_dir is exactly set. I had the same problem when i enable these five extensions:

The number of warnings is the same as the extensions that enabled. So i guess may be there is sth. wrong with the extension setting. When i change the extension_dir directive to the right dir, the problem resolved.

I found this answer in this post on the wampserver forums, and it worked for me:

Click on the Apache version that you use in the WAMPServer menu, e.g.

wampmanager -> Apache -> Version -> 2.4.9 ( just click on the version number on this menu item )

this will rebuild the SYMLINKS for the extensions that are causing the "in Unknown on line 0" error.

The answer was given by RiggsFolly in this thread: http://forum.wampserver.com/read.php?2,128734

I had the same problem when I enabled extensions (see Error when enabling PHP extensions).

I resolved it adding the PHP folder to the path and restarting the computer.

  1. You need to download and install Aspell for Windows “GNU Aspell-0.50.3 (win32)”.

Your Dictionaries are also here. Aspell needs at least one Dictionary to operate.

Aspell should copy the “aspell-15.dll” to the “Windows/System32” directory which the php entension php_pspell.dll requires and looks for to execute. If not then locate aspell-15.dll in C:/Program Files/Aspell/bin/aspell-15.dll and copy it to C:/Windows/System 32/aspell-15.dll

You only need now to uncomment this line in: xampp/apache/bin/php.ini ;extension=php_pspell.dll to this: extension=php_pspell.dll

Restart Apache. (If Apache won’t start paste the error message here).

On Mac OSX Mavericks using homebrew php55 whenever I run a a php command I get the following error message (everything runs fine it’s just annoying)

and the output was

Checked in the php.ini file and the only place intl is loaded is at the top and it’s commented out. The other files contents look something like:

where the contents after the last slash is the extension.

I’m not sure where else to look.

Any help is appreciated

11 Answers 11

I think you have loaded Xdebug probably twice in php.ini .

check the php.ini , that you not have xdebug.so for the values extension= and zend_extension= .

Check also /etc/php5/apache2 and /etc/php5/cli/ . You should not load in each php.ini in this directories the extension xdebug.so . Only one file php.ini should load it.

I had the same issue on mac i.e. Warning: Module ‘pdo_pgsql’ already loaded in Unknown on line 0 . Here’s how I solved it.

  • Locate the folder conf.d , mine was in the directory /usr/local/etc/php/7.0/conf.d .
  • In this folder, there’s a file called ext-pdo_pgsql.ini .
  • Type sudo nano ext-pdo_pgsql.ini to edit it.
  • There should be a line extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so" . Comment it out by adding semi-colon to the beginning of the line i.e. ;extension="/usr/local/opt/php70-pdo-pgsql/pdo_pgsql.so" .
  • Save the file. (I usually run control + O, control + M).
  • Exit the file (control + X).

Hope this helps someone.

You should have a /etc/php2/conf.d directory (At least on Ubuntu I do) containing a bunch of .ini files which all get loaded when php runs. These files can contain duplicate settings that conflict with settings in php.ini . In my PHP installation I notice a file conf.d/20-intl.ini with an extension=intl.so setting. I bet that’s your conflict.

To fix this problem, you must edit your php.ini (or extensions.ini) file and comment-out the extensions that are already compiled-in. For example, after editing, your ini file may look like the lines below:

In my case I had uncoment the ;extension=php_curl.so in php.ini, but Ubuntu was already calling this extension somewhere else.

To find this "somewhere else", on php.ini will informe. On my case: /etc/php/7.1/apache2/conf.d/20-curl.ini was the path.

So now we edit this file (terminal):

Comment the ;extension=php_curl.so

Save file and restart apache:

I had the same issue after upgrading from Fedora Server 24 (PHP 5) to 25 (PHP 7). After investigation, I found that /etc/php.d/ had two different .ini files loading extension=geoip.so .

Previous version of distros had this file named 50-geoip.ini but the recent was changed to 40-geoip.ini , and I suspect that in the version-upgrade process the old hasn’t been removed, while the new one has been created.

That was the actual case of the issue. After removing stray 50-geoip.ini from /etc/php.d/ and restarting httpd it just worked flawlessly.

I deleted the 20-mongo.ini file in /etc/php5/cli/conf.d and this solved the problem.

There are two "php_intl.dll" files inside php.ini file on 872 and 968 number lines. if php warning module ‘intl’ already loaded in unknown on line 0 this message is focused on your CLI. Then you should have to remove the semiclone prefixes on line 872. I expect this will done.

Just for the record as it might help others who are on shared hosting (cPanel).

I had error on shared hosting php7.2: Module ‘imagick’ already loaded in Unknown on line 0

In the beginning hosting provider said it was my bad configuration (running Yii2.16). But after I showed them, that all Internet related this issue to server configuration -they started to listen to me. After I proved, that there was no error on php7.1 they started to search for the error.

As they told to me — the error was due to configuration in PERL modules or PEAR package, but they did not told me the real issue.

So, if you are on shared hosting — talk to you provider and experiment with PHP versions (if you can change them).

Загуглил вместо тебя и нашел решение проблемы за 4 секунды:

Проблема не в движке OpenCart, а настройках php.ini. Пропиши если можешь это вручную, или обратись в поддержку чтобы прописали:

Обычно это означает, что ошибка в самом интерпретаторе PHP или в Extention’ах.

Найти ошибку не так то просто. Этому посвящены целые статьи на хабре.
Попробуйте вспомнить, после чего она начала появляться.
Вообще, ошибка может быть совсем глупой.

Оцените статью
Много толка
Добавить комментарий