The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Php Error

Discussion in 'General Discussion' started by Rhode, Jun 23, 2003.

  1. Rhode

    Rhode Member

    Joined:
    Feb 10, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    PhpNuke when installed manually or with Cpanel gives the below error.
    This happens to all accounts on the server, so I know it is not an install error.
    Does anyone know the fix?

    Warning: main(mainfile.php) [function.main]: failed to create stream: No such file or directory in /home/domain/public_html/endowed/modules/News/index.php on line 20

    Fatal error: main() [function.main]: Failed opening required 'mainfile.php' (include_path='/usr/local/lib/php') in /home/domain/public_html/endowed/modules/News/index.php on line 20


    Thanks,
    Rhode :confused:

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  2. casey

    casey Well-Known Member

    Joined:
    Jan 17, 2003
    Messages:
    2,303
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    If there is trouble, it will find me
    Is there anything in the error logs? I had a problem like this and it was due to a certain module being called twice.

    cPanel.net Support Ticket Number:
     
  3. tekdns

    tekdns Well-Known Member

    Joined:
    Jun 9, 2002
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Yes, i have received same error message,

    Does anyone know the fix?

    cPanel.net Support Ticket Number:
     
  4. kcdworks

    kcdworks Well-Known Member

    Joined:
    Jul 28, 2002
    Messages:
    186
    Likes Received:
    0
    Trophy Points:
    16
    What is on line 20 of that index.php file?

    cPanel.net Support Ticket Number:
     
  5. Rhode

    Rhode Member

    Joined:
    Feb 10, 2003
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    The problem has been solved.
    The server's php.ini file had to be configured again.
     
    #5 Rhode, Jun 23, 2003
    Last edited: Jun 24, 2003
  6. tekdns

    tekdns Well-Known Member

    Joined:
    Jun 9, 2002
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    If other other person have this problem, that must be delete '/usr/local/lib/php' section in php.ini

    cPanel.net Support Ticket Number:
     
  7. toma1708

    toma1708 Active Member

    Joined:
    Aug 30, 2001
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    php.ini

    Hi,

    Modify in php.ini ( pico /usr/local/lib/php.ini) the value of include_path to:

    .:/usr/local/lib/php or .:/usr/local/lib/php:/usr/lib/php

    then restart apache.

    Best regards,

    Catalin

    cPanel.net Support Ticket Number:
     
  8. Brad

    Brad Well-Known Member

    Joined:
    Aug 16, 2001
    Messages:
    231
    Likes Received:
    0
    Trophy Points:
    16
    Same problems here, doing a scan at Google brings up thousands of others having the same problems ;)

    What section? Do you mean by deleting /usr/local/lib/php'

    the include_path ?

    I'm having same problems here and adding include_path = .:/usr/local/lib/php:/usr/lib/php does not work nor commenting out the section does anything after restarting Apache.


    cPanel.net Support Ticket Number:
     
  9. Brad

    Brad Well-Known Member

    Joined:
    Aug 16, 2001
    Messages:
    231
    Likes Received:
    0
    Trophy Points:
    16
    Well nothing seemed to clear the error, so I edited the php script itself, this was not phpnuke but a simple php script with includes.

    I just added a @ before any includes and it's now fine..


    If the include showed

    include "$archiveurl/footer.php";

    I changed to:

    @include "$archiveurl/footer.php";

    grrr... php updates are baffling!

    cPanel.net Support Ticket Number:
     
  10. Dill

    Dill Registered

    Joined:
    Jul 3, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi Brad,

    I had similar error and tried the "@" before includes. It works thanks.
    Is there another solution that you've found so I don't have to edit scripts?

    Thanks

    cPanel.net Support Ticket Number:
     
  11. norm

    norm Well-Known Member

    Joined:
    Apr 23, 2002
    Messages:
    53
    Likes Received:
    0
    Trophy Points:
    6
    1. Edit /usr/local/lib/php.ini
    2. Add the following entry and save:
    allow_url_fopen = 1;
    3. Restart apache

    cPanel.net Support Ticket Number:
     
  12. Dill

    Dill Registered

    Joined:
    Jul 3, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thanks,
    I tried your suggestion but it didn't work.
    PHP has been giving me trouble ever since I used "easyapache"
    on this new CPanel box. I'm fairly lost as to what to do. If I recompile Apache and PHP manually will that break CPanel's ability to add domains etc. ?

    cPanel.net Support Ticket Number:
     
  13. dysk

    dysk Well-Known Member

    Joined:
    Apr 22, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Hi-
    Compiling Apache manually shouldn't break cPanel's ability to work with apache as long as you follow cPanel's conventions for things like the location of apache and the suexec wrapper, also be sure to include all the modules that cPanel does.

    Regards,
    Erek Dyskant
    Unix Consultant

    cPanel.net Support Ticket Number:
     
  14. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Us too!! What bothers me is we are having include_path problem as well. All of a sudden, as of yesterday we had two users complaining about errors. One was a site running phpproject the other site on another server is running phpproject on another one of our servers. At the same time our DNS registration service is down due to a include_path problem.

    Nothing has been updated on our boxes since E19. Nothing has been compiled on the box. php has been untouched still at 4.3.1 yet all of a sudden the include_path in php.ini does not work. Why is that? Absolutely nothing has changed.

    Im getting the error as the origional poster.

    Warning: main() [function.main]: Failed opening 'templates/english/welcome.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/lib/php') in /home/primedns/public_html/welcome.php on line 94

    And we cannot modify welcome.php either because its ioncude encrypted!!


    cPanel.net Support Ticket Number:
     
    #14 sexy_guy, Jul 11, 2003
    Last edited: Jul 11, 2003
  15. carlgm

    carlgm Well-Known Member

    Joined:
    Mar 25, 2003
    Messages:
    103
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Do this

    /scripts/updatenow
    /scripts/updatephpconf

    cPanel.net Support Ticket Number:
     
  16. Dill

    Dill Registered

    Joined:
    Jul 3, 2003
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I updated to the latest Cpanel and updated with easyapache.
    After all that I still had the same includes path error.
    Then I had the brilliant idea to delete all my friggin cookies.
    And the error went away. WTF?
    I would suggest deleting cookies when doing browser refreshes :)

    cPanel.net Support Ticket Number:
     
  17. OneSizeFitsAll

    OneSizeFitsAll Well-Known Member

    Joined:
    Dec 19, 2002
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    6
    Could this line:
    allow_url_fopen = 1;
    be simply added (as needed) to an ".htaccess" file?
    Thanks!

    cPanel.net Support Ticket Number:
     
  18. mahinder

    mahinder Well-Known Member

    Joined:
    Jun 12, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    matrix
    this does not work, i have tried it many times.

    cPanel.net Support Ticket Number:
     
  19. mahinder

    mahinder Well-Known Member

    Joined:
    Jun 12, 2003
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    matrix
    i tried many things but the error doesn't seems to go away, there isn't much help available on internet regarding this error.

    but when i recompiled php to 4.2.3 the problem went away so i am sure something is wrong with 4.3.2 configuration.

    also is 4.2.3 php buggy ?

    cPanel.net Support Ticket Number:
     
  20. pingo

    pingo Well-Known Member

    Joined:
    Nov 16, 2002
    Messages:
    430
    Likes Received:
    0
    Trophy Points:
    16
    Thanks norm :) that fixed my problem.

    John

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page